diff --git a/.gitlab/merge_request_templates/.gitkeep b/.gitlab/merge_request_templates/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/.gitlab/merge_request_templates/mergechecklist.md b/.gitlab/merge_request_templates/mergechecklist.md deleted file mode 100644 index 6a64303c38..0000000000 --- a/.gitlab/merge_request_templates/mergechecklist.md +++ /dev/null @@ -1 +0,0 @@ -AAAAA \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/exception/NoSuchApiManagerException.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/exception/NoSuchApiManagerException.java new file mode 100644 index 0000000000..101adad988 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/exception/NoSuchApiManagerException.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +package org.opencps.adminconfig.exception; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.exception.NoSuchModelException; + +/** + * @author binhth + */ +@ProviderType +public class NoSuchApiManagerException extends NoSuchModelException { + + public NoSuchApiManagerException() { + } + + public NoSuchApiManagerException(String msg) { + super(msg); + } + + public NoSuchApiManagerException(String msg, Throwable cause) { + super(msg, cause); + } + + public NoSuchApiManagerException(Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/exception/NoSuchApiRoleException.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/exception/NoSuchApiRoleException.java new file mode 100644 index 0000000000..1b7af5663a --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/exception/NoSuchApiRoleException.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +package org.opencps.adminconfig.exception; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.exception.NoSuchModelException; + +/** + * @author binhth + */ +@ProviderType +public class NoSuchApiRoleException extends NoSuchModelException { + + public NoSuchApiRoleException() { + } + + public NoSuchApiRoleException(String msg) { + super(msg); + } + + public NoSuchApiRoleException(String msg, Throwable cause) { + super(msg, cause); + } + + public NoSuchApiRoleException(Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/exception/NoSuchSyncTrackingException.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/exception/NoSuchSyncTrackingException.java new file mode 100644 index 0000000000..4847bcb587 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/exception/NoSuchSyncTrackingException.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +package org.opencps.adminconfig.exception; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.exception.NoSuchModelException; + +/** + * @author binhth + */ +@ProviderType +public class NoSuchSyncTrackingException extends NoSuchModelException { + + public NoSuchSyncTrackingException() { + } + + public NoSuchSyncTrackingException(String msg) { + super(msg); + } + + public NoSuchSyncTrackingException(String msg, Throwable cause) { + super(msg, cause); + } + + public NoSuchSyncTrackingException(Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiManager.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiManager.java new file mode 100644 index 0000000000..56950c0665 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiManager.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.annotation.ImplementationClassName; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.util.Accessor; + +/** + * The extended model interface for the ApiManager service. Represents a row in the "opencps_api_manager" database table, with each column mapped to a property of this class. + * + * @author binhth + * @see ApiManagerModel + * @see org.opencps.adminconfig.model.impl.ApiManagerImpl + * @see org.opencps.adminconfig.model.impl.ApiManagerModelImpl + * @generated + */ +@ImplementationClassName("org.opencps.adminconfig.model.impl.ApiManagerImpl") +@ProviderType +public interface ApiManager extends ApiManagerModel, PersistedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this interface directly. Add methods to {@link org.opencps.adminconfig.model.impl.ApiManagerImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + public static final Accessor API_MANAGER_ID_ACCESSOR = new Accessor() { + @Override + public Long get(ApiManager apiManager) { + return apiManager.getApiManagerId(); + } + + @Override + public Class getAttributeClass() { + return Long.class; + } + + @Override + public Class getTypeClass() { + return ApiManager.class; + } + }; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiManagerModel.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiManagerModel.java new file mode 100644 index 0000000000..4323a628cf --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiManagerModel.java @@ -0,0 +1,279 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; + +import com.liferay.portal.kernel.bean.AutoEscape; +import com.liferay.portal.kernel.model.BaseModel; +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.service.ServiceContext; + +import java.io.Serializable; + +import java.util.Date; + +/** + * The base model interface for the ApiManager service. Represents a row in the "opencps_api_manager" database table, with each column mapped to a property of this class. + * + *

+ * This interface and its corresponding implementation {@link org.opencps.adminconfig.model.impl.ApiManagerModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link org.opencps.adminconfig.model.impl.ApiManagerImpl}. + *

+ * + * @author binhth + * @see ApiManager + * @see org.opencps.adminconfig.model.impl.ApiManagerImpl + * @see org.opencps.adminconfig.model.impl.ApiManagerModelImpl + * @generated + */ +@ProviderType +public interface ApiManagerModel extends BaseModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. All methods that expect a api manager model instance should use the {@link ApiManager} interface instead. + */ + + /** + * Returns the primary key of this api manager. + * + * @return the primary key of this api manager + */ + public long getPrimaryKey(); + + /** + * Sets the primary key of this api manager. + * + * @param primaryKey the primary key of this api manager + */ + public void setPrimaryKey(long primaryKey); + + /** + * Returns the api manager ID of this api manager. + * + * @return the api manager ID of this api manager + */ + public long getApiManagerId(); + + /** + * Sets the api manager ID of this api manager. + * + * @param apiManagerId the api manager ID of this api manager + */ + public void setApiManagerId(long apiManagerId); + + /** + * Returns the group ID of this api manager. + * + * @return the group ID of this api manager + */ + public long getGroupId(); + + /** + * Sets the group ID of this api manager. + * + * @param groupId the group ID of this api manager + */ + public void setGroupId(long groupId); + + /** + * Returns the api code of this api manager. + * + * @return the api code of this api manager + */ + @AutoEscape + public String getApiCode(); + + /** + * Sets the api code of this api manager. + * + * @param apiCode the api code of this api manager + */ + public void setApiCode(String apiCode); + + /** + * Returns the create date of this api manager. + * + * @return the create date of this api manager + */ + public Date getCreateDate(); + + /** + * Sets the create date of this api manager. + * + * @param createDate the create date of this api manager + */ + public void setCreateDate(Date createDate); + + /** + * Returns the modified date of this api manager. + * + * @return the modified date of this api manager + */ + public Date getModifiedDate(); + + /** + * Sets the modified date of this api manager. + * + * @param modifiedDate the modified date of this api manager + */ + public void setModifiedDate(Date modifiedDate); + + /** + * Returns the user ID of this api manager. + * + * @return the user ID of this api manager + */ + public long getUserId(); + + /** + * Sets the user ID of this api manager. + * + * @param userId the user ID of this api manager + */ + public void setUserId(long userId); + + /** + * Returns the user uuid of this api manager. + * + * @return the user uuid of this api manager + */ + public String getUserUuid(); + + /** + * Sets the user uuid of this api manager. + * + * @param userUuid the user uuid of this api manager + */ + public void setUserUuid(String userUuid); + + /** + * Returns the api name of this api manager. + * + * @return the api name of this api manager + */ + @AutoEscape + public String getApiName(); + + /** + * Sets the api name of this api manager. + * + * @param apiName the api name of this api manager + */ + public void setApiName(String apiName); + + /** + * Returns the api description of this api manager. + * + * @return the api description of this api manager + */ + @AutoEscape + public String getApiDescription(); + + /** + * Sets the api description of this api manager. + * + * @param apiDescription the api description of this api manager + */ + public void setApiDescription(String apiDescription); + + /** + * Returns the api status of this api manager. + * + * @return the api status of this api manager + */ + public int getApiStatus(); + + /** + * Sets the api status of this api manager. + * + * @param apiStatus the api status of this api manager + */ + public void setApiStatus(int apiStatus); + + /** + * Returns the class name of this api manager. + * + * @return the class name of this api manager + */ + @AutoEscape + public String getClassName(); + + /** + * Sets the class name of this api manager. + * + * @param className the class name of this api manager + */ + public void setClassName(String className); + + @Override + public boolean isNew(); + + @Override + public void setNew(boolean n); + + @Override + public boolean isCachedModel(); + + @Override + public void setCachedModel(boolean cachedModel); + + @Override + public boolean isEscapedModel(); + + @Override + public Serializable getPrimaryKeyObj(); + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj); + + @Override + public ExpandoBridge getExpandoBridge(); + + @Override + public void setExpandoBridgeAttributes(BaseModel baseModel); + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge); + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext); + + @Override + public Object clone(); + + @Override + public int compareTo(ApiManager apiManager); + + @Override + public int hashCode(); + + @Override + public CacheModel toCacheModel(); + + @Override + public ApiManager toEscapedModel(); + + @Override + public ApiManager toUnescapedModel(); + + @Override + public String toString(); + + @Override + public String toXmlString(); +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiManagerSoap.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiManagerSoap.java new file mode 100644 index 0000000000..1802d62fbe --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiManagerSoap.java @@ -0,0 +1,188 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model; + +import aQute.bnd.annotation.ProviderType; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * This class is used by SOAP remote services. + * + * @author binhth + * @generated + */ +@ProviderType +public class ApiManagerSoap implements Serializable { + public static ApiManagerSoap toSoapModel(ApiManager model) { + ApiManagerSoap soapModel = new ApiManagerSoap(); + + soapModel.setApiManagerId(model.getApiManagerId()); + soapModel.setGroupId(model.getGroupId()); + soapModel.setApiCode(model.getApiCode()); + soapModel.setCreateDate(model.getCreateDate()); + soapModel.setModifiedDate(model.getModifiedDate()); + soapModel.setUserId(model.getUserId()); + soapModel.setApiName(model.getApiName()); + soapModel.setApiDescription(model.getApiDescription()); + soapModel.setApiStatus(model.getApiStatus()); + soapModel.setClassName(model.getClassName()); + + return soapModel; + } + + public static ApiManagerSoap[] toSoapModels(ApiManager[] models) { + ApiManagerSoap[] soapModels = new ApiManagerSoap[models.length]; + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModel(models[i]); + } + + return soapModels; + } + + public static ApiManagerSoap[][] toSoapModels(ApiManager[][] models) { + ApiManagerSoap[][] soapModels = null; + + if (models.length > 0) { + soapModels = new ApiManagerSoap[models.length][models[0].length]; + } + else { + soapModels = new ApiManagerSoap[0][0]; + } + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModels(models[i]); + } + + return soapModels; + } + + public static ApiManagerSoap[] toSoapModels(List models) { + List soapModels = new ArrayList(models.size()); + + for (ApiManager model : models) { + soapModels.add(toSoapModel(model)); + } + + return soapModels.toArray(new ApiManagerSoap[soapModels.size()]); + } + + public ApiManagerSoap() { + } + + public long getPrimaryKey() { + return _apiManagerId; + } + + public void setPrimaryKey(long pk) { + setApiManagerId(pk); + } + + public long getApiManagerId() { + return _apiManagerId; + } + + public void setApiManagerId(long apiManagerId) { + _apiManagerId = apiManagerId; + } + + public long getGroupId() { + return _groupId; + } + + public void setGroupId(long groupId) { + _groupId = groupId; + } + + public String getApiCode() { + return _apiCode; + } + + public void setApiCode(String apiCode) { + _apiCode = apiCode; + } + + public Date getCreateDate() { + return _createDate; + } + + public void setCreateDate(Date createDate) { + _createDate = createDate; + } + + public Date getModifiedDate() { + return _modifiedDate; + } + + public void setModifiedDate(Date modifiedDate) { + _modifiedDate = modifiedDate; + } + + public long getUserId() { + return _userId; + } + + public void setUserId(long userId) { + _userId = userId; + } + + public String getApiName() { + return _apiName; + } + + public void setApiName(String apiName) { + _apiName = apiName; + } + + public String getApiDescription() { + return _apiDescription; + } + + public void setApiDescription(String apiDescription) { + _apiDescription = apiDescription; + } + + public int getApiStatus() { + return _apiStatus; + } + + public void setApiStatus(int apiStatus) { + _apiStatus = apiStatus; + } + + public String getClassName() { + return _className; + } + + public void setClassName(String className) { + _className = className; + } + + private long _apiManagerId; + private long _groupId; + private String _apiCode; + private Date _createDate; + private Date _modifiedDate; + private long _userId; + private String _apiName; + private String _apiDescription; + private int _apiStatus; + private String _className; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiManagerWrapper.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiManagerWrapper.java new file mode 100644 index 0000000000..0f65953111 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiManagerWrapper.java @@ -0,0 +1,518 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; + +import com.liferay.portal.kernel.model.ModelWrapper; +import com.liferay.portal.kernel.service.ServiceContext; + +import java.io.Serializable; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + *

+ * This class is a wrapper for {@link ApiManager}. + *

+ * + * @author binhth + * @see ApiManager + * @generated + */ +@ProviderType +public class ApiManagerWrapper implements ApiManager, ModelWrapper { + public ApiManagerWrapper(ApiManager apiManager) { + _apiManager = apiManager; + } + + @Override + public Class getModelClass() { + return ApiManager.class; + } + + @Override + public String getModelClassName() { + return ApiManager.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("apiManagerId", getApiManagerId()); + attributes.put("groupId", getGroupId()); + attributes.put("apiCode", getApiCode()); + attributes.put("createDate", getCreateDate()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("userId", getUserId()); + attributes.put("apiName", getApiName()); + attributes.put("apiDescription", getApiDescription()); + attributes.put("apiStatus", getApiStatus()); + attributes.put("className", getClassName()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + Long apiManagerId = (Long)attributes.get("apiManagerId"); + + if (apiManagerId != null) { + setApiManagerId(apiManagerId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + String apiCode = (String)attributes.get("apiCode"); + + if (apiCode != null) { + setApiCode(apiCode); + } + + Date createDate = (Date)attributes.get("createDate"); + + if (createDate != null) { + setCreateDate(createDate); + } + + Date modifiedDate = (Date)attributes.get("modifiedDate"); + + if (modifiedDate != null) { + setModifiedDate(modifiedDate); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String apiName = (String)attributes.get("apiName"); + + if (apiName != null) { + setApiName(apiName); + } + + String apiDescription = (String)attributes.get("apiDescription"); + + if (apiDescription != null) { + setApiDescription(apiDescription); + } + + Integer apiStatus = (Integer)attributes.get("apiStatus"); + + if (apiStatus != null) { + setApiStatus(apiStatus); + } + + String className = (String)attributes.get("className"); + + if (className != null) { + setClassName(className); + } + } + + @Override + public Object clone() { + return new ApiManagerWrapper((ApiManager)_apiManager.clone()); + } + + @Override + public int compareTo(ApiManager apiManager) { + return _apiManager.compareTo(apiManager); + } + + /** + * Returns the api code of this api manager. + * + * @return the api code of this api manager + */ + @Override + public String getApiCode() { + return _apiManager.getApiCode(); + } + + /** + * Returns the api description of this api manager. + * + * @return the api description of this api manager + */ + @Override + public String getApiDescription() { + return _apiManager.getApiDescription(); + } + + /** + * Returns the api manager ID of this api manager. + * + * @return the api manager ID of this api manager + */ + @Override + public long getApiManagerId() { + return _apiManager.getApiManagerId(); + } + + /** + * Returns the api name of this api manager. + * + * @return the api name of this api manager + */ + @Override + public String getApiName() { + return _apiManager.getApiName(); + } + + /** + * Returns the api status of this api manager. + * + * @return the api status of this api manager + */ + @Override + public int getApiStatus() { + return _apiManager.getApiStatus(); + } + + /** + * Returns the class name of this api manager. + * + * @return the class name of this api manager + */ + @Override + public String getClassName() { + return _apiManager.getClassName(); + } + + /** + * Returns the create date of this api manager. + * + * @return the create date of this api manager + */ + @Override + public Date getCreateDate() { + return _apiManager.getCreateDate(); + } + + @Override + public ExpandoBridge getExpandoBridge() { + return _apiManager.getExpandoBridge(); + } + + /** + * Returns the group ID of this api manager. + * + * @return the group ID of this api manager + */ + @Override + public long getGroupId() { + return _apiManager.getGroupId(); + } + + /** + * Returns the modified date of this api manager. + * + * @return the modified date of this api manager + */ + @Override + public Date getModifiedDate() { + return _apiManager.getModifiedDate(); + } + + /** + * Returns the primary key of this api manager. + * + * @return the primary key of this api manager + */ + @Override + public long getPrimaryKey() { + return _apiManager.getPrimaryKey(); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _apiManager.getPrimaryKeyObj(); + } + + /** + * Returns the user ID of this api manager. + * + * @return the user ID of this api manager + */ + @Override + public long getUserId() { + return _apiManager.getUserId(); + } + + /** + * Returns the user uuid of this api manager. + * + * @return the user uuid of this api manager + */ + @Override + public String getUserUuid() { + return _apiManager.getUserUuid(); + } + + @Override + public int hashCode() { + return _apiManager.hashCode(); + } + + @Override + public boolean isCachedModel() { + return _apiManager.isCachedModel(); + } + + @Override + public boolean isEscapedModel() { + return _apiManager.isEscapedModel(); + } + + @Override + public boolean isNew() { + return _apiManager.isNew(); + } + + @Override + public void persist() { + _apiManager.persist(); + } + + /** + * Sets the api code of this api manager. + * + * @param apiCode the api code of this api manager + */ + @Override + public void setApiCode(String apiCode) { + _apiManager.setApiCode(apiCode); + } + + /** + * Sets the api description of this api manager. + * + * @param apiDescription the api description of this api manager + */ + @Override + public void setApiDescription(String apiDescription) { + _apiManager.setApiDescription(apiDescription); + } + + /** + * Sets the api manager ID of this api manager. + * + * @param apiManagerId the api manager ID of this api manager + */ + @Override + public void setApiManagerId(long apiManagerId) { + _apiManager.setApiManagerId(apiManagerId); + } + + /** + * Sets the api name of this api manager. + * + * @param apiName the api name of this api manager + */ + @Override + public void setApiName(String apiName) { + _apiManager.setApiName(apiName); + } + + /** + * Sets the api status of this api manager. + * + * @param apiStatus the api status of this api manager + */ + @Override + public void setApiStatus(int apiStatus) { + _apiManager.setApiStatus(apiStatus); + } + + @Override + public void setCachedModel(boolean cachedModel) { + _apiManager.setCachedModel(cachedModel); + } + + /** + * Sets the class name of this api manager. + * + * @param className the class name of this api manager + */ + @Override + public void setClassName(String className) { + _apiManager.setClassName(className); + } + + /** + * Sets the create date of this api manager. + * + * @param createDate the create date of this api manager + */ + @Override + public void setCreateDate(Date createDate) { + _apiManager.setCreateDate(createDate); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.kernel.model.BaseModel baseModel) { + _apiManager.setExpandoBridgeAttributes(baseModel); + } + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) { + _apiManager.setExpandoBridgeAttributes(expandoBridge); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + _apiManager.setExpandoBridgeAttributes(serviceContext); + } + + /** + * Sets the group ID of this api manager. + * + * @param groupId the group ID of this api manager + */ + @Override + public void setGroupId(long groupId) { + _apiManager.setGroupId(groupId); + } + + /** + * Sets the modified date of this api manager. + * + * @param modifiedDate the modified date of this api manager + */ + @Override + public void setModifiedDate(Date modifiedDate) { + _apiManager.setModifiedDate(modifiedDate); + } + + @Override + public void setNew(boolean n) { + _apiManager.setNew(n); + } + + /** + * Sets the primary key of this api manager. + * + * @param primaryKey the primary key of this api manager + */ + @Override + public void setPrimaryKey(long primaryKey) { + _apiManager.setPrimaryKey(primaryKey); + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + _apiManager.setPrimaryKeyObj(primaryKeyObj); + } + + /** + * Sets the user ID of this api manager. + * + * @param userId the user ID of this api manager + */ + @Override + public void setUserId(long userId) { + _apiManager.setUserId(userId); + } + + /** + * Sets the user uuid of this api manager. + * + * @param userUuid the user uuid of this api manager + */ + @Override + public void setUserUuid(String userUuid) { + _apiManager.setUserUuid(userUuid); + } + + @Override + public com.liferay.portal.kernel.model.CacheModel toCacheModel() { + return _apiManager.toCacheModel(); + } + + @Override + public ApiManager toEscapedModel() { + return new ApiManagerWrapper(_apiManager.toEscapedModel()); + } + + @Override + public String toString() { + return _apiManager.toString(); + } + + @Override + public ApiManager toUnescapedModel() { + return new ApiManagerWrapper(_apiManager.toUnescapedModel()); + } + + @Override + public String toXmlString() { + return _apiManager.toXmlString(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof ApiManagerWrapper)) { + return false; + } + + ApiManagerWrapper apiManagerWrapper = (ApiManagerWrapper)obj; + + if (Objects.equals(_apiManager, apiManagerWrapper._apiManager)) { + return true; + } + + return false; + } + + @Override + public ApiManager getWrappedModel() { + return _apiManager; + } + + @Override + public boolean isEntityCacheEnabled() { + return _apiManager.isEntityCacheEnabled(); + } + + @Override + public boolean isFinderCacheEnabled() { + return _apiManager.isFinderCacheEnabled(); + } + + @Override + public void resetOriginalValues() { + _apiManager.resetOriginalValues(); + } + + private final ApiManager _apiManager; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiRole.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiRole.java new file mode 100644 index 0000000000..a8b0ea4e5f --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiRole.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.annotation.ImplementationClassName; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.util.Accessor; + +/** + * The extended model interface for the ApiRole service. Represents a row in the "opencps_api_role" database table, with each column mapped to a property of this class. + * + * @author binhth + * @see ApiRoleModel + * @see org.opencps.adminconfig.model.impl.ApiRoleImpl + * @see org.opencps.adminconfig.model.impl.ApiRoleModelImpl + * @generated + */ +@ImplementationClassName("org.opencps.adminconfig.model.impl.ApiRoleImpl") +@ProviderType +public interface ApiRole extends ApiRoleModel, PersistedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this interface directly. Add methods to {@link org.opencps.adminconfig.model.impl.ApiRoleImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + public static final Accessor API_ROLE_ID_ACCESSOR = new Accessor() { + @Override + public Long get(ApiRole apiRole) { + return apiRole.getApiRoleId(); + } + + @Override + public Class getAttributeClass() { + return Long.class; + } + + @Override + public Class getTypeClass() { + return ApiRole.class; + } + }; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiRoleModel.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiRoleModel.java new file mode 100644 index 0000000000..02711d71fa --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiRoleModel.java @@ -0,0 +1,263 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; + +import com.liferay.portal.kernel.bean.AutoEscape; +import com.liferay.portal.kernel.model.BaseModel; +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.service.ServiceContext; + +import java.io.Serializable; + +import java.util.Date; + +/** + * The base model interface for the ApiRole service. Represents a row in the "opencps_api_role" database table, with each column mapped to a property of this class. + * + *

+ * This interface and its corresponding implementation {@link org.opencps.adminconfig.model.impl.ApiRoleModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link org.opencps.adminconfig.model.impl.ApiRoleImpl}. + *

+ * + * @author binhth + * @see ApiRole + * @see org.opencps.adminconfig.model.impl.ApiRoleImpl + * @see org.opencps.adminconfig.model.impl.ApiRoleModelImpl + * @generated + */ +@ProviderType +public interface ApiRoleModel extends BaseModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. All methods that expect a api role model instance should use the {@link ApiRole} interface instead. + */ + + /** + * Returns the primary key of this api role. + * + * @return the primary key of this api role + */ + public long getPrimaryKey(); + + /** + * Sets the primary key of this api role. + * + * @param primaryKey the primary key of this api role + */ + public void setPrimaryKey(long primaryKey); + + /** + * Returns the api role ID of this api role. + * + * @return the api role ID of this api role + */ + public long getApiRoleId(); + + /** + * Sets the api role ID of this api role. + * + * @param apiRoleId the api role ID of this api role + */ + public void setApiRoleId(long apiRoleId); + + /** + * Returns the group ID of this api role. + * + * @return the group ID of this api role + */ + public long getGroupId(); + + /** + * Sets the group ID of this api role. + * + * @param groupId the group ID of this api role + */ + public void setGroupId(long groupId); + + /** + * Returns the create date of this api role. + * + * @return the create date of this api role + */ + public Date getCreateDate(); + + /** + * Sets the create date of this api role. + * + * @param createDate the create date of this api role + */ + public void setCreateDate(Date createDate); + + /** + * Returns the modified date of this api role. + * + * @return the modified date of this api role + */ + public Date getModifiedDate(); + + /** + * Sets the modified date of this api role. + * + * @param modifiedDate the modified date of this api role + */ + public void setModifiedDate(Date modifiedDate); + + /** + * Returns the user ID of this api role. + * + * @return the user ID of this api role + */ + public long getUserId(); + + /** + * Sets the user ID of this api role. + * + * @param userId the user ID of this api role + */ + public void setUserId(long userId); + + /** + * Returns the user uuid of this api role. + * + * @return the user uuid of this api role + */ + public String getUserUuid(); + + /** + * Sets the user uuid of this api role. + * + * @param userUuid the user uuid of this api role + */ + public void setUserUuid(String userUuid); + + /** + * Returns the api code of this api role. + * + * @return the api code of this api role + */ + @AutoEscape + public String getApiCode(); + + /** + * Sets the api code of this api role. + * + * @param apiCode the api code of this api role + */ + public void setApiCode(String apiCode); + + /** + * Returns the role ID of this api role. + * + * @return the role ID of this api role + */ + public int getRoleId(); + + /** + * Sets the role ID of this api role. + * + * @param roleId the role ID of this api role + */ + public void setRoleId(int roleId); + + /** + * Returns the role code of this api role. + * + * @return the role code of this api role + */ + @AutoEscape + public String getRoleCode(); + + /** + * Sets the role code of this api role. + * + * @param roleCode the role code of this api role + */ + public void setRoleCode(String roleCode); + + /** + * Returns the api role status of this api role. + * + * @return the api role status of this api role + */ + public int getApiRoleStatus(); + + /** + * Sets the api role status of this api role. + * + * @param apiRoleStatus the api role status of this api role + */ + public void setApiRoleStatus(int apiRoleStatus); + + @Override + public boolean isNew(); + + @Override + public void setNew(boolean n); + + @Override + public boolean isCachedModel(); + + @Override + public void setCachedModel(boolean cachedModel); + + @Override + public boolean isEscapedModel(); + + @Override + public Serializable getPrimaryKeyObj(); + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj); + + @Override + public ExpandoBridge getExpandoBridge(); + + @Override + public void setExpandoBridgeAttributes(BaseModel baseModel); + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge); + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext); + + @Override + public Object clone(); + + @Override + public int compareTo(ApiRole apiRole); + + @Override + public int hashCode(); + + @Override + public CacheModel toCacheModel(); + + @Override + public ApiRole toEscapedModel(); + + @Override + public ApiRole toUnescapedModel(); + + @Override + public String toString(); + + @Override + public String toXmlString(); +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiRoleSoap.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiRoleSoap.java new file mode 100644 index 0000000000..4869521956 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiRoleSoap.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model; + +import aQute.bnd.annotation.ProviderType; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * This class is used by SOAP remote services. + * + * @author binhth + * @generated + */ +@ProviderType +public class ApiRoleSoap implements Serializable { + public static ApiRoleSoap toSoapModel(ApiRole model) { + ApiRoleSoap soapModel = new ApiRoleSoap(); + + soapModel.setApiRoleId(model.getApiRoleId()); + soapModel.setGroupId(model.getGroupId()); + soapModel.setCreateDate(model.getCreateDate()); + soapModel.setModifiedDate(model.getModifiedDate()); + soapModel.setUserId(model.getUserId()); + soapModel.setApiCode(model.getApiCode()); + soapModel.setRoleId(model.getRoleId()); + soapModel.setRoleCode(model.getRoleCode()); + soapModel.setApiRoleStatus(model.getApiRoleStatus()); + + return soapModel; + } + + public static ApiRoleSoap[] toSoapModels(ApiRole[] models) { + ApiRoleSoap[] soapModels = new ApiRoleSoap[models.length]; + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModel(models[i]); + } + + return soapModels; + } + + public static ApiRoleSoap[][] toSoapModels(ApiRole[][] models) { + ApiRoleSoap[][] soapModels = null; + + if (models.length > 0) { + soapModels = new ApiRoleSoap[models.length][models[0].length]; + } + else { + soapModels = new ApiRoleSoap[0][0]; + } + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModels(models[i]); + } + + return soapModels; + } + + public static ApiRoleSoap[] toSoapModels(List models) { + List soapModels = new ArrayList(models.size()); + + for (ApiRole model : models) { + soapModels.add(toSoapModel(model)); + } + + return soapModels.toArray(new ApiRoleSoap[soapModels.size()]); + } + + public ApiRoleSoap() { + } + + public long getPrimaryKey() { + return _apiRoleId; + } + + public void setPrimaryKey(long pk) { + setApiRoleId(pk); + } + + public long getApiRoleId() { + return _apiRoleId; + } + + public void setApiRoleId(long apiRoleId) { + _apiRoleId = apiRoleId; + } + + public long getGroupId() { + return _groupId; + } + + public void setGroupId(long groupId) { + _groupId = groupId; + } + + public Date getCreateDate() { + return _createDate; + } + + public void setCreateDate(Date createDate) { + _createDate = createDate; + } + + public Date getModifiedDate() { + return _modifiedDate; + } + + public void setModifiedDate(Date modifiedDate) { + _modifiedDate = modifiedDate; + } + + public long getUserId() { + return _userId; + } + + public void setUserId(long userId) { + _userId = userId; + } + + public String getApiCode() { + return _apiCode; + } + + public void setApiCode(String apiCode) { + _apiCode = apiCode; + } + + public int getRoleId() { + return _roleId; + } + + public void setRoleId(int roleId) { + _roleId = roleId; + } + + public String getRoleCode() { + return _roleCode; + } + + public void setRoleCode(String roleCode) { + _roleCode = roleCode; + } + + public int getApiRoleStatus() { + return _apiRoleStatus; + } + + public void setApiRoleStatus(int apiRoleStatus) { + _apiRoleStatus = apiRoleStatus; + } + + private long _apiRoleId; + private long _groupId; + private Date _createDate; + private Date _modifiedDate; + private long _userId; + private String _apiCode; + private int _roleId; + private String _roleCode; + private int _apiRoleStatus; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiRoleWrapper.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiRoleWrapper.java new file mode 100644 index 0000000000..e5d4cde5e3 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/ApiRoleWrapper.java @@ -0,0 +1,491 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; + +import com.liferay.portal.kernel.model.ModelWrapper; +import com.liferay.portal.kernel.service.ServiceContext; + +import java.io.Serializable; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + *

+ * This class is a wrapper for {@link ApiRole}. + *

+ * + * @author binhth + * @see ApiRole + * @generated + */ +@ProviderType +public class ApiRoleWrapper implements ApiRole, ModelWrapper { + public ApiRoleWrapper(ApiRole apiRole) { + _apiRole = apiRole; + } + + @Override + public Class getModelClass() { + return ApiRole.class; + } + + @Override + public String getModelClassName() { + return ApiRole.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("apiRoleId", getApiRoleId()); + attributes.put("groupId", getGroupId()); + attributes.put("createDate", getCreateDate()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("userId", getUserId()); + attributes.put("apiCode", getApiCode()); + attributes.put("roleId", getRoleId()); + attributes.put("roleCode", getRoleCode()); + attributes.put("apiRoleStatus", getApiRoleStatus()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + Long apiRoleId = (Long)attributes.get("apiRoleId"); + + if (apiRoleId != null) { + setApiRoleId(apiRoleId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Date createDate = (Date)attributes.get("createDate"); + + if (createDate != null) { + setCreateDate(createDate); + } + + Date modifiedDate = (Date)attributes.get("modifiedDate"); + + if (modifiedDate != null) { + setModifiedDate(modifiedDate); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String apiCode = (String)attributes.get("apiCode"); + + if (apiCode != null) { + setApiCode(apiCode); + } + + Integer roleId = (Integer)attributes.get("roleId"); + + if (roleId != null) { + setRoleId(roleId); + } + + String roleCode = (String)attributes.get("roleCode"); + + if (roleCode != null) { + setRoleCode(roleCode); + } + + Integer apiRoleStatus = (Integer)attributes.get("apiRoleStatus"); + + if (apiRoleStatus != null) { + setApiRoleStatus(apiRoleStatus); + } + } + + @Override + public Object clone() { + return new ApiRoleWrapper((ApiRole)_apiRole.clone()); + } + + @Override + public int compareTo(ApiRole apiRole) { + return _apiRole.compareTo(apiRole); + } + + /** + * Returns the api code of this api role. + * + * @return the api code of this api role + */ + @Override + public String getApiCode() { + return _apiRole.getApiCode(); + } + + /** + * Returns the api role ID of this api role. + * + * @return the api role ID of this api role + */ + @Override + public long getApiRoleId() { + return _apiRole.getApiRoleId(); + } + + /** + * Returns the api role status of this api role. + * + * @return the api role status of this api role + */ + @Override + public int getApiRoleStatus() { + return _apiRole.getApiRoleStatus(); + } + + /** + * Returns the create date of this api role. + * + * @return the create date of this api role + */ + @Override + public Date getCreateDate() { + return _apiRole.getCreateDate(); + } + + @Override + public ExpandoBridge getExpandoBridge() { + return _apiRole.getExpandoBridge(); + } + + /** + * Returns the group ID of this api role. + * + * @return the group ID of this api role + */ + @Override + public long getGroupId() { + return _apiRole.getGroupId(); + } + + /** + * Returns the modified date of this api role. + * + * @return the modified date of this api role + */ + @Override + public Date getModifiedDate() { + return _apiRole.getModifiedDate(); + } + + /** + * Returns the primary key of this api role. + * + * @return the primary key of this api role + */ + @Override + public long getPrimaryKey() { + return _apiRole.getPrimaryKey(); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _apiRole.getPrimaryKeyObj(); + } + + /** + * Returns the role code of this api role. + * + * @return the role code of this api role + */ + @Override + public String getRoleCode() { + return _apiRole.getRoleCode(); + } + + /** + * Returns the role ID of this api role. + * + * @return the role ID of this api role + */ + @Override + public int getRoleId() { + return _apiRole.getRoleId(); + } + + /** + * Returns the user ID of this api role. + * + * @return the user ID of this api role + */ + @Override + public long getUserId() { + return _apiRole.getUserId(); + } + + /** + * Returns the user uuid of this api role. + * + * @return the user uuid of this api role + */ + @Override + public String getUserUuid() { + return _apiRole.getUserUuid(); + } + + @Override + public int hashCode() { + return _apiRole.hashCode(); + } + + @Override + public boolean isCachedModel() { + return _apiRole.isCachedModel(); + } + + @Override + public boolean isEscapedModel() { + return _apiRole.isEscapedModel(); + } + + @Override + public boolean isNew() { + return _apiRole.isNew(); + } + + @Override + public void persist() { + _apiRole.persist(); + } + + /** + * Sets the api code of this api role. + * + * @param apiCode the api code of this api role + */ + @Override + public void setApiCode(String apiCode) { + _apiRole.setApiCode(apiCode); + } + + /** + * Sets the api role ID of this api role. + * + * @param apiRoleId the api role ID of this api role + */ + @Override + public void setApiRoleId(long apiRoleId) { + _apiRole.setApiRoleId(apiRoleId); + } + + /** + * Sets the api role status of this api role. + * + * @param apiRoleStatus the api role status of this api role + */ + @Override + public void setApiRoleStatus(int apiRoleStatus) { + _apiRole.setApiRoleStatus(apiRoleStatus); + } + + @Override + public void setCachedModel(boolean cachedModel) { + _apiRole.setCachedModel(cachedModel); + } + + /** + * Sets the create date of this api role. + * + * @param createDate the create date of this api role + */ + @Override + public void setCreateDate(Date createDate) { + _apiRole.setCreateDate(createDate); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.kernel.model.BaseModel baseModel) { + _apiRole.setExpandoBridgeAttributes(baseModel); + } + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) { + _apiRole.setExpandoBridgeAttributes(expandoBridge); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + _apiRole.setExpandoBridgeAttributes(serviceContext); + } + + /** + * Sets the group ID of this api role. + * + * @param groupId the group ID of this api role + */ + @Override + public void setGroupId(long groupId) { + _apiRole.setGroupId(groupId); + } + + /** + * Sets the modified date of this api role. + * + * @param modifiedDate the modified date of this api role + */ + @Override + public void setModifiedDate(Date modifiedDate) { + _apiRole.setModifiedDate(modifiedDate); + } + + @Override + public void setNew(boolean n) { + _apiRole.setNew(n); + } + + /** + * Sets the primary key of this api role. + * + * @param primaryKey the primary key of this api role + */ + @Override + public void setPrimaryKey(long primaryKey) { + _apiRole.setPrimaryKey(primaryKey); + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + _apiRole.setPrimaryKeyObj(primaryKeyObj); + } + + /** + * Sets the role code of this api role. + * + * @param roleCode the role code of this api role + */ + @Override + public void setRoleCode(String roleCode) { + _apiRole.setRoleCode(roleCode); + } + + /** + * Sets the role ID of this api role. + * + * @param roleId the role ID of this api role + */ + @Override + public void setRoleId(int roleId) { + _apiRole.setRoleId(roleId); + } + + /** + * Sets the user ID of this api role. + * + * @param userId the user ID of this api role + */ + @Override + public void setUserId(long userId) { + _apiRole.setUserId(userId); + } + + /** + * Sets the user uuid of this api role. + * + * @param userUuid the user uuid of this api role + */ + @Override + public void setUserUuid(String userUuid) { + _apiRole.setUserUuid(userUuid); + } + + @Override + public com.liferay.portal.kernel.model.CacheModel toCacheModel() { + return _apiRole.toCacheModel(); + } + + @Override + public ApiRole toEscapedModel() { + return new ApiRoleWrapper(_apiRole.toEscapedModel()); + } + + @Override + public String toString() { + return _apiRole.toString(); + } + + @Override + public ApiRole toUnescapedModel() { + return new ApiRoleWrapper(_apiRole.toUnescapedModel()); + } + + @Override + public String toXmlString() { + return _apiRole.toXmlString(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof ApiRoleWrapper)) { + return false; + } + + ApiRoleWrapper apiRoleWrapper = (ApiRoleWrapper)obj; + + if (Objects.equals(_apiRole, apiRoleWrapper._apiRole)) { + return true; + } + + return false; + } + + @Override + public ApiRole getWrappedModel() { + return _apiRole; + } + + @Override + public boolean isEntityCacheEnabled() { + return _apiRole.isEntityCacheEnabled(); + } + + @Override + public boolean isFinderCacheEnabled() { + return _apiRole.isFinderCacheEnabled(); + } + + @Override + public void resetOriginalValues() { + _apiRole.resetOriginalValues(); + } + + private final ApiRole _apiRole; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/SyncTracking.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/SyncTracking.java new file mode 100644 index 0000000000..15d161877f --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/SyncTracking.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.annotation.ImplementationClassName; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.util.Accessor; + +/** + * The extended model interface for the SyncTracking service. Represents a row in the "opencps_synctracking" database table, with each column mapped to a property of this class. + * + * @author binhth + * @see SyncTrackingModel + * @see org.opencps.adminconfig.model.impl.SyncTrackingImpl + * @see org.opencps.adminconfig.model.impl.SyncTrackingModelImpl + * @generated + */ +@ImplementationClassName("org.opencps.adminconfig.model.impl.SyncTrackingImpl") +@ProviderType +public interface SyncTracking extends SyncTrackingModel, PersistedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this interface directly. Add methods to {@link org.opencps.adminconfig.model.impl.SyncTrackingImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + public static final Accessor TRACKING_ID_ACCESSOR = new Accessor() { + @Override + public Long get(SyncTracking syncTracking) { + return syncTracking.getTrackingId(); + } + + @Override + public Class getAttributeClass() { + return Long.class; + } + + @Override + public Class getTypeClass() { + return SyncTracking.class; + } + }; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/SyncTrackingModel.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/SyncTrackingModel.java new file mode 100644 index 0000000000..276b19044b --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/SyncTrackingModel.java @@ -0,0 +1,448 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; + +import com.liferay.portal.kernel.bean.AutoEscape; +import com.liferay.portal.kernel.model.BaseModel; +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.model.GroupedModel; +import com.liferay.portal.kernel.model.ShardedModel; +import com.liferay.portal.kernel.model.StagedAuditedModel; +import com.liferay.portal.kernel.service.ServiceContext; + +import java.io.Serializable; + +import java.util.Date; + +/** + * The base model interface for the SyncTracking service. Represents a row in the "opencps_synctracking" database table, with each column mapped to a property of this class. + * + *

+ * This interface and its corresponding implementation {@link org.opencps.adminconfig.model.impl.SyncTrackingModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link org.opencps.adminconfig.model.impl.SyncTrackingImpl}. + *

+ * + * @author binhth + * @see SyncTracking + * @see org.opencps.adminconfig.model.impl.SyncTrackingImpl + * @see org.opencps.adminconfig.model.impl.SyncTrackingModelImpl + * @generated + */ +@ProviderType +public interface SyncTrackingModel extends BaseModel, GroupedModel, + ShardedModel, StagedAuditedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. All methods that expect a sync tracking model instance should use the {@link SyncTracking} interface instead. + */ + + /** + * Returns the primary key of this sync tracking. + * + * @return the primary key of this sync tracking + */ + public long getPrimaryKey(); + + /** + * Sets the primary key of this sync tracking. + * + * @param primaryKey the primary key of this sync tracking + */ + public void setPrimaryKey(long primaryKey); + + /** + * Returns the uuid of this sync tracking. + * + * @return the uuid of this sync tracking + */ + @AutoEscape + @Override + public String getUuid(); + + /** + * Sets the uuid of this sync tracking. + * + * @param uuid the uuid of this sync tracking + */ + @Override + public void setUuid(String uuid); + + /** + * Returns the tracking ID of this sync tracking. + * + * @return the tracking ID of this sync tracking + */ + public long getTrackingId(); + + /** + * Sets the tracking ID of this sync tracking. + * + * @param trackingId the tracking ID of this sync tracking + */ + public void setTrackingId(long trackingId); + + /** + * Returns the company ID of this sync tracking. + * + * @return the company ID of this sync tracking + */ + @Override + public long getCompanyId(); + + /** + * Sets the company ID of this sync tracking. + * + * @param companyId the company ID of this sync tracking + */ + @Override + public void setCompanyId(long companyId); + + /** + * Returns the group ID of this sync tracking. + * + * @return the group ID of this sync tracking + */ + @Override + public long getGroupId(); + + /** + * Sets the group ID of this sync tracking. + * + * @param groupId the group ID of this sync tracking + */ + @Override + public void setGroupId(long groupId); + + /** + * Returns the user ID of this sync tracking. + * + * @return the user ID of this sync tracking + */ + @Override + public long getUserId(); + + /** + * Sets the user ID of this sync tracking. + * + * @param userId the user ID of this sync tracking + */ + @Override + public void setUserId(long userId); + + /** + * Returns the user uuid of this sync tracking. + * + * @return the user uuid of this sync tracking + */ + @Override + public String getUserUuid(); + + /** + * Sets the user uuid of this sync tracking. + * + * @param userUuid the user uuid of this sync tracking + */ + @Override + public void setUserUuid(String userUuid); + + /** + * Returns the user name of this sync tracking. + * + * @return the user name of this sync tracking + */ + @AutoEscape + @Override + public String getUserName(); + + /** + * Sets the user name of this sync tracking. + * + * @param userName the user name of this sync tracking + */ + @Override + public void setUserName(String userName); + + /** + * Returns the create date of this sync tracking. + * + * @return the create date of this sync tracking + */ + @Override + public Date getCreateDate(); + + /** + * Sets the create date of this sync tracking. + * + * @param createDate the create date of this sync tracking + */ + @Override + public void setCreateDate(Date createDate); + + /** + * Returns the modified date of this sync tracking. + * + * @return the modified date of this sync tracking + */ + @Override + public Date getModifiedDate(); + + /** + * Sets the modified date of this sync tracking. + * + * @param modifiedDate the modified date of this sync tracking + */ + @Override + public void setModifiedDate(Date modifiedDate); + + /** + * Returns the dossier no of this sync tracking. + * + * @return the dossier no of this sync tracking + */ + @AutoEscape + public String getDossierNo(); + + /** + * Sets the dossier no of this sync tracking. + * + * @param dossierNo the dossier no of this sync tracking + */ + public void setDossierNo(String dossierNo); + + /** + * Returns the reference uid of this sync tracking. + * + * @return the reference uid of this sync tracking + */ + @AutoEscape + public String getReferenceUid(); + + /** + * Sets the reference uid of this sync tracking. + * + * @param referenceUid the reference uid of this sync tracking + */ + public void setReferenceUid(String referenceUid); + + /** + * Returns the server no of this sync tracking. + * + * @return the server no of this sync tracking + */ + @AutoEscape + public String getServerNo(); + + /** + * Sets the server no of this sync tracking. + * + * @param serverNo the server no of this sync tracking + */ + public void setServerNo(String serverNo); + + /** + * Returns the protocol of this sync tracking. + * + * @return the protocol of this sync tracking + */ + @AutoEscape + public String getProtocol(); + + /** + * Sets the protocol of this sync tracking. + * + * @param protocol the protocol of this sync tracking + */ + public void setProtocol(String protocol); + + /** + * Returns the state sync of this sync tracking. + * + * @return the state sync of this sync tracking + */ + public int getStateSync(); + + /** + * Sets the state sync of this sync tracking. + * + * @param stateSync the state sync of this sync tracking + */ + public void setStateSync(int stateSync); + + /** + * Returns the service code of this sync tracking. + * + * @return the service code of this sync tracking + */ + @AutoEscape + public String getServiceCode(); + + /** + * Sets the service code of this sync tracking. + * + * @param serviceCode the service code of this sync tracking + */ + public void setServiceCode(String serviceCode); + + /** + * Returns the api of this sync tracking. + * + * @return the api of this sync tracking + */ + @AutoEscape + public String getApi(); + + /** + * Sets the api of this sync tracking. + * + * @param api the api of this sync tracking + */ + public void setApi(String api); + + /** + * Returns the from unit of this sync tracking. + * + * @return the from unit of this sync tracking + */ + @AutoEscape + public String getFromUnit(); + + /** + * Sets the from unit of this sync tracking. + * + * @param fromUnit the from unit of this sync tracking + */ + public void setFromUnit(String fromUnit); + + /** + * Returns the to unit of this sync tracking. + * + * @return the to unit of this sync tracking + */ + @AutoEscape + public String getToUnit(); + + /** + * Sets the to unit of this sync tracking. + * + * @param toUnit the to unit of this sync tracking + */ + public void setToUnit(String toUnit); + + /** + * Returns the body request of this sync tracking. + * + * @return the body request of this sync tracking + */ + @AutoEscape + public String getBodyRequest(); + + /** + * Sets the body request of this sync tracking. + * + * @param bodyRequest the body request of this sync tracking + */ + public void setBodyRequest(String bodyRequest); + + /** + * Returns the response of this sync tracking. + * + * @return the response of this sync tracking + */ + @AutoEscape + public String getResponse(); + + /** + * Sets the response of this sync tracking. + * + * @param response the response of this sync tracking + */ + public void setResponse(String response); + + /** + * Returns the meta data of this sync tracking. + * + * @return the meta data of this sync tracking + */ + @AutoEscape + public String getMetaData(); + + /** + * Sets the meta data of this sync tracking. + * + * @param metaData the meta data of this sync tracking + */ + public void setMetaData(String metaData); + + @Override + public boolean isNew(); + + @Override + public void setNew(boolean n); + + @Override + public boolean isCachedModel(); + + @Override + public void setCachedModel(boolean cachedModel); + + @Override + public boolean isEscapedModel(); + + @Override + public Serializable getPrimaryKeyObj(); + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj); + + @Override + public ExpandoBridge getExpandoBridge(); + + @Override + public void setExpandoBridgeAttributes(BaseModel baseModel); + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge); + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext); + + @Override + public Object clone(); + + @Override + public int compareTo(SyncTracking syncTracking); + + @Override + public int hashCode(); + + @Override + public CacheModel toCacheModel(); + + @Override + public SyncTracking toEscapedModel(); + + @Override + public SyncTracking toUnescapedModel(); + + @Override + public String toString(); + + @Override + public String toXmlString(); +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/SyncTrackingSoap.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/SyncTrackingSoap.java new file mode 100644 index 0000000000..1114fd64f0 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/SyncTrackingSoap.java @@ -0,0 +1,288 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model; + +import aQute.bnd.annotation.ProviderType; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * This class is used by SOAP remote services. + * + * @author binhth + * @generated + */ +@ProviderType +public class SyncTrackingSoap implements Serializable { + public static SyncTrackingSoap toSoapModel(SyncTracking model) { + SyncTrackingSoap soapModel = new SyncTrackingSoap(); + + soapModel.setUuid(model.getUuid()); + soapModel.setTrackingId(model.getTrackingId()); + soapModel.setCompanyId(model.getCompanyId()); + soapModel.setGroupId(model.getGroupId()); + soapModel.setUserId(model.getUserId()); + soapModel.setUserName(model.getUserName()); + soapModel.setCreateDate(model.getCreateDate()); + soapModel.setModifiedDate(model.getModifiedDate()); + soapModel.setDossierNo(model.getDossierNo()); + soapModel.setReferenceUid(model.getReferenceUid()); + soapModel.setServerNo(model.getServerNo()); + soapModel.setProtocol(model.getProtocol()); + soapModel.setStateSync(model.getStateSync()); + soapModel.setServiceCode(model.getServiceCode()); + soapModel.setApi(model.getApi()); + soapModel.setFromUnit(model.getFromUnit()); + soapModel.setToUnit(model.getToUnit()); + soapModel.setBodyRequest(model.getBodyRequest()); + soapModel.setResponse(model.getResponse()); + soapModel.setMetaData(model.getMetaData()); + + return soapModel; + } + + public static SyncTrackingSoap[] toSoapModels(SyncTracking[] models) { + SyncTrackingSoap[] soapModels = new SyncTrackingSoap[models.length]; + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModel(models[i]); + } + + return soapModels; + } + + public static SyncTrackingSoap[][] toSoapModels(SyncTracking[][] models) { + SyncTrackingSoap[][] soapModels = null; + + if (models.length > 0) { + soapModels = new SyncTrackingSoap[models.length][models[0].length]; + } + else { + soapModels = new SyncTrackingSoap[0][0]; + } + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModels(models[i]); + } + + return soapModels; + } + + public static SyncTrackingSoap[] toSoapModels(List models) { + List soapModels = new ArrayList(models.size()); + + for (SyncTracking model : models) { + soapModels.add(toSoapModel(model)); + } + + return soapModels.toArray(new SyncTrackingSoap[soapModels.size()]); + } + + public SyncTrackingSoap() { + } + + public long getPrimaryKey() { + return _trackingId; + } + + public void setPrimaryKey(long pk) { + setTrackingId(pk); + } + + public String getUuid() { + return _uuid; + } + + public void setUuid(String uuid) { + _uuid = uuid; + } + + public long getTrackingId() { + return _trackingId; + } + + public void setTrackingId(long trackingId) { + _trackingId = trackingId; + } + + public long getCompanyId() { + return _companyId; + } + + public void setCompanyId(long companyId) { + _companyId = companyId; + } + + public long getGroupId() { + return _groupId; + } + + public void setGroupId(long groupId) { + _groupId = groupId; + } + + public long getUserId() { + return _userId; + } + + public void setUserId(long userId) { + _userId = userId; + } + + public String getUserName() { + return _userName; + } + + public void setUserName(String userName) { + _userName = userName; + } + + public Date getCreateDate() { + return _createDate; + } + + public void setCreateDate(Date createDate) { + _createDate = createDate; + } + + public Date getModifiedDate() { + return _modifiedDate; + } + + public void setModifiedDate(Date modifiedDate) { + _modifiedDate = modifiedDate; + } + + public String getDossierNo() { + return _dossierNo; + } + + public void setDossierNo(String dossierNo) { + _dossierNo = dossierNo; + } + + public String getReferenceUid() { + return _referenceUid; + } + + public void setReferenceUid(String referenceUid) { + _referenceUid = referenceUid; + } + + public String getServerNo() { + return _serverNo; + } + + public void setServerNo(String serverNo) { + _serverNo = serverNo; + } + + public String getProtocol() { + return _protocol; + } + + public void setProtocol(String protocol) { + _protocol = protocol; + } + + public int getStateSync() { + return _stateSync; + } + + public void setStateSync(int stateSync) { + _stateSync = stateSync; + } + + public String getServiceCode() { + return _serviceCode; + } + + public void setServiceCode(String serviceCode) { + _serviceCode = serviceCode; + } + + public String getApi() { + return _api; + } + + public void setApi(String api) { + _api = api; + } + + public String getFromUnit() { + return _fromUnit; + } + + public void setFromUnit(String fromUnit) { + _fromUnit = fromUnit; + } + + public String getToUnit() { + return _toUnit; + } + + public void setToUnit(String toUnit) { + _toUnit = toUnit; + } + + public String getBodyRequest() { + return _bodyRequest; + } + + public void setBodyRequest(String bodyRequest) { + _bodyRequest = bodyRequest; + } + + public String getResponse() { + return _response; + } + + public void setResponse(String response) { + _response = response; + } + + public String getMetaData() { + return _metaData; + } + + public void setMetaData(String metaData) { + _metaData = metaData; + } + + private String _uuid; + private long _trackingId; + private long _companyId; + private long _groupId; + private long _userId; + private String _userName; + private Date _createDate; + private Date _modifiedDate; + private String _dossierNo; + private String _referenceUid; + private String _serverNo; + private String _protocol; + private int _stateSync; + private String _serviceCode; + private String _api; + private String _fromUnit; + private String _toUnit; + private String _bodyRequest; + private String _response; + private String _metaData; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/SyncTrackingWrapper.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/SyncTrackingWrapper.java new file mode 100644 index 0000000000..988cb71ee1 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/model/SyncTrackingWrapper.java @@ -0,0 +1,796 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; + +import com.liferay.exportimport.kernel.lar.StagedModelType; + +import com.liferay.portal.kernel.model.ModelWrapper; +import com.liferay.portal.kernel.service.ServiceContext; + +import java.io.Serializable; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + *

+ * This class is a wrapper for {@link SyncTracking}. + *

+ * + * @author binhth + * @see SyncTracking + * @generated + */ +@ProviderType +public class SyncTrackingWrapper implements SyncTracking, + ModelWrapper { + public SyncTrackingWrapper(SyncTracking syncTracking) { + _syncTracking = syncTracking; + } + + @Override + public Class getModelClass() { + return SyncTracking.class; + } + + @Override + public String getModelClassName() { + return SyncTracking.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("uuid", getUuid()); + attributes.put("trackingId", getTrackingId()); + attributes.put("companyId", getCompanyId()); + attributes.put("groupId", getGroupId()); + attributes.put("userId", getUserId()); + attributes.put("userName", getUserName()); + attributes.put("createDate", getCreateDate()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("dossierNo", getDossierNo()); + attributes.put("referenceUid", getReferenceUid()); + attributes.put("serverNo", getServerNo()); + attributes.put("protocol", getProtocol()); + attributes.put("stateSync", getStateSync()); + attributes.put("serviceCode", getServiceCode()); + attributes.put("api", getApi()); + attributes.put("fromUnit", getFromUnit()); + attributes.put("toUnit", getToUnit()); + attributes.put("bodyRequest", getBodyRequest()); + attributes.put("response", getResponse()); + attributes.put("metaData", getMetaData()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + String uuid = (String)attributes.get("uuid"); + + if (uuid != null) { + setUuid(uuid); + } + + Long trackingId = (Long)attributes.get("trackingId"); + + if (trackingId != null) { + setTrackingId(trackingId); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String userName = (String)attributes.get("userName"); + + if (userName != null) { + setUserName(userName); + } + + Date createDate = (Date)attributes.get("createDate"); + + if (createDate != null) { + setCreateDate(createDate); + } + + Date modifiedDate = (Date)attributes.get("modifiedDate"); + + if (modifiedDate != null) { + setModifiedDate(modifiedDate); + } + + String dossierNo = (String)attributes.get("dossierNo"); + + if (dossierNo != null) { + setDossierNo(dossierNo); + } + + String referenceUid = (String)attributes.get("referenceUid"); + + if (referenceUid != null) { + setReferenceUid(referenceUid); + } + + String serverNo = (String)attributes.get("serverNo"); + + if (serverNo != null) { + setServerNo(serverNo); + } + + String protocol = (String)attributes.get("protocol"); + + if (protocol != null) { + setProtocol(protocol); + } + + Integer stateSync = (Integer)attributes.get("stateSync"); + + if (stateSync != null) { + setStateSync(stateSync); + } + + String serviceCode = (String)attributes.get("serviceCode"); + + if (serviceCode != null) { + setServiceCode(serviceCode); + } + + String api = (String)attributes.get("api"); + + if (api != null) { + setApi(api); + } + + String fromUnit = (String)attributes.get("fromUnit"); + + if (fromUnit != null) { + setFromUnit(fromUnit); + } + + String toUnit = (String)attributes.get("toUnit"); + + if (toUnit != null) { + setToUnit(toUnit); + } + + String bodyRequest = (String)attributes.get("bodyRequest"); + + if (bodyRequest != null) { + setBodyRequest(bodyRequest); + } + + String response = (String)attributes.get("response"); + + if (response != null) { + setResponse(response); + } + + String metaData = (String)attributes.get("metaData"); + + if (metaData != null) { + setMetaData(metaData); + } + } + + @Override + public Object clone() { + return new SyncTrackingWrapper((SyncTracking)_syncTracking.clone()); + } + + @Override + public int compareTo(SyncTracking syncTracking) { + return _syncTracking.compareTo(syncTracking); + } + + /** + * Returns the api of this sync tracking. + * + * @return the api of this sync tracking + */ + @Override + public String getApi() { + return _syncTracking.getApi(); + } + + /** + * Returns the body request of this sync tracking. + * + * @return the body request of this sync tracking + */ + @Override + public String getBodyRequest() { + return _syncTracking.getBodyRequest(); + } + + /** + * Returns the company ID of this sync tracking. + * + * @return the company ID of this sync tracking + */ + @Override + public long getCompanyId() { + return _syncTracking.getCompanyId(); + } + + /** + * Returns the create date of this sync tracking. + * + * @return the create date of this sync tracking + */ + @Override + public Date getCreateDate() { + return _syncTracking.getCreateDate(); + } + + /** + * Returns the dossier no of this sync tracking. + * + * @return the dossier no of this sync tracking + */ + @Override + public String getDossierNo() { + return _syncTracking.getDossierNo(); + } + + @Override + public ExpandoBridge getExpandoBridge() { + return _syncTracking.getExpandoBridge(); + } + + /** + * Returns the from unit of this sync tracking. + * + * @return the from unit of this sync tracking + */ + @Override + public String getFromUnit() { + return _syncTracking.getFromUnit(); + } + + /** + * Returns the group ID of this sync tracking. + * + * @return the group ID of this sync tracking + */ + @Override + public long getGroupId() { + return _syncTracking.getGroupId(); + } + + /** + * Returns the meta data of this sync tracking. + * + * @return the meta data of this sync tracking + */ + @Override + public String getMetaData() { + return _syncTracking.getMetaData(); + } + + /** + * Returns the modified date of this sync tracking. + * + * @return the modified date of this sync tracking + */ + @Override + public Date getModifiedDate() { + return _syncTracking.getModifiedDate(); + } + + /** + * Returns the primary key of this sync tracking. + * + * @return the primary key of this sync tracking + */ + @Override + public long getPrimaryKey() { + return _syncTracking.getPrimaryKey(); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _syncTracking.getPrimaryKeyObj(); + } + + /** + * Returns the protocol of this sync tracking. + * + * @return the protocol of this sync tracking + */ + @Override + public String getProtocol() { + return _syncTracking.getProtocol(); + } + + /** + * Returns the reference uid of this sync tracking. + * + * @return the reference uid of this sync tracking + */ + @Override + public String getReferenceUid() { + return _syncTracking.getReferenceUid(); + } + + /** + * Returns the response of this sync tracking. + * + * @return the response of this sync tracking + */ + @Override + public String getResponse() { + return _syncTracking.getResponse(); + } + + /** + * Returns the server no of this sync tracking. + * + * @return the server no of this sync tracking + */ + @Override + public String getServerNo() { + return _syncTracking.getServerNo(); + } + + /** + * Returns the service code of this sync tracking. + * + * @return the service code of this sync tracking + */ + @Override + public String getServiceCode() { + return _syncTracking.getServiceCode(); + } + + /** + * Returns the state sync of this sync tracking. + * + * @return the state sync of this sync tracking + */ + @Override + public int getStateSync() { + return _syncTracking.getStateSync(); + } + + /** + * Returns the to unit of this sync tracking. + * + * @return the to unit of this sync tracking + */ + @Override + public String getToUnit() { + return _syncTracking.getToUnit(); + } + + /** + * Returns the tracking ID of this sync tracking. + * + * @return the tracking ID of this sync tracking + */ + @Override + public long getTrackingId() { + return _syncTracking.getTrackingId(); + } + + /** + * Returns the user ID of this sync tracking. + * + * @return the user ID of this sync tracking + */ + @Override + public long getUserId() { + return _syncTracking.getUserId(); + } + + /** + * Returns the user name of this sync tracking. + * + * @return the user name of this sync tracking + */ + @Override + public String getUserName() { + return _syncTracking.getUserName(); + } + + /** + * Returns the user uuid of this sync tracking. + * + * @return the user uuid of this sync tracking + */ + @Override + public String getUserUuid() { + return _syncTracking.getUserUuid(); + } + + /** + * Returns the uuid of this sync tracking. + * + * @return the uuid of this sync tracking + */ + @Override + public String getUuid() { + return _syncTracking.getUuid(); + } + + @Override + public int hashCode() { + return _syncTracking.hashCode(); + } + + @Override + public boolean isCachedModel() { + return _syncTracking.isCachedModel(); + } + + @Override + public boolean isEscapedModel() { + return _syncTracking.isEscapedModel(); + } + + @Override + public boolean isNew() { + return _syncTracking.isNew(); + } + + @Override + public void persist() { + _syncTracking.persist(); + } + + /** + * Sets the api of this sync tracking. + * + * @param api the api of this sync tracking + */ + @Override + public void setApi(String api) { + _syncTracking.setApi(api); + } + + /** + * Sets the body request of this sync tracking. + * + * @param bodyRequest the body request of this sync tracking + */ + @Override + public void setBodyRequest(String bodyRequest) { + _syncTracking.setBodyRequest(bodyRequest); + } + + @Override + public void setCachedModel(boolean cachedModel) { + _syncTracking.setCachedModel(cachedModel); + } + + /** + * Sets the company ID of this sync tracking. + * + * @param companyId the company ID of this sync tracking + */ + @Override + public void setCompanyId(long companyId) { + _syncTracking.setCompanyId(companyId); + } + + /** + * Sets the create date of this sync tracking. + * + * @param createDate the create date of this sync tracking + */ + @Override + public void setCreateDate(Date createDate) { + _syncTracking.setCreateDate(createDate); + } + + /** + * Sets the dossier no of this sync tracking. + * + * @param dossierNo the dossier no of this sync tracking + */ + @Override + public void setDossierNo(String dossierNo) { + _syncTracking.setDossierNo(dossierNo); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.kernel.model.BaseModel baseModel) { + _syncTracking.setExpandoBridgeAttributes(baseModel); + } + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) { + _syncTracking.setExpandoBridgeAttributes(expandoBridge); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + _syncTracking.setExpandoBridgeAttributes(serviceContext); + } + + /** + * Sets the from unit of this sync tracking. + * + * @param fromUnit the from unit of this sync tracking + */ + @Override + public void setFromUnit(String fromUnit) { + _syncTracking.setFromUnit(fromUnit); + } + + /** + * Sets the group ID of this sync tracking. + * + * @param groupId the group ID of this sync tracking + */ + @Override + public void setGroupId(long groupId) { + _syncTracking.setGroupId(groupId); + } + + /** + * Sets the meta data of this sync tracking. + * + * @param metaData the meta data of this sync tracking + */ + @Override + public void setMetaData(String metaData) { + _syncTracking.setMetaData(metaData); + } + + /** + * Sets the modified date of this sync tracking. + * + * @param modifiedDate the modified date of this sync tracking + */ + @Override + public void setModifiedDate(Date modifiedDate) { + _syncTracking.setModifiedDate(modifiedDate); + } + + @Override + public void setNew(boolean n) { + _syncTracking.setNew(n); + } + + /** + * Sets the primary key of this sync tracking. + * + * @param primaryKey the primary key of this sync tracking + */ + @Override + public void setPrimaryKey(long primaryKey) { + _syncTracking.setPrimaryKey(primaryKey); + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + _syncTracking.setPrimaryKeyObj(primaryKeyObj); + } + + /** + * Sets the protocol of this sync tracking. + * + * @param protocol the protocol of this sync tracking + */ + @Override + public void setProtocol(String protocol) { + _syncTracking.setProtocol(protocol); + } + + /** + * Sets the reference uid of this sync tracking. + * + * @param referenceUid the reference uid of this sync tracking + */ + @Override + public void setReferenceUid(String referenceUid) { + _syncTracking.setReferenceUid(referenceUid); + } + + /** + * Sets the response of this sync tracking. + * + * @param response the response of this sync tracking + */ + @Override + public void setResponse(String response) { + _syncTracking.setResponse(response); + } + + /** + * Sets the server no of this sync tracking. + * + * @param serverNo the server no of this sync tracking + */ + @Override + public void setServerNo(String serverNo) { + _syncTracking.setServerNo(serverNo); + } + + /** + * Sets the service code of this sync tracking. + * + * @param serviceCode the service code of this sync tracking + */ + @Override + public void setServiceCode(String serviceCode) { + _syncTracking.setServiceCode(serviceCode); + } + + /** + * Sets the state sync of this sync tracking. + * + * @param stateSync the state sync of this sync tracking + */ + @Override + public void setStateSync(int stateSync) { + _syncTracking.setStateSync(stateSync); + } + + /** + * Sets the to unit of this sync tracking. + * + * @param toUnit the to unit of this sync tracking + */ + @Override + public void setToUnit(String toUnit) { + _syncTracking.setToUnit(toUnit); + } + + /** + * Sets the tracking ID of this sync tracking. + * + * @param trackingId the tracking ID of this sync tracking + */ + @Override + public void setTrackingId(long trackingId) { + _syncTracking.setTrackingId(trackingId); + } + + /** + * Sets the user ID of this sync tracking. + * + * @param userId the user ID of this sync tracking + */ + @Override + public void setUserId(long userId) { + _syncTracking.setUserId(userId); + } + + /** + * Sets the user name of this sync tracking. + * + * @param userName the user name of this sync tracking + */ + @Override + public void setUserName(String userName) { + _syncTracking.setUserName(userName); + } + + /** + * Sets the user uuid of this sync tracking. + * + * @param userUuid the user uuid of this sync tracking + */ + @Override + public void setUserUuid(String userUuid) { + _syncTracking.setUserUuid(userUuid); + } + + /** + * Sets the uuid of this sync tracking. + * + * @param uuid the uuid of this sync tracking + */ + @Override + public void setUuid(String uuid) { + _syncTracking.setUuid(uuid); + } + + @Override + public com.liferay.portal.kernel.model.CacheModel toCacheModel() { + return _syncTracking.toCacheModel(); + } + + @Override + public SyncTracking toEscapedModel() { + return new SyncTrackingWrapper(_syncTracking.toEscapedModel()); + } + + @Override + public String toString() { + return _syncTracking.toString(); + } + + @Override + public SyncTracking toUnescapedModel() { + return new SyncTrackingWrapper(_syncTracking.toUnescapedModel()); + } + + @Override + public String toXmlString() { + return _syncTracking.toXmlString(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof SyncTrackingWrapper)) { + return false; + } + + SyncTrackingWrapper syncTrackingWrapper = (SyncTrackingWrapper)obj; + + if (Objects.equals(_syncTracking, syncTrackingWrapper._syncTracking)) { + return true; + } + + return false; + } + + @Override + public StagedModelType getStagedModelType() { + return _syncTracking.getStagedModelType(); + } + + @Override + public SyncTracking getWrappedModel() { + return _syncTracking; + } + + @Override + public boolean isEntityCacheEnabled() { + return _syncTracking.isEntityCacheEnabled(); + } + + @Override + public boolean isFinderCacheEnabled() { + return _syncTracking.isFinderCacheEnabled(); + } + + @Override + public void resetOriginalValues() { + _syncTracking.resetOriginalValues(); + } + + private final SyncTracking _syncTracking; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiManagerLocalService.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiManagerLocalService.java new file mode 100644 index 0000000000..9d33080a1a --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiManagerLocalService.java @@ -0,0 +1,240 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.service.BaseLocalService; +import com.liferay.portal.kernel.service.PersistedModelLocalService; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Propagation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.kernel.util.OrderByComparator; + +import org.opencps.adminconfig.model.ApiManager; + +import java.io.Serializable; + +import java.util.List; + +/** + * Provides the local service interface for ApiManager. Methods of this + * service will not have security checks based on the propagated JAAS + * credentials because this service can only be accessed from within the same + * VM. + * + * @author binhth + * @see ApiManagerLocalServiceUtil + * @see org.opencps.adminconfig.service.base.ApiManagerLocalServiceBaseImpl + * @see org.opencps.adminconfig.service.impl.ApiManagerLocalServiceImpl + * @generated + */ +@ProviderType +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface ApiManagerLocalService extends BaseLocalService, + PersistedModelLocalService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link ApiManagerLocalServiceUtil} to access the api manager local service. Add custom service methods to {@link org.opencps.adminconfig.service.impl.ApiManagerLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Adds the api manager to the database. Also notifies the appropriate model listeners. + * + * @param apiManager the api manager + * @return the api manager that was added + */ + @Indexable(type = IndexableType.REINDEX) + public ApiManager addApiManager(ApiManager apiManager); + + public int countByG(long groupId); + + /** + * Creates a new api manager with the primary key. Does not add the api manager to the database. + * + * @param apiManagerId the primary key for the new api manager + * @return the new api manager + */ + @Transactional(enabled = false) + public ApiManager createApiManager(long apiManagerId); + + /** + * Deletes the api manager from the database. Also notifies the appropriate model listeners. + * + * @param apiManager the api manager + * @return the api manager that was removed + */ + @Indexable(type = IndexableType.DELETE) + public ApiManager deleteApiManager(ApiManager apiManager); + + /** + * Deletes the api manager with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager that was removed + * @throws PortalException if a api manager with the primary key could not be found + */ + @Indexable(type = IndexableType.DELETE) + public ApiManager deleteApiManager(long apiManagerId) + throws PortalException; + + /** + * @throws PortalException + */ + @Override + public PersistedModel deletePersistedModel(PersistedModel persistedModel) + throws PortalException; + + public DynamicQuery dynamicQuery(); + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery); + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end); + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end, OrderByComparator orderByComparator); + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + public long dynamicQueryCount(DynamicQuery dynamicQuery); + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ApiManager fetchApiManager(long apiManagerId); + + public ApiManager findByApiCode(String apiCode); + + public List findByG(long groupId); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ActionableDynamicQuery getActionableDynamicQuery(); + + /** + * Returns the api manager with the primary key. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager + * @throws PortalException if a api manager with the primary key could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ApiManager getApiManager(long apiManagerId) + throws PortalException; + + /** + * Returns a range of all the api managers. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @return the range of api managers + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getApiManagers(int start, int end); + + /** + * Returns the number of api managers. + * + * @return the number of api managers + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getApiManagersCount(); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + public String getOSGiServiceIdentifier(); + + @Override + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException; + + /** + * Updates the api manager in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param apiManager the api manager + * @return the api manager that was updated + */ + @Indexable(type = IndexableType.REINDEX) + public ApiManager updateApiManager(ApiManager apiManager); + + public ApiManager updateApiManager(long userId, long groupId, + long apiManagerId, String apiCode, String apiDescription, + String apiName, int apiStatus, String className); +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiManagerLocalServiceUtil.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiManagerLocalServiceUtil.java new file mode 100644 index 0000000000..dd6ebaebe9 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiManagerLocalServiceUtil.java @@ -0,0 +1,295 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service; + +import aQute.bnd.annotation.ProviderType; + +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; + +import org.osgi.util.tracker.ServiceTracker; + +/** + * Provides the local service utility for ApiManager. This utility wraps + * {@link org.opencps.adminconfig.service.impl.ApiManagerLocalServiceImpl} and is the + * primary access point for service operations in application layer code running + * on the local server. Methods of this service will not have security checks + * based on the propagated JAAS credentials because this service can only be + * accessed from within the same VM. + * + * @author binhth + * @see ApiManagerLocalService + * @see org.opencps.adminconfig.service.base.ApiManagerLocalServiceBaseImpl + * @see org.opencps.adminconfig.service.impl.ApiManagerLocalServiceImpl + * @generated + */ +@ProviderType +public class ApiManagerLocalServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link org.opencps.adminconfig.service.impl.ApiManagerLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Adds the api manager to the database. Also notifies the appropriate model listeners. + * + * @param apiManager the api manager + * @return the api manager that was added + */ + public static org.opencps.adminconfig.model.ApiManager addApiManager( + org.opencps.adminconfig.model.ApiManager apiManager) { + return getService().addApiManager(apiManager); + } + + public static int countByG(long groupId) { + return getService().countByG(groupId); + } + + /** + * Creates a new api manager with the primary key. Does not add the api manager to the database. + * + * @param apiManagerId the primary key for the new api manager + * @return the new api manager + */ + public static org.opencps.adminconfig.model.ApiManager createApiManager( + long apiManagerId) { + return getService().createApiManager(apiManagerId); + } + + /** + * Deletes the api manager from the database. Also notifies the appropriate model listeners. + * + * @param apiManager the api manager + * @return the api manager that was removed + */ + public static org.opencps.adminconfig.model.ApiManager deleteApiManager( + org.opencps.adminconfig.model.ApiManager apiManager) { + return getService().deleteApiManager(apiManager); + } + + /** + * Deletes the api manager with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager that was removed + * @throws PortalException if a api manager with the primary key could not be found + */ + public static org.opencps.adminconfig.model.ApiManager deleteApiManager( + long apiManagerId) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().deleteApiManager(apiManagerId); + } + + /** + * @throws PortalException + */ + public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( + com.liferay.portal.kernel.model.PersistedModel persistedModel) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().deletePersistedModel(persistedModel); + } + + public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return getService().dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return getService().dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) { + return getService().dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return getService() + .dynamicQuery(dynamicQuery, start, end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return getService().dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) { + return getService().dynamicQueryCount(dynamicQuery, projection); + } + + public static org.opencps.adminconfig.model.ApiManager fetchApiManager( + long apiManagerId) { + return getService().fetchApiManager(apiManagerId); + } + + public static org.opencps.adminconfig.model.ApiManager findByApiCode( + String apiCode) { + return getService().findByApiCode(apiCode); + } + + public static java.util.List findByG( + long groupId) { + return getService().findByG(groupId); + } + + public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { + return getService().getActionableDynamicQuery(); + } + + /** + * Returns the api manager with the primary key. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager + * @throws PortalException if a api manager with the primary key could not be found + */ + public static org.opencps.adminconfig.model.ApiManager getApiManager( + long apiManagerId) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getApiManager(apiManagerId); + } + + /** + * Returns a range of all the api managers. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @return the range of api managers + */ + public static java.util.List getApiManagers( + int start, int end) { + return getService().getApiManagers(start, end); + } + + /** + * Returns the number of api managers. + * + * @return the number of api managers + */ + public static int getApiManagersCount() { + return getService().getApiManagersCount(); + } + + public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + return getService().getIndexableActionableDynamicQuery(); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + public static String getOSGiServiceIdentifier() { + return getService().getOSGiServiceIdentifier(); + } + + public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getPersistedModel(primaryKeyObj); + } + + /** + * Updates the api manager in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param apiManager the api manager + * @return the api manager that was updated + */ + public static org.opencps.adminconfig.model.ApiManager updateApiManager( + org.opencps.adminconfig.model.ApiManager apiManager) { + return getService().updateApiManager(apiManager); + } + + public static org.opencps.adminconfig.model.ApiManager updateApiManager( + long userId, long groupId, long apiManagerId, String apiCode, + String apiDescription, String apiName, int apiStatus, String className) { + return getService() + .updateApiManager(userId, groupId, apiManagerId, apiCode, + apiDescription, apiName, apiStatus, className); + } + + public static ApiManagerLocalService getService() { + return _serviceTracker.getService(); + } + + private static ServiceTracker _serviceTracker; + + static { + Bundle bundle = FrameworkUtil.getBundle(ApiManagerLocalService.class); + + ServiceTracker serviceTracker = + new ServiceTracker(bundle.getBundleContext(), + ApiManagerLocalService.class, null); + + serviceTracker.open(); + + _serviceTracker = serviceTracker; + } +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiManagerLocalServiceWrapper.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiManagerLocalServiceWrapper.java new file mode 100644 index 0000000000..88d9ae4bc5 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiManagerLocalServiceWrapper.java @@ -0,0 +1,303 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link ApiManagerLocalService}. + * + * @author binhth + * @see ApiManagerLocalService + * @generated + */ +@ProviderType +public class ApiManagerLocalServiceWrapper implements ApiManagerLocalService, + ServiceWrapper { + public ApiManagerLocalServiceWrapper( + ApiManagerLocalService apiManagerLocalService) { + _apiManagerLocalService = apiManagerLocalService; + } + + /** + * Adds the api manager to the database. Also notifies the appropriate model listeners. + * + * @param apiManager the api manager + * @return the api manager that was added + */ + @Override + public org.opencps.adminconfig.model.ApiManager addApiManager( + org.opencps.adminconfig.model.ApiManager apiManager) { + return _apiManagerLocalService.addApiManager(apiManager); + } + + @Override + public int countByG(long groupId) { + return _apiManagerLocalService.countByG(groupId); + } + + /** + * Creates a new api manager with the primary key. Does not add the api manager to the database. + * + * @param apiManagerId the primary key for the new api manager + * @return the new api manager + */ + @Override + public org.opencps.adminconfig.model.ApiManager createApiManager( + long apiManagerId) { + return _apiManagerLocalService.createApiManager(apiManagerId); + } + + /** + * Deletes the api manager from the database. Also notifies the appropriate model listeners. + * + * @param apiManager the api manager + * @return the api manager that was removed + */ + @Override + public org.opencps.adminconfig.model.ApiManager deleteApiManager( + org.opencps.adminconfig.model.ApiManager apiManager) { + return _apiManagerLocalService.deleteApiManager(apiManager); + } + + /** + * Deletes the api manager with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager that was removed + * @throws PortalException if a api manager with the primary key could not be found + */ + @Override + public org.opencps.adminconfig.model.ApiManager deleteApiManager( + long apiManagerId) + throws com.liferay.portal.kernel.exception.PortalException { + return _apiManagerLocalService.deleteApiManager(apiManagerId); + } + + /** + * @throws PortalException + */ + @Override + public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( + com.liferay.portal.kernel.model.PersistedModel persistedModel) + throws com.liferay.portal.kernel.exception.PortalException { + return _apiManagerLocalService.deletePersistedModel(persistedModel); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return _apiManagerLocalService.dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return _apiManagerLocalService.dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) { + return _apiManagerLocalService.dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return _apiManagerLocalService.dynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return _apiManagerLocalService.dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) { + return _apiManagerLocalService.dynamicQueryCount(dynamicQuery, + projection); + } + + @Override + public org.opencps.adminconfig.model.ApiManager fetchApiManager( + long apiManagerId) { + return _apiManagerLocalService.fetchApiManager(apiManagerId); + } + + @Override + public org.opencps.adminconfig.model.ApiManager findByApiCode( + String apiCode) { + return _apiManagerLocalService.findByApiCode(apiCode); + } + + @Override + public java.util.List findByG( + long groupId) { + return _apiManagerLocalService.findByG(groupId); + } + + @Override + public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { + return _apiManagerLocalService.getActionableDynamicQuery(); + } + + /** + * Returns the api manager with the primary key. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager + * @throws PortalException if a api manager with the primary key could not be found + */ + @Override + public org.opencps.adminconfig.model.ApiManager getApiManager( + long apiManagerId) + throws com.liferay.portal.kernel.exception.PortalException { + return _apiManagerLocalService.getApiManager(apiManagerId); + } + + /** + * Returns a range of all the api managers. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @return the range of api managers + */ + @Override + public java.util.List getApiManagers( + int start, int end) { + return _apiManagerLocalService.getApiManagers(start, end); + } + + /** + * Returns the number of api managers. + * + * @return the number of api managers + */ + @Override + public int getApiManagersCount() { + return _apiManagerLocalService.getApiManagersCount(); + } + + @Override + public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + return _apiManagerLocalService.getIndexableActionableDynamicQuery(); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + @Override + public String getOSGiServiceIdentifier() { + return _apiManagerLocalService.getOSGiServiceIdentifier(); + } + + @Override + public com.liferay.portal.kernel.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException { + return _apiManagerLocalService.getPersistedModel(primaryKeyObj); + } + + /** + * Updates the api manager in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param apiManager the api manager + * @return the api manager that was updated + */ + @Override + public org.opencps.adminconfig.model.ApiManager updateApiManager( + org.opencps.adminconfig.model.ApiManager apiManager) { + return _apiManagerLocalService.updateApiManager(apiManager); + } + + @Override + public org.opencps.adminconfig.model.ApiManager updateApiManager( + long userId, long groupId, long apiManagerId, String apiCode, + String apiDescription, String apiName, int apiStatus, String className) { + return _apiManagerLocalService.updateApiManager(userId, groupId, + apiManagerId, apiCode, apiDescription, apiName, apiStatus, className); + } + + @Override + public ApiManagerLocalService getWrappedService() { + return _apiManagerLocalService; + } + + @Override + public void setWrappedService(ApiManagerLocalService apiManagerLocalService) { + _apiManagerLocalService = apiManagerLocalService; + } + + private ApiManagerLocalService _apiManagerLocalService; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiRoleLocalService.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiRoleLocalService.java new file mode 100644 index 0000000000..5b86a71ab7 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiRoleLocalService.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.service.BaseLocalService; +import com.liferay.portal.kernel.service.PersistedModelLocalService; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Propagation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.kernel.util.OrderByComparator; + +import org.opencps.adminconfig.model.ApiRole; + +import java.io.Serializable; + +import java.util.List; + +/** + * Provides the local service interface for ApiRole. Methods of this + * service will not have security checks based on the propagated JAAS + * credentials because this service can only be accessed from within the same + * VM. + * + * @author binhth + * @see ApiRoleLocalServiceUtil + * @see org.opencps.adminconfig.service.base.ApiRoleLocalServiceBaseImpl + * @see org.opencps.adminconfig.service.impl.ApiRoleLocalServiceImpl + * @generated + */ +@ProviderType +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface ApiRoleLocalService extends BaseLocalService, + PersistedModelLocalService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link ApiRoleLocalServiceUtil} to access the api role local service. Add custom service methods to {@link org.opencps.adminconfig.service.impl.ApiRoleLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Adds the api role to the database. Also notifies the appropriate model listeners. + * + * @param apiRole the api role + * @return the api role that was added + */ + @Indexable(type = IndexableType.REINDEX) + public ApiRole addApiRole(ApiRole apiRole); + + public int countByG(long groupId); + + /** + * Creates a new api role with the primary key. Does not add the api role to the database. + * + * @param apiRoleId the primary key for the new api role + * @return the new api role + */ + @Transactional(enabled = false) + public ApiRole createApiRole(long apiRoleId); + + /** + * Deletes the api role from the database. Also notifies the appropriate model listeners. + * + * @param apiRole the api role + * @return the api role that was removed + */ + @Indexable(type = IndexableType.DELETE) + public ApiRole deleteApiRole(ApiRole apiRole); + + /** + * Deletes the api role with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param apiRoleId the primary key of the api role + * @return the api role that was removed + * @throws PortalException if a api role with the primary key could not be found + */ + @Indexable(type = IndexableType.DELETE) + public ApiRole deleteApiRole(long apiRoleId) throws PortalException; + + /** + * @throws PortalException + */ + @Override + public PersistedModel deletePersistedModel(PersistedModel persistedModel) + throws PortalException; + + public DynamicQuery dynamicQuery(); + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery); + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end); + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end, OrderByComparator orderByComparator); + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + public long dynamicQueryCount(DynamicQuery dynamicQuery); + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ApiRole fetchApiRole(long apiRoleId); + + public List findByG(long groupId); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ActionableDynamicQuery getActionableDynamicQuery(); + + /** + * Returns the api role with the primary key. + * + * @param apiRoleId the primary key of the api role + * @return the api role + * @throws PortalException if a api role with the primary key could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ApiRole getApiRole(long apiRoleId) throws PortalException; + + /** + * Returns a range of all the api roles. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @return the range of api roles + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getApiRoles(int start, int end); + + /** + * Returns the number of api roles. + * + * @return the number of api roles + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getApiRolesCount(); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + public String getOSGiServiceIdentifier(); + + @Override + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException; + + /** + * Updates the api role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param apiRole the api role + * @return the api role that was updated + */ + @Indexable(type = IndexableType.REINDEX) + public ApiRole updateApiRole(ApiRole apiRole); + + public ApiRole updateApiRole(long userId, long groupId, long apiRoleId, + String apiCode, long roleId, String roleCode, int apiRoleStatus); +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiRoleLocalServiceUtil.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiRoleLocalServiceUtil.java new file mode 100644 index 0000000000..0556996b10 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiRoleLocalServiceUtil.java @@ -0,0 +1,289 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service; + +import aQute.bnd.annotation.ProviderType; + +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; + +import org.osgi.util.tracker.ServiceTracker; + +/** + * Provides the local service utility for ApiRole. This utility wraps + * {@link org.opencps.adminconfig.service.impl.ApiRoleLocalServiceImpl} and is the + * primary access point for service operations in application layer code running + * on the local server. Methods of this service will not have security checks + * based on the propagated JAAS credentials because this service can only be + * accessed from within the same VM. + * + * @author binhth + * @see ApiRoleLocalService + * @see org.opencps.adminconfig.service.base.ApiRoleLocalServiceBaseImpl + * @see org.opencps.adminconfig.service.impl.ApiRoleLocalServiceImpl + * @generated + */ +@ProviderType +public class ApiRoleLocalServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link org.opencps.adminconfig.service.impl.ApiRoleLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Adds the api role to the database. Also notifies the appropriate model listeners. + * + * @param apiRole the api role + * @return the api role that was added + */ + public static org.opencps.adminconfig.model.ApiRole addApiRole( + org.opencps.adminconfig.model.ApiRole apiRole) { + return getService().addApiRole(apiRole); + } + + public static int countByG(long groupId) { + return getService().countByG(groupId); + } + + /** + * Creates a new api role with the primary key. Does not add the api role to the database. + * + * @param apiRoleId the primary key for the new api role + * @return the new api role + */ + public static org.opencps.adminconfig.model.ApiRole createApiRole( + long apiRoleId) { + return getService().createApiRole(apiRoleId); + } + + /** + * Deletes the api role from the database. Also notifies the appropriate model listeners. + * + * @param apiRole the api role + * @return the api role that was removed + */ + public static org.opencps.adminconfig.model.ApiRole deleteApiRole( + org.opencps.adminconfig.model.ApiRole apiRole) { + return getService().deleteApiRole(apiRole); + } + + /** + * Deletes the api role with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param apiRoleId the primary key of the api role + * @return the api role that was removed + * @throws PortalException if a api role with the primary key could not be found + */ + public static org.opencps.adminconfig.model.ApiRole deleteApiRole( + long apiRoleId) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().deleteApiRole(apiRoleId); + } + + /** + * @throws PortalException + */ + public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( + com.liferay.portal.kernel.model.PersistedModel persistedModel) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().deletePersistedModel(persistedModel); + } + + public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return getService().dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return getService().dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) { + return getService().dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return getService() + .dynamicQuery(dynamicQuery, start, end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return getService().dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) { + return getService().dynamicQueryCount(dynamicQuery, projection); + } + + public static org.opencps.adminconfig.model.ApiRole fetchApiRole( + long apiRoleId) { + return getService().fetchApiRole(apiRoleId); + } + + public static java.util.List findByG( + long groupId) { + return getService().findByG(groupId); + } + + public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { + return getService().getActionableDynamicQuery(); + } + + /** + * Returns the api role with the primary key. + * + * @param apiRoleId the primary key of the api role + * @return the api role + * @throws PortalException if a api role with the primary key could not be found + */ + public static org.opencps.adminconfig.model.ApiRole getApiRole( + long apiRoleId) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getApiRole(apiRoleId); + } + + /** + * Returns a range of all the api roles. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @return the range of api roles + */ + public static java.util.List getApiRoles( + int start, int end) { + return getService().getApiRoles(start, end); + } + + /** + * Returns the number of api roles. + * + * @return the number of api roles + */ + public static int getApiRolesCount() { + return getService().getApiRolesCount(); + } + + public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + return getService().getIndexableActionableDynamicQuery(); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + public static String getOSGiServiceIdentifier() { + return getService().getOSGiServiceIdentifier(); + } + + public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getPersistedModel(primaryKeyObj); + } + + /** + * Updates the api role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param apiRole the api role + * @return the api role that was updated + */ + public static org.opencps.adminconfig.model.ApiRole updateApiRole( + org.opencps.adminconfig.model.ApiRole apiRole) { + return getService().updateApiRole(apiRole); + } + + public static org.opencps.adminconfig.model.ApiRole updateApiRole( + long userId, long groupId, long apiRoleId, String apiCode, long roleId, + String roleCode, int apiRoleStatus) { + return getService() + .updateApiRole(userId, groupId, apiRoleId, apiCode, roleId, + roleCode, apiRoleStatus); + } + + public static ApiRoleLocalService getService() { + return _serviceTracker.getService(); + } + + private static ServiceTracker _serviceTracker; + + static { + Bundle bundle = FrameworkUtil.getBundle(ApiRoleLocalService.class); + + ServiceTracker serviceTracker = new ServiceTracker(bundle.getBundleContext(), + ApiRoleLocalService.class, null); + + serviceTracker.open(); + + _serviceTracker = serviceTracker; + } +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiRoleLocalServiceWrapper.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiRoleLocalServiceWrapper.java new file mode 100644 index 0000000000..707a611c9b --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/ApiRoleLocalServiceWrapper.java @@ -0,0 +1,291 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link ApiRoleLocalService}. + * + * @author binhth + * @see ApiRoleLocalService + * @generated + */ +@ProviderType +public class ApiRoleLocalServiceWrapper implements ApiRoleLocalService, + ServiceWrapper { + public ApiRoleLocalServiceWrapper(ApiRoleLocalService apiRoleLocalService) { + _apiRoleLocalService = apiRoleLocalService; + } + + /** + * Adds the api role to the database. Also notifies the appropriate model listeners. + * + * @param apiRole the api role + * @return the api role that was added + */ + @Override + public org.opencps.adminconfig.model.ApiRole addApiRole( + org.opencps.adminconfig.model.ApiRole apiRole) { + return _apiRoleLocalService.addApiRole(apiRole); + } + + @Override + public int countByG(long groupId) { + return _apiRoleLocalService.countByG(groupId); + } + + /** + * Creates a new api role with the primary key. Does not add the api role to the database. + * + * @param apiRoleId the primary key for the new api role + * @return the new api role + */ + @Override + public org.opencps.adminconfig.model.ApiRole createApiRole(long apiRoleId) { + return _apiRoleLocalService.createApiRole(apiRoleId); + } + + /** + * Deletes the api role from the database. Also notifies the appropriate model listeners. + * + * @param apiRole the api role + * @return the api role that was removed + */ + @Override + public org.opencps.adminconfig.model.ApiRole deleteApiRole( + org.opencps.adminconfig.model.ApiRole apiRole) { + return _apiRoleLocalService.deleteApiRole(apiRole); + } + + /** + * Deletes the api role with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param apiRoleId the primary key of the api role + * @return the api role that was removed + * @throws PortalException if a api role with the primary key could not be found + */ + @Override + public org.opencps.adminconfig.model.ApiRole deleteApiRole(long apiRoleId) + throws com.liferay.portal.kernel.exception.PortalException { + return _apiRoleLocalService.deleteApiRole(apiRoleId); + } + + /** + * @throws PortalException + */ + @Override + public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( + com.liferay.portal.kernel.model.PersistedModel persistedModel) + throws com.liferay.portal.kernel.exception.PortalException { + return _apiRoleLocalService.deletePersistedModel(persistedModel); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return _apiRoleLocalService.dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return _apiRoleLocalService.dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) { + return _apiRoleLocalService.dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return _apiRoleLocalService.dynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return _apiRoleLocalService.dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) { + return _apiRoleLocalService.dynamicQueryCount(dynamicQuery, projection); + } + + @Override + public org.opencps.adminconfig.model.ApiRole fetchApiRole(long apiRoleId) { + return _apiRoleLocalService.fetchApiRole(apiRoleId); + } + + @Override + public java.util.List findByG( + long groupId) { + return _apiRoleLocalService.findByG(groupId); + } + + @Override + public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { + return _apiRoleLocalService.getActionableDynamicQuery(); + } + + /** + * Returns the api role with the primary key. + * + * @param apiRoleId the primary key of the api role + * @return the api role + * @throws PortalException if a api role with the primary key could not be found + */ + @Override + public org.opencps.adminconfig.model.ApiRole getApiRole(long apiRoleId) + throws com.liferay.portal.kernel.exception.PortalException { + return _apiRoleLocalService.getApiRole(apiRoleId); + } + + /** + * Returns a range of all the api roles. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @return the range of api roles + */ + @Override + public java.util.List getApiRoles( + int start, int end) { + return _apiRoleLocalService.getApiRoles(start, end); + } + + /** + * Returns the number of api roles. + * + * @return the number of api roles + */ + @Override + public int getApiRolesCount() { + return _apiRoleLocalService.getApiRolesCount(); + } + + @Override + public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + return _apiRoleLocalService.getIndexableActionableDynamicQuery(); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + @Override + public String getOSGiServiceIdentifier() { + return _apiRoleLocalService.getOSGiServiceIdentifier(); + } + + @Override + public com.liferay.portal.kernel.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException { + return _apiRoleLocalService.getPersistedModel(primaryKeyObj); + } + + /** + * Updates the api role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param apiRole the api role + * @return the api role that was updated + */ + @Override + public org.opencps.adminconfig.model.ApiRole updateApiRole( + org.opencps.adminconfig.model.ApiRole apiRole) { + return _apiRoleLocalService.updateApiRole(apiRole); + } + + @Override + public org.opencps.adminconfig.model.ApiRole updateApiRole(long userId, + long groupId, long apiRoleId, String apiCode, long roleId, + String roleCode, int apiRoleStatus) { + return _apiRoleLocalService.updateApiRole(userId, groupId, apiRoleId, + apiCode, roleId, roleCode, apiRoleStatus); + } + + @Override + public ApiRoleLocalService getWrappedService() { + return _apiRoleLocalService; + } + + @Override + public void setWrappedService(ApiRoleLocalService apiRoleLocalService) { + _apiRoleLocalService = apiRoleLocalService; + } + + private ApiRoleLocalService _apiRoleLocalService; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/SyncTrackingLocalService.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/SyncTrackingLocalService.java new file mode 100644 index 0000000000..3dd24e348b --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/SyncTrackingLocalService.java @@ -0,0 +1,336 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.exportimport.kernel.lar.PortletDataContext; + +import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.service.BaseLocalService; +import com.liferay.portal.kernel.service.PersistedModelLocalService; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Propagation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.kernel.util.OrderByComparator; + +import org.opencps.adminconfig.model.SyncTracking; + +import java.io.Serializable; + +import java.util.Date; +import java.util.List; + +/** + * Provides the local service interface for SyncTracking. Methods of this + * service will not have security checks based on the propagated JAAS + * credentials because this service can only be accessed from within the same + * VM. + * + * @author binhth + * @see SyncTrackingLocalServiceUtil + * @see org.opencps.adminconfig.service.base.SyncTrackingLocalServiceBaseImpl + * @see org.opencps.adminconfig.service.impl.SyncTrackingLocalServiceImpl + * @generated + */ +@ProviderType +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface SyncTrackingLocalService extends BaseLocalService, + PersistedModelLocalService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link SyncTrackingLocalServiceUtil} to access the sync tracking local service. Add custom service methods to {@link org.opencps.adminconfig.service.impl.SyncTrackingLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Adds the sync tracking to the database. Also notifies the appropriate model listeners. + * + * @param syncTracking the sync tracking + * @return the sync tracking that was added + */ + @Indexable(type = IndexableType.REINDEX) + public SyncTracking addSyncTracking(SyncTracking syncTracking); + + /** + * Creates a new sync tracking with the primary key. Does not add the sync tracking to the database. + * + * @param trackingId the primary key for the new sync tracking + * @return the new sync tracking + */ + @Transactional(enabled = false) + public SyncTracking createSyncTracking(long trackingId); + + /** + * @throws PortalException + */ + @Override + public PersistedModel deletePersistedModel(PersistedModel persistedModel) + throws PortalException; + + /** + * Deletes the sync tracking with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking that was removed + * @throws PortalException if a sync tracking with the primary key could not be found + */ + @Indexable(type = IndexableType.DELETE) + public SyncTracking deleteSyncTracking(long trackingId) + throws PortalException; + + /** + * Deletes the sync tracking from the database. Also notifies the appropriate model listeners. + * + * @param syncTracking the sync tracking + * @return the sync tracking that was removed + */ + @Indexable(type = IndexableType.DELETE) + public SyncTracking deleteSyncTracking(SyncTracking syncTracking); + + public DynamicQuery dynamicQuery(); + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery); + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end); + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end, OrderByComparator orderByComparator); + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + public long dynamicQueryCount(DynamicQuery dynamicQuery); + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public SyncTracking fetchSyncTracking(long trackingId); + + /** + * Returns the sync tracking matching the UUID and group. + * + * @param uuid the sync tracking's UUID + * @param groupId the primary key of the group + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public SyncTracking fetchSyncTrackingByUuidAndGroupId(String uuid, + long groupId); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ActionableDynamicQuery getActionableDynamicQuery(); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByApiAndDate(String api, Date fromDate, + Date toDate, int start, int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByApiAndDossierNoAndDate(String api, + String dossierNo, Date fromDate, Date toDate, int start, int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByApiAndServiceCodeAndDate(String api, + String serviceCode, Date fromDate, Date toDate, int start, int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByApiAndServiceCodeAndDossierNoAndDate( + String api, String dossierNo, String serviceCode, Date fromDate, + Date toDate, int start, int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByDate(Date fromDate, Date toDate, int start, + int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public SyncTracking getByDossierNo(String dossierNo); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByDossierNoAndDate(String dossierNo, + Date fromDate, Date toDate, int start, int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByDossierNoAndServiceCodeAndDate( + String dossierNo, String serviceCode, Date fromDate, Date toDate, + int start, int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public SyncTracking getByReferenceUid(String referenceUid); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByReferenceUidAndDate(String referenceUid, + Date fromDate, Date toDate, int start, int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByServiceCodeAndDate(String serviceCode, + Date fromDate, Date toDate, int start, int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ExportActionableDynamicQuery getExportActionableDynamicQuery( + PortletDataContext portletDataContext); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + public String getOSGiServiceIdentifier(); + + @Override + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException; + + /** + * Returns the sync tracking with the primary key. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking + * @throws PortalException if a sync tracking with the primary key could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public SyncTracking getSyncTracking(long trackingId) + throws PortalException; + + /** + * Returns the sync tracking matching the UUID and group. + * + * @param uuid the sync tracking's UUID + * @param groupId the primary key of the group + * @return the matching sync tracking + * @throws PortalException if a matching sync tracking could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public SyncTracking getSyncTrackingByUuidAndGroupId(String uuid, + long groupId) throws PortalException; + + /** + * Returns a range of all the sync trackings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of sync trackings + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getSyncTrackings(int start, int end); + + /** + * Returns all the sync trackings matching the UUID and company. + * + * @param uuid the UUID of the sync trackings + * @param companyId the primary key of the company + * @return the matching sync trackings, or an empty list if no matches were found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getSyncTrackingsByUuidAndCompanyId(String uuid, + long companyId); + + /** + * Returns a range of sync trackings matching the UUID and company. + * + * @param uuid the UUID of the sync trackings + * @param companyId the primary key of the company + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching sync trackings, or an empty list if no matches were found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getSyncTrackingsByUuidAndCompanyId(String uuid, + long companyId, int start, int end, + OrderByComparator orderByComparator); + + /** + * Returns the number of sync trackings. + * + * @return the number of sync trackings + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getSyncTrackingsCount(); + + public SyncTracking updateSyncTracking(long userId, long groupId, + long trackingId, String dossierNo, String referenceUid, + String serviceCode, int stateSync, String api, String bodyRequest, + String bodyResponse); + + /** + * Updates the sync tracking in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param syncTracking the sync tracking + * @return the sync tracking that was updated + */ + @Indexable(type = IndexableType.REINDEX) + public SyncTracking updateSyncTracking(SyncTracking syncTracking); +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/SyncTrackingLocalServiceUtil.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/SyncTrackingLocalServiceUtil.java new file mode 100644 index 0000000000..990b5e7ae9 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/SyncTrackingLocalServiceUtil.java @@ -0,0 +1,420 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service; + +import aQute.bnd.annotation.ProviderType; + +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; + +import org.osgi.util.tracker.ServiceTracker; + +/** + * Provides the local service utility for SyncTracking. This utility wraps + * {@link org.opencps.adminconfig.service.impl.SyncTrackingLocalServiceImpl} and is the + * primary access point for service operations in application layer code running + * on the local server. Methods of this service will not have security checks + * based on the propagated JAAS credentials because this service can only be + * accessed from within the same VM. + * + * @author binhth + * @see SyncTrackingLocalService + * @see org.opencps.adminconfig.service.base.SyncTrackingLocalServiceBaseImpl + * @see org.opencps.adminconfig.service.impl.SyncTrackingLocalServiceImpl + * @generated + */ +@ProviderType +public class SyncTrackingLocalServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link org.opencps.adminconfig.service.impl.SyncTrackingLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Adds the sync tracking to the database. Also notifies the appropriate model listeners. + * + * @param syncTracking the sync tracking + * @return the sync tracking that was added + */ + public static org.opencps.adminconfig.model.SyncTracking addSyncTracking( + org.opencps.adminconfig.model.SyncTracking syncTracking) { + return getService().addSyncTracking(syncTracking); + } + + /** + * Creates a new sync tracking with the primary key. Does not add the sync tracking to the database. + * + * @param trackingId the primary key for the new sync tracking + * @return the new sync tracking + */ + public static org.opencps.adminconfig.model.SyncTracking createSyncTracking( + long trackingId) { + return getService().createSyncTracking(trackingId); + } + + /** + * @throws PortalException + */ + public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( + com.liferay.portal.kernel.model.PersistedModel persistedModel) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().deletePersistedModel(persistedModel); + } + + /** + * Deletes the sync tracking with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking that was removed + * @throws PortalException if a sync tracking with the primary key could not be found + */ + public static org.opencps.adminconfig.model.SyncTracking deleteSyncTracking( + long trackingId) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().deleteSyncTracking(trackingId); + } + + /** + * Deletes the sync tracking from the database. Also notifies the appropriate model listeners. + * + * @param syncTracking the sync tracking + * @return the sync tracking that was removed + */ + public static org.opencps.adminconfig.model.SyncTracking deleteSyncTracking( + org.opencps.adminconfig.model.SyncTracking syncTracking) { + return getService().deleteSyncTracking(syncTracking); + } + + public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return getService().dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return getService().dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) { + return getService().dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return getService() + .dynamicQuery(dynamicQuery, start, end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return getService().dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) { + return getService().dynamicQueryCount(dynamicQuery, projection); + } + + public static org.opencps.adminconfig.model.SyncTracking fetchSyncTracking( + long trackingId) { + return getService().fetchSyncTracking(trackingId); + } + + /** + * Returns the sync tracking matching the UUID and group. + * + * @param uuid the sync tracking's UUID + * @param groupId the primary key of the group + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public static org.opencps.adminconfig.model.SyncTracking fetchSyncTrackingByUuidAndGroupId( + String uuid, long groupId) { + return getService().fetchSyncTrackingByUuidAndGroupId(uuid, groupId); + } + + public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { + return getService().getActionableDynamicQuery(); + } + + public static java.util.List getByApiAndDate( + String api, java.util.Date fromDate, java.util.Date toDate, int start, + int end) { + return getService().getByApiAndDate(api, fromDate, toDate, start, end); + } + + public static java.util.List getByApiAndDossierNoAndDate( + String api, String dossierNo, java.util.Date fromDate, + java.util.Date toDate, int start, int end) { + return getService() + .getByApiAndDossierNoAndDate(api, dossierNo, fromDate, + toDate, start, end); + } + + public static java.util.List getByApiAndServiceCodeAndDate( + String api, String serviceCode, java.util.Date fromDate, + java.util.Date toDate, int start, int end) { + return getService() + .getByApiAndServiceCodeAndDate(api, serviceCode, fromDate, + toDate, start, end); + } + + public static java.util.List getByApiAndServiceCodeAndDossierNoAndDate( + String api, String dossierNo, String serviceCode, + java.util.Date fromDate, java.util.Date toDate, int start, int end) { + return getService() + .getByApiAndServiceCodeAndDossierNoAndDate(api, dossierNo, + serviceCode, fromDate, toDate, start, end); + } + + public static java.util.List getByDate( + java.util.Date fromDate, java.util.Date toDate, int start, int end) { + return getService().getByDate(fromDate, toDate, start, end); + } + + public static org.opencps.adminconfig.model.SyncTracking getByDossierNo( + String dossierNo) { + return getService().getByDossierNo(dossierNo); + } + + public static java.util.List getByDossierNoAndDate( + String dossierNo, java.util.Date fromDate, java.util.Date toDate, + int start, int end) { + return getService() + .getByDossierNoAndDate(dossierNo, fromDate, toDate, start, + end); + } + + public static java.util.List getByDossierNoAndServiceCodeAndDate( + String dossierNo, String serviceCode, java.util.Date fromDate, + java.util.Date toDate, int start, int end) { + return getService() + .getByDossierNoAndServiceCodeAndDate(dossierNo, serviceCode, + fromDate, toDate, start, end); + } + + public static org.opencps.adminconfig.model.SyncTracking getByReferenceUid( + String referenceUid) { + return getService().getByReferenceUid(referenceUid); + } + + public static java.util.List getByReferenceUidAndDate( + String referenceUid, java.util.Date fromDate, java.util.Date toDate, + int start, int end) { + return getService() + .getByReferenceUidAndDate(referenceUid, fromDate, toDate, + start, end); + } + + public static java.util.List getByServiceCodeAndDate( + String serviceCode, java.util.Date fromDate, java.util.Date toDate, + int start, int end) { + return getService() + .getByServiceCodeAndDate(serviceCode, fromDate, toDate, + start, end); + } + + public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( + com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) { + return getService().getExportActionableDynamicQuery(portletDataContext); + } + + public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + return getService().getIndexableActionableDynamicQuery(); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + public static String getOSGiServiceIdentifier() { + return getService().getOSGiServiceIdentifier(); + } + + public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getPersistedModel(primaryKeyObj); + } + + /** + * Returns the sync tracking with the primary key. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking + * @throws PortalException if a sync tracking with the primary key could not be found + */ + public static org.opencps.adminconfig.model.SyncTracking getSyncTracking( + long trackingId) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getSyncTracking(trackingId); + } + + /** + * Returns the sync tracking matching the UUID and group. + * + * @param uuid the sync tracking's UUID + * @param groupId the primary key of the group + * @return the matching sync tracking + * @throws PortalException if a matching sync tracking could not be found + */ + public static org.opencps.adminconfig.model.SyncTracking getSyncTrackingByUuidAndGroupId( + String uuid, long groupId) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getSyncTrackingByUuidAndGroupId(uuid, groupId); + } + + /** + * Returns a range of all the sync trackings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of sync trackings + */ + public static java.util.List getSyncTrackings( + int start, int end) { + return getService().getSyncTrackings(start, end); + } + + /** + * Returns all the sync trackings matching the UUID and company. + * + * @param uuid the UUID of the sync trackings + * @param companyId the primary key of the company + * @return the matching sync trackings, or an empty list if no matches were found + */ + public static java.util.List getSyncTrackingsByUuidAndCompanyId( + String uuid, long companyId) { + return getService().getSyncTrackingsByUuidAndCompanyId(uuid, companyId); + } + + /** + * Returns a range of sync trackings matching the UUID and company. + * + * @param uuid the UUID of the sync trackings + * @param companyId the primary key of the company + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching sync trackings, or an empty list if no matches were found + */ + public static java.util.List getSyncTrackingsByUuidAndCompanyId( + String uuid, long companyId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return getService() + .getSyncTrackingsByUuidAndCompanyId(uuid, companyId, start, + end, orderByComparator); + } + + /** + * Returns the number of sync trackings. + * + * @return the number of sync trackings + */ + public static int getSyncTrackingsCount() { + return getService().getSyncTrackingsCount(); + } + + public static org.opencps.adminconfig.model.SyncTracking updateSyncTracking( + long userId, long groupId, long trackingId, String dossierNo, + String referenceUid, String serviceCode, int stateSync, String api, + String bodyRequest, String bodyResponse) { + return getService() + .updateSyncTracking(userId, groupId, trackingId, dossierNo, + referenceUid, serviceCode, stateSync, api, bodyRequest, bodyResponse); + } + + /** + * Updates the sync tracking in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param syncTracking the sync tracking + * @return the sync tracking that was updated + */ + public static org.opencps.adminconfig.model.SyncTracking updateSyncTracking( + org.opencps.adminconfig.model.SyncTracking syncTracking) { + return getService().updateSyncTracking(syncTracking); + } + + public static SyncTrackingLocalService getService() { + return _serviceTracker.getService(); + } + + private static ServiceTracker _serviceTracker; + + static { + Bundle bundle = FrameworkUtil.getBundle(SyncTrackingLocalService.class); + + ServiceTracker serviceTracker = + new ServiceTracker(bundle.getBundleContext(), + SyncTrackingLocalService.class, null); + + serviceTracker.open(); + + _serviceTracker = serviceTracker; + } +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/SyncTrackingLocalServiceWrapper.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/SyncTrackingLocalServiceWrapper.java new file mode 100644 index 0000000000..efe75fbead --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/SyncTrackingLocalServiceWrapper.java @@ -0,0 +1,439 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link SyncTrackingLocalService}. + * + * @author binhth + * @see SyncTrackingLocalService + * @generated + */ +@ProviderType +public class SyncTrackingLocalServiceWrapper implements SyncTrackingLocalService, + ServiceWrapper { + public SyncTrackingLocalServiceWrapper( + SyncTrackingLocalService syncTrackingLocalService) { + _syncTrackingLocalService = syncTrackingLocalService; + } + + /** + * Adds the sync tracking to the database. Also notifies the appropriate model listeners. + * + * @param syncTracking the sync tracking + * @return the sync tracking that was added + */ + @Override + public org.opencps.adminconfig.model.SyncTracking addSyncTracking( + org.opencps.adminconfig.model.SyncTracking syncTracking) { + return _syncTrackingLocalService.addSyncTracking(syncTracking); + } + + /** + * Creates a new sync tracking with the primary key. Does not add the sync tracking to the database. + * + * @param trackingId the primary key for the new sync tracking + * @return the new sync tracking + */ + @Override + public org.opencps.adminconfig.model.SyncTracking createSyncTracking( + long trackingId) { + return _syncTrackingLocalService.createSyncTracking(trackingId); + } + + /** + * @throws PortalException + */ + @Override + public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( + com.liferay.portal.kernel.model.PersistedModel persistedModel) + throws com.liferay.portal.kernel.exception.PortalException { + return _syncTrackingLocalService.deletePersistedModel(persistedModel); + } + + /** + * Deletes the sync tracking with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking that was removed + * @throws PortalException if a sync tracking with the primary key could not be found + */ + @Override + public org.opencps.adminconfig.model.SyncTracking deleteSyncTracking( + long trackingId) + throws com.liferay.portal.kernel.exception.PortalException { + return _syncTrackingLocalService.deleteSyncTracking(trackingId); + } + + /** + * Deletes the sync tracking from the database. Also notifies the appropriate model listeners. + * + * @param syncTracking the sync tracking + * @return the sync tracking that was removed + */ + @Override + public org.opencps.adminconfig.model.SyncTracking deleteSyncTracking( + org.opencps.adminconfig.model.SyncTracking syncTracking) { + return _syncTrackingLocalService.deleteSyncTracking(syncTracking); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return _syncTrackingLocalService.dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return _syncTrackingLocalService.dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) { + return _syncTrackingLocalService.dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return _syncTrackingLocalService.dynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return _syncTrackingLocalService.dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) { + return _syncTrackingLocalService.dynamicQueryCount(dynamicQuery, + projection); + } + + @Override + public org.opencps.adminconfig.model.SyncTracking fetchSyncTracking( + long trackingId) { + return _syncTrackingLocalService.fetchSyncTracking(trackingId); + } + + /** + * Returns the sync tracking matching the UUID and group. + * + * @param uuid the sync tracking's UUID + * @param groupId the primary key of the group + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public org.opencps.adminconfig.model.SyncTracking fetchSyncTrackingByUuidAndGroupId( + String uuid, long groupId) { + return _syncTrackingLocalService.fetchSyncTrackingByUuidAndGroupId(uuid, + groupId); + } + + @Override + public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { + return _syncTrackingLocalService.getActionableDynamicQuery(); + } + + @Override + public java.util.List getByApiAndDate( + String api, java.util.Date fromDate, java.util.Date toDate, int start, + int end) { + return _syncTrackingLocalService.getByApiAndDate(api, fromDate, toDate, + start, end); + } + + @Override + public java.util.List getByApiAndDossierNoAndDate( + String api, String dossierNo, java.util.Date fromDate, + java.util.Date toDate, int start, int end) { + return _syncTrackingLocalService.getByApiAndDossierNoAndDate(api, + dossierNo, fromDate, toDate, start, end); + } + + @Override + public java.util.List getByApiAndServiceCodeAndDate( + String api, String serviceCode, java.util.Date fromDate, + java.util.Date toDate, int start, int end) { + return _syncTrackingLocalService.getByApiAndServiceCodeAndDate(api, + serviceCode, fromDate, toDate, start, end); + } + + @Override + public java.util.List getByApiAndServiceCodeAndDossierNoAndDate( + String api, String dossierNo, String serviceCode, + java.util.Date fromDate, java.util.Date toDate, int start, int end) { + return _syncTrackingLocalService.getByApiAndServiceCodeAndDossierNoAndDate(api, + dossierNo, serviceCode, fromDate, toDate, start, end); + } + + @Override + public java.util.List getByDate( + java.util.Date fromDate, java.util.Date toDate, int start, int end) { + return _syncTrackingLocalService.getByDate(fromDate, toDate, start, end); + } + + @Override + public org.opencps.adminconfig.model.SyncTracking getByDossierNo( + String dossierNo) { + return _syncTrackingLocalService.getByDossierNo(dossierNo); + } + + @Override + public java.util.List getByDossierNoAndDate( + String dossierNo, java.util.Date fromDate, java.util.Date toDate, + int start, int end) { + return _syncTrackingLocalService.getByDossierNoAndDate(dossierNo, + fromDate, toDate, start, end); + } + + @Override + public java.util.List getByDossierNoAndServiceCodeAndDate( + String dossierNo, String serviceCode, java.util.Date fromDate, + java.util.Date toDate, int start, int end) { + return _syncTrackingLocalService.getByDossierNoAndServiceCodeAndDate(dossierNo, + serviceCode, fromDate, toDate, start, end); + } + + @Override + public org.opencps.adminconfig.model.SyncTracking getByReferenceUid( + String referenceUid) { + return _syncTrackingLocalService.getByReferenceUid(referenceUid); + } + + @Override + public java.util.List getByReferenceUidAndDate( + String referenceUid, java.util.Date fromDate, java.util.Date toDate, + int start, int end) { + return _syncTrackingLocalService.getByReferenceUidAndDate(referenceUid, + fromDate, toDate, start, end); + } + + @Override + public java.util.List getByServiceCodeAndDate( + String serviceCode, java.util.Date fromDate, java.util.Date toDate, + int start, int end) { + return _syncTrackingLocalService.getByServiceCodeAndDate(serviceCode, + fromDate, toDate, start, end); + } + + @Override + public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( + com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) { + return _syncTrackingLocalService.getExportActionableDynamicQuery(portletDataContext); + } + + @Override + public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + return _syncTrackingLocalService.getIndexableActionableDynamicQuery(); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + @Override + public String getOSGiServiceIdentifier() { + return _syncTrackingLocalService.getOSGiServiceIdentifier(); + } + + @Override + public com.liferay.portal.kernel.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException { + return _syncTrackingLocalService.getPersistedModel(primaryKeyObj); + } + + /** + * Returns the sync tracking with the primary key. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking + * @throws PortalException if a sync tracking with the primary key could not be found + */ + @Override + public org.opencps.adminconfig.model.SyncTracking getSyncTracking( + long trackingId) + throws com.liferay.portal.kernel.exception.PortalException { + return _syncTrackingLocalService.getSyncTracking(trackingId); + } + + /** + * Returns the sync tracking matching the UUID and group. + * + * @param uuid the sync tracking's UUID + * @param groupId the primary key of the group + * @return the matching sync tracking + * @throws PortalException if a matching sync tracking could not be found + */ + @Override + public org.opencps.adminconfig.model.SyncTracking getSyncTrackingByUuidAndGroupId( + String uuid, long groupId) + throws com.liferay.portal.kernel.exception.PortalException { + return _syncTrackingLocalService.getSyncTrackingByUuidAndGroupId(uuid, + groupId); + } + + /** + * Returns a range of all the sync trackings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of sync trackings + */ + @Override + public java.util.List getSyncTrackings( + int start, int end) { + return _syncTrackingLocalService.getSyncTrackings(start, end); + } + + /** + * Returns all the sync trackings matching the UUID and company. + * + * @param uuid the UUID of the sync trackings + * @param companyId the primary key of the company + * @return the matching sync trackings, or an empty list if no matches were found + */ + @Override + public java.util.List getSyncTrackingsByUuidAndCompanyId( + String uuid, long companyId) { + return _syncTrackingLocalService.getSyncTrackingsByUuidAndCompanyId(uuid, + companyId); + } + + /** + * Returns a range of sync trackings matching the UUID and company. + * + * @param uuid the UUID of the sync trackings + * @param companyId the primary key of the company + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching sync trackings, or an empty list if no matches were found + */ + @Override + public java.util.List getSyncTrackingsByUuidAndCompanyId( + String uuid, long companyId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return _syncTrackingLocalService.getSyncTrackingsByUuidAndCompanyId(uuid, + companyId, start, end, orderByComparator); + } + + /** + * Returns the number of sync trackings. + * + * @return the number of sync trackings + */ + @Override + public int getSyncTrackingsCount() { + return _syncTrackingLocalService.getSyncTrackingsCount(); + } + + @Override + public org.opencps.adminconfig.model.SyncTracking updateSyncTracking( + long userId, long groupId, long trackingId, String dossierNo, + String referenceUid, String serviceCode, int stateSync, String api, + String bodyRequest, String bodyResponse) { + return _syncTrackingLocalService.updateSyncTracking(userId, groupId, + trackingId, dossierNo, referenceUid, serviceCode, stateSync, api, + bodyRequest, bodyResponse); + } + + /** + * Updates the sync tracking in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param syncTracking the sync tracking + * @return the sync tracking that was updated + */ + @Override + public org.opencps.adminconfig.model.SyncTracking updateSyncTracking( + org.opencps.adminconfig.model.SyncTracking syncTracking) { + return _syncTrackingLocalService.updateSyncTracking(syncTracking); + } + + @Override + public SyncTrackingLocalService getWrappedService() { + return _syncTrackingLocalService; + } + + @Override + public void setWrappedService( + SyncTrackingLocalService syncTrackingLocalService) { + _syncTrackingLocalService = syncTrackingLocalService; + } + + private SyncTrackingLocalService _syncTrackingLocalService; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/ApiManagerPersistence.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/ApiManagerPersistence.java new file mode 100644 index 0000000000..edfd6e930d --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/ApiManagerPersistence.java @@ -0,0 +1,383 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.service.persistence.BasePersistence; + +import org.opencps.adminconfig.exception.NoSuchApiManagerException; +import org.opencps.adminconfig.model.ApiManager; + +/** + * The persistence interface for the api manager service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author binhth + * @see org.opencps.adminconfig.service.persistence.impl.ApiManagerPersistenceImpl + * @see ApiManagerUtil + * @generated + */ +@ProviderType +public interface ApiManagerPersistence extends BasePersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link ApiManagerUtil} to access the api manager persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. + */ + + /** + * Returns the api manager where apiManagerId = ? or throws a {@link NoSuchApiManagerException} if it could not be found. + * + * @param apiManagerId the api manager ID + * @return the matching api manager + * @throws NoSuchApiManagerException if a matching api manager could not be found + */ + public ApiManager findByF_ID(long apiManagerId) + throws NoSuchApiManagerException; + + /** + * Returns the api manager where apiManagerId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param apiManagerId the api manager ID + * @return the matching api manager, or null if a matching api manager could not be found + */ + public ApiManager fetchByF_ID(long apiManagerId); + + /** + * Returns the api manager where apiManagerId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param apiManagerId the api manager ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching api manager, or null if a matching api manager could not be found + */ + public ApiManager fetchByF_ID(long apiManagerId, boolean retrieveFromCache); + + /** + * Removes the api manager where apiManagerId = ? from the database. + * + * @param apiManagerId the api manager ID + * @return the api manager that was removed + */ + public ApiManager removeByF_ID(long apiManagerId) + throws NoSuchApiManagerException; + + /** + * Returns the number of api managers where apiManagerId = ?. + * + * @param apiManagerId the api manager ID + * @return the number of matching api managers + */ + public int countByF_ID(long apiManagerId); + + /** + * Returns the api manager where apiCode = ? or throws a {@link NoSuchApiManagerException} if it could not be found. + * + * @param apiCode the api code + * @return the matching api manager + * @throws NoSuchApiManagerException if a matching api manager could not be found + */ + public ApiManager findByF_apiCode(String apiCode) + throws NoSuchApiManagerException; + + /** + * Returns the api manager where apiCode = ? or returns null if it could not be found. Uses the finder cache. + * + * @param apiCode the api code + * @return the matching api manager, or null if a matching api manager could not be found + */ + public ApiManager fetchByF_apiCode(String apiCode); + + /** + * Returns the api manager where apiCode = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param apiCode the api code + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching api manager, or null if a matching api manager could not be found + */ + public ApiManager fetchByF_apiCode(String apiCode, boolean retrieveFromCache); + + /** + * Removes the api manager where apiCode = ? from the database. + * + * @param apiCode the api code + * @return the api manager that was removed + */ + public ApiManager removeByF_apiCode(String apiCode) + throws NoSuchApiManagerException; + + /** + * Returns the number of api managers where apiCode = ?. + * + * @param apiCode the api code + * @return the number of matching api managers + */ + public int countByF_apiCode(String apiCode); + + /** + * Returns all the api managers where groupId = ?. + * + * @param groupId the group ID + * @return the matching api managers + */ + public java.util.List findByF_GID(long groupId); + + /** + * Returns a range of all the api managers where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @return the range of matching api managers + */ + public java.util.List findByF_GID(long groupId, int start, + int end); + + /** + * Returns an ordered range of all the api managers where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching api managers + */ + public java.util.List findByF_GID(long groupId, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the api managers where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching api managers + */ + public java.util.List findByF_GID(long groupId, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first api manager in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching api manager + * @throws NoSuchApiManagerException if a matching api manager could not be found + */ + public ApiManager findByF_GID_First(long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchApiManagerException; + + /** + * Returns the first api manager in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching api manager, or null if a matching api manager could not be found + */ + public ApiManager fetchByF_GID_First(long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last api manager in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching api manager + * @throws NoSuchApiManagerException if a matching api manager could not be found + */ + public ApiManager findByF_GID_Last(long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchApiManagerException; + + /** + * Returns the last api manager in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching api manager, or null if a matching api manager could not be found + */ + public ApiManager fetchByF_GID_Last(long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the api managers before and after the current api manager in the ordered set where groupId = ?. + * + * @param apiManagerId the primary key of the current api manager + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next api manager + * @throws NoSuchApiManagerException if a api manager with the primary key could not be found + */ + public ApiManager[] findByF_GID_PrevAndNext(long apiManagerId, + long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchApiManagerException; + + /** + * Removes all the api managers where groupId = ? from the database. + * + * @param groupId the group ID + */ + public void removeByF_GID(long groupId); + + /** + * Returns the number of api managers where groupId = ?. + * + * @param groupId the group ID + * @return the number of matching api managers + */ + public int countByF_GID(long groupId); + + /** + * Caches the api manager in the entity cache if it is enabled. + * + * @param apiManager the api manager + */ + public void cacheResult(ApiManager apiManager); + + /** + * Caches the api managers in the entity cache if it is enabled. + * + * @param apiManagers the api managers + */ + public void cacheResult(java.util.List apiManagers); + + /** + * Creates a new api manager with the primary key. Does not add the api manager to the database. + * + * @param apiManagerId the primary key for the new api manager + * @return the new api manager + */ + public ApiManager create(long apiManagerId); + + /** + * Removes the api manager with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager that was removed + * @throws NoSuchApiManagerException if a api manager with the primary key could not be found + */ + public ApiManager remove(long apiManagerId) + throws NoSuchApiManagerException; + + public ApiManager updateImpl(ApiManager apiManager); + + /** + * Returns the api manager with the primary key or throws a {@link NoSuchApiManagerException} if it could not be found. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager + * @throws NoSuchApiManagerException if a api manager with the primary key could not be found + */ + public ApiManager findByPrimaryKey(long apiManagerId) + throws NoSuchApiManagerException; + + /** + * Returns the api manager with the primary key or returns null if it could not be found. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager, or null if a api manager with the primary key could not be found + */ + public ApiManager fetchByPrimaryKey(long apiManagerId); + + @Override + public java.util.Map fetchByPrimaryKeys( + java.util.Set primaryKeys); + + /** + * Returns all the api managers. + * + * @return the api managers + */ + public java.util.List findAll(); + + /** + * Returns a range of all the api managers. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @return the range of api managers + */ + public java.util.List findAll(int start, int end); + + /** + * Returns an ordered range of all the api managers. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of api managers + */ + public java.util.List findAll(int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the api managers. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of api managers + */ + public java.util.List findAll(int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Removes all the api managers from the database. + */ + public void removeAll(); + + /** + * Returns the number of api managers. + * + * @return the number of api managers + */ + public int countAll(); +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/ApiManagerUtil.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/ApiManagerUtil.java new file mode 100644 index 0000000000..08af38ebf3 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/ApiManagerUtil.java @@ -0,0 +1,545 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.util.OrderByComparator; + +import org.opencps.adminconfig.model.ApiManager; + +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; + +import org.osgi.util.tracker.ServiceTracker; + +import java.util.List; + +/** + * The persistence utility for the api manager service. This utility wraps {@link org.opencps.adminconfig.service.persistence.impl.ApiManagerPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author binhth + * @see ApiManagerPersistence + * @see org.opencps.adminconfig.service.persistence.impl.ApiManagerPersistenceImpl + * @generated + */ +@ProviderType +public class ApiManagerUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache() + */ + public static void clearCache() { + getPersistence().clearCache(); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache(com.liferay.portal.kernel.model.BaseModel) + */ + public static void clearCache(ApiManager apiManager) { + getPersistence().clearCache(apiManager); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) + */ + public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { + return getPersistence().countWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery) { + return getPersistence().findWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end) { + return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findWithDynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel) + */ + public static ApiManager update(ApiManager apiManager) { + return getPersistence().update(apiManager); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel, ServiceContext) + */ + public static ApiManager update(ApiManager apiManager, + ServiceContext serviceContext) { + return getPersistence().update(apiManager, serviceContext); + } + + /** + * Returns the api manager where apiManagerId = ? or throws a {@link NoSuchApiManagerException} if it could not be found. + * + * @param apiManagerId the api manager ID + * @return the matching api manager + * @throws NoSuchApiManagerException if a matching api manager could not be found + */ + public static ApiManager findByF_ID(long apiManagerId) + throws org.opencps.adminconfig.exception.NoSuchApiManagerException { + return getPersistence().findByF_ID(apiManagerId); + } + + /** + * Returns the api manager where apiManagerId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param apiManagerId the api manager ID + * @return the matching api manager, or null if a matching api manager could not be found + */ + public static ApiManager fetchByF_ID(long apiManagerId) { + return getPersistence().fetchByF_ID(apiManagerId); + } + + /** + * Returns the api manager where apiManagerId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param apiManagerId the api manager ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching api manager, or null if a matching api manager could not be found + */ + public static ApiManager fetchByF_ID(long apiManagerId, + boolean retrieveFromCache) { + return getPersistence().fetchByF_ID(apiManagerId, retrieveFromCache); + } + + /** + * Removes the api manager where apiManagerId = ? from the database. + * + * @param apiManagerId the api manager ID + * @return the api manager that was removed + */ + public static ApiManager removeByF_ID(long apiManagerId) + throws org.opencps.adminconfig.exception.NoSuchApiManagerException { + return getPersistence().removeByF_ID(apiManagerId); + } + + /** + * Returns the number of api managers where apiManagerId = ?. + * + * @param apiManagerId the api manager ID + * @return the number of matching api managers + */ + public static int countByF_ID(long apiManagerId) { + return getPersistence().countByF_ID(apiManagerId); + } + + /** + * Returns the api manager where apiCode = ? or throws a {@link NoSuchApiManagerException} if it could not be found. + * + * @param apiCode the api code + * @return the matching api manager + * @throws NoSuchApiManagerException if a matching api manager could not be found + */ + public static ApiManager findByF_apiCode(String apiCode) + throws org.opencps.adminconfig.exception.NoSuchApiManagerException { + return getPersistence().findByF_apiCode(apiCode); + } + + /** + * Returns the api manager where apiCode = ? or returns null if it could not be found. Uses the finder cache. + * + * @param apiCode the api code + * @return the matching api manager, or null if a matching api manager could not be found + */ + public static ApiManager fetchByF_apiCode(String apiCode) { + return getPersistence().fetchByF_apiCode(apiCode); + } + + /** + * Returns the api manager where apiCode = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param apiCode the api code + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching api manager, or null if a matching api manager could not be found + */ + public static ApiManager fetchByF_apiCode(String apiCode, + boolean retrieveFromCache) { + return getPersistence().fetchByF_apiCode(apiCode, retrieveFromCache); + } + + /** + * Removes the api manager where apiCode = ? from the database. + * + * @param apiCode the api code + * @return the api manager that was removed + */ + public static ApiManager removeByF_apiCode(String apiCode) + throws org.opencps.adminconfig.exception.NoSuchApiManagerException { + return getPersistence().removeByF_apiCode(apiCode); + } + + /** + * Returns the number of api managers where apiCode = ?. + * + * @param apiCode the api code + * @return the number of matching api managers + */ + public static int countByF_apiCode(String apiCode) { + return getPersistence().countByF_apiCode(apiCode); + } + + /** + * Returns all the api managers where groupId = ?. + * + * @param groupId the group ID + * @return the matching api managers + */ + public static List findByF_GID(long groupId) { + return getPersistence().findByF_GID(groupId); + } + + /** + * Returns a range of all the api managers where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @return the range of matching api managers + */ + public static List findByF_GID(long groupId, int start, int end) { + return getPersistence().findByF_GID(groupId, start, end); + } + + /** + * Returns an ordered range of all the api managers where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching api managers + */ + public static List findByF_GID(long groupId, int start, + int end, OrderByComparator orderByComparator) { + return getPersistence() + .findByF_GID(groupId, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the api managers where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching api managers + */ + public static List findByF_GID(long groupId, int start, + int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_GID(groupId, start, end, orderByComparator, + retrieveFromCache); + } + + /** + * Returns the first api manager in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching api manager + * @throws NoSuchApiManagerException if a matching api manager could not be found + */ + public static ApiManager findByF_GID_First(long groupId, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchApiManagerException { + return getPersistence().findByF_GID_First(groupId, orderByComparator); + } + + /** + * Returns the first api manager in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching api manager, or null if a matching api manager could not be found + */ + public static ApiManager fetchByF_GID_First(long groupId, + OrderByComparator orderByComparator) { + return getPersistence().fetchByF_GID_First(groupId, orderByComparator); + } + + /** + * Returns the last api manager in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching api manager + * @throws NoSuchApiManagerException if a matching api manager could not be found + */ + public static ApiManager findByF_GID_Last(long groupId, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchApiManagerException { + return getPersistence().findByF_GID_Last(groupId, orderByComparator); + } + + /** + * Returns the last api manager in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching api manager, or null if a matching api manager could not be found + */ + public static ApiManager fetchByF_GID_Last(long groupId, + OrderByComparator orderByComparator) { + return getPersistence().fetchByF_GID_Last(groupId, orderByComparator); + } + + /** + * Returns the api managers before and after the current api manager in the ordered set where groupId = ?. + * + * @param apiManagerId the primary key of the current api manager + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next api manager + * @throws NoSuchApiManagerException if a api manager with the primary key could not be found + */ + public static ApiManager[] findByF_GID_PrevAndNext(long apiManagerId, + long groupId, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchApiManagerException { + return getPersistence() + .findByF_GID_PrevAndNext(apiManagerId, groupId, + orderByComparator); + } + + /** + * Removes all the api managers where groupId = ? from the database. + * + * @param groupId the group ID + */ + public static void removeByF_GID(long groupId) { + getPersistence().removeByF_GID(groupId); + } + + /** + * Returns the number of api managers where groupId = ?. + * + * @param groupId the group ID + * @return the number of matching api managers + */ + public static int countByF_GID(long groupId) { + return getPersistence().countByF_GID(groupId); + } + + /** + * Caches the api manager in the entity cache if it is enabled. + * + * @param apiManager the api manager + */ + public static void cacheResult(ApiManager apiManager) { + getPersistence().cacheResult(apiManager); + } + + /** + * Caches the api managers in the entity cache if it is enabled. + * + * @param apiManagers the api managers + */ + public static void cacheResult(List apiManagers) { + getPersistence().cacheResult(apiManagers); + } + + /** + * Creates a new api manager with the primary key. Does not add the api manager to the database. + * + * @param apiManagerId the primary key for the new api manager + * @return the new api manager + */ + public static ApiManager create(long apiManagerId) { + return getPersistence().create(apiManagerId); + } + + /** + * Removes the api manager with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager that was removed + * @throws NoSuchApiManagerException if a api manager with the primary key could not be found + */ + public static ApiManager remove(long apiManagerId) + throws org.opencps.adminconfig.exception.NoSuchApiManagerException { + return getPersistence().remove(apiManagerId); + } + + public static ApiManager updateImpl(ApiManager apiManager) { + return getPersistence().updateImpl(apiManager); + } + + /** + * Returns the api manager with the primary key or throws a {@link NoSuchApiManagerException} if it could not be found. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager + * @throws NoSuchApiManagerException if a api manager with the primary key could not be found + */ + public static ApiManager findByPrimaryKey(long apiManagerId) + throws org.opencps.adminconfig.exception.NoSuchApiManagerException { + return getPersistence().findByPrimaryKey(apiManagerId); + } + + /** + * Returns the api manager with the primary key or returns null if it could not be found. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager, or null if a api manager with the primary key could not be found + */ + public static ApiManager fetchByPrimaryKey(long apiManagerId) { + return getPersistence().fetchByPrimaryKey(apiManagerId); + } + + public static java.util.Map fetchByPrimaryKeys( + java.util.Set primaryKeys) { + return getPersistence().fetchByPrimaryKeys(primaryKeys); + } + + /** + * Returns all the api managers. + * + * @return the api managers + */ + public static List findAll() { + return getPersistence().findAll(); + } + + /** + * Returns a range of all the api managers. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @return the range of api managers + */ + public static List findAll(int start, int end) { + return getPersistence().findAll(start, end); + } + + /** + * Returns an ordered range of all the api managers. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of api managers + */ + public static List findAll(int start, int end, + OrderByComparator orderByComparator) { + return getPersistence().findAll(start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the api managers. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of api managers + */ + public static List findAll(int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findAll(start, end, orderByComparator, retrieveFromCache); + } + + /** + * Removes all the api managers from the database. + */ + public static void removeAll() { + getPersistence().removeAll(); + } + + /** + * Returns the number of api managers. + * + * @return the number of api managers + */ + public static int countAll() { + return getPersistence().countAll(); + } + + public static ApiManagerPersistence getPersistence() { + return _serviceTracker.getService(); + } + + private static ServiceTracker _serviceTracker; + + static { + Bundle bundle = FrameworkUtil.getBundle(ApiManagerPersistence.class); + + ServiceTracker serviceTracker = + new ServiceTracker(bundle.getBundleContext(), + ApiManagerPersistence.class, null); + + serviceTracker.open(); + + _serviceTracker = serviceTracker; + } +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/ApiRolePersistence.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/ApiRolePersistence.java new file mode 100644 index 0000000000..14432bf4be --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/ApiRolePersistence.java @@ -0,0 +1,378 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.service.persistence.BasePersistence; + +import org.opencps.adminconfig.exception.NoSuchApiRoleException; +import org.opencps.adminconfig.model.ApiRole; + +/** + * The persistence interface for the api role service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author binhth + * @see org.opencps.adminconfig.service.persistence.impl.ApiRolePersistenceImpl + * @see ApiRoleUtil + * @generated + */ +@ProviderType +public interface ApiRolePersistence extends BasePersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link ApiRoleUtil} to access the api role persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. + */ + + /** + * Returns the api role where apiRoleId = ? or throws a {@link NoSuchApiRoleException} if it could not be found. + * + * @param apiRoleId the api role ID + * @return the matching api role + * @throws NoSuchApiRoleException if a matching api role could not be found + */ + public ApiRole findByF_ID(long apiRoleId) throws NoSuchApiRoleException; + + /** + * Returns the api role where apiRoleId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param apiRoleId the api role ID + * @return the matching api role, or null if a matching api role could not be found + */ + public ApiRole fetchByF_ID(long apiRoleId); + + /** + * Returns the api role where apiRoleId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param apiRoleId the api role ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching api role, or null if a matching api role could not be found + */ + public ApiRole fetchByF_ID(long apiRoleId, boolean retrieveFromCache); + + /** + * Removes the api role where apiRoleId = ? from the database. + * + * @param apiRoleId the api role ID + * @return the api role that was removed + */ + public ApiRole removeByF_ID(long apiRoleId) throws NoSuchApiRoleException; + + /** + * Returns the number of api roles where apiRoleId = ?. + * + * @param apiRoleId the api role ID + * @return the number of matching api roles + */ + public int countByF_ID(long apiRoleId); + + /** + * Returns the api role where roleCode = ? or throws a {@link NoSuchApiRoleException} if it could not be found. + * + * @param roleCode the role code + * @return the matching api role + * @throws NoSuchApiRoleException if a matching api role could not be found + */ + public ApiRole findByF_roleCode(String roleCode) + throws NoSuchApiRoleException; + + /** + * Returns the api role where roleCode = ? or returns null if it could not be found. Uses the finder cache. + * + * @param roleCode the role code + * @return the matching api role, or null if a matching api role could not be found + */ + public ApiRole fetchByF_roleCode(String roleCode); + + /** + * Returns the api role where roleCode = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param roleCode the role code + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching api role, or null if a matching api role could not be found + */ + public ApiRole fetchByF_roleCode(String roleCode, boolean retrieveFromCache); + + /** + * Removes the api role where roleCode = ? from the database. + * + * @param roleCode the role code + * @return the api role that was removed + */ + public ApiRole removeByF_roleCode(String roleCode) + throws NoSuchApiRoleException; + + /** + * Returns the number of api roles where roleCode = ?. + * + * @param roleCode the role code + * @return the number of matching api roles + */ + public int countByF_roleCode(String roleCode); + + /** + * Returns all the api roles where groupId = ?. + * + * @param groupId the group ID + * @return the matching api roles + */ + public java.util.List findByF_GID(long groupId); + + /** + * Returns a range of all the api roles where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @return the range of matching api roles + */ + public java.util.List findByF_GID(long groupId, int start, int end); + + /** + * Returns an ordered range of all the api roles where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching api roles + */ + public java.util.List findByF_GID(long groupId, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the api roles where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching api roles + */ + public java.util.List findByF_GID(long groupId, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first api role in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching api role + * @throws NoSuchApiRoleException if a matching api role could not be found + */ + public ApiRole findByF_GID_First(long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchApiRoleException; + + /** + * Returns the first api role in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching api role, or null if a matching api role could not be found + */ + public ApiRole fetchByF_GID_First(long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last api role in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching api role + * @throws NoSuchApiRoleException if a matching api role could not be found + */ + public ApiRole findByF_GID_Last(long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchApiRoleException; + + /** + * Returns the last api role in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching api role, or null if a matching api role could not be found + */ + public ApiRole fetchByF_GID_Last(long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the api roles before and after the current api role in the ordered set where groupId = ?. + * + * @param apiRoleId the primary key of the current api role + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next api role + * @throws NoSuchApiRoleException if a api role with the primary key could not be found + */ + public ApiRole[] findByF_GID_PrevAndNext(long apiRoleId, long groupId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchApiRoleException; + + /** + * Removes all the api roles where groupId = ? from the database. + * + * @param groupId the group ID + */ + public void removeByF_GID(long groupId); + + /** + * Returns the number of api roles where groupId = ?. + * + * @param groupId the group ID + * @return the number of matching api roles + */ + public int countByF_GID(long groupId); + + /** + * Caches the api role in the entity cache if it is enabled. + * + * @param apiRole the api role + */ + public void cacheResult(ApiRole apiRole); + + /** + * Caches the api roles in the entity cache if it is enabled. + * + * @param apiRoles the api roles + */ + public void cacheResult(java.util.List apiRoles); + + /** + * Creates a new api role with the primary key. Does not add the api role to the database. + * + * @param apiRoleId the primary key for the new api role + * @return the new api role + */ + public ApiRole create(long apiRoleId); + + /** + * Removes the api role with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param apiRoleId the primary key of the api role + * @return the api role that was removed + * @throws NoSuchApiRoleException if a api role with the primary key could not be found + */ + public ApiRole remove(long apiRoleId) throws NoSuchApiRoleException; + + public ApiRole updateImpl(ApiRole apiRole); + + /** + * Returns the api role with the primary key or throws a {@link NoSuchApiRoleException} if it could not be found. + * + * @param apiRoleId the primary key of the api role + * @return the api role + * @throws NoSuchApiRoleException if a api role with the primary key could not be found + */ + public ApiRole findByPrimaryKey(long apiRoleId) + throws NoSuchApiRoleException; + + /** + * Returns the api role with the primary key or returns null if it could not be found. + * + * @param apiRoleId the primary key of the api role + * @return the api role, or null if a api role with the primary key could not be found + */ + public ApiRole fetchByPrimaryKey(long apiRoleId); + + @Override + public java.util.Map fetchByPrimaryKeys( + java.util.Set primaryKeys); + + /** + * Returns all the api roles. + * + * @return the api roles + */ + public java.util.List findAll(); + + /** + * Returns a range of all the api roles. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @return the range of api roles + */ + public java.util.List findAll(int start, int end); + + /** + * Returns an ordered range of all the api roles. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of api roles + */ + public java.util.List findAll(int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the api roles. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of api roles + */ + public java.util.List findAll(int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Removes all the api roles from the database. + */ + public void removeAll(); + + /** + * Returns the number of api roles. + * + * @return the number of api roles + */ + public int countAll(); +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/ApiRoleUtil.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/ApiRoleUtil.java new file mode 100644 index 0000000000..d8121bd76a --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/ApiRoleUtil.java @@ -0,0 +1,539 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.util.OrderByComparator; + +import org.opencps.adminconfig.model.ApiRole; + +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; + +import org.osgi.util.tracker.ServiceTracker; + +import java.util.List; + +/** + * The persistence utility for the api role service. This utility wraps {@link org.opencps.adminconfig.service.persistence.impl.ApiRolePersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author binhth + * @see ApiRolePersistence + * @see org.opencps.adminconfig.service.persistence.impl.ApiRolePersistenceImpl + * @generated + */ +@ProviderType +public class ApiRoleUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache() + */ + public static void clearCache() { + getPersistence().clearCache(); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache(com.liferay.portal.kernel.model.BaseModel) + */ + public static void clearCache(ApiRole apiRole) { + getPersistence().clearCache(apiRole); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) + */ + public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { + return getPersistence().countWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) + */ + public static List findWithDynamicQuery(DynamicQuery dynamicQuery) { + return getPersistence().findWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end) { + return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findWithDynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel) + */ + public static ApiRole update(ApiRole apiRole) { + return getPersistence().update(apiRole); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel, ServiceContext) + */ + public static ApiRole update(ApiRole apiRole, ServiceContext serviceContext) { + return getPersistence().update(apiRole, serviceContext); + } + + /** + * Returns the api role where apiRoleId = ? or throws a {@link NoSuchApiRoleException} if it could not be found. + * + * @param apiRoleId the api role ID + * @return the matching api role + * @throws NoSuchApiRoleException if a matching api role could not be found + */ + public static ApiRole findByF_ID(long apiRoleId) + throws org.opencps.adminconfig.exception.NoSuchApiRoleException { + return getPersistence().findByF_ID(apiRoleId); + } + + /** + * Returns the api role where apiRoleId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param apiRoleId the api role ID + * @return the matching api role, or null if a matching api role could not be found + */ + public static ApiRole fetchByF_ID(long apiRoleId) { + return getPersistence().fetchByF_ID(apiRoleId); + } + + /** + * Returns the api role where apiRoleId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param apiRoleId the api role ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching api role, or null if a matching api role could not be found + */ + public static ApiRole fetchByF_ID(long apiRoleId, boolean retrieveFromCache) { + return getPersistence().fetchByF_ID(apiRoleId, retrieveFromCache); + } + + /** + * Removes the api role where apiRoleId = ? from the database. + * + * @param apiRoleId the api role ID + * @return the api role that was removed + */ + public static ApiRole removeByF_ID(long apiRoleId) + throws org.opencps.adminconfig.exception.NoSuchApiRoleException { + return getPersistence().removeByF_ID(apiRoleId); + } + + /** + * Returns the number of api roles where apiRoleId = ?. + * + * @param apiRoleId the api role ID + * @return the number of matching api roles + */ + public static int countByF_ID(long apiRoleId) { + return getPersistence().countByF_ID(apiRoleId); + } + + /** + * Returns the api role where roleCode = ? or throws a {@link NoSuchApiRoleException} if it could not be found. + * + * @param roleCode the role code + * @return the matching api role + * @throws NoSuchApiRoleException if a matching api role could not be found + */ + public static ApiRole findByF_roleCode(String roleCode) + throws org.opencps.adminconfig.exception.NoSuchApiRoleException { + return getPersistence().findByF_roleCode(roleCode); + } + + /** + * Returns the api role where roleCode = ? or returns null if it could not be found. Uses the finder cache. + * + * @param roleCode the role code + * @return the matching api role, or null if a matching api role could not be found + */ + public static ApiRole fetchByF_roleCode(String roleCode) { + return getPersistence().fetchByF_roleCode(roleCode); + } + + /** + * Returns the api role where roleCode = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param roleCode the role code + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching api role, or null if a matching api role could not be found + */ + public static ApiRole fetchByF_roleCode(String roleCode, + boolean retrieveFromCache) { + return getPersistence().fetchByF_roleCode(roleCode, retrieveFromCache); + } + + /** + * Removes the api role where roleCode = ? from the database. + * + * @param roleCode the role code + * @return the api role that was removed + */ + public static ApiRole removeByF_roleCode(String roleCode) + throws org.opencps.adminconfig.exception.NoSuchApiRoleException { + return getPersistence().removeByF_roleCode(roleCode); + } + + /** + * Returns the number of api roles where roleCode = ?. + * + * @param roleCode the role code + * @return the number of matching api roles + */ + public static int countByF_roleCode(String roleCode) { + return getPersistence().countByF_roleCode(roleCode); + } + + /** + * Returns all the api roles where groupId = ?. + * + * @param groupId the group ID + * @return the matching api roles + */ + public static List findByF_GID(long groupId) { + return getPersistence().findByF_GID(groupId); + } + + /** + * Returns a range of all the api roles where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @return the range of matching api roles + */ + public static List findByF_GID(long groupId, int start, int end) { + return getPersistence().findByF_GID(groupId, start, end); + } + + /** + * Returns an ordered range of all the api roles where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching api roles + */ + public static List findByF_GID(long groupId, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByF_GID(groupId, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the api roles where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching api roles + */ + public static List findByF_GID(long groupId, int start, int end, + OrderByComparator orderByComparator, boolean retrieveFromCache) { + return getPersistence() + .findByF_GID(groupId, start, end, orderByComparator, + retrieveFromCache); + } + + /** + * Returns the first api role in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching api role + * @throws NoSuchApiRoleException if a matching api role could not be found + */ + public static ApiRole findByF_GID_First(long groupId, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchApiRoleException { + return getPersistence().findByF_GID_First(groupId, orderByComparator); + } + + /** + * Returns the first api role in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching api role, or null if a matching api role could not be found + */ + public static ApiRole fetchByF_GID_First(long groupId, + OrderByComparator orderByComparator) { + return getPersistence().fetchByF_GID_First(groupId, orderByComparator); + } + + /** + * Returns the last api role in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching api role + * @throws NoSuchApiRoleException if a matching api role could not be found + */ + public static ApiRole findByF_GID_Last(long groupId, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchApiRoleException { + return getPersistence().findByF_GID_Last(groupId, orderByComparator); + } + + /** + * Returns the last api role in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching api role, or null if a matching api role could not be found + */ + public static ApiRole fetchByF_GID_Last(long groupId, + OrderByComparator orderByComparator) { + return getPersistence().fetchByF_GID_Last(groupId, orderByComparator); + } + + /** + * Returns the api roles before and after the current api role in the ordered set where groupId = ?. + * + * @param apiRoleId the primary key of the current api role + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next api role + * @throws NoSuchApiRoleException if a api role with the primary key could not be found + */ + public static ApiRole[] findByF_GID_PrevAndNext(long apiRoleId, + long groupId, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchApiRoleException { + return getPersistence() + .findByF_GID_PrevAndNext(apiRoleId, groupId, + orderByComparator); + } + + /** + * Removes all the api roles where groupId = ? from the database. + * + * @param groupId the group ID + */ + public static void removeByF_GID(long groupId) { + getPersistence().removeByF_GID(groupId); + } + + /** + * Returns the number of api roles where groupId = ?. + * + * @param groupId the group ID + * @return the number of matching api roles + */ + public static int countByF_GID(long groupId) { + return getPersistence().countByF_GID(groupId); + } + + /** + * Caches the api role in the entity cache if it is enabled. + * + * @param apiRole the api role + */ + public static void cacheResult(ApiRole apiRole) { + getPersistence().cacheResult(apiRole); + } + + /** + * Caches the api roles in the entity cache if it is enabled. + * + * @param apiRoles the api roles + */ + public static void cacheResult(List apiRoles) { + getPersistence().cacheResult(apiRoles); + } + + /** + * Creates a new api role with the primary key. Does not add the api role to the database. + * + * @param apiRoleId the primary key for the new api role + * @return the new api role + */ + public static ApiRole create(long apiRoleId) { + return getPersistence().create(apiRoleId); + } + + /** + * Removes the api role with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param apiRoleId the primary key of the api role + * @return the api role that was removed + * @throws NoSuchApiRoleException if a api role with the primary key could not be found + */ + public static ApiRole remove(long apiRoleId) + throws org.opencps.adminconfig.exception.NoSuchApiRoleException { + return getPersistence().remove(apiRoleId); + } + + public static ApiRole updateImpl(ApiRole apiRole) { + return getPersistence().updateImpl(apiRole); + } + + /** + * Returns the api role with the primary key or throws a {@link NoSuchApiRoleException} if it could not be found. + * + * @param apiRoleId the primary key of the api role + * @return the api role + * @throws NoSuchApiRoleException if a api role with the primary key could not be found + */ + public static ApiRole findByPrimaryKey(long apiRoleId) + throws org.opencps.adminconfig.exception.NoSuchApiRoleException { + return getPersistence().findByPrimaryKey(apiRoleId); + } + + /** + * Returns the api role with the primary key or returns null if it could not be found. + * + * @param apiRoleId the primary key of the api role + * @return the api role, or null if a api role with the primary key could not be found + */ + public static ApiRole fetchByPrimaryKey(long apiRoleId) { + return getPersistence().fetchByPrimaryKey(apiRoleId); + } + + public static java.util.Map fetchByPrimaryKeys( + java.util.Set primaryKeys) { + return getPersistence().fetchByPrimaryKeys(primaryKeys); + } + + /** + * Returns all the api roles. + * + * @return the api roles + */ + public static List findAll() { + return getPersistence().findAll(); + } + + /** + * Returns a range of all the api roles. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @return the range of api roles + */ + public static List findAll(int start, int end) { + return getPersistence().findAll(start, end); + } + + /** + * Returns an ordered range of all the api roles. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of api roles + */ + public static List findAll(int start, int end, + OrderByComparator orderByComparator) { + return getPersistence().findAll(start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the api roles. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of api roles + */ + public static List findAll(int start, int end, + OrderByComparator orderByComparator, boolean retrieveFromCache) { + return getPersistence() + .findAll(start, end, orderByComparator, retrieveFromCache); + } + + /** + * Removes all the api roles from the database. + */ + public static void removeAll() { + getPersistence().removeAll(); + } + + /** + * Returns the number of api roles. + * + * @return the number of api roles + */ + public static int countAll() { + return getPersistence().countAll(); + } + + public static ApiRolePersistence getPersistence() { + return _serviceTracker.getService(); + } + + private static ServiceTracker _serviceTracker; + + static { + Bundle bundle = FrameworkUtil.getBundle(ApiRolePersistence.class); + + ServiceTracker serviceTracker = new ServiceTracker(bundle.getBundleContext(), + ApiRolePersistence.class, null); + + serviceTracker.open(); + + _serviceTracker = serviceTracker; + } +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/SyncTrackingPersistence.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/SyncTrackingPersistence.java new file mode 100644 index 0000000000..8911d995bb --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/SyncTrackingPersistence.java @@ -0,0 +1,2538 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.service.persistence.BasePersistence; + +import org.opencps.adminconfig.exception.NoSuchSyncTrackingException; +import org.opencps.adminconfig.model.SyncTracking; + +import java.util.Date; + +/** + * The persistence interface for the sync tracking service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author binhth + * @see org.opencps.adminconfig.service.persistence.impl.SyncTrackingPersistenceImpl + * @see SyncTrackingUtil + * @generated + */ +@ProviderType +public interface SyncTrackingPersistence extends BasePersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link SyncTrackingUtil} to access the sync tracking persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. + */ + + /** + * Returns all the sync trackings where uuid = ?. + * + * @param uuid the uuid + * @return the matching sync trackings + */ + public java.util.List findByUuid(String uuid); + + /** + * Returns a range of all the sync trackings where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public java.util.List findByUuid(String uuid, int start, + int end); + + /** + * Returns an ordered range of all the sync trackings where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public java.util.List findByUuid(String uuid, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public java.util.List findByUuid(String uuid, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first sync tracking in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByUuid_First(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the first sync tracking in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByUuid_First(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last sync tracking in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByUuid_Last(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the last sync tracking in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByUuid_Last(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where uuid = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking[] findByUuid_PrevAndNext(long trackingId, String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Removes all the sync trackings where uuid = ? from the database. + * + * @param uuid the uuid + */ + public void removeByUuid(String uuid); + + /** + * Returns the number of sync trackings where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching sync trackings + */ + public int countByUuid(String uuid); + + /** + * Returns the sync tracking where uuid = ? and groupId = ? or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByUUID_G(String uuid, long groupId) + throws NoSuchSyncTrackingException; + + /** + * Returns the sync tracking where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByUUID_G(String uuid, long groupId); + + /** + * Returns the sync tracking where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByUUID_G(String uuid, long groupId, + boolean retrieveFromCache); + + /** + * Removes the sync tracking where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the sync tracking that was removed + */ + public SyncTracking removeByUUID_G(String uuid, long groupId) + throws NoSuchSyncTrackingException; + + /** + * Returns the number of sync trackings where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching sync trackings + */ + public int countByUUID_G(String uuid, long groupId); + + /** + * Returns all the sync trackings where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the matching sync trackings + */ + public java.util.List findByUuid_C(String uuid, long companyId); + + /** + * Returns a range of all the sync trackings where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public java.util.List findByUuid_C(String uuid, + long companyId, int start, int end); + + /** + * Returns an ordered range of all the sync trackings where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public java.util.List findByUuid_C(String uuid, + long companyId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public java.util.List findByUuid_C(String uuid, + long companyId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByUuid_C_First(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the first sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByUuid_C_First(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByUuid_C_Last(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the last sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByUuid_C_Last(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking[] findByUuid_C_PrevAndNext(long trackingId, + String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Removes all the sync trackings where uuid = ? and companyId = ? from the database. + * + * @param uuid the uuid + * @param companyId the company ID + */ + public void removeByUuid_C(String uuid, long companyId); + + /** + * Returns the number of sync trackings where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the number of matching sync trackings + */ + public int countByUuid_C(String uuid, long companyId); + + /** + * Returns the sync tracking where referenceUid = ? or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param referenceUid the reference uid + * @return the matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_ReferenceUid(String referenceUid) + throws NoSuchSyncTrackingException; + + /** + * Returns the sync tracking where referenceUid = ? or returns null if it could not be found. Uses the finder cache. + * + * @param referenceUid the reference uid + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_ReferenceUid(String referenceUid); + + /** + * Returns the sync tracking where referenceUid = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param referenceUid the reference uid + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_ReferenceUid(String referenceUid, + boolean retrieveFromCache); + + /** + * Removes the sync tracking where referenceUid = ? from the database. + * + * @param referenceUid the reference uid + * @return the sync tracking that was removed + */ + public SyncTracking removeByF_ReferenceUid(String referenceUid) + throws NoSuchSyncTrackingException; + + /** + * Returns the number of sync trackings where referenceUid = ?. + * + * @param referenceUid the reference uid + * @return the number of matching sync trackings + */ + public int countByF_ReferenceUid(String referenceUid); + + /** + * Returns the sync tracking where dossierNo = ? or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param dossierNo the dossier no + * @return the matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_DossierNo(String dossierNo) + throws NoSuchSyncTrackingException; + + /** + * Returns the sync tracking where dossierNo = ? or returns null if it could not be found. Uses the finder cache. + * + * @param dossierNo the dossier no + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_DossierNo(String dossierNo); + + /** + * Returns the sync tracking where dossierNo = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param dossierNo the dossier no + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_DossierNo(String dossierNo, + boolean retrieveFromCache); + + /** + * Removes the sync tracking where dossierNo = ? from the database. + * + * @param dossierNo the dossier no + * @return the sync tracking that was removed + */ + public SyncTracking removeByF_DossierNo(String dossierNo) + throws NoSuchSyncTrackingException; + + /** + * Returns the number of sync trackings where dossierNo = ?. + * + * @param dossierNo the dossier no + * @return the number of matching sync trackings + */ + public int countByF_DossierNo(String dossierNo); + + /** + * Returns all the sync trackings where protocol = ?. + * + * @param protocol the protocol + * @return the matching sync trackings + */ + public java.util.List findByF_Protocol(String protocol); + + /** + * Returns a range of all the sync trackings where protocol = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public java.util.List findByF_Protocol(String protocol, + int start, int end); + + /** + * Returns an ordered range of all the sync trackings where protocol = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_Protocol(String protocol, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings where protocol = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_Protocol(String protocol, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first sync tracking in the ordered set where protocol = ?. + * + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_Protocol_First(String protocol, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the first sync tracking in the ordered set where protocol = ?. + * + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_Protocol_First(String protocol, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last sync tracking in the ordered set where protocol = ?. + * + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_Protocol_Last(String protocol, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the last sync tracking in the ordered set where protocol = ?. + * + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_Protocol_Last(String protocol, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where protocol = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking[] findByF_Protocol_PrevAndNext(long trackingId, + String protocol, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Removes all the sync trackings where protocol = ? from the database. + * + * @param protocol the protocol + */ + public void removeByF_Protocol(String protocol); + + /** + * Returns the number of sync trackings where protocol = ?. + * + * @param protocol the protocol + * @return the number of matching sync trackings + */ + public int countByF_Protocol(String protocol); + + /** + * Returns all the sync trackings where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @return the matching sync trackings + */ + public java.util.List findByF_Protocol_DossierNo( + String protocol, String dossierNo); + + /** + * Returns a range of all the sync trackings where protocol = ? and dossierNo = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public java.util.List findByF_Protocol_DossierNo( + String protocol, String dossierNo, int start, int end); + + /** + * Returns an ordered range of all the sync trackings where protocol = ? and dossierNo = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_Protocol_DossierNo( + String protocol, String dossierNo, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings where protocol = ? and dossierNo = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_Protocol_DossierNo( + String protocol, String dossierNo, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_Protocol_DossierNo_First(String protocol, + String dossierNo, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the first sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_Protocol_DossierNo_First(String protocol, + String dossierNo, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_Protocol_DossierNo_Last(String protocol, + String dossierNo, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the last sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_Protocol_DossierNo_Last(String protocol, + String dossierNo, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking[] findByF_Protocol_DossierNo_PrevAndNext( + long trackingId, String protocol, String dossierNo, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Removes all the sync trackings where protocol = ? and dossierNo = ? from the database. + * + * @param protocol the protocol + * @param dossierNo the dossier no + */ + public void removeByF_Protocol_DossierNo(String protocol, String dossierNo); + + /** + * Returns the number of sync trackings where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @return the number of matching sync trackings + */ + public int countByF_Protocol_DossierNo(String protocol, String dossierNo); + + /** + * Returns all the sync trackings where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @return the matching sync trackings + */ + public java.util.List findByF_Protocol_ServiceCode( + String protocol, String serviceCode); + + /** + * Returns a range of all the sync trackings where protocol = ? and serviceCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param serviceCode the service code + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public java.util.List findByF_Protocol_ServiceCode( + String protocol, String serviceCode, int start, int end); + + /** + * Returns an ordered range of all the sync trackings where protocol = ? and serviceCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param serviceCode the service code + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_Protocol_ServiceCode( + String protocol, String serviceCode, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings where protocol = ? and serviceCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param serviceCode the service code + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_Protocol_ServiceCode( + String protocol, String serviceCode, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_Protocol_ServiceCode_First(String protocol, + String serviceCode, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the first sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_Protocol_ServiceCode_First(String protocol, + String serviceCode, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_Protocol_ServiceCode_Last(String protocol, + String serviceCode, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the last sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_Protocol_ServiceCode_Last(String protocol, + String serviceCode, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking[] findByF_Protocol_ServiceCode_PrevAndNext( + long trackingId, String protocol, String serviceCode, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Removes all the sync trackings where protocol = ? and serviceCode = ? from the database. + * + * @param protocol the protocol + * @param serviceCode the service code + */ + public void removeByF_Protocol_ServiceCode(String protocol, + String serviceCode); + + /** + * Returns the number of sync trackings where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @return the number of matching sync trackings + */ + public int countByF_Protocol_ServiceCode(String protocol, String serviceCode); + + /** + * Returns all the sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public java.util.List findByF_CREATED_BETWEEN( + Date createDate, Date modifiedDate); + + /** + * Returns a range of all the sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public java.util.List findByF_CREATED_BETWEEN( + Date createDate, Date modifiedDate, int start, int end); + + /** + * Returns an ordered range of all the sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_CREATED_BETWEEN( + Date createDate, Date modifiedDate, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_CREATED_BETWEEN( + Date createDate, Date modifiedDate, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_CREATED_BETWEEN_First(Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the first sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_CREATED_BETWEEN_First(Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_CREATED_BETWEEN_Last(Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the last sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_CREATED_BETWEEN_Last(Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking[] findByF_CREATED_BETWEEN_PrevAndNext(long trackingId, + Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Removes all the sync trackings where createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param createDate the create date + * @param modifiedDate the modified date + */ + public void removeByF_CREATED_BETWEEN(Date createDate, Date modifiedDate); + + /** + * Returns the number of sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public int countByF_CREATED_BETWEEN(Date createDate, Date modifiedDate); + + /** + * Returns all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public java.util.List findByF_DOSSIERNO_CREATED_BETWEEN( + String dossierNo, Date createDate, Date modifiedDate); + + /** + * Returns a range of all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public java.util.List findByF_DOSSIERNO_CREATED_BETWEEN( + String dossierNo, Date createDate, Date modifiedDate, int start, int end); + + /** + * Returns an ordered range of all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_DOSSIERNO_CREATED_BETWEEN( + String dossierNo, Date createDate, Date modifiedDate, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_DOSSIERNO_CREATED_BETWEEN( + String dossierNo, Date createDate, Date modifiedDate, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_DOSSIERNO_CREATED_BETWEEN_First( + String dossierNo, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the first sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_DOSSIERNO_CREATED_BETWEEN_First( + String dossierNo, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_DOSSIERNO_CREATED_BETWEEN_Last( + String dossierNo, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the last sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_DOSSIERNO_CREATED_BETWEEN_Last( + String dossierNo, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking[] findByF_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + long trackingId, String dossierNo, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Removes all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + */ + public void removeByF_DOSSIERNO_CREATED_BETWEEN(String dossierNo, + Date createDate, Date modifiedDate); + + /** + * Returns the number of sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public int countByF_DOSSIERNO_CREATED_BETWEEN(String dossierNo, + Date createDate, Date modifiedDate); + + /** + * Returns all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public java.util.List findByF_REFERENCE_UID_CREATED_BETWEEN( + String referenceUid, Date createDate, Date modifiedDate); + + /** + * Returns a range of all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public java.util.List findByF_REFERENCE_UID_CREATED_BETWEEN( + String referenceUid, Date createDate, Date modifiedDate, int start, + int end); + + /** + * Returns an ordered range of all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_REFERENCE_UID_CREATED_BETWEEN( + String referenceUid, Date createDate, Date modifiedDate, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_REFERENCE_UID_CREATED_BETWEEN( + String referenceUid, Date createDate, Date modifiedDate, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_REFERENCE_UID_CREATED_BETWEEN_First( + String referenceUid, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the first sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_REFERENCE_UID_CREATED_BETWEEN_First( + String referenceUid, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_REFERENCE_UID_CREATED_BETWEEN_Last( + String referenceUid, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the last sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_REFERENCE_UID_CREATED_BETWEEN_Last( + String referenceUid, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking[] findByF_REFERENCE_UID_CREATED_BETWEEN_PrevAndNext( + long trackingId, String referenceUid, Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Removes all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + */ + public void removeByF_REFERENCE_UID_CREATED_BETWEEN(String referenceUid, + Date createDate, Date modifiedDate); + + /** + * Returns the number of sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public int countByF_REFERENCE_UID_CREATED_BETWEEN(String referenceUid, + Date createDate, Date modifiedDate); + + /** + * Returns all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public java.util.List findByF_SERVICECODE_CREATED_BETWEEN( + String serviceCode, Date createDate, Date modifiedDate); + + /** + * Returns a range of all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public java.util.List findByF_SERVICECODE_CREATED_BETWEEN( + String serviceCode, Date createDate, Date modifiedDate, int start, + int end); + + /** + * Returns an ordered range of all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_SERVICECODE_CREATED_BETWEEN( + String serviceCode, Date createDate, Date modifiedDate, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_SERVICECODE_CREATED_BETWEEN( + String serviceCode, Date createDate, Date modifiedDate, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_SERVICECODE_CREATED_BETWEEN_First( + String serviceCode, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the first sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_SERVICECODE_CREATED_BETWEEN_First( + String serviceCode, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_SERVICECODE_CREATED_BETWEEN_Last( + String serviceCode, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the last sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_SERVICECODE_CREATED_BETWEEN_Last( + String serviceCode, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking[] findByF_SERVICECODE_CREATED_BETWEEN_PrevAndNext( + long trackingId, String serviceCode, Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Removes all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + */ + public void removeByF_SERVICECODE_CREATED_BETWEEN(String serviceCode, + Date createDate, Date modifiedDate); + + /** + * Returns the number of sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public int countByF_SERVICECODE_CREATED_BETWEEN(String serviceCode, + Date createDate, Date modifiedDate); + + /** + * Returns all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public java.util.List findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, Date modifiedDate); + + /** + * Returns a range of all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public java.util.List findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end); + + /** + * Returns an ordered range of all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the first sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the last sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking[] findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + long trackingId, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Removes all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + */ + public void removeByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, Date modifiedDate); + + /** + * Returns the number of sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public int countByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, Date modifiedDate); + + /** + * Returns all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public java.util.List findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate); + + /** + * Returns a range of all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public java.util.List findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end); + + /** + * Returns an ordered range of all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the first sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the last sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking[] findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + long trackingId, String api, String serviceCode, String dossierNo, + Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Removes all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + */ + public void removeByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate); + + /** + * Returns the number of sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public int countByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(String api, + String serviceCode, String dossierNo, Date createDate, Date modifiedDate); + + /** + * Returns all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public java.util.List findByF_API_SERVICECODE_CREATED_BETWEEN( + String api, String serviceCode, Date createDate, Date modifiedDate); + + /** + * Returns a range of all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public java.util.List findByF_API_SERVICECODE_CREATED_BETWEEN( + String api, String serviceCode, Date createDate, Date modifiedDate, + int start, int end); + + /** + * Returns an ordered range of all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_API_SERVICECODE_CREATED_BETWEEN( + String api, String serviceCode, Date createDate, Date modifiedDate, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_API_SERVICECODE_CREATED_BETWEEN( + String api, String serviceCode, Date createDate, Date modifiedDate, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_API_SERVICECODE_CREATED_BETWEEN_First( + String api, String serviceCode, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the first sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_API_SERVICECODE_CREATED_BETWEEN_First( + String api, String serviceCode, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_API_SERVICECODE_CREATED_BETWEEN_Last( + String api, String serviceCode, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the last sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_API_SERVICECODE_CREATED_BETWEEN_Last( + String api, String serviceCode, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking[] findByF_API_SERVICECODE_CREATED_BETWEEN_PrevAndNext( + long trackingId, String api, String serviceCode, Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Removes all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + */ + public void removeByF_API_SERVICECODE_CREATED_BETWEEN(String api, + String serviceCode, Date createDate, Date modifiedDate); + + /** + * Returns the number of sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public int countByF_API_SERVICECODE_CREATED_BETWEEN(String api, + String serviceCode, Date createDate, Date modifiedDate); + + /** + * Returns all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public java.util.List findByF_API_DOSSIERNO_CREATED_BETWEEN( + String api, String dossierNo, Date createDate, Date modifiedDate); + + /** + * Returns a range of all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public java.util.List findByF_API_DOSSIERNO_CREATED_BETWEEN( + String api, String dossierNo, Date createDate, Date modifiedDate, + int start, int end); + + /** + * Returns an ordered range of all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_API_DOSSIERNO_CREATED_BETWEEN( + String api, String dossierNo, Date createDate, Date modifiedDate, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_API_DOSSIERNO_CREATED_BETWEEN( + String api, String dossierNo, Date createDate, Date modifiedDate, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_API_DOSSIERNO_CREATED_BETWEEN_First( + String api, String dossierNo, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the first sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_API_DOSSIERNO_CREATED_BETWEEN_First( + String api, String dossierNo, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_API_DOSSIERNO_CREATED_BETWEEN_Last(String api, + String dossierNo, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the last sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_API_DOSSIERNO_CREATED_BETWEEN_Last( + String api, String dossierNo, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking[] findByF_API_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + long trackingId, String api, String dossierNo, Date createDate, + Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Removes all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + */ + public void removeByF_API_DOSSIERNO_CREATED_BETWEEN(String api, + String dossierNo, Date createDate, Date modifiedDate); + + /** + * Returns the number of sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public int countByF_API_DOSSIERNO_CREATED_BETWEEN(String api, + String dossierNo, Date createDate, Date modifiedDate); + + /** + * Returns all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public java.util.List findByF_API_CREATED_BETWEEN( + String api, Date createDate, Date modifiedDate); + + /** + * Returns a range of all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public java.util.List findByF_API_CREATED_BETWEEN( + String api, Date createDate, Date modifiedDate, int start, int end); + + /** + * Returns an ordered range of all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_API_CREATED_BETWEEN( + String api, Date createDate, Date modifiedDate, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public java.util.List findByF_API_CREATED_BETWEEN( + String api, Date createDate, Date modifiedDate, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_API_CREATED_BETWEEN_First(String api, + Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the first sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_API_CREATED_BETWEEN_First(String api, + Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_API_CREATED_BETWEEN_Last(String api, + Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Returns the last sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_API_CREATED_BETWEEN_Last(String api, + Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking[] findByF_API_CREATED_BETWEEN_PrevAndNext( + long trackingId, String api, Date createDate, Date modifiedDate, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException; + + /** + * Removes all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + */ + public void removeByF_API_CREATED_BETWEEN(String api, Date createDate, + Date modifiedDate); + + /** + * Returns the number of sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public int countByF_API_CREATED_BETWEEN(String api, Date createDate, + Date modifiedDate); + + /** + * Caches the sync tracking in the entity cache if it is enabled. + * + * @param syncTracking the sync tracking + */ + public void cacheResult(SyncTracking syncTracking); + + /** + * Caches the sync trackings in the entity cache if it is enabled. + * + * @param syncTrackings the sync trackings + */ + public void cacheResult(java.util.List syncTrackings); + + /** + * Creates a new sync tracking with the primary key. Does not add the sync tracking to the database. + * + * @param trackingId the primary key for the new sync tracking + * @return the new sync tracking + */ + public SyncTracking create(long trackingId); + + /** + * Removes the sync tracking with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking that was removed + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking remove(long trackingId) + throws NoSuchSyncTrackingException; + + public SyncTracking updateImpl(SyncTracking syncTracking); + + /** + * Returns the sync tracking with the primary key or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public SyncTracking findByPrimaryKey(long trackingId) + throws NoSuchSyncTrackingException; + + /** + * Returns the sync tracking with the primary key or returns null if it could not be found. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking, or null if a sync tracking with the primary key could not be found + */ + public SyncTracking fetchByPrimaryKey(long trackingId); + + @Override + public java.util.Map fetchByPrimaryKeys( + java.util.Set primaryKeys); + + /** + * Returns all the sync trackings. + * + * @return the sync trackings + */ + public java.util.List findAll(); + + /** + * Returns a range of all the sync trackings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of sync trackings + */ + public java.util.List findAll(int start, int end); + + /** + * Returns an ordered range of all the sync trackings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of sync trackings + */ + public java.util.List findAll(int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the sync trackings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of sync trackings + */ + public java.util.List findAll(int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Removes all the sync trackings from the database. + */ + public void removeAll(); + + /** + * Returns the number of sync trackings. + * + * @return the number of sync trackings + */ + public int countAll(); + + @Override + public java.util.Set getBadColumnNames(); +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/SyncTrackingUtil.java b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/SyncTrackingUtil.java new file mode 100644 index 0000000000..e3d5ad5e0d --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-api/src/main/java/org/opencps/adminconfig/service/persistence/SyncTrackingUtil.java @@ -0,0 +1,3216 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.util.OrderByComparator; + +import org.opencps.adminconfig.model.SyncTracking; + +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; + +import org.osgi.util.tracker.ServiceTracker; + +import java.util.Date; +import java.util.List; + +/** + * The persistence utility for the sync tracking service. This utility wraps {@link org.opencps.adminconfig.service.persistence.impl.SyncTrackingPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author binhth + * @see SyncTrackingPersistence + * @see org.opencps.adminconfig.service.persistence.impl.SyncTrackingPersistenceImpl + * @generated + */ +@ProviderType +public class SyncTrackingUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache() + */ + public static void clearCache() { + getPersistence().clearCache(); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache(com.liferay.portal.kernel.model.BaseModel) + */ + public static void clearCache(SyncTracking syncTracking) { + getPersistence().clearCache(syncTracking); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) + */ + public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { + return getPersistence().countWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery) { + return getPersistence().findWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end) { + return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findWithDynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel) + */ + public static SyncTracking update(SyncTracking syncTracking) { + return getPersistence().update(syncTracking); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel, ServiceContext) + */ + public static SyncTracking update(SyncTracking syncTracking, + ServiceContext serviceContext) { + return getPersistence().update(syncTracking, serviceContext); + } + + /** + * Returns all the sync trackings where uuid = ?. + * + * @param uuid the uuid + * @return the matching sync trackings + */ + public static List findByUuid(String uuid) { + return getPersistence().findByUuid(uuid); + } + + /** + * Returns a range of all the sync trackings where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public static List findByUuid(String uuid, int start, int end) { + return getPersistence().findByUuid(uuid, start, end); + } + + /** + * Returns an ordered range of all the sync trackings where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public static List findByUuid(String uuid, int start, + int end, OrderByComparator orderByComparator) { + return getPersistence().findByUuid(uuid, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public static List findByUuid(String uuid, int start, + int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByUuid(uuid, start, end, orderByComparator, + retrieveFromCache); + } + + /** + * Returns the first sync tracking in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByUuid_First(String uuid, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence().findByUuid_First(uuid, orderByComparator); + } + + /** + * Returns the first sync tracking in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByUuid_First(String uuid, + OrderByComparator orderByComparator) { + return getPersistence().fetchByUuid_First(uuid, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByUuid_Last(String uuid, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence().findByUuid_Last(uuid, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByUuid_Last(String uuid, + OrderByComparator orderByComparator) { + return getPersistence().fetchByUuid_Last(uuid, orderByComparator); + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where uuid = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking[] findByUuid_PrevAndNext(long trackingId, + String uuid, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByUuid_PrevAndNext(trackingId, uuid, orderByComparator); + } + + /** + * Removes all the sync trackings where uuid = ? from the database. + * + * @param uuid the uuid + */ + public static void removeByUuid(String uuid) { + getPersistence().removeByUuid(uuid); + } + + /** + * Returns the number of sync trackings where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching sync trackings + */ + public static int countByUuid(String uuid) { + return getPersistence().countByUuid(uuid); + } + + /** + * Returns the sync tracking where uuid = ? and groupId = ? or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByUUID_G(String uuid, long groupId) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence().findByUUID_G(uuid, groupId); + } + + /** + * Returns the sync tracking where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByUUID_G(String uuid, long groupId) { + return getPersistence().fetchByUUID_G(uuid, groupId); + } + + /** + * Returns the sync tracking where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByUUID_G(String uuid, long groupId, + boolean retrieveFromCache) { + return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); + } + + /** + * Removes the sync tracking where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the sync tracking that was removed + */ + public static SyncTracking removeByUUID_G(String uuid, long groupId) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence().removeByUUID_G(uuid, groupId); + } + + /** + * Returns the number of sync trackings where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching sync trackings + */ + public static int countByUUID_G(String uuid, long groupId) { + return getPersistence().countByUUID_G(uuid, groupId); + } + + /** + * Returns all the sync trackings where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the matching sync trackings + */ + public static List findByUuid_C(String uuid, long companyId) { + return getPersistence().findByUuid_C(uuid, companyId); + } + + /** + * Returns a range of all the sync trackings where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public static List findByUuid_C(String uuid, long companyId, + int start, int end) { + return getPersistence().findByUuid_C(uuid, companyId, start, end); + } + + /** + * Returns an ordered range of all the sync trackings where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public static List findByUuid_C(String uuid, long companyId, + int start, int end, OrderByComparator orderByComparator) { + return getPersistence() + .findByUuid_C(uuid, companyId, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public static List findByUuid_C(String uuid, long companyId, + int start, int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByUuid_C(uuid, companyId, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByUuid_C_First(String uuid, long companyId, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByUuid_C_First(uuid, companyId, orderByComparator); + } + + /** + * Returns the first sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByUuid_C_First(String uuid, long companyId, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByUuid_C_First(uuid, companyId, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByUuid_C_Last(String uuid, long companyId, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByUuid_C_Last(uuid, companyId, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByUuid_C_Last(String uuid, long companyId, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByUuid_C_Last(uuid, companyId, orderByComparator); + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking[] findByUuid_C_PrevAndNext(long trackingId, + String uuid, long companyId, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByUuid_C_PrevAndNext(trackingId, uuid, companyId, + orderByComparator); + } + + /** + * Removes all the sync trackings where uuid = ? and companyId = ? from the database. + * + * @param uuid the uuid + * @param companyId the company ID + */ + public static void removeByUuid_C(String uuid, long companyId) { + getPersistence().removeByUuid_C(uuid, companyId); + } + + /** + * Returns the number of sync trackings where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the number of matching sync trackings + */ + public static int countByUuid_C(String uuid, long companyId) { + return getPersistence().countByUuid_C(uuid, companyId); + } + + /** + * Returns the sync tracking where referenceUid = ? or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param referenceUid the reference uid + * @return the matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_ReferenceUid(String referenceUid) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence().findByF_ReferenceUid(referenceUid); + } + + /** + * Returns the sync tracking where referenceUid = ? or returns null if it could not be found. Uses the finder cache. + * + * @param referenceUid the reference uid + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_ReferenceUid(String referenceUid) { + return getPersistence().fetchByF_ReferenceUid(referenceUid); + } + + /** + * Returns the sync tracking where referenceUid = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param referenceUid the reference uid + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_ReferenceUid(String referenceUid, + boolean retrieveFromCache) { + return getPersistence() + .fetchByF_ReferenceUid(referenceUid, retrieveFromCache); + } + + /** + * Removes the sync tracking where referenceUid = ? from the database. + * + * @param referenceUid the reference uid + * @return the sync tracking that was removed + */ + public static SyncTracking removeByF_ReferenceUid(String referenceUid) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence().removeByF_ReferenceUid(referenceUid); + } + + /** + * Returns the number of sync trackings where referenceUid = ?. + * + * @param referenceUid the reference uid + * @return the number of matching sync trackings + */ + public static int countByF_ReferenceUid(String referenceUid) { + return getPersistence().countByF_ReferenceUid(referenceUid); + } + + /** + * Returns the sync tracking where dossierNo = ? or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param dossierNo the dossier no + * @return the matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_DossierNo(String dossierNo) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence().findByF_DossierNo(dossierNo); + } + + /** + * Returns the sync tracking where dossierNo = ? or returns null if it could not be found. Uses the finder cache. + * + * @param dossierNo the dossier no + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_DossierNo(String dossierNo) { + return getPersistence().fetchByF_DossierNo(dossierNo); + } + + /** + * Returns the sync tracking where dossierNo = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param dossierNo the dossier no + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_DossierNo(String dossierNo, + boolean retrieveFromCache) { + return getPersistence().fetchByF_DossierNo(dossierNo, retrieveFromCache); + } + + /** + * Removes the sync tracking where dossierNo = ? from the database. + * + * @param dossierNo the dossier no + * @return the sync tracking that was removed + */ + public static SyncTracking removeByF_DossierNo(String dossierNo) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence().removeByF_DossierNo(dossierNo); + } + + /** + * Returns the number of sync trackings where dossierNo = ?. + * + * @param dossierNo the dossier no + * @return the number of matching sync trackings + */ + public static int countByF_DossierNo(String dossierNo) { + return getPersistence().countByF_DossierNo(dossierNo); + } + + /** + * Returns all the sync trackings where protocol = ?. + * + * @param protocol the protocol + * @return the matching sync trackings + */ + public static List findByF_Protocol(String protocol) { + return getPersistence().findByF_Protocol(protocol); + } + + /** + * Returns a range of all the sync trackings where protocol = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public static List findByF_Protocol(String protocol, + int start, int end) { + return getPersistence().findByF_Protocol(protocol, start, end); + } + + /** + * Returns an ordered range of all the sync trackings where protocol = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public static List findByF_Protocol(String protocol, + int start, int end, OrderByComparator orderByComparator) { + return getPersistence() + .findByF_Protocol(protocol, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings where protocol = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public static List findByF_Protocol(String protocol, + int start, int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_Protocol(protocol, start, end, orderByComparator, + retrieveFromCache); + } + + /** + * Returns the first sync tracking in the ordered set where protocol = ?. + * + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_Protocol_First(String protocol, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_Protocol_First(protocol, orderByComparator); + } + + /** + * Returns the first sync tracking in the ordered set where protocol = ?. + * + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_Protocol_First(String protocol, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_Protocol_First(protocol, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where protocol = ?. + * + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_Protocol_Last(String protocol, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_Protocol_Last(protocol, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where protocol = ?. + * + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_Protocol_Last(String protocol, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_Protocol_Last(protocol, orderByComparator); + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where protocol = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking[] findByF_Protocol_PrevAndNext(long trackingId, + String protocol, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_Protocol_PrevAndNext(trackingId, protocol, + orderByComparator); + } + + /** + * Removes all the sync trackings where protocol = ? from the database. + * + * @param protocol the protocol + */ + public static void removeByF_Protocol(String protocol) { + getPersistence().removeByF_Protocol(protocol); + } + + /** + * Returns the number of sync trackings where protocol = ?. + * + * @param protocol the protocol + * @return the number of matching sync trackings + */ + public static int countByF_Protocol(String protocol) { + return getPersistence().countByF_Protocol(protocol); + } + + /** + * Returns all the sync trackings where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @return the matching sync trackings + */ + public static List findByF_Protocol_DossierNo( + String protocol, String dossierNo) { + return getPersistence().findByF_Protocol_DossierNo(protocol, dossierNo); + } + + /** + * Returns a range of all the sync trackings where protocol = ? and dossierNo = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public static List findByF_Protocol_DossierNo( + String protocol, String dossierNo, int start, int end) { + return getPersistence() + .findByF_Protocol_DossierNo(protocol, dossierNo, start, end); + } + + /** + * Returns an ordered range of all the sync trackings where protocol = ? and dossierNo = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public static List findByF_Protocol_DossierNo( + String protocol, String dossierNo, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByF_Protocol_DossierNo(protocol, dossierNo, start, end, + orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings where protocol = ? and dossierNo = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public static List findByF_Protocol_DossierNo( + String protocol, String dossierNo, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_Protocol_DossierNo(protocol, dossierNo, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_Protocol_DossierNo_First( + String protocol, String dossierNo, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_Protocol_DossierNo_First(protocol, dossierNo, + orderByComparator); + } + + /** + * Returns the first sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_Protocol_DossierNo_First( + String protocol, String dossierNo, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_Protocol_DossierNo_First(protocol, dossierNo, + orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_Protocol_DossierNo_Last( + String protocol, String dossierNo, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_Protocol_DossierNo_Last(protocol, dossierNo, + orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_Protocol_DossierNo_Last( + String protocol, String dossierNo, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_Protocol_DossierNo_Last(protocol, dossierNo, + orderByComparator); + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking[] findByF_Protocol_DossierNo_PrevAndNext( + long trackingId, String protocol, String dossierNo, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_Protocol_DossierNo_PrevAndNext(trackingId, + protocol, dossierNo, orderByComparator); + } + + /** + * Removes all the sync trackings where protocol = ? and dossierNo = ? from the database. + * + * @param protocol the protocol + * @param dossierNo the dossier no + */ + public static void removeByF_Protocol_DossierNo(String protocol, + String dossierNo) { + getPersistence().removeByF_Protocol_DossierNo(protocol, dossierNo); + } + + /** + * Returns the number of sync trackings where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @return the number of matching sync trackings + */ + public static int countByF_Protocol_DossierNo(String protocol, + String dossierNo) { + return getPersistence().countByF_Protocol_DossierNo(protocol, dossierNo); + } + + /** + * Returns all the sync trackings where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @return the matching sync trackings + */ + public static List findByF_Protocol_ServiceCode( + String protocol, String serviceCode) { + return getPersistence() + .findByF_Protocol_ServiceCode(protocol, serviceCode); + } + + /** + * Returns a range of all the sync trackings where protocol = ? and serviceCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param serviceCode the service code + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public static List findByF_Protocol_ServiceCode( + String protocol, String serviceCode, int start, int end) { + return getPersistence() + .findByF_Protocol_ServiceCode(protocol, serviceCode, start, + end); + } + + /** + * Returns an ordered range of all the sync trackings where protocol = ? and serviceCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param serviceCode the service code + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public static List findByF_Protocol_ServiceCode( + String protocol, String serviceCode, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByF_Protocol_ServiceCode(protocol, serviceCode, start, + end, orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings where protocol = ? and serviceCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param serviceCode the service code + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public static List findByF_Protocol_ServiceCode( + String protocol, String serviceCode, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_Protocol_ServiceCode(protocol, serviceCode, start, + end, orderByComparator, retrieveFromCache); + } + + /** + * Returns the first sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_Protocol_ServiceCode_First( + String protocol, String serviceCode, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_Protocol_ServiceCode_First(protocol, serviceCode, + orderByComparator); + } + + /** + * Returns the first sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_Protocol_ServiceCode_First( + String protocol, String serviceCode, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_Protocol_ServiceCode_First(protocol, serviceCode, + orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_Protocol_ServiceCode_Last( + String protocol, String serviceCode, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_Protocol_ServiceCode_Last(protocol, serviceCode, + orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_Protocol_ServiceCode_Last( + String protocol, String serviceCode, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_Protocol_ServiceCode_Last(protocol, serviceCode, + orderByComparator); + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking[] findByF_Protocol_ServiceCode_PrevAndNext( + long trackingId, String protocol, String serviceCode, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_Protocol_ServiceCode_PrevAndNext(trackingId, + protocol, serviceCode, orderByComparator); + } + + /** + * Removes all the sync trackings where protocol = ? and serviceCode = ? from the database. + * + * @param protocol the protocol + * @param serviceCode the service code + */ + public static void removeByF_Protocol_ServiceCode(String protocol, + String serviceCode) { + getPersistence().removeByF_Protocol_ServiceCode(protocol, serviceCode); + } + + /** + * Returns the number of sync trackings where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @return the number of matching sync trackings + */ + public static int countByF_Protocol_ServiceCode(String protocol, + String serviceCode) { + return getPersistence() + .countByF_Protocol_ServiceCode(protocol, serviceCode); + } + + /** + * Returns all the sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public static List findByF_CREATED_BETWEEN(Date createDate, + Date modifiedDate) { + return getPersistence().findByF_CREATED_BETWEEN(createDate, modifiedDate); + } + + /** + * Returns a range of all the sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public static List findByF_CREATED_BETWEEN(Date createDate, + Date modifiedDate, int start, int end) { + return getPersistence() + .findByF_CREATED_BETWEEN(createDate, modifiedDate, start, end); + } + + /** + * Returns an ordered range of all the sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public static List findByF_CREATED_BETWEEN(Date createDate, + Date modifiedDate, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByF_CREATED_BETWEEN(createDate, modifiedDate, start, + end, orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public static List findByF_CREATED_BETWEEN(Date createDate, + Date modifiedDate, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_CREATED_BETWEEN(createDate, modifiedDate, start, + end, orderByComparator, retrieveFromCache); + } + + /** + * Returns the first sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_CREATED_BETWEEN_First(Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_CREATED_BETWEEN_First(createDate, modifiedDate, + orderByComparator); + } + + /** + * Returns the first sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_CREATED_BETWEEN_First(Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_CREATED_BETWEEN_First(createDate, modifiedDate, + orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_CREATED_BETWEEN_Last(Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_CREATED_BETWEEN_Last(createDate, modifiedDate, + orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_CREATED_BETWEEN_Last(Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_CREATED_BETWEEN_Last(createDate, modifiedDate, + orderByComparator); + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking[] findByF_CREATED_BETWEEN_PrevAndNext( + long trackingId, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_CREATED_BETWEEN_PrevAndNext(trackingId, createDate, + modifiedDate, orderByComparator); + } + + /** + * Removes all the sync trackings where createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param createDate the create date + * @param modifiedDate the modified date + */ + public static void removeByF_CREATED_BETWEEN(Date createDate, + Date modifiedDate) { + getPersistence().removeByF_CREATED_BETWEEN(createDate, modifiedDate); + } + + /** + * Returns the number of sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public static int countByF_CREATED_BETWEEN(Date createDate, + Date modifiedDate) { + return getPersistence() + .countByF_CREATED_BETWEEN(createDate, modifiedDate); + } + + /** + * Returns all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public static List findByF_DOSSIERNO_CREATED_BETWEEN( + String dossierNo, Date createDate, Date modifiedDate) { + return getPersistence() + .findByF_DOSSIERNO_CREATED_BETWEEN(dossierNo, createDate, + modifiedDate); + } + + /** + * Returns a range of all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public static List findByF_DOSSIERNO_CREATED_BETWEEN( + String dossierNo, Date createDate, Date modifiedDate, int start, int end) { + return getPersistence() + .findByF_DOSSIERNO_CREATED_BETWEEN(dossierNo, createDate, + modifiedDate, start, end); + } + + /** + * Returns an ordered range of all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public static List findByF_DOSSIERNO_CREATED_BETWEEN( + String dossierNo, Date createDate, Date modifiedDate, int start, + int end, OrderByComparator orderByComparator) { + return getPersistence() + .findByF_DOSSIERNO_CREATED_BETWEEN(dossierNo, createDate, + modifiedDate, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public static List findByF_DOSSIERNO_CREATED_BETWEEN( + String dossierNo, Date createDate, Date modifiedDate, int start, + int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_DOSSIERNO_CREATED_BETWEEN(dossierNo, createDate, + modifiedDate, start, end, orderByComparator, retrieveFromCache); + } + + /** + * Returns the first sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_DOSSIERNO_CREATED_BETWEEN_First( + String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_DOSSIERNO_CREATED_BETWEEN_First(dossierNo, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the first sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_DOSSIERNO_CREATED_BETWEEN_First( + String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_DOSSIERNO_CREATED_BETWEEN_First(dossierNo, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_DOSSIERNO_CREATED_BETWEEN_Last( + String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_DOSSIERNO_CREATED_BETWEEN_Last(dossierNo, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_DOSSIERNO_CREATED_BETWEEN_Last( + String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_DOSSIERNO_CREATED_BETWEEN_Last(dossierNo, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking[] findByF_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + long trackingId, String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_DOSSIERNO_CREATED_BETWEEN_PrevAndNext(trackingId, + dossierNo, createDate, modifiedDate, orderByComparator); + } + + /** + * Removes all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + */ + public static void removeByF_DOSSIERNO_CREATED_BETWEEN(String dossierNo, + Date createDate, Date modifiedDate) { + getPersistence() + .removeByF_DOSSIERNO_CREATED_BETWEEN(dossierNo, createDate, + modifiedDate); + } + + /** + * Returns the number of sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public static int countByF_DOSSIERNO_CREATED_BETWEEN(String dossierNo, + Date createDate, Date modifiedDate) { + return getPersistence() + .countByF_DOSSIERNO_CREATED_BETWEEN(dossierNo, createDate, + modifiedDate); + } + + /** + * Returns all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public static List findByF_REFERENCE_UID_CREATED_BETWEEN( + String referenceUid, Date createDate, Date modifiedDate) { + return getPersistence() + .findByF_REFERENCE_UID_CREATED_BETWEEN(referenceUid, + createDate, modifiedDate); + } + + /** + * Returns a range of all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public static List findByF_REFERENCE_UID_CREATED_BETWEEN( + String referenceUid, Date createDate, Date modifiedDate, int start, + int end) { + return getPersistence() + .findByF_REFERENCE_UID_CREATED_BETWEEN(referenceUid, + createDate, modifiedDate, start, end); + } + + /** + * Returns an ordered range of all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public static List findByF_REFERENCE_UID_CREATED_BETWEEN( + String referenceUid, Date createDate, Date modifiedDate, int start, + int end, OrderByComparator orderByComparator) { + return getPersistence() + .findByF_REFERENCE_UID_CREATED_BETWEEN(referenceUid, + createDate, modifiedDate, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public static List findByF_REFERENCE_UID_CREATED_BETWEEN( + String referenceUid, Date createDate, Date modifiedDate, int start, + int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_REFERENCE_UID_CREATED_BETWEEN(referenceUid, + createDate, modifiedDate, start, end, orderByComparator, + retrieveFromCache); + } + + /** + * Returns the first sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_REFERENCE_UID_CREATED_BETWEEN_First( + String referenceUid, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_REFERENCE_UID_CREATED_BETWEEN_First(referenceUid, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the first sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_REFERENCE_UID_CREATED_BETWEEN_First( + String referenceUid, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_REFERENCE_UID_CREATED_BETWEEN_First(referenceUid, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_REFERENCE_UID_CREATED_BETWEEN_Last( + String referenceUid, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_REFERENCE_UID_CREATED_BETWEEN_Last(referenceUid, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_REFERENCE_UID_CREATED_BETWEEN_Last( + String referenceUid, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_REFERENCE_UID_CREATED_BETWEEN_Last(referenceUid, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking[] findByF_REFERENCE_UID_CREATED_BETWEEN_PrevAndNext( + long trackingId, String referenceUid, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_REFERENCE_UID_CREATED_BETWEEN_PrevAndNext(trackingId, + referenceUid, createDate, modifiedDate, orderByComparator); + } + + /** + * Removes all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + */ + public static void removeByF_REFERENCE_UID_CREATED_BETWEEN( + String referenceUid, Date createDate, Date modifiedDate) { + getPersistence() + .removeByF_REFERENCE_UID_CREATED_BETWEEN(referenceUid, createDate, + modifiedDate); + } + + /** + * Returns the number of sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public static int countByF_REFERENCE_UID_CREATED_BETWEEN( + String referenceUid, Date createDate, Date modifiedDate) { + return getPersistence() + .countByF_REFERENCE_UID_CREATED_BETWEEN(referenceUid, + createDate, modifiedDate); + } + + /** + * Returns all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public static List findByF_SERVICECODE_CREATED_BETWEEN( + String serviceCode, Date createDate, Date modifiedDate) { + return getPersistence() + .findByF_SERVICECODE_CREATED_BETWEEN(serviceCode, + createDate, modifiedDate); + } + + /** + * Returns a range of all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public static List findByF_SERVICECODE_CREATED_BETWEEN( + String serviceCode, Date createDate, Date modifiedDate, int start, + int end) { + return getPersistence() + .findByF_SERVICECODE_CREATED_BETWEEN(serviceCode, + createDate, modifiedDate, start, end); + } + + /** + * Returns an ordered range of all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public static List findByF_SERVICECODE_CREATED_BETWEEN( + String serviceCode, Date createDate, Date modifiedDate, int start, + int end, OrderByComparator orderByComparator) { + return getPersistence() + .findByF_SERVICECODE_CREATED_BETWEEN(serviceCode, + createDate, modifiedDate, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public static List findByF_SERVICECODE_CREATED_BETWEEN( + String serviceCode, Date createDate, Date modifiedDate, int start, + int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_SERVICECODE_CREATED_BETWEEN(serviceCode, + createDate, modifiedDate, start, end, orderByComparator, + retrieveFromCache); + } + + /** + * Returns the first sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_SERVICECODE_CREATED_BETWEEN_First( + String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_SERVICECODE_CREATED_BETWEEN_First(serviceCode, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the first sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_SERVICECODE_CREATED_BETWEEN_First( + String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_SERVICECODE_CREATED_BETWEEN_First(serviceCode, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_SERVICECODE_CREATED_BETWEEN_Last( + String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_SERVICECODE_CREATED_BETWEEN_Last(serviceCode, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_SERVICECODE_CREATED_BETWEEN_Last( + String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_SERVICECODE_CREATED_BETWEEN_Last(serviceCode, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking[] findByF_SERVICECODE_CREATED_BETWEEN_PrevAndNext( + long trackingId, String serviceCode, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_SERVICECODE_CREATED_BETWEEN_PrevAndNext(trackingId, + serviceCode, createDate, modifiedDate, orderByComparator); + } + + /** + * Removes all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + */ + public static void removeByF_SERVICECODE_CREATED_BETWEEN( + String serviceCode, Date createDate, Date modifiedDate) { + getPersistence() + .removeByF_SERVICECODE_CREATED_BETWEEN(serviceCode, createDate, + modifiedDate); + } + + /** + * Returns the number of sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public static int countByF_SERVICECODE_CREATED_BETWEEN(String serviceCode, + Date createDate, Date modifiedDate) { + return getPersistence() + .countByF_SERVICECODE_CREATED_BETWEEN(serviceCode, + createDate, modifiedDate); + } + + /** + * Returns all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public static List findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, Date modifiedDate) { + return getPersistence() + .findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(serviceCode, + dossierNo, createDate, modifiedDate); + } + + /** + * Returns a range of all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public static List findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end) { + return getPersistence() + .findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(serviceCode, + dossierNo, createDate, modifiedDate, start, end); + } + + /** + * Returns an ordered range of all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public static List findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(serviceCode, + dossierNo, createDate, modifiedDate, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public static List findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(serviceCode, + dossierNo, createDate, modifiedDate, start, end, orderByComparator, + retrieveFromCache); + } + + /** + * Returns the first sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First(serviceCode, + dossierNo, createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the first sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First(serviceCode, + dossierNo, createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last(serviceCode, + dossierNo, createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last(serviceCode, + dossierNo, createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking[] findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + long trackingId, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_PrevAndNext(trackingId, + serviceCode, dossierNo, createDate, modifiedDate, orderByComparator); + } + + /** + * Removes all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + */ + public static void removeByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, Date modifiedDate) { + getPersistence() + .removeByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(serviceCode, + dossierNo, createDate, modifiedDate); + } + + /** + * Returns the number of sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public static int countByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, Date modifiedDate) { + return getPersistence() + .countByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(serviceCode, + dossierNo, createDate, modifiedDate); + } + + /** + * Returns all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public static List findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate) { + return getPersistence() + .findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(api, + serviceCode, dossierNo, createDate, modifiedDate); + } + + /** + * Returns a range of all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public static List findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end) { + return getPersistence() + .findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(api, + serviceCode, dossierNo, createDate, modifiedDate, start, end); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public static List findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(api, + serviceCode, dossierNo, createDate, modifiedDate, start, end, + orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public static List findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(api, + serviceCode, dossierNo, createDate, modifiedDate, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First(api, + serviceCode, dossierNo, createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First(api, + serviceCode, dossierNo, createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last(api, + serviceCode, dossierNo, createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last(api, + serviceCode, dossierNo, createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking[] findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + long trackingId, String api, String serviceCode, String dossierNo, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_PrevAndNext(trackingId, + api, serviceCode, dossierNo, createDate, modifiedDate, + orderByComparator); + } + + /** + * Removes all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + */ + public static void removeByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate) { + getPersistence() + .removeByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(api, + serviceCode, dossierNo, createDate, modifiedDate); + } + + /** + * Returns the number of sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public static int countByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate) { + return getPersistence() + .countByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(api, + serviceCode, dossierNo, createDate, modifiedDate); + } + + /** + * Returns all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public static List findByF_API_SERVICECODE_CREATED_BETWEEN( + String api, String serviceCode, Date createDate, Date modifiedDate) { + return getPersistence() + .findByF_API_SERVICECODE_CREATED_BETWEEN(api, serviceCode, + createDate, modifiedDate); + } + + /** + * Returns a range of all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public static List findByF_API_SERVICECODE_CREATED_BETWEEN( + String api, String serviceCode, Date createDate, Date modifiedDate, + int start, int end) { + return getPersistence() + .findByF_API_SERVICECODE_CREATED_BETWEEN(api, serviceCode, + createDate, modifiedDate, start, end); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public static List findByF_API_SERVICECODE_CREATED_BETWEEN( + String api, String serviceCode, Date createDate, Date modifiedDate, + int start, int end, OrderByComparator orderByComparator) { + return getPersistence() + .findByF_API_SERVICECODE_CREATED_BETWEEN(api, serviceCode, + createDate, modifiedDate, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public static List findByF_API_SERVICECODE_CREATED_BETWEEN( + String api, String serviceCode, Date createDate, Date modifiedDate, + int start, int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_API_SERVICECODE_CREATED_BETWEEN(api, serviceCode, + createDate, modifiedDate, start, end, orderByComparator, + retrieveFromCache); + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_API_SERVICECODE_CREATED_BETWEEN_First( + String api, String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_API_SERVICECODE_CREATED_BETWEEN_First(api, + serviceCode, createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_API_SERVICECODE_CREATED_BETWEEN_First( + String api, String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_API_SERVICECODE_CREATED_BETWEEN_First(api, + serviceCode, createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_API_SERVICECODE_CREATED_BETWEEN_Last( + String api, String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_API_SERVICECODE_CREATED_BETWEEN_Last(api, + serviceCode, createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_API_SERVICECODE_CREATED_BETWEEN_Last( + String api, String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_API_SERVICECODE_CREATED_BETWEEN_Last(api, + serviceCode, createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking[] findByF_API_SERVICECODE_CREATED_BETWEEN_PrevAndNext( + long trackingId, String api, String serviceCode, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_API_SERVICECODE_CREATED_BETWEEN_PrevAndNext(trackingId, + api, serviceCode, createDate, modifiedDate, orderByComparator); + } + + /** + * Removes all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + */ + public static void removeByF_API_SERVICECODE_CREATED_BETWEEN(String api, + String serviceCode, Date createDate, Date modifiedDate) { + getPersistence() + .removeByF_API_SERVICECODE_CREATED_BETWEEN(api, serviceCode, + createDate, modifiedDate); + } + + /** + * Returns the number of sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public static int countByF_API_SERVICECODE_CREATED_BETWEEN(String api, + String serviceCode, Date createDate, Date modifiedDate) { + return getPersistence() + .countByF_API_SERVICECODE_CREATED_BETWEEN(api, serviceCode, + createDate, modifiedDate); + } + + /** + * Returns all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public static List findByF_API_DOSSIERNO_CREATED_BETWEEN( + String api, String dossierNo, Date createDate, Date modifiedDate) { + return getPersistence() + .findByF_API_DOSSIERNO_CREATED_BETWEEN(api, dossierNo, + createDate, modifiedDate); + } + + /** + * Returns a range of all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public static List findByF_API_DOSSIERNO_CREATED_BETWEEN( + String api, String dossierNo, Date createDate, Date modifiedDate, + int start, int end) { + return getPersistence() + .findByF_API_DOSSIERNO_CREATED_BETWEEN(api, dossierNo, + createDate, modifiedDate, start, end); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public static List findByF_API_DOSSIERNO_CREATED_BETWEEN( + String api, String dossierNo, Date createDate, Date modifiedDate, + int start, int end, OrderByComparator orderByComparator) { + return getPersistence() + .findByF_API_DOSSIERNO_CREATED_BETWEEN(api, dossierNo, + createDate, modifiedDate, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public static List findByF_API_DOSSIERNO_CREATED_BETWEEN( + String api, String dossierNo, Date createDate, Date modifiedDate, + int start, int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_API_DOSSIERNO_CREATED_BETWEEN(api, dossierNo, + createDate, modifiedDate, start, end, orderByComparator, + retrieveFromCache); + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_API_DOSSIERNO_CREATED_BETWEEN_First( + String api, String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_API_DOSSIERNO_CREATED_BETWEEN_First(api, dossierNo, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_API_DOSSIERNO_CREATED_BETWEEN_First( + String api, String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_API_DOSSIERNO_CREATED_BETWEEN_First(api, + dossierNo, createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_API_DOSSIERNO_CREATED_BETWEEN_Last( + String api, String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_API_DOSSIERNO_CREATED_BETWEEN_Last(api, dossierNo, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_API_DOSSIERNO_CREATED_BETWEEN_Last( + String api, String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_API_DOSSIERNO_CREATED_BETWEEN_Last(api, dossierNo, + createDate, modifiedDate, orderByComparator); + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking[] findByF_API_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + long trackingId, String api, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_API_DOSSIERNO_CREATED_BETWEEN_PrevAndNext(trackingId, + api, dossierNo, createDate, modifiedDate, orderByComparator); + } + + /** + * Removes all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + */ + public static void removeByF_API_DOSSIERNO_CREATED_BETWEEN(String api, + String dossierNo, Date createDate, Date modifiedDate) { + getPersistence() + .removeByF_API_DOSSIERNO_CREATED_BETWEEN(api, dossierNo, + createDate, modifiedDate); + } + + /** + * Returns the number of sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public static int countByF_API_DOSSIERNO_CREATED_BETWEEN(String api, + String dossierNo, Date createDate, Date modifiedDate) { + return getPersistence() + .countByF_API_DOSSIERNO_CREATED_BETWEEN(api, dossierNo, + createDate, modifiedDate); + } + + /** + * Returns all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + public static List findByF_API_CREATED_BETWEEN(String api, + Date createDate, Date modifiedDate) { + return getPersistence() + .findByF_API_CREATED_BETWEEN(api, createDate, modifiedDate); + } + + /** + * Returns a range of all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + public static List findByF_API_CREATED_BETWEEN(String api, + Date createDate, Date modifiedDate, int start, int end) { + return getPersistence() + .findByF_API_CREATED_BETWEEN(api, createDate, modifiedDate, + start, end); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + public static List findByF_API_CREATED_BETWEEN(String api, + Date createDate, Date modifiedDate, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByF_API_CREATED_BETWEEN(api, createDate, modifiedDate, + start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + public static List findByF_API_CREATED_BETWEEN(String api, + Date createDate, Date modifiedDate, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_API_CREATED_BETWEEN(api, createDate, modifiedDate, + start, end, orderByComparator, retrieveFromCache); + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_API_CREATED_BETWEEN_First(String api, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_API_CREATED_BETWEEN_First(api, createDate, + modifiedDate, orderByComparator); + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_API_CREATED_BETWEEN_First(String api, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_API_CREATED_BETWEEN_First(api, createDate, + modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_API_CREATED_BETWEEN_Last(String api, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_API_CREATED_BETWEEN_Last(api, createDate, + modifiedDate, orderByComparator); + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_API_CREATED_BETWEEN_Last(String api, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_API_CREATED_BETWEEN_Last(api, createDate, + modifiedDate, orderByComparator); + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking[] findByF_API_CREATED_BETWEEN_PrevAndNext( + long trackingId, String api, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_API_CREATED_BETWEEN_PrevAndNext(trackingId, api, + createDate, modifiedDate, orderByComparator); + } + + /** + * Removes all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + */ + public static void removeByF_API_CREATED_BETWEEN(String api, + Date createDate, Date modifiedDate) { + getPersistence() + .removeByF_API_CREATED_BETWEEN(api, createDate, modifiedDate); + } + + /** + * Returns the number of sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + public static int countByF_API_CREATED_BETWEEN(String api, Date createDate, + Date modifiedDate) { + return getPersistence() + .countByF_API_CREATED_BETWEEN(api, createDate, modifiedDate); + } + + /** + * Caches the sync tracking in the entity cache if it is enabled. + * + * @param syncTracking the sync tracking + */ + public static void cacheResult(SyncTracking syncTracking) { + getPersistence().cacheResult(syncTracking); + } + + /** + * Caches the sync trackings in the entity cache if it is enabled. + * + * @param syncTrackings the sync trackings + */ + public static void cacheResult(List syncTrackings) { + getPersistence().cacheResult(syncTrackings); + } + + /** + * Creates a new sync tracking with the primary key. Does not add the sync tracking to the database. + * + * @param trackingId the primary key for the new sync tracking + * @return the new sync tracking + */ + public static SyncTracking create(long trackingId) { + return getPersistence().create(trackingId); + } + + /** + * Removes the sync tracking with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking that was removed + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking remove(long trackingId) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence().remove(trackingId); + } + + public static SyncTracking updateImpl(SyncTracking syncTracking) { + return getPersistence().updateImpl(syncTracking); + } + + /** + * Returns the sync tracking with the primary key or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + public static SyncTracking findByPrimaryKey(long trackingId) + throws org.opencps.adminconfig.exception.NoSuchSyncTrackingException { + return getPersistence().findByPrimaryKey(trackingId); + } + + /** + * Returns the sync tracking with the primary key or returns null if it could not be found. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking, or null if a sync tracking with the primary key could not be found + */ + public static SyncTracking fetchByPrimaryKey(long trackingId) { + return getPersistence().fetchByPrimaryKey(trackingId); + } + + public static java.util.Map fetchByPrimaryKeys( + java.util.Set primaryKeys) { + return getPersistence().fetchByPrimaryKeys(primaryKeys); + } + + /** + * Returns all the sync trackings. + * + * @return the sync trackings + */ + public static List findAll() { + return getPersistence().findAll(); + } + + /** + * Returns a range of all the sync trackings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of sync trackings + */ + public static List findAll(int start, int end) { + return getPersistence().findAll(start, end); + } + + /** + * Returns an ordered range of all the sync trackings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of sync trackings + */ + public static List findAll(int start, int end, + OrderByComparator orderByComparator) { + return getPersistence().findAll(start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the sync trackings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of sync trackings + */ + public static List findAll(int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findAll(start, end, orderByComparator, retrieveFromCache); + } + + /** + * Removes all the sync trackings from the database. + */ + public static void removeAll() { + getPersistence().removeAll(); + } + + /** + * Returns the number of sync trackings. + * + * @return the number of sync trackings + */ + public static int countAll() { + return getPersistence().countAll(); + } + + public static java.util.Set getBadColumnNames() { + return getPersistence().getBadColumnNames(); + } + + public static SyncTrackingPersistence getPersistence() { + return _serviceTracker.getService(); + } + + private static ServiceTracker _serviceTracker; + + static { + Bundle bundle = FrameworkUtil.getBundle(SyncTrackingPersistence.class); + + ServiceTracker serviceTracker = + new ServiceTracker(bundle.getBundleContext(), + SyncTrackingPersistence.class, null); + + serviceTracker.open(); + + _serviceTracker = serviceTracker; + } +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/service.xml b/modules/backend-admin-config/backend-admin-config-service/service.xml index e6888421e8..416dc8d882 100644 --- a/modules/backend-admin-config/backend-admin-config-service/service.xml +++ b/modules/backend-admin-config/backend-admin-config-service/service.xml @@ -94,7 +94,7 @@ - + @@ -105,5 +105,177 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiManagerBaseImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiManagerBaseImpl.java new file mode 100644 index 0000000000..0abe1c66eb --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiManagerBaseImpl.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import org.opencps.adminconfig.model.ApiManager; +import org.opencps.adminconfig.service.ApiManagerLocalServiceUtil; + +/** + * The extended model base implementation for the ApiManager service. Represents a row in the "opencps_api_manager" database table, with each column mapped to a property of this class. + * + *

+ * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link ApiManagerImpl}. + *

+ * + * @author binhth + * @see ApiManagerImpl + * @see ApiManager + * @generated + */ +@ProviderType +public abstract class ApiManagerBaseImpl extends ApiManagerModelImpl + implements ApiManager { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a api manager model instance should use the {@link ApiManager} interface instead. + */ + @Override + public void persist() { + if (this.isNew()) { + ApiManagerLocalServiceUtil.addApiManager(this); + } + else { + ApiManagerLocalServiceUtil.updateApiManager(this); + } + } +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiManagerCacheModel.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiManagerCacheModel.java new file mode 100644 index 0000000000..5b0df34bc5 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiManagerCacheModel.java @@ -0,0 +1,223 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.util.HashUtil; +import com.liferay.portal.kernel.util.StringBundler; + +import org.opencps.adminconfig.model.ApiManager; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +import java.util.Date; + +/** + * The cache model class for representing ApiManager in entity cache. + * + * @author binhth + * @see ApiManager + * @generated + */ +@ProviderType +public class ApiManagerCacheModel implements CacheModel, + Externalizable { + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof ApiManagerCacheModel)) { + return false; + } + + ApiManagerCacheModel apiManagerCacheModel = (ApiManagerCacheModel)obj; + + if (apiManagerId == apiManagerCacheModel.apiManagerId) { + return true; + } + + return false; + } + + @Override + public int hashCode() { + return HashUtil.hash(0, apiManagerId); + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(21); + + sb.append("{apiManagerId="); + sb.append(apiManagerId); + sb.append(", groupId="); + sb.append(groupId); + sb.append(", apiCode="); + sb.append(apiCode); + sb.append(", createDate="); + sb.append(createDate); + sb.append(", modifiedDate="); + sb.append(modifiedDate); + sb.append(", userId="); + sb.append(userId); + sb.append(", apiName="); + sb.append(apiName); + sb.append(", apiDescription="); + sb.append(apiDescription); + sb.append(", apiStatus="); + sb.append(apiStatus); + sb.append(", className="); + sb.append(className); + sb.append("}"); + + return sb.toString(); + } + + @Override + public ApiManager toEntityModel() { + ApiManagerImpl apiManagerImpl = new ApiManagerImpl(); + + apiManagerImpl.setApiManagerId(apiManagerId); + apiManagerImpl.setGroupId(groupId); + + if (apiCode == null) { + apiManagerImpl.setApiCode(""); + } + else { + apiManagerImpl.setApiCode(apiCode); + } + + if (createDate == Long.MIN_VALUE) { + apiManagerImpl.setCreateDate(null); + } + else { + apiManagerImpl.setCreateDate(new Date(createDate)); + } + + if (modifiedDate == Long.MIN_VALUE) { + apiManagerImpl.setModifiedDate(null); + } + else { + apiManagerImpl.setModifiedDate(new Date(modifiedDate)); + } + + apiManagerImpl.setUserId(userId); + + if (apiName == null) { + apiManagerImpl.setApiName(""); + } + else { + apiManagerImpl.setApiName(apiName); + } + + if (apiDescription == null) { + apiManagerImpl.setApiDescription(""); + } + else { + apiManagerImpl.setApiDescription(apiDescription); + } + + apiManagerImpl.setApiStatus(apiStatus); + + if (className == null) { + apiManagerImpl.setClassName(""); + } + else { + apiManagerImpl.setClassName(className); + } + + apiManagerImpl.resetOriginalValues(); + + return apiManagerImpl; + } + + @Override + public void readExternal(ObjectInput objectInput) throws IOException { + apiManagerId = objectInput.readLong(); + + groupId = objectInput.readLong(); + apiCode = objectInput.readUTF(); + createDate = objectInput.readLong(); + modifiedDate = objectInput.readLong(); + + userId = objectInput.readLong(); + apiName = objectInput.readUTF(); + apiDescription = objectInput.readUTF(); + + apiStatus = objectInput.readInt(); + className = objectInput.readUTF(); + } + + @Override + public void writeExternal(ObjectOutput objectOutput) + throws IOException { + objectOutput.writeLong(apiManagerId); + + objectOutput.writeLong(groupId); + + if (apiCode == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(apiCode); + } + + objectOutput.writeLong(createDate); + objectOutput.writeLong(modifiedDate); + + objectOutput.writeLong(userId); + + if (apiName == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(apiName); + } + + if (apiDescription == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(apiDescription); + } + + objectOutput.writeInt(apiStatus); + + if (className == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(className); + } + } + + public long apiManagerId; + public long groupId; + public String apiCode; + public long createDate; + public long modifiedDate; + public long userId; + public String apiName; + public String apiDescription; + public int apiStatus; + public String className; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiManagerImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiManagerImpl.java new file mode 100644 index 0000000000..11948f0a84 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiManagerImpl.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model.impl; + +import aQute.bnd.annotation.ProviderType; + +/** + * The extended model implementation for the ApiManager service. Represents a row in the "opencps_api_mânger" database table, with each column mapped to a property of this class. + * + *

+ * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.adminconfig.model.ApiManager} interface. + *

+ * + * @author binhth + */ +@ProviderType +public class ApiManagerImpl extends ApiManagerBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a api manager model instance should use the {@link org.opencps.adminconfig.model.ApiManager} interface instead. + */ + public ApiManagerImpl() { + } +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiManagerModelImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiManagerModelImpl.java new file mode 100644 index 0000000000..f1001c84fb --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiManagerModelImpl.java @@ -0,0 +1,697 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; +import com.liferay.expando.kernel.util.ExpandoBridgeFactoryUtil; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.model.ModelWrapper; +import com.liferay.portal.kernel.model.User; +import com.liferay.portal.kernel.model.impl.BaseModelImpl; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.service.UserLocalServiceUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; + +import org.opencps.adminconfig.model.ApiManager; +import org.opencps.adminconfig.model.ApiManagerModel; + +import java.io.Serializable; + +import java.sql.Types; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * The base model implementation for the ApiManager service. Represents a row in the "opencps_api_manager" database table, with each column mapped to a property of this class. + * + *

+ * This implementation and its corresponding interface {@link ApiManagerModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link ApiManagerImpl}. + *

+ * + * @author binhth + * @see ApiManagerImpl + * @see ApiManager + * @see ApiManagerModel + * @generated + */ +@ProviderType +public class ApiManagerModelImpl extends BaseModelImpl + implements ApiManagerModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a api manager model instance should use the {@link ApiManager} interface instead. + */ + public static final String TABLE_NAME = "opencps_api_manager"; + public static final Object[][] TABLE_COLUMNS = { + { "apiManagerId", Types.BIGINT }, + { "groupId", Types.BIGINT }, + { "apiCode", Types.VARCHAR }, + { "createDate", Types.TIMESTAMP }, + { "modifiedDate", Types.TIMESTAMP }, + { "userId", Types.BIGINT }, + { "apiName", Types.VARCHAR }, + { "apiDescription", Types.VARCHAR }, + { "apiStatus", Types.INTEGER }, + { "className", Types.VARCHAR } + }; + public static final Map TABLE_COLUMNS_MAP = new HashMap(); + + static { + TABLE_COLUMNS_MAP.put("apiManagerId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("groupId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("apiCode", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("createDate", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("modifiedDate", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("userId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("apiName", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("apiDescription", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("apiStatus", Types.INTEGER); + TABLE_COLUMNS_MAP.put("className", Types.VARCHAR); + } + + public static final String TABLE_SQL_CREATE = "create table opencps_api_manager (apiManagerId LONG not null primary key,groupId LONG,apiCode VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,userId LONG,apiName VARCHAR(75) null,apiDescription VARCHAR(75) null,apiStatus INTEGER,className VARCHAR(75) null)"; + public static final String TABLE_SQL_DROP = "drop table opencps_api_manager"; + public static final String ORDER_BY_JPQL = " ORDER BY apiManager.apiManagerId ASC"; + public static final String ORDER_BY_SQL = " ORDER BY opencps_api_manager.apiManagerId ASC"; + public static final String DATA_SOURCE = "liferayDataSource"; + public static final String SESSION_FACTORY = "liferaySessionFactory"; + public static final String TX_MANAGER = "liferayTransactionManager"; + public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(backend.admin.config.service.util.ServiceProps.get( + "value.object.entity.cache.enabled.org.opencps.adminconfig.model.ApiManager"), + true); + public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(backend.admin.config.service.util.ServiceProps.get( + "value.object.finder.cache.enabled.org.opencps.adminconfig.model.ApiManager"), + true); + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(backend.admin.config.service.util.ServiceProps.get( + "value.object.column.bitmask.enabled.org.opencps.adminconfig.model.ApiManager"), + true); + public static final long APICODE_COLUMN_BITMASK = 1L; + public static final long APIMANAGERID_COLUMN_BITMASK = 2L; + public static final long GROUPID_COLUMN_BITMASK = 4L; + public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(backend.admin.config.service.util.ServiceProps.get( + "lock.expiration.time.org.opencps.adminconfig.model.ApiManager")); + + public ApiManagerModelImpl() { + } + + @Override + public long getPrimaryKey() { + return _apiManagerId; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setApiManagerId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _apiManagerId; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Class getModelClass() { + return ApiManager.class; + } + + @Override + public String getModelClassName() { + return ApiManager.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("apiManagerId", getApiManagerId()); + attributes.put("groupId", getGroupId()); + attributes.put("apiCode", getApiCode()); + attributes.put("createDate", getCreateDate()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("userId", getUserId()); + attributes.put("apiName", getApiName()); + attributes.put("apiDescription", getApiDescription()); + attributes.put("apiStatus", getApiStatus()); + attributes.put("className", getClassName()); + + attributes.put("entityCacheEnabled", isEntityCacheEnabled()); + attributes.put("finderCacheEnabled", isFinderCacheEnabled()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + Long apiManagerId = (Long)attributes.get("apiManagerId"); + + if (apiManagerId != null) { + setApiManagerId(apiManagerId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + String apiCode = (String)attributes.get("apiCode"); + + if (apiCode != null) { + setApiCode(apiCode); + } + + Date createDate = (Date)attributes.get("createDate"); + + if (createDate != null) { + setCreateDate(createDate); + } + + Date modifiedDate = (Date)attributes.get("modifiedDate"); + + if (modifiedDate != null) { + setModifiedDate(modifiedDate); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String apiName = (String)attributes.get("apiName"); + + if (apiName != null) { + setApiName(apiName); + } + + String apiDescription = (String)attributes.get("apiDescription"); + + if (apiDescription != null) { + setApiDescription(apiDescription); + } + + Integer apiStatus = (Integer)attributes.get("apiStatus"); + + if (apiStatus != null) { + setApiStatus(apiStatus); + } + + String className = (String)attributes.get("className"); + + if (className != null) { + setClassName(className); + } + } + + @Override + public long getApiManagerId() { + return _apiManagerId; + } + + @Override + public void setApiManagerId(long apiManagerId) { + _columnBitmask |= APIMANAGERID_COLUMN_BITMASK; + + if (!_setOriginalApiManagerId) { + _setOriginalApiManagerId = true; + + _originalApiManagerId = _apiManagerId; + } + + _apiManagerId = apiManagerId; + } + + public long getOriginalApiManagerId() { + return _originalApiManagerId; + } + + @Override + public long getGroupId() { + return _groupId; + } + + @Override + public void setGroupId(long groupId) { + _columnBitmask |= GROUPID_COLUMN_BITMASK; + + if (!_setOriginalGroupId) { + _setOriginalGroupId = true; + + _originalGroupId = _groupId; + } + + _groupId = groupId; + } + + public long getOriginalGroupId() { + return _originalGroupId; + } + + @Override + public String getApiCode() { + if (_apiCode == null) { + return ""; + } + else { + return _apiCode; + } + } + + @Override + public void setApiCode(String apiCode) { + _columnBitmask |= APICODE_COLUMN_BITMASK; + + if (_originalApiCode == null) { + _originalApiCode = _apiCode; + } + + _apiCode = apiCode; + } + + public String getOriginalApiCode() { + return GetterUtil.getString(_originalApiCode); + } + + @Override + public Date getCreateDate() { + return _createDate; + } + + @Override + public void setCreateDate(Date createDate) { + _createDate = createDate; + } + + @Override + public Date getModifiedDate() { + return _modifiedDate; + } + + public boolean hasSetModifiedDate() { + return _setModifiedDate; + } + + @Override + public void setModifiedDate(Date modifiedDate) { + _setModifiedDate = true; + + _modifiedDate = modifiedDate; + } + + @Override + public long getUserId() { + return _userId; + } + + @Override + public void setUserId(long userId) { + _userId = userId; + } + + @Override + public String getUserUuid() { + try { + User user = UserLocalServiceUtil.getUserById(getUserId()); + + return user.getUuid(); + } + catch (PortalException pe) { + return ""; + } + } + + @Override + public void setUserUuid(String userUuid) { + } + + @Override + public String getApiName() { + if (_apiName == null) { + return ""; + } + else { + return _apiName; + } + } + + @Override + public void setApiName(String apiName) { + _apiName = apiName; + } + + @Override + public String getApiDescription() { + if (_apiDescription == null) { + return ""; + } + else { + return _apiDescription; + } + } + + @Override + public void setApiDescription(String apiDescription) { + _apiDescription = apiDescription; + } + + @Override + public int getApiStatus() { + return _apiStatus; + } + + @Override + public void setApiStatus(int apiStatus) { + _apiStatus = apiStatus; + } + + @Override + public String getClassName() { + if (_className == null) { + return ""; + } + else { + return _className; + } + } + + @Override + public void setClassName(String className) { + _className = className; + } + + public long getColumnBitmask() { + return _columnBitmask; + } + + @Override + public ExpandoBridge getExpandoBridge() { + return ExpandoBridgeFactoryUtil.getExpandoBridge(0, + ApiManager.class.getName(), getPrimaryKey()); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + ExpandoBridge expandoBridge = getExpandoBridge(); + + expandoBridge.setAttributes(serviceContext); + } + + @Override + public ApiManager toEscapedModel() { + if (_escapedModel == null) { + _escapedModel = (ApiManager)ProxyUtil.newProxyInstance(_classLoader, + _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); + } + + return _escapedModel; + } + + @Override + public Object clone() { + ApiManagerImpl apiManagerImpl = new ApiManagerImpl(); + + apiManagerImpl.setApiManagerId(getApiManagerId()); + apiManagerImpl.setGroupId(getGroupId()); + apiManagerImpl.setApiCode(getApiCode()); + apiManagerImpl.setCreateDate(getCreateDate()); + apiManagerImpl.setModifiedDate(getModifiedDate()); + apiManagerImpl.setUserId(getUserId()); + apiManagerImpl.setApiName(getApiName()); + apiManagerImpl.setApiDescription(getApiDescription()); + apiManagerImpl.setApiStatus(getApiStatus()); + apiManagerImpl.setClassName(getClassName()); + + apiManagerImpl.resetOriginalValues(); + + return apiManagerImpl; + } + + @Override + public int compareTo(ApiManager apiManager) { + long primaryKey = apiManager.getPrimaryKey(); + + if (getPrimaryKey() < primaryKey) { + return -1; + } + else if (getPrimaryKey() > primaryKey) { + return 1; + } + else { + return 0; + } + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof ApiManager)) { + return false; + } + + ApiManager apiManager = (ApiManager)obj; + + long primaryKey = apiManager.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public boolean isEntityCacheEnabled() { + return ENTITY_CACHE_ENABLED; + } + + @Override + public boolean isFinderCacheEnabled() { + return FINDER_CACHE_ENABLED; + } + + @Override + public void resetOriginalValues() { + ApiManagerModelImpl apiManagerModelImpl = this; + + apiManagerModelImpl._originalApiManagerId = apiManagerModelImpl._apiManagerId; + + apiManagerModelImpl._setOriginalApiManagerId = false; + + apiManagerModelImpl._originalGroupId = apiManagerModelImpl._groupId; + + apiManagerModelImpl._setOriginalGroupId = false; + + apiManagerModelImpl._originalApiCode = apiManagerModelImpl._apiCode; + + apiManagerModelImpl._setModifiedDate = false; + + apiManagerModelImpl._columnBitmask = 0; + } + + @Override + public CacheModel toCacheModel() { + ApiManagerCacheModel apiManagerCacheModel = new ApiManagerCacheModel(); + + apiManagerCacheModel.apiManagerId = getApiManagerId(); + + apiManagerCacheModel.groupId = getGroupId(); + + apiManagerCacheModel.apiCode = getApiCode(); + + String apiCode = apiManagerCacheModel.apiCode; + + if ((apiCode != null) && (apiCode.length() == 0)) { + apiManagerCacheModel.apiCode = null; + } + + Date createDate = getCreateDate(); + + if (createDate != null) { + apiManagerCacheModel.createDate = createDate.getTime(); + } + else { + apiManagerCacheModel.createDate = Long.MIN_VALUE; + } + + Date modifiedDate = getModifiedDate(); + + if (modifiedDate != null) { + apiManagerCacheModel.modifiedDate = modifiedDate.getTime(); + } + else { + apiManagerCacheModel.modifiedDate = Long.MIN_VALUE; + } + + apiManagerCacheModel.userId = getUserId(); + + apiManagerCacheModel.apiName = getApiName(); + + String apiName = apiManagerCacheModel.apiName; + + if ((apiName != null) && (apiName.length() == 0)) { + apiManagerCacheModel.apiName = null; + } + + apiManagerCacheModel.apiDescription = getApiDescription(); + + String apiDescription = apiManagerCacheModel.apiDescription; + + if ((apiDescription != null) && (apiDescription.length() == 0)) { + apiManagerCacheModel.apiDescription = null; + } + + apiManagerCacheModel.apiStatus = getApiStatus(); + + apiManagerCacheModel.className = getClassName(); + + String className = apiManagerCacheModel.className; + + if ((className != null) && (className.length() == 0)) { + apiManagerCacheModel.className = null; + } + + return apiManagerCacheModel; + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(21); + + sb.append("{apiManagerId="); + sb.append(getApiManagerId()); + sb.append(", groupId="); + sb.append(getGroupId()); + sb.append(", apiCode="); + sb.append(getApiCode()); + sb.append(", createDate="); + sb.append(getCreateDate()); + sb.append(", modifiedDate="); + sb.append(getModifiedDate()); + sb.append(", userId="); + sb.append(getUserId()); + sb.append(", apiName="); + sb.append(getApiName()); + sb.append(", apiDescription="); + sb.append(getApiDescription()); + sb.append(", apiStatus="); + sb.append(getApiStatus()); + sb.append(", className="); + sb.append(getClassName()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(34); + + sb.append(""); + sb.append("org.opencps.adminconfig.model.ApiManager"); + sb.append(""); + + sb.append( + "apiManagerId"); + sb.append( + "groupId"); + sb.append( + "apiCode"); + sb.append( + "createDate"); + sb.append( + "modifiedDate"); + sb.append( + "userId"); + sb.append( + "apiName"); + sb.append( + "apiDescription"); + sb.append( + "apiStatus"); + sb.append( + "className"); + + sb.append(""); + + return sb.toString(); + } + + private static final ClassLoader _classLoader = ApiManager.class.getClassLoader(); + private static final Class[] _escapedModelInterfaces = new Class[] { + ApiManager.class, ModelWrapper.class + }; + private long _apiManagerId; + private long _originalApiManagerId; + private boolean _setOriginalApiManagerId; + private long _groupId; + private long _originalGroupId; + private boolean _setOriginalGroupId; + private String _apiCode; + private String _originalApiCode; + private Date _createDate; + private Date _modifiedDate; + private boolean _setModifiedDate; + private long _userId; + private String _apiName; + private String _apiDescription; + private int _apiStatus; + private String _className; + private long _columnBitmask; + private ApiManager _escapedModel; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiRoleBaseImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiRoleBaseImpl.java new file mode 100644 index 0000000000..538c3fd147 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiRoleBaseImpl.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import org.opencps.adminconfig.model.ApiRole; +import org.opencps.adminconfig.service.ApiRoleLocalServiceUtil; + +/** + * The extended model base implementation for the ApiRole service. Represents a row in the "opencps_api_role" database table, with each column mapped to a property of this class. + * + *

+ * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link ApiRoleImpl}. + *

+ * + * @author binhth + * @see ApiRoleImpl + * @see ApiRole + * @generated + */ +@ProviderType +public abstract class ApiRoleBaseImpl extends ApiRoleModelImpl + implements ApiRole { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a api role model instance should use the {@link ApiRole} interface instead. + */ + @Override + public void persist() { + if (this.isNew()) { + ApiRoleLocalServiceUtil.addApiRole(this); + } + else { + ApiRoleLocalServiceUtil.updateApiRole(this); + } + } +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiRoleCacheModel.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiRoleCacheModel.java new file mode 100644 index 0000000000..502ddbfeb5 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiRoleCacheModel.java @@ -0,0 +1,194 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.util.HashUtil; +import com.liferay.portal.kernel.util.StringBundler; + +import org.opencps.adminconfig.model.ApiRole; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +import java.util.Date; + +/** + * The cache model class for representing ApiRole in entity cache. + * + * @author binhth + * @see ApiRole + * @generated + */ +@ProviderType +public class ApiRoleCacheModel implements CacheModel, Externalizable { + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof ApiRoleCacheModel)) { + return false; + } + + ApiRoleCacheModel apiRoleCacheModel = (ApiRoleCacheModel)obj; + + if (apiRoleId == apiRoleCacheModel.apiRoleId) { + return true; + } + + return false; + } + + @Override + public int hashCode() { + return HashUtil.hash(0, apiRoleId); + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(19); + + sb.append("{apiRoleId="); + sb.append(apiRoleId); + sb.append(", groupId="); + sb.append(groupId); + sb.append(", createDate="); + sb.append(createDate); + sb.append(", modifiedDate="); + sb.append(modifiedDate); + sb.append(", userId="); + sb.append(userId); + sb.append(", apiCode="); + sb.append(apiCode); + sb.append(", roleId="); + sb.append(roleId); + sb.append(", roleCode="); + sb.append(roleCode); + sb.append(", apiRoleStatus="); + sb.append(apiRoleStatus); + sb.append("}"); + + return sb.toString(); + } + + @Override + public ApiRole toEntityModel() { + ApiRoleImpl apiRoleImpl = new ApiRoleImpl(); + + apiRoleImpl.setApiRoleId(apiRoleId); + apiRoleImpl.setGroupId(groupId); + + if (createDate == Long.MIN_VALUE) { + apiRoleImpl.setCreateDate(null); + } + else { + apiRoleImpl.setCreateDate(new Date(createDate)); + } + + if (modifiedDate == Long.MIN_VALUE) { + apiRoleImpl.setModifiedDate(null); + } + else { + apiRoleImpl.setModifiedDate(new Date(modifiedDate)); + } + + apiRoleImpl.setUserId(userId); + + if (apiCode == null) { + apiRoleImpl.setApiCode(""); + } + else { + apiRoleImpl.setApiCode(apiCode); + } + + apiRoleImpl.setRoleId(roleId); + + if (roleCode == null) { + apiRoleImpl.setRoleCode(""); + } + else { + apiRoleImpl.setRoleCode(roleCode); + } + + apiRoleImpl.setApiRoleStatus(apiRoleStatus); + + apiRoleImpl.resetOriginalValues(); + + return apiRoleImpl; + } + + @Override + public void readExternal(ObjectInput objectInput) throws IOException { + apiRoleId = objectInput.readLong(); + + groupId = objectInput.readLong(); + createDate = objectInput.readLong(); + modifiedDate = objectInput.readLong(); + + userId = objectInput.readLong(); + apiCode = objectInput.readUTF(); + + roleId = objectInput.readInt(); + roleCode = objectInput.readUTF(); + + apiRoleStatus = objectInput.readInt(); + } + + @Override + public void writeExternal(ObjectOutput objectOutput) + throws IOException { + objectOutput.writeLong(apiRoleId); + + objectOutput.writeLong(groupId); + objectOutput.writeLong(createDate); + objectOutput.writeLong(modifiedDate); + + objectOutput.writeLong(userId); + + if (apiCode == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(apiCode); + } + + objectOutput.writeInt(roleId); + + if (roleCode == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(roleCode); + } + + objectOutput.writeInt(apiRoleStatus); + } + + public long apiRoleId; + public long groupId; + public long createDate; + public long modifiedDate; + public long userId; + public String apiCode; + public int roleId; + public String roleCode; + public int apiRoleStatus; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiRoleImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiRoleImpl.java new file mode 100644 index 0000000000..fd17637c89 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiRoleImpl.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model.impl; + +import aQute.bnd.annotation.ProviderType; + +/** + * The extended model implementation for the ApiRole service. Represents a row in the "opencps_api_role" database table, with each column mapped to a property of this class. + * + *

+ * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.adminconfig.model.ApiRole} interface. + *

+ * + * @author binhth + */ +@ProviderType +public class ApiRoleImpl extends ApiRoleBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a api role model instance should use the {@link org.opencps.adminconfig.model.ApiRole} interface instead. + */ + public ApiRoleImpl() { + } +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiRoleModelImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiRoleModelImpl.java new file mode 100644 index 0000000000..5e13f53fd4 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/ApiRoleModelImpl.java @@ -0,0 +1,646 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; +import com.liferay.expando.kernel.util.ExpandoBridgeFactoryUtil; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.model.ModelWrapper; +import com.liferay.portal.kernel.model.User; +import com.liferay.portal.kernel.model.impl.BaseModelImpl; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.service.UserLocalServiceUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; + +import org.opencps.adminconfig.model.ApiRole; +import org.opencps.adminconfig.model.ApiRoleModel; + +import java.io.Serializable; + +import java.sql.Types; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * The base model implementation for the ApiRole service. Represents a row in the "opencps_api_role" database table, with each column mapped to a property of this class. + * + *

+ * This implementation and its corresponding interface {@link ApiRoleModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link ApiRoleImpl}. + *

+ * + * @author binhth + * @see ApiRoleImpl + * @see ApiRole + * @see ApiRoleModel + * @generated + */ +@ProviderType +public class ApiRoleModelImpl extends BaseModelImpl + implements ApiRoleModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a api role model instance should use the {@link ApiRole} interface instead. + */ + public static final String TABLE_NAME = "opencps_api_role"; + public static final Object[][] TABLE_COLUMNS = { + { "apiRoleId", Types.BIGINT }, + { "groupId", Types.BIGINT }, + { "createDate", Types.TIMESTAMP }, + { "modifiedDate", Types.TIMESTAMP }, + { "userId", Types.BIGINT }, + { "apiCode", Types.VARCHAR }, + { "roleId", Types.INTEGER }, + { "roleCode", Types.VARCHAR }, + { "apiRoleStatus", Types.INTEGER } + }; + public static final Map TABLE_COLUMNS_MAP = new HashMap(); + + static { + TABLE_COLUMNS_MAP.put("apiRoleId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("groupId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("createDate", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("modifiedDate", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("userId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("apiCode", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("roleId", Types.INTEGER); + TABLE_COLUMNS_MAP.put("roleCode", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("apiRoleStatus", Types.INTEGER); + } + + public static final String TABLE_SQL_CREATE = "create table opencps_api_role (apiRoleId LONG not null primary key,groupId LONG,createDate DATE null,modifiedDate DATE null,userId LONG,apiCode VARCHAR(75) null,roleId INTEGER,roleCode VARCHAR(75) null,apiRoleStatus INTEGER)"; + public static final String TABLE_SQL_DROP = "drop table opencps_api_role"; + public static final String ORDER_BY_JPQL = " ORDER BY apiRole.apiRoleId ASC"; + public static final String ORDER_BY_SQL = " ORDER BY opencps_api_role.apiRoleId ASC"; + public static final String DATA_SOURCE = "liferayDataSource"; + public static final String SESSION_FACTORY = "liferaySessionFactory"; + public static final String TX_MANAGER = "liferayTransactionManager"; + public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(backend.admin.config.service.util.ServiceProps.get( + "value.object.entity.cache.enabled.org.opencps.adminconfig.model.ApiRole"), + true); + public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(backend.admin.config.service.util.ServiceProps.get( + "value.object.finder.cache.enabled.org.opencps.adminconfig.model.ApiRole"), + true); + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(backend.admin.config.service.util.ServiceProps.get( + "value.object.column.bitmask.enabled.org.opencps.adminconfig.model.ApiRole"), + true); + public static final long APIROLEID_COLUMN_BITMASK = 1L; + public static final long GROUPID_COLUMN_BITMASK = 2L; + public static final long ROLECODE_COLUMN_BITMASK = 4L; + public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(backend.admin.config.service.util.ServiceProps.get( + "lock.expiration.time.org.opencps.adminconfig.model.ApiRole")); + + public ApiRoleModelImpl() { + } + + @Override + public long getPrimaryKey() { + return _apiRoleId; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setApiRoleId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _apiRoleId; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Class getModelClass() { + return ApiRole.class; + } + + @Override + public String getModelClassName() { + return ApiRole.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("apiRoleId", getApiRoleId()); + attributes.put("groupId", getGroupId()); + attributes.put("createDate", getCreateDate()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("userId", getUserId()); + attributes.put("apiCode", getApiCode()); + attributes.put("roleId", getRoleId()); + attributes.put("roleCode", getRoleCode()); + attributes.put("apiRoleStatus", getApiRoleStatus()); + + attributes.put("entityCacheEnabled", isEntityCacheEnabled()); + attributes.put("finderCacheEnabled", isFinderCacheEnabled()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + Long apiRoleId = (Long)attributes.get("apiRoleId"); + + if (apiRoleId != null) { + setApiRoleId(apiRoleId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Date createDate = (Date)attributes.get("createDate"); + + if (createDate != null) { + setCreateDate(createDate); + } + + Date modifiedDate = (Date)attributes.get("modifiedDate"); + + if (modifiedDate != null) { + setModifiedDate(modifiedDate); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String apiCode = (String)attributes.get("apiCode"); + + if (apiCode != null) { + setApiCode(apiCode); + } + + Integer roleId = (Integer)attributes.get("roleId"); + + if (roleId != null) { + setRoleId(roleId); + } + + String roleCode = (String)attributes.get("roleCode"); + + if (roleCode != null) { + setRoleCode(roleCode); + } + + Integer apiRoleStatus = (Integer)attributes.get("apiRoleStatus"); + + if (apiRoleStatus != null) { + setApiRoleStatus(apiRoleStatus); + } + } + + @Override + public long getApiRoleId() { + return _apiRoleId; + } + + @Override + public void setApiRoleId(long apiRoleId) { + _columnBitmask |= APIROLEID_COLUMN_BITMASK; + + if (!_setOriginalApiRoleId) { + _setOriginalApiRoleId = true; + + _originalApiRoleId = _apiRoleId; + } + + _apiRoleId = apiRoleId; + } + + public long getOriginalApiRoleId() { + return _originalApiRoleId; + } + + @Override + public long getGroupId() { + return _groupId; + } + + @Override + public void setGroupId(long groupId) { + _columnBitmask |= GROUPID_COLUMN_BITMASK; + + if (!_setOriginalGroupId) { + _setOriginalGroupId = true; + + _originalGroupId = _groupId; + } + + _groupId = groupId; + } + + public long getOriginalGroupId() { + return _originalGroupId; + } + + @Override + public Date getCreateDate() { + return _createDate; + } + + @Override + public void setCreateDate(Date createDate) { + _createDate = createDate; + } + + @Override + public Date getModifiedDate() { + return _modifiedDate; + } + + public boolean hasSetModifiedDate() { + return _setModifiedDate; + } + + @Override + public void setModifiedDate(Date modifiedDate) { + _setModifiedDate = true; + + _modifiedDate = modifiedDate; + } + + @Override + public long getUserId() { + return _userId; + } + + @Override + public void setUserId(long userId) { + _userId = userId; + } + + @Override + public String getUserUuid() { + try { + User user = UserLocalServiceUtil.getUserById(getUserId()); + + return user.getUuid(); + } + catch (PortalException pe) { + return ""; + } + } + + @Override + public void setUserUuid(String userUuid) { + } + + @Override + public String getApiCode() { + if (_apiCode == null) { + return ""; + } + else { + return _apiCode; + } + } + + @Override + public void setApiCode(String apiCode) { + _apiCode = apiCode; + } + + @Override + public int getRoleId() { + return _roleId; + } + + @Override + public void setRoleId(int roleId) { + _roleId = roleId; + } + + @Override + public String getRoleCode() { + if (_roleCode == null) { + return ""; + } + else { + return _roleCode; + } + } + + @Override + public void setRoleCode(String roleCode) { + _columnBitmask |= ROLECODE_COLUMN_BITMASK; + + if (_originalRoleCode == null) { + _originalRoleCode = _roleCode; + } + + _roleCode = roleCode; + } + + public String getOriginalRoleCode() { + return GetterUtil.getString(_originalRoleCode); + } + + @Override + public int getApiRoleStatus() { + return _apiRoleStatus; + } + + @Override + public void setApiRoleStatus(int apiRoleStatus) { + _apiRoleStatus = apiRoleStatus; + } + + public long getColumnBitmask() { + return _columnBitmask; + } + + @Override + public ExpandoBridge getExpandoBridge() { + return ExpandoBridgeFactoryUtil.getExpandoBridge(0, + ApiRole.class.getName(), getPrimaryKey()); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + ExpandoBridge expandoBridge = getExpandoBridge(); + + expandoBridge.setAttributes(serviceContext); + } + + @Override + public ApiRole toEscapedModel() { + if (_escapedModel == null) { + _escapedModel = (ApiRole)ProxyUtil.newProxyInstance(_classLoader, + _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); + } + + return _escapedModel; + } + + @Override + public Object clone() { + ApiRoleImpl apiRoleImpl = new ApiRoleImpl(); + + apiRoleImpl.setApiRoleId(getApiRoleId()); + apiRoleImpl.setGroupId(getGroupId()); + apiRoleImpl.setCreateDate(getCreateDate()); + apiRoleImpl.setModifiedDate(getModifiedDate()); + apiRoleImpl.setUserId(getUserId()); + apiRoleImpl.setApiCode(getApiCode()); + apiRoleImpl.setRoleId(getRoleId()); + apiRoleImpl.setRoleCode(getRoleCode()); + apiRoleImpl.setApiRoleStatus(getApiRoleStatus()); + + apiRoleImpl.resetOriginalValues(); + + return apiRoleImpl; + } + + @Override + public int compareTo(ApiRole apiRole) { + long primaryKey = apiRole.getPrimaryKey(); + + if (getPrimaryKey() < primaryKey) { + return -1; + } + else if (getPrimaryKey() > primaryKey) { + return 1; + } + else { + return 0; + } + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof ApiRole)) { + return false; + } + + ApiRole apiRole = (ApiRole)obj; + + long primaryKey = apiRole.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public boolean isEntityCacheEnabled() { + return ENTITY_CACHE_ENABLED; + } + + @Override + public boolean isFinderCacheEnabled() { + return FINDER_CACHE_ENABLED; + } + + @Override + public void resetOriginalValues() { + ApiRoleModelImpl apiRoleModelImpl = this; + + apiRoleModelImpl._originalApiRoleId = apiRoleModelImpl._apiRoleId; + + apiRoleModelImpl._setOriginalApiRoleId = false; + + apiRoleModelImpl._originalGroupId = apiRoleModelImpl._groupId; + + apiRoleModelImpl._setOriginalGroupId = false; + + apiRoleModelImpl._setModifiedDate = false; + + apiRoleModelImpl._originalRoleCode = apiRoleModelImpl._roleCode; + + apiRoleModelImpl._columnBitmask = 0; + } + + @Override + public CacheModel toCacheModel() { + ApiRoleCacheModel apiRoleCacheModel = new ApiRoleCacheModel(); + + apiRoleCacheModel.apiRoleId = getApiRoleId(); + + apiRoleCacheModel.groupId = getGroupId(); + + Date createDate = getCreateDate(); + + if (createDate != null) { + apiRoleCacheModel.createDate = createDate.getTime(); + } + else { + apiRoleCacheModel.createDate = Long.MIN_VALUE; + } + + Date modifiedDate = getModifiedDate(); + + if (modifiedDate != null) { + apiRoleCacheModel.modifiedDate = modifiedDate.getTime(); + } + else { + apiRoleCacheModel.modifiedDate = Long.MIN_VALUE; + } + + apiRoleCacheModel.userId = getUserId(); + + apiRoleCacheModel.apiCode = getApiCode(); + + String apiCode = apiRoleCacheModel.apiCode; + + if ((apiCode != null) && (apiCode.length() == 0)) { + apiRoleCacheModel.apiCode = null; + } + + apiRoleCacheModel.roleId = getRoleId(); + + apiRoleCacheModel.roleCode = getRoleCode(); + + String roleCode = apiRoleCacheModel.roleCode; + + if ((roleCode != null) && (roleCode.length() == 0)) { + apiRoleCacheModel.roleCode = null; + } + + apiRoleCacheModel.apiRoleStatus = getApiRoleStatus(); + + return apiRoleCacheModel; + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(19); + + sb.append("{apiRoleId="); + sb.append(getApiRoleId()); + sb.append(", groupId="); + sb.append(getGroupId()); + sb.append(", createDate="); + sb.append(getCreateDate()); + sb.append(", modifiedDate="); + sb.append(getModifiedDate()); + sb.append(", userId="); + sb.append(getUserId()); + sb.append(", apiCode="); + sb.append(getApiCode()); + sb.append(", roleId="); + sb.append(getRoleId()); + sb.append(", roleCode="); + sb.append(getRoleCode()); + sb.append(", apiRoleStatus="); + sb.append(getApiRoleStatus()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(31); + + sb.append(""); + sb.append("org.opencps.adminconfig.model.ApiRole"); + sb.append(""); + + sb.append( + "apiRoleId"); + sb.append( + "groupId"); + sb.append( + "createDate"); + sb.append( + "modifiedDate"); + sb.append( + "userId"); + sb.append( + "apiCode"); + sb.append( + "roleId"); + sb.append( + "roleCode"); + sb.append( + "apiRoleStatus"); + + sb.append(""); + + return sb.toString(); + } + + private static final ClassLoader _classLoader = ApiRole.class.getClassLoader(); + private static final Class[] _escapedModelInterfaces = new Class[] { + ApiRole.class, ModelWrapper.class + }; + private long _apiRoleId; + private long _originalApiRoleId; + private boolean _setOriginalApiRoleId; + private long _groupId; + private long _originalGroupId; + private boolean _setOriginalGroupId; + private Date _createDate; + private Date _modifiedDate; + private boolean _setModifiedDate; + private long _userId; + private String _apiCode; + private int _roleId; + private String _roleCode; + private String _originalRoleCode; + private int _apiRoleStatus; + private long _columnBitmask; + private ApiRole _escapedModel; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/SyncTrackingBaseImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/SyncTrackingBaseImpl.java new file mode 100644 index 0000000000..3c7e0d170d --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/SyncTrackingBaseImpl.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import org.opencps.adminconfig.model.SyncTracking; +import org.opencps.adminconfig.service.SyncTrackingLocalServiceUtil; + +/** + * The extended model base implementation for the SyncTracking service. Represents a row in the "opencps_synctracking" database table, with each column mapped to a property of this class. + * + *

+ * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link SyncTrackingImpl}. + *

+ * + * @author binhth + * @see SyncTrackingImpl + * @see SyncTracking + * @generated + */ +@ProviderType +public abstract class SyncTrackingBaseImpl extends SyncTrackingModelImpl + implements SyncTracking { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a sync tracking model instance should use the {@link SyncTracking} interface instead. + */ + @Override + public void persist() { + if (this.isNew()) { + SyncTrackingLocalServiceUtil.addSyncTracking(this); + } + else { + SyncTrackingLocalServiceUtil.updateSyncTracking(this); + } + } +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/SyncTrackingCacheModel.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/SyncTrackingCacheModel.java new file mode 100644 index 0000000000..06b3ed8728 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/SyncTrackingCacheModel.java @@ -0,0 +1,393 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.util.HashUtil; +import com.liferay.portal.kernel.util.StringBundler; + +import org.opencps.adminconfig.model.SyncTracking; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +import java.util.Date; + +/** + * The cache model class for representing SyncTracking in entity cache. + * + * @author binhth + * @see SyncTracking + * @generated + */ +@ProviderType +public class SyncTrackingCacheModel implements CacheModel, + Externalizable { + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof SyncTrackingCacheModel)) { + return false; + } + + SyncTrackingCacheModel syncTrackingCacheModel = (SyncTrackingCacheModel)obj; + + if (trackingId == syncTrackingCacheModel.trackingId) { + return true; + } + + return false; + } + + @Override + public int hashCode() { + return HashUtil.hash(0, trackingId); + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(41); + + sb.append("{uuid="); + sb.append(uuid); + sb.append(", trackingId="); + sb.append(trackingId); + sb.append(", companyId="); + sb.append(companyId); + sb.append(", groupId="); + sb.append(groupId); + sb.append(", userId="); + sb.append(userId); + sb.append(", userName="); + sb.append(userName); + sb.append(", createDate="); + sb.append(createDate); + sb.append(", modifiedDate="); + sb.append(modifiedDate); + sb.append(", dossierNo="); + sb.append(dossierNo); + sb.append(", referenceUid="); + sb.append(referenceUid); + sb.append(", serverNo="); + sb.append(serverNo); + sb.append(", protocol="); + sb.append(protocol); + sb.append(", stateSync="); + sb.append(stateSync); + sb.append(", serviceCode="); + sb.append(serviceCode); + sb.append(", api="); + sb.append(api); + sb.append(", fromUnit="); + sb.append(fromUnit); + sb.append(", toUnit="); + sb.append(toUnit); + sb.append(", bodyRequest="); + sb.append(bodyRequest); + sb.append(", response="); + sb.append(response); + sb.append(", metaData="); + sb.append(metaData); + sb.append("}"); + + return sb.toString(); + } + + @Override + public SyncTracking toEntityModel() { + SyncTrackingImpl syncTrackingImpl = new SyncTrackingImpl(); + + if (uuid == null) { + syncTrackingImpl.setUuid(""); + } + else { + syncTrackingImpl.setUuid(uuid); + } + + syncTrackingImpl.setTrackingId(trackingId); + syncTrackingImpl.setCompanyId(companyId); + syncTrackingImpl.setGroupId(groupId); + syncTrackingImpl.setUserId(userId); + + if (userName == null) { + syncTrackingImpl.setUserName(""); + } + else { + syncTrackingImpl.setUserName(userName); + } + + if (createDate == Long.MIN_VALUE) { + syncTrackingImpl.setCreateDate(null); + } + else { + syncTrackingImpl.setCreateDate(new Date(createDate)); + } + + if (modifiedDate == Long.MIN_VALUE) { + syncTrackingImpl.setModifiedDate(null); + } + else { + syncTrackingImpl.setModifiedDate(new Date(modifiedDate)); + } + + if (dossierNo == null) { + syncTrackingImpl.setDossierNo(""); + } + else { + syncTrackingImpl.setDossierNo(dossierNo); + } + + if (referenceUid == null) { + syncTrackingImpl.setReferenceUid(""); + } + else { + syncTrackingImpl.setReferenceUid(referenceUid); + } + + if (serverNo == null) { + syncTrackingImpl.setServerNo(""); + } + else { + syncTrackingImpl.setServerNo(serverNo); + } + + if (protocol == null) { + syncTrackingImpl.setProtocol(""); + } + else { + syncTrackingImpl.setProtocol(protocol); + } + + syncTrackingImpl.setStateSync(stateSync); + + if (serviceCode == null) { + syncTrackingImpl.setServiceCode(""); + } + else { + syncTrackingImpl.setServiceCode(serviceCode); + } + + if (api == null) { + syncTrackingImpl.setApi(""); + } + else { + syncTrackingImpl.setApi(api); + } + + if (fromUnit == null) { + syncTrackingImpl.setFromUnit(""); + } + else { + syncTrackingImpl.setFromUnit(fromUnit); + } + + if (toUnit == null) { + syncTrackingImpl.setToUnit(""); + } + else { + syncTrackingImpl.setToUnit(toUnit); + } + + if (bodyRequest == null) { + syncTrackingImpl.setBodyRequest(""); + } + else { + syncTrackingImpl.setBodyRequest(bodyRequest); + } + + if (response == null) { + syncTrackingImpl.setResponse(""); + } + else { + syncTrackingImpl.setResponse(response); + } + + if (metaData == null) { + syncTrackingImpl.setMetaData(""); + } + else { + syncTrackingImpl.setMetaData(metaData); + } + + syncTrackingImpl.resetOriginalValues(); + + return syncTrackingImpl; + } + + @Override + public void readExternal(ObjectInput objectInput) throws IOException { + uuid = objectInput.readUTF(); + + trackingId = objectInput.readLong(); + + companyId = objectInput.readLong(); + + groupId = objectInput.readLong(); + + userId = objectInput.readLong(); + userName = objectInput.readUTF(); + createDate = objectInput.readLong(); + modifiedDate = objectInput.readLong(); + dossierNo = objectInput.readUTF(); + referenceUid = objectInput.readUTF(); + serverNo = objectInput.readUTF(); + protocol = objectInput.readUTF(); + + stateSync = objectInput.readInt(); + serviceCode = objectInput.readUTF(); + api = objectInput.readUTF(); + fromUnit = objectInput.readUTF(); + toUnit = objectInput.readUTF(); + bodyRequest = objectInput.readUTF(); + response = objectInput.readUTF(); + metaData = objectInput.readUTF(); + } + + @Override + public void writeExternal(ObjectOutput objectOutput) + throws IOException { + if (uuid == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(uuid); + } + + objectOutput.writeLong(trackingId); + + objectOutput.writeLong(companyId); + + objectOutput.writeLong(groupId); + + objectOutput.writeLong(userId); + + if (userName == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(userName); + } + + objectOutput.writeLong(createDate); + objectOutput.writeLong(modifiedDate); + + if (dossierNo == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(dossierNo); + } + + if (referenceUid == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(referenceUid); + } + + if (serverNo == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(serverNo); + } + + if (protocol == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(protocol); + } + + objectOutput.writeInt(stateSync); + + if (serviceCode == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(serviceCode); + } + + if (api == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(api); + } + + if (fromUnit == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(fromUnit); + } + + if (toUnit == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(toUnit); + } + + if (bodyRequest == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(bodyRequest); + } + + if (response == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(response); + } + + if (metaData == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(metaData); + } + } + + public String uuid; + public long trackingId; + public long companyId; + public long groupId; + public long userId; + public String userName; + public long createDate; + public long modifiedDate; + public String dossierNo; + public String referenceUid; + public String serverNo; + public String protocol; + public int stateSync; + public String serviceCode; + public String api; + public String fromUnit; + public String toUnit; + public String bodyRequest; + public String response; + public String metaData; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/SyncTrackingImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/SyncTrackingImpl.java new file mode 100644 index 0000000000..8d13c2abbe --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/SyncTrackingImpl.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model.impl; + +import aQute.bnd.annotation.ProviderType; + +/** + * The extended model implementation for the SyncTracking service. Represents a row in the "opencps_synctracking" database table, with each column mapped to a property of this class. + * + *

+ * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.adminconfig.model.SyncTracking} interface. + *

+ * + * @author binhth + */ +@ProviderType +public class SyncTrackingImpl extends SyncTrackingBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a sync tracking model instance should use the {@link org.opencps.adminconfig.model.SyncTracking} interface instead. + */ + public SyncTrackingImpl() { + } +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/SyncTrackingModelImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/SyncTrackingModelImpl.java new file mode 100644 index 0000000000..e01681eb17 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/model/impl/SyncTrackingModelImpl.java @@ -0,0 +1,1192 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; +import com.liferay.expando.kernel.util.ExpandoBridgeFactoryUtil; + +import com.liferay.exportimport.kernel.lar.StagedModelType; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.model.ModelWrapper; +import com.liferay.portal.kernel.model.User; +import com.liferay.portal.kernel.model.impl.BaseModelImpl; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.service.UserLocalServiceUtil; +import com.liferay.portal.kernel.util.DateUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.PortalUtil; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; + +import org.opencps.adminconfig.model.SyncTracking; +import org.opencps.adminconfig.model.SyncTrackingModel; + +import java.io.Serializable; + +import java.sql.Types; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * The base model implementation for the SyncTracking service. Represents a row in the "opencps_synctracking" database table, with each column mapped to a property of this class. + * + *

+ * This implementation and its corresponding interface {@link SyncTrackingModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link SyncTrackingImpl}. + *

+ * + * @author binhth + * @see SyncTrackingImpl + * @see SyncTracking + * @see SyncTrackingModel + * @generated + */ +@ProviderType +public class SyncTrackingModelImpl extends BaseModelImpl + implements SyncTrackingModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a sync tracking model instance should use the {@link SyncTracking} interface instead. + */ + public static final String TABLE_NAME = "opencps_synctracking"; + public static final Object[][] TABLE_COLUMNS = { + { "uuid_", Types.VARCHAR }, + { "trackingId", Types.BIGINT }, + { "companyId", Types.BIGINT }, + { "groupId", Types.BIGINT }, + { "userId", Types.BIGINT }, + { "userName", Types.VARCHAR }, + { "createDate", Types.TIMESTAMP }, + { "modifiedDate", Types.TIMESTAMP }, + { "dossierNo", Types.VARCHAR }, + { "referenceUid", Types.VARCHAR }, + { "serverNo", Types.VARCHAR }, + { "protocol", Types.VARCHAR }, + { "stateSync", Types.INTEGER }, + { "serviceCode", Types.VARCHAR }, + { "api", Types.VARCHAR }, + { "fromUnit", Types.VARCHAR }, + { "toUnit", Types.VARCHAR }, + { "bodyRequest", Types.VARCHAR }, + { "response", Types.VARCHAR }, + { "metaData", Types.VARCHAR } + }; + public static final Map TABLE_COLUMNS_MAP = new HashMap(); + + static { + TABLE_COLUMNS_MAP.put("uuid_", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("trackingId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("companyId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("groupId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("userId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("userName", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("createDate", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("modifiedDate", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("dossierNo", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("referenceUid", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("serverNo", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("protocol", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("stateSync", Types.INTEGER); + TABLE_COLUMNS_MAP.put("serviceCode", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("api", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("fromUnit", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("toUnit", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("bodyRequest", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("response", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("metaData", Types.VARCHAR); + } + + public static final String TABLE_SQL_CREATE = "create table opencps_synctracking (uuid_ VARCHAR(75) null,trackingId LONG not null primary key,companyId LONG,groupId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,dossierNo VARCHAR(75) null,referenceUid VARCHAR(75) null,serverNo VARCHAR(75) null,protocol VARCHAR(75) null,stateSync INTEGER,serviceCode VARCHAR(75) null,api VARCHAR(75) null,fromUnit VARCHAR(75) null,toUnit VARCHAR(75) null,bodyRequest VARCHAR(75) null,response VARCHAR(75) null,metaData VARCHAR(75) null)"; + public static final String TABLE_SQL_DROP = "drop table opencps_synctracking"; + public static final String ORDER_BY_JPQL = " ORDER BY syncTracking.createDate DESC"; + public static final String ORDER_BY_SQL = " ORDER BY opencps_synctracking.createDate DESC"; + public static final String DATA_SOURCE = "liferayDataSource"; + public static final String SESSION_FACTORY = "liferaySessionFactory"; + public static final String TX_MANAGER = "liferayTransactionManager"; + public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(backend.admin.config.service.util.ServiceProps.get( + "value.object.entity.cache.enabled.org.opencps.adminconfig.model.SyncTracking"), + true); + public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(backend.admin.config.service.util.ServiceProps.get( + "value.object.finder.cache.enabled.org.opencps.adminconfig.model.SyncTracking"), + true); + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(backend.admin.config.service.util.ServiceProps.get( + "value.object.column.bitmask.enabled.org.opencps.adminconfig.model.SyncTracking"), + true); + public static final long API_COLUMN_BITMASK = 1L; + public static final long COMPANYID_COLUMN_BITMASK = 2L; + public static final long CREATEDATE_COLUMN_BITMASK = 4L; + public static final long DOSSIERNO_COLUMN_BITMASK = 8L; + public static final long GROUPID_COLUMN_BITMASK = 16L; + public static final long MODIFIEDDATE_COLUMN_BITMASK = 32L; + public static final long PROTOCOL_COLUMN_BITMASK = 64L; + public static final long REFERENCEUID_COLUMN_BITMASK = 128L; + public static final long SERVICECODE_COLUMN_BITMASK = 256L; + public static final long UUID_COLUMN_BITMASK = 512L; + public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(backend.admin.config.service.util.ServiceProps.get( + "lock.expiration.time.org.opencps.adminconfig.model.SyncTracking")); + + public SyncTrackingModelImpl() { + } + + @Override + public long getPrimaryKey() { + return _trackingId; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setTrackingId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _trackingId; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Class getModelClass() { + return SyncTracking.class; + } + + @Override + public String getModelClassName() { + return SyncTracking.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("uuid", getUuid()); + attributes.put("trackingId", getTrackingId()); + attributes.put("companyId", getCompanyId()); + attributes.put("groupId", getGroupId()); + attributes.put("userId", getUserId()); + attributes.put("userName", getUserName()); + attributes.put("createDate", getCreateDate()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("dossierNo", getDossierNo()); + attributes.put("referenceUid", getReferenceUid()); + attributes.put("serverNo", getServerNo()); + attributes.put("protocol", getProtocol()); + attributes.put("stateSync", getStateSync()); + attributes.put("serviceCode", getServiceCode()); + attributes.put("api", getApi()); + attributes.put("fromUnit", getFromUnit()); + attributes.put("toUnit", getToUnit()); + attributes.put("bodyRequest", getBodyRequest()); + attributes.put("response", getResponse()); + attributes.put("metaData", getMetaData()); + + attributes.put("entityCacheEnabled", isEntityCacheEnabled()); + attributes.put("finderCacheEnabled", isFinderCacheEnabled()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + String uuid = (String)attributes.get("uuid"); + + if (uuid != null) { + setUuid(uuid); + } + + Long trackingId = (Long)attributes.get("trackingId"); + + if (trackingId != null) { + setTrackingId(trackingId); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String userName = (String)attributes.get("userName"); + + if (userName != null) { + setUserName(userName); + } + + Date createDate = (Date)attributes.get("createDate"); + + if (createDate != null) { + setCreateDate(createDate); + } + + Date modifiedDate = (Date)attributes.get("modifiedDate"); + + if (modifiedDate != null) { + setModifiedDate(modifiedDate); + } + + String dossierNo = (String)attributes.get("dossierNo"); + + if (dossierNo != null) { + setDossierNo(dossierNo); + } + + String referenceUid = (String)attributes.get("referenceUid"); + + if (referenceUid != null) { + setReferenceUid(referenceUid); + } + + String serverNo = (String)attributes.get("serverNo"); + + if (serverNo != null) { + setServerNo(serverNo); + } + + String protocol = (String)attributes.get("protocol"); + + if (protocol != null) { + setProtocol(protocol); + } + + Integer stateSync = (Integer)attributes.get("stateSync"); + + if (stateSync != null) { + setStateSync(stateSync); + } + + String serviceCode = (String)attributes.get("serviceCode"); + + if (serviceCode != null) { + setServiceCode(serviceCode); + } + + String api = (String)attributes.get("api"); + + if (api != null) { + setApi(api); + } + + String fromUnit = (String)attributes.get("fromUnit"); + + if (fromUnit != null) { + setFromUnit(fromUnit); + } + + String toUnit = (String)attributes.get("toUnit"); + + if (toUnit != null) { + setToUnit(toUnit); + } + + String bodyRequest = (String)attributes.get("bodyRequest"); + + if (bodyRequest != null) { + setBodyRequest(bodyRequest); + } + + String response = (String)attributes.get("response"); + + if (response != null) { + setResponse(response); + } + + String metaData = (String)attributes.get("metaData"); + + if (metaData != null) { + setMetaData(metaData); + } + } + + @Override + public String getUuid() { + if (_uuid == null) { + return ""; + } + else { + return _uuid; + } + } + + @Override + public void setUuid(String uuid) { + if (_originalUuid == null) { + _originalUuid = _uuid; + } + + _uuid = uuid; + } + + public String getOriginalUuid() { + return GetterUtil.getString(_originalUuid); + } + + @Override + public long getTrackingId() { + return _trackingId; + } + + @Override + public void setTrackingId(long trackingId) { + _trackingId = trackingId; + } + + @Override + public long getCompanyId() { + return _companyId; + } + + @Override + public void setCompanyId(long companyId) { + _columnBitmask |= COMPANYID_COLUMN_BITMASK; + + if (!_setOriginalCompanyId) { + _setOriginalCompanyId = true; + + _originalCompanyId = _companyId; + } + + _companyId = companyId; + } + + public long getOriginalCompanyId() { + return _originalCompanyId; + } + + @Override + public long getGroupId() { + return _groupId; + } + + @Override + public void setGroupId(long groupId) { + _columnBitmask |= GROUPID_COLUMN_BITMASK; + + if (!_setOriginalGroupId) { + _setOriginalGroupId = true; + + _originalGroupId = _groupId; + } + + _groupId = groupId; + } + + public long getOriginalGroupId() { + return _originalGroupId; + } + + @Override + public long getUserId() { + return _userId; + } + + @Override + public void setUserId(long userId) { + _userId = userId; + } + + @Override + public String getUserUuid() { + try { + User user = UserLocalServiceUtil.getUserById(getUserId()); + + return user.getUuid(); + } + catch (PortalException pe) { + return ""; + } + } + + @Override + public void setUserUuid(String userUuid) { + } + + @Override + public String getUserName() { + if (_userName == null) { + return ""; + } + else { + return _userName; + } + } + + @Override + public void setUserName(String userName) { + _userName = userName; + } + + @Override + public Date getCreateDate() { + return _createDate; + } + + @Override + public void setCreateDate(Date createDate) { + _columnBitmask = -1L; + + if (_originalCreateDate == null) { + _originalCreateDate = _createDate; + } + + _createDate = createDate; + } + + public Date getOriginalCreateDate() { + return _originalCreateDate; + } + + @Override + public Date getModifiedDate() { + return _modifiedDate; + } + + public boolean hasSetModifiedDate() { + return _setModifiedDate; + } + + @Override + public void setModifiedDate(Date modifiedDate) { + _setModifiedDate = true; + + _columnBitmask |= MODIFIEDDATE_COLUMN_BITMASK; + + if (_originalModifiedDate == null) { + _originalModifiedDate = _modifiedDate; + } + + _modifiedDate = modifiedDate; + } + + public Date getOriginalModifiedDate() { + return _originalModifiedDate; + } + + @Override + public String getDossierNo() { + if (_dossierNo == null) { + return ""; + } + else { + return _dossierNo; + } + } + + @Override + public void setDossierNo(String dossierNo) { + _columnBitmask |= DOSSIERNO_COLUMN_BITMASK; + + if (_originalDossierNo == null) { + _originalDossierNo = _dossierNo; + } + + _dossierNo = dossierNo; + } + + public String getOriginalDossierNo() { + return GetterUtil.getString(_originalDossierNo); + } + + @Override + public String getReferenceUid() { + if (_referenceUid == null) { + return ""; + } + else { + return _referenceUid; + } + } + + @Override + public void setReferenceUid(String referenceUid) { + _columnBitmask |= REFERENCEUID_COLUMN_BITMASK; + + if (_originalReferenceUid == null) { + _originalReferenceUid = _referenceUid; + } + + _referenceUid = referenceUid; + } + + public String getOriginalReferenceUid() { + return GetterUtil.getString(_originalReferenceUid); + } + + @Override + public String getServerNo() { + if (_serverNo == null) { + return ""; + } + else { + return _serverNo; + } + } + + @Override + public void setServerNo(String serverNo) { + _serverNo = serverNo; + } + + @Override + public String getProtocol() { + if (_protocol == null) { + return ""; + } + else { + return _protocol; + } + } + + @Override + public void setProtocol(String protocol) { + _columnBitmask |= PROTOCOL_COLUMN_BITMASK; + + if (_originalProtocol == null) { + _originalProtocol = _protocol; + } + + _protocol = protocol; + } + + public String getOriginalProtocol() { + return GetterUtil.getString(_originalProtocol); + } + + @Override + public int getStateSync() { + return _stateSync; + } + + @Override + public void setStateSync(int stateSync) { + _stateSync = stateSync; + } + + @Override + public String getServiceCode() { + if (_serviceCode == null) { + return ""; + } + else { + return _serviceCode; + } + } + + @Override + public void setServiceCode(String serviceCode) { + _columnBitmask |= SERVICECODE_COLUMN_BITMASK; + + if (_originalServiceCode == null) { + _originalServiceCode = _serviceCode; + } + + _serviceCode = serviceCode; + } + + public String getOriginalServiceCode() { + return GetterUtil.getString(_originalServiceCode); + } + + @Override + public String getApi() { + if (_api == null) { + return ""; + } + else { + return _api; + } + } + + @Override + public void setApi(String api) { + _columnBitmask |= API_COLUMN_BITMASK; + + if (_originalApi == null) { + _originalApi = _api; + } + + _api = api; + } + + public String getOriginalApi() { + return GetterUtil.getString(_originalApi); + } + + @Override + public String getFromUnit() { + if (_fromUnit == null) { + return ""; + } + else { + return _fromUnit; + } + } + + @Override + public void setFromUnit(String fromUnit) { + _fromUnit = fromUnit; + } + + @Override + public String getToUnit() { + if (_toUnit == null) { + return ""; + } + else { + return _toUnit; + } + } + + @Override + public void setToUnit(String toUnit) { + _toUnit = toUnit; + } + + @Override + public String getBodyRequest() { + if (_bodyRequest == null) { + return ""; + } + else { + return _bodyRequest; + } + } + + @Override + public void setBodyRequest(String bodyRequest) { + _bodyRequest = bodyRequest; + } + + @Override + public String getResponse() { + if (_response == null) { + return ""; + } + else { + return _response; + } + } + + @Override + public void setResponse(String response) { + _response = response; + } + + @Override + public String getMetaData() { + if (_metaData == null) { + return ""; + } + else { + return _metaData; + } + } + + @Override + public void setMetaData(String metaData) { + _metaData = metaData; + } + + @Override + public StagedModelType getStagedModelType() { + return new StagedModelType(PortalUtil.getClassNameId( + SyncTracking.class.getName())); + } + + public long getColumnBitmask() { + return _columnBitmask; + } + + @Override + public ExpandoBridge getExpandoBridge() { + return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), + SyncTracking.class.getName(), getPrimaryKey()); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + ExpandoBridge expandoBridge = getExpandoBridge(); + + expandoBridge.setAttributes(serviceContext); + } + + @Override + public SyncTracking toEscapedModel() { + if (_escapedModel == null) { + _escapedModel = (SyncTracking)ProxyUtil.newProxyInstance(_classLoader, + _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); + } + + return _escapedModel; + } + + @Override + public Object clone() { + SyncTrackingImpl syncTrackingImpl = new SyncTrackingImpl(); + + syncTrackingImpl.setUuid(getUuid()); + syncTrackingImpl.setTrackingId(getTrackingId()); + syncTrackingImpl.setCompanyId(getCompanyId()); + syncTrackingImpl.setGroupId(getGroupId()); + syncTrackingImpl.setUserId(getUserId()); + syncTrackingImpl.setUserName(getUserName()); + syncTrackingImpl.setCreateDate(getCreateDate()); + syncTrackingImpl.setModifiedDate(getModifiedDate()); + syncTrackingImpl.setDossierNo(getDossierNo()); + syncTrackingImpl.setReferenceUid(getReferenceUid()); + syncTrackingImpl.setServerNo(getServerNo()); + syncTrackingImpl.setProtocol(getProtocol()); + syncTrackingImpl.setStateSync(getStateSync()); + syncTrackingImpl.setServiceCode(getServiceCode()); + syncTrackingImpl.setApi(getApi()); + syncTrackingImpl.setFromUnit(getFromUnit()); + syncTrackingImpl.setToUnit(getToUnit()); + syncTrackingImpl.setBodyRequest(getBodyRequest()); + syncTrackingImpl.setResponse(getResponse()); + syncTrackingImpl.setMetaData(getMetaData()); + + syncTrackingImpl.resetOriginalValues(); + + return syncTrackingImpl; + } + + @Override + public int compareTo(SyncTracking syncTracking) { + int value = 0; + + value = DateUtil.compareTo(getCreateDate(), syncTracking.getCreateDate()); + + value = value * -1; + + if (value != 0) { + return value; + } + + return 0; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof SyncTracking)) { + return false; + } + + SyncTracking syncTracking = (SyncTracking)obj; + + long primaryKey = syncTracking.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public boolean isEntityCacheEnabled() { + return ENTITY_CACHE_ENABLED; + } + + @Override + public boolean isFinderCacheEnabled() { + return FINDER_CACHE_ENABLED; + } + + @Override + public void resetOriginalValues() { + SyncTrackingModelImpl syncTrackingModelImpl = this; + + syncTrackingModelImpl._originalUuid = syncTrackingModelImpl._uuid; + + syncTrackingModelImpl._originalCompanyId = syncTrackingModelImpl._companyId; + + syncTrackingModelImpl._setOriginalCompanyId = false; + + syncTrackingModelImpl._originalGroupId = syncTrackingModelImpl._groupId; + + syncTrackingModelImpl._setOriginalGroupId = false; + + syncTrackingModelImpl._originalCreateDate = syncTrackingModelImpl._createDate; + + syncTrackingModelImpl._originalModifiedDate = syncTrackingModelImpl._modifiedDate; + + syncTrackingModelImpl._setModifiedDate = false; + + syncTrackingModelImpl._originalDossierNo = syncTrackingModelImpl._dossierNo; + + syncTrackingModelImpl._originalReferenceUid = syncTrackingModelImpl._referenceUid; + + syncTrackingModelImpl._originalProtocol = syncTrackingModelImpl._protocol; + + syncTrackingModelImpl._originalServiceCode = syncTrackingModelImpl._serviceCode; + + syncTrackingModelImpl._originalApi = syncTrackingModelImpl._api; + + syncTrackingModelImpl._columnBitmask = 0; + } + + @Override + public CacheModel toCacheModel() { + SyncTrackingCacheModel syncTrackingCacheModel = new SyncTrackingCacheModel(); + + syncTrackingCacheModel.uuid = getUuid(); + + String uuid = syncTrackingCacheModel.uuid; + + if ((uuid != null) && (uuid.length() == 0)) { + syncTrackingCacheModel.uuid = null; + } + + syncTrackingCacheModel.trackingId = getTrackingId(); + + syncTrackingCacheModel.companyId = getCompanyId(); + + syncTrackingCacheModel.groupId = getGroupId(); + + syncTrackingCacheModel.userId = getUserId(); + + syncTrackingCacheModel.userName = getUserName(); + + String userName = syncTrackingCacheModel.userName; + + if ((userName != null) && (userName.length() == 0)) { + syncTrackingCacheModel.userName = null; + } + + Date createDate = getCreateDate(); + + if (createDate != null) { + syncTrackingCacheModel.createDate = createDate.getTime(); + } + else { + syncTrackingCacheModel.createDate = Long.MIN_VALUE; + } + + Date modifiedDate = getModifiedDate(); + + if (modifiedDate != null) { + syncTrackingCacheModel.modifiedDate = modifiedDate.getTime(); + } + else { + syncTrackingCacheModel.modifiedDate = Long.MIN_VALUE; + } + + syncTrackingCacheModel.dossierNo = getDossierNo(); + + String dossierNo = syncTrackingCacheModel.dossierNo; + + if ((dossierNo != null) && (dossierNo.length() == 0)) { + syncTrackingCacheModel.dossierNo = null; + } + + syncTrackingCacheModel.referenceUid = getReferenceUid(); + + String referenceUid = syncTrackingCacheModel.referenceUid; + + if ((referenceUid != null) && (referenceUid.length() == 0)) { + syncTrackingCacheModel.referenceUid = null; + } + + syncTrackingCacheModel.serverNo = getServerNo(); + + String serverNo = syncTrackingCacheModel.serverNo; + + if ((serverNo != null) && (serverNo.length() == 0)) { + syncTrackingCacheModel.serverNo = null; + } + + syncTrackingCacheModel.protocol = getProtocol(); + + String protocol = syncTrackingCacheModel.protocol; + + if ((protocol != null) && (protocol.length() == 0)) { + syncTrackingCacheModel.protocol = null; + } + + syncTrackingCacheModel.stateSync = getStateSync(); + + syncTrackingCacheModel.serviceCode = getServiceCode(); + + String serviceCode = syncTrackingCacheModel.serviceCode; + + if ((serviceCode != null) && (serviceCode.length() == 0)) { + syncTrackingCacheModel.serviceCode = null; + } + + syncTrackingCacheModel.api = getApi(); + + String api = syncTrackingCacheModel.api; + + if ((api != null) && (api.length() == 0)) { + syncTrackingCacheModel.api = null; + } + + syncTrackingCacheModel.fromUnit = getFromUnit(); + + String fromUnit = syncTrackingCacheModel.fromUnit; + + if ((fromUnit != null) && (fromUnit.length() == 0)) { + syncTrackingCacheModel.fromUnit = null; + } + + syncTrackingCacheModel.toUnit = getToUnit(); + + String toUnit = syncTrackingCacheModel.toUnit; + + if ((toUnit != null) && (toUnit.length() == 0)) { + syncTrackingCacheModel.toUnit = null; + } + + syncTrackingCacheModel.bodyRequest = getBodyRequest(); + + String bodyRequest = syncTrackingCacheModel.bodyRequest; + + if ((bodyRequest != null) && (bodyRequest.length() == 0)) { + syncTrackingCacheModel.bodyRequest = null; + } + + syncTrackingCacheModel.response = getResponse(); + + String response = syncTrackingCacheModel.response; + + if ((response != null) && (response.length() == 0)) { + syncTrackingCacheModel.response = null; + } + + syncTrackingCacheModel.metaData = getMetaData(); + + String metaData = syncTrackingCacheModel.metaData; + + if ((metaData != null) && (metaData.length() == 0)) { + syncTrackingCacheModel.metaData = null; + } + + return syncTrackingCacheModel; + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(41); + + sb.append("{uuid="); + sb.append(getUuid()); + sb.append(", trackingId="); + sb.append(getTrackingId()); + sb.append(", companyId="); + sb.append(getCompanyId()); + sb.append(", groupId="); + sb.append(getGroupId()); + sb.append(", userId="); + sb.append(getUserId()); + sb.append(", userName="); + sb.append(getUserName()); + sb.append(", createDate="); + sb.append(getCreateDate()); + sb.append(", modifiedDate="); + sb.append(getModifiedDate()); + sb.append(", dossierNo="); + sb.append(getDossierNo()); + sb.append(", referenceUid="); + sb.append(getReferenceUid()); + sb.append(", serverNo="); + sb.append(getServerNo()); + sb.append(", protocol="); + sb.append(getProtocol()); + sb.append(", stateSync="); + sb.append(getStateSync()); + sb.append(", serviceCode="); + sb.append(getServiceCode()); + sb.append(", api="); + sb.append(getApi()); + sb.append(", fromUnit="); + sb.append(getFromUnit()); + sb.append(", toUnit="); + sb.append(getToUnit()); + sb.append(", bodyRequest="); + sb.append(getBodyRequest()); + sb.append(", response="); + sb.append(getResponse()); + sb.append(", metaData="); + sb.append(getMetaData()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(64); + + sb.append(""); + sb.append("org.opencps.adminconfig.model.SyncTracking"); + sb.append(""); + + sb.append( + "uuid"); + sb.append( + "trackingId"); + sb.append( + "companyId"); + sb.append( + "groupId"); + sb.append( + "userId"); + sb.append( + "userName"); + sb.append( + "createDate"); + sb.append( + "modifiedDate"); + sb.append( + "dossierNo"); + sb.append( + "referenceUid"); + sb.append( + "serverNo"); + sb.append( + "protocol"); + sb.append( + "stateSync"); + sb.append( + "serviceCode"); + sb.append( + "api"); + sb.append( + "fromUnit"); + sb.append( + "toUnit"); + sb.append( + "bodyRequest"); + sb.append( + "response"); + sb.append( + "metaData"); + + sb.append(""); + + return sb.toString(); + } + + private static final ClassLoader _classLoader = SyncTracking.class.getClassLoader(); + private static final Class[] _escapedModelInterfaces = new Class[] { + SyncTracking.class, ModelWrapper.class + }; + private String _uuid; + private String _originalUuid; + private long _trackingId; + private long _companyId; + private long _originalCompanyId; + private boolean _setOriginalCompanyId; + private long _groupId; + private long _originalGroupId; + private boolean _setOriginalGroupId; + private long _userId; + private String _userName; + private Date _createDate; + private Date _originalCreateDate; + private Date _modifiedDate; + private Date _originalModifiedDate; + private boolean _setModifiedDate; + private String _dossierNo; + private String _originalDossierNo; + private String _referenceUid; + private String _originalReferenceUid; + private String _serverNo; + private String _protocol; + private String _originalProtocol; + private int _stateSync; + private String _serviceCode; + private String _originalServiceCode; + private String _api; + private String _originalApi; + private String _fromUnit; + private String _toUnit; + private String _bodyRequest; + private String _response; + private String _metaData; + private long _columnBitmask; + private SyncTracking _escapedModel; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/AdminConfigLocalServiceBaseImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/AdminConfigLocalServiceBaseImpl.java index 5e8ef9ccef..c1e129d818 100644 --- a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/AdminConfigLocalServiceBaseImpl.java +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/AdminConfigLocalServiceBaseImpl.java @@ -45,8 +45,11 @@ import org.opencps.adminconfig.model.AdminConfig; import org.opencps.adminconfig.service.AdminConfigLocalService; import org.opencps.adminconfig.service.persistence.AdminConfigPersistence; +import org.opencps.adminconfig.service.persistence.ApiManagerPersistence; +import org.opencps.adminconfig.service.persistence.ApiRolePersistence; import org.opencps.adminconfig.service.persistence.DynamicReportPersistence; import org.opencps.adminconfig.service.persistence.ReportRolePersistence; +import org.opencps.adminconfig.service.persistence.SyncTrackingPersistence; import java.io.Serializable; @@ -353,6 +356,81 @@ public void setAdminConfigPersistence( this.adminConfigPersistence = adminConfigPersistence; } + /** + * Returns the api manager local service. + * + * @return the api manager local service + */ + public org.opencps.adminconfig.service.ApiManagerLocalService getApiManagerLocalService() { + return apiManagerLocalService; + } + + /** + * Sets the api manager local service. + * + * @param apiManagerLocalService the api manager local service + */ + public void setApiManagerLocalService( + org.opencps.adminconfig.service.ApiManagerLocalService apiManagerLocalService) { + this.apiManagerLocalService = apiManagerLocalService; + } + + /** + * Returns the api manager persistence. + * + * @return the api manager persistence + */ + public ApiManagerPersistence getApiManagerPersistence() { + return apiManagerPersistence; + } + + /** + * Sets the api manager persistence. + * + * @param apiManagerPersistence the api manager persistence + */ + public void setApiManagerPersistence( + ApiManagerPersistence apiManagerPersistence) { + this.apiManagerPersistence = apiManagerPersistence; + } + + /** + * Returns the api role local service. + * + * @return the api role local service + */ + public org.opencps.adminconfig.service.ApiRoleLocalService getApiRoleLocalService() { + return apiRoleLocalService; + } + + /** + * Sets the api role local service. + * + * @param apiRoleLocalService the api role local service + */ + public void setApiRoleLocalService( + org.opencps.adminconfig.service.ApiRoleLocalService apiRoleLocalService) { + this.apiRoleLocalService = apiRoleLocalService; + } + + /** + * Returns the api role persistence. + * + * @return the api role persistence + */ + public ApiRolePersistence getApiRolePersistence() { + return apiRolePersistence; + } + + /** + * Sets the api role persistence. + * + * @param apiRolePersistence the api role persistence + */ + public void setApiRolePersistence(ApiRolePersistence apiRolePersistence) { + this.apiRolePersistence = apiRolePersistence; + } + /** * Returns the dynamic report local service. * @@ -429,6 +507,44 @@ public void setReportRolePersistence( this.reportRolePersistence = reportRolePersistence; } + /** + * Returns the sync tracking local service. + * + * @return the sync tracking local service + */ + public org.opencps.adminconfig.service.SyncTrackingLocalService getSyncTrackingLocalService() { + return syncTrackingLocalService; + } + + /** + * Sets the sync tracking local service. + * + * @param syncTrackingLocalService the sync tracking local service + */ + public void setSyncTrackingLocalService( + org.opencps.adminconfig.service.SyncTrackingLocalService syncTrackingLocalService) { + this.syncTrackingLocalService = syncTrackingLocalService; + } + + /** + * Returns the sync tracking persistence. + * + * @return the sync tracking persistence + */ + public SyncTrackingPersistence getSyncTrackingPersistence() { + return syncTrackingPersistence; + } + + /** + * Sets the sync tracking persistence. + * + * @param syncTrackingPersistence the sync tracking persistence + */ + public void setSyncTrackingPersistence( + SyncTrackingPersistence syncTrackingPersistence) { + this.syncTrackingPersistence = syncTrackingPersistence; + } + /** * Returns the counter local service. * @@ -598,6 +714,14 @@ protected void runSQL(String sql) { protected AdminConfigLocalService adminConfigLocalService; @BeanReference(type = AdminConfigPersistence.class) protected AdminConfigPersistence adminConfigPersistence; + @BeanReference(type = org.opencps.adminconfig.service.ApiManagerLocalService.class) + protected org.opencps.adminconfig.service.ApiManagerLocalService apiManagerLocalService; + @BeanReference(type = ApiManagerPersistence.class) + protected ApiManagerPersistence apiManagerPersistence; + @BeanReference(type = org.opencps.adminconfig.service.ApiRoleLocalService.class) + protected org.opencps.adminconfig.service.ApiRoleLocalService apiRoleLocalService; + @BeanReference(type = ApiRolePersistence.class) + protected ApiRolePersistence apiRolePersistence; @BeanReference(type = org.opencps.adminconfig.service.DynamicReportLocalService.class) protected org.opencps.adminconfig.service.DynamicReportLocalService dynamicReportLocalService; @BeanReference(type = DynamicReportPersistence.class) @@ -606,6 +730,10 @@ protected void runSQL(String sql) { protected org.opencps.adminconfig.service.ReportRoleLocalService reportRoleLocalService; @BeanReference(type = ReportRolePersistence.class) protected ReportRolePersistence reportRolePersistence; + @BeanReference(type = org.opencps.adminconfig.service.SyncTrackingLocalService.class) + protected org.opencps.adminconfig.service.SyncTrackingLocalService syncTrackingLocalService; + @BeanReference(type = SyncTrackingPersistence.class) + protected SyncTrackingPersistence syncTrackingPersistence; @ServiceReference(type = com.liferay.counter.kernel.service.CounterLocalService.class) protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService; @ServiceReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class) diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/ApiManagerLocalServiceBaseImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/ApiManagerLocalServiceBaseImpl.java new file mode 100644 index 0000000000..13adc0d449 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/ApiManagerLocalServiceBaseImpl.java @@ -0,0 +1,754 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.base; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.dao.db.DB; +import com.liferay.portal.kernel.dao.db.DBManagerUtil; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; +import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.service.BaseLocalServiceImpl; +import com.liferay.portal.kernel.service.PersistedModelLocalServiceRegistry; +import com.liferay.portal.kernel.service.persistence.ClassNamePersistence; +import com.liferay.portal.kernel.service.persistence.UserPersistence; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.PortalUtil; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import org.opencps.adminconfig.model.ApiManager; +import org.opencps.adminconfig.service.ApiManagerLocalService; +import org.opencps.adminconfig.service.persistence.AdminConfigPersistence; +import org.opencps.adminconfig.service.persistence.ApiManagerPersistence; +import org.opencps.adminconfig.service.persistence.ApiRolePersistence; +import org.opencps.adminconfig.service.persistence.DynamicReportPersistence; +import org.opencps.adminconfig.service.persistence.ReportRolePersistence; +import org.opencps.adminconfig.service.persistence.SyncTrackingPersistence; + +import java.io.Serializable; + +import java.util.List; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the api manager local service. + * + *

+ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.opencps.adminconfig.service.impl.ApiManagerLocalServiceImpl}. + *

+ * + * @author binhth + * @see org.opencps.adminconfig.service.impl.ApiManagerLocalServiceImpl + * @see org.opencps.adminconfig.service.ApiManagerLocalServiceUtil + * @generated + */ +@ProviderType +public abstract class ApiManagerLocalServiceBaseImpl + extends BaseLocalServiceImpl implements ApiManagerLocalService, + IdentifiableOSGiService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link org.opencps.adminconfig.service.ApiManagerLocalServiceUtil} to access the api manager local service. + */ + + /** + * Adds the api manager to the database. Also notifies the appropriate model listeners. + * + * @param apiManager the api manager + * @return the api manager that was added + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public ApiManager addApiManager(ApiManager apiManager) { + apiManager.setNew(true); + + return apiManagerPersistence.update(apiManager); + } + + /** + * Creates a new api manager with the primary key. Does not add the api manager to the database. + * + * @param apiManagerId the primary key for the new api manager + * @return the new api manager + */ + @Override + @Transactional(enabled = false) + public ApiManager createApiManager(long apiManagerId) { + return apiManagerPersistence.create(apiManagerId); + } + + /** + * Deletes the api manager with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager that was removed + * @throws PortalException if a api manager with the primary key could not be found + */ + @Indexable(type = IndexableType.DELETE) + @Override + public ApiManager deleteApiManager(long apiManagerId) + throws PortalException { + return apiManagerPersistence.remove(apiManagerId); + } + + /** + * Deletes the api manager from the database. Also notifies the appropriate model listeners. + * + * @param apiManager the api manager + * @return the api manager that was removed + */ + @Indexable(type = IndexableType.DELETE) + @Override + public ApiManager deleteApiManager(ApiManager apiManager) { + return apiManagerPersistence.remove(apiManager); + } + + @Override + public DynamicQuery dynamicQuery() { + Class clazz = getClass(); + + return DynamicQueryFactoryUtil.forClass(ApiManager.class, + clazz.getClassLoader()); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery) { + return apiManagerPersistence.findWithDynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end) { + return apiManagerPersistence.findWithDynamicQuery(dynamicQuery, start, + end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end, OrderByComparator orderByComparator) { + return apiManagerPersistence.findWithDynamicQuery(dynamicQuery, start, + end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery) { + return apiManagerPersistence.countWithDynamicQuery(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection) { + return apiManagerPersistence.countWithDynamicQuery(dynamicQuery, + projection); + } + + @Override + public ApiManager fetchApiManager(long apiManagerId) { + return apiManagerPersistence.fetchByPrimaryKey(apiManagerId); + } + + /** + * Returns the api manager with the primary key. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager + * @throws PortalException if a api manager with the primary key could not be found + */ + @Override + public ApiManager getApiManager(long apiManagerId) + throws PortalException { + return apiManagerPersistence.findByPrimaryKey(apiManagerId); + } + + @Override + public ActionableDynamicQuery getActionableDynamicQuery() { + ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery(); + + actionableDynamicQuery.setBaseLocalService(apiManagerLocalService); + actionableDynamicQuery.setClassLoader(getClassLoader()); + actionableDynamicQuery.setModelClass(ApiManager.class); + + actionableDynamicQuery.setPrimaryKeyPropertyName("apiManagerId"); + + return actionableDynamicQuery; + } + + @Override + public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery(); + + indexableActionableDynamicQuery.setBaseLocalService(apiManagerLocalService); + indexableActionableDynamicQuery.setClassLoader(getClassLoader()); + indexableActionableDynamicQuery.setModelClass(ApiManager.class); + + indexableActionableDynamicQuery.setPrimaryKeyPropertyName( + "apiManagerId"); + + return indexableActionableDynamicQuery; + } + + protected void initActionableDynamicQuery( + ActionableDynamicQuery actionableDynamicQuery) { + actionableDynamicQuery.setBaseLocalService(apiManagerLocalService); + actionableDynamicQuery.setClassLoader(getClassLoader()); + actionableDynamicQuery.setModelClass(ApiManager.class); + + actionableDynamicQuery.setPrimaryKeyPropertyName("apiManagerId"); + } + + /** + * @throws PortalException + */ + @Override + public PersistedModel deletePersistedModel(PersistedModel persistedModel) + throws PortalException { + return apiManagerLocalService.deleteApiManager((ApiManager)persistedModel); + } + + @Override + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException { + return apiManagerPersistence.findByPrimaryKey(primaryKeyObj); + } + + /** + * Returns a range of all the api managers. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @return the range of api managers + */ + @Override + public List getApiManagers(int start, int end) { + return apiManagerPersistence.findAll(start, end); + } + + /** + * Returns the number of api managers. + * + * @return the number of api managers + */ + @Override + public int getApiManagersCount() { + return apiManagerPersistence.countAll(); + } + + /** + * Updates the api manager in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param apiManager the api manager + * @return the api manager that was updated + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public ApiManager updateApiManager(ApiManager apiManager) { + return apiManagerPersistence.update(apiManager); + } + + /** + * Returns the admin config local service. + * + * @return the admin config local service + */ + public org.opencps.adminconfig.service.AdminConfigLocalService getAdminConfigLocalService() { + return adminConfigLocalService; + } + + /** + * Sets the admin config local service. + * + * @param adminConfigLocalService the admin config local service + */ + public void setAdminConfigLocalService( + org.opencps.adminconfig.service.AdminConfigLocalService adminConfigLocalService) { + this.adminConfigLocalService = adminConfigLocalService; + } + + /** + * Returns the admin config persistence. + * + * @return the admin config persistence + */ + public AdminConfigPersistence getAdminConfigPersistence() { + return adminConfigPersistence; + } + + /** + * Sets the admin config persistence. + * + * @param adminConfigPersistence the admin config persistence + */ + public void setAdminConfigPersistence( + AdminConfigPersistence adminConfigPersistence) { + this.adminConfigPersistence = adminConfigPersistence; + } + + /** + * Returns the api manager local service. + * + * @return the api manager local service + */ + public ApiManagerLocalService getApiManagerLocalService() { + return apiManagerLocalService; + } + + /** + * Sets the api manager local service. + * + * @param apiManagerLocalService the api manager local service + */ + public void setApiManagerLocalService( + ApiManagerLocalService apiManagerLocalService) { + this.apiManagerLocalService = apiManagerLocalService; + } + + /** + * Returns the api manager persistence. + * + * @return the api manager persistence + */ + public ApiManagerPersistence getApiManagerPersistence() { + return apiManagerPersistence; + } + + /** + * Sets the api manager persistence. + * + * @param apiManagerPersistence the api manager persistence + */ + public void setApiManagerPersistence( + ApiManagerPersistence apiManagerPersistence) { + this.apiManagerPersistence = apiManagerPersistence; + } + + /** + * Returns the api role local service. + * + * @return the api role local service + */ + public org.opencps.adminconfig.service.ApiRoleLocalService getApiRoleLocalService() { + return apiRoleLocalService; + } + + /** + * Sets the api role local service. + * + * @param apiRoleLocalService the api role local service + */ + public void setApiRoleLocalService( + org.opencps.adminconfig.service.ApiRoleLocalService apiRoleLocalService) { + this.apiRoleLocalService = apiRoleLocalService; + } + + /** + * Returns the api role persistence. + * + * @return the api role persistence + */ + public ApiRolePersistence getApiRolePersistence() { + return apiRolePersistence; + } + + /** + * Sets the api role persistence. + * + * @param apiRolePersistence the api role persistence + */ + public void setApiRolePersistence(ApiRolePersistence apiRolePersistence) { + this.apiRolePersistence = apiRolePersistence; + } + + /** + * Returns the dynamic report local service. + * + * @return the dynamic report local service + */ + public org.opencps.adminconfig.service.DynamicReportLocalService getDynamicReportLocalService() { + return dynamicReportLocalService; + } + + /** + * Sets the dynamic report local service. + * + * @param dynamicReportLocalService the dynamic report local service + */ + public void setDynamicReportLocalService( + org.opencps.adminconfig.service.DynamicReportLocalService dynamicReportLocalService) { + this.dynamicReportLocalService = dynamicReportLocalService; + } + + /** + * Returns the dynamic report persistence. + * + * @return the dynamic report persistence + */ + public DynamicReportPersistence getDynamicReportPersistence() { + return dynamicReportPersistence; + } + + /** + * Sets the dynamic report persistence. + * + * @param dynamicReportPersistence the dynamic report persistence + */ + public void setDynamicReportPersistence( + DynamicReportPersistence dynamicReportPersistence) { + this.dynamicReportPersistence = dynamicReportPersistence; + } + + /** + * Returns the report role local service. + * + * @return the report role local service + */ + public org.opencps.adminconfig.service.ReportRoleLocalService getReportRoleLocalService() { + return reportRoleLocalService; + } + + /** + * Sets the report role local service. + * + * @param reportRoleLocalService the report role local service + */ + public void setReportRoleLocalService( + org.opencps.adminconfig.service.ReportRoleLocalService reportRoleLocalService) { + this.reportRoleLocalService = reportRoleLocalService; + } + + /** + * Returns the report role persistence. + * + * @return the report role persistence + */ + public ReportRolePersistence getReportRolePersistence() { + return reportRolePersistence; + } + + /** + * Sets the report role persistence. + * + * @param reportRolePersistence the report role persistence + */ + public void setReportRolePersistence( + ReportRolePersistence reportRolePersistence) { + this.reportRolePersistence = reportRolePersistence; + } + + /** + * Returns the sync tracking local service. + * + * @return the sync tracking local service + */ + public org.opencps.adminconfig.service.SyncTrackingLocalService getSyncTrackingLocalService() { + return syncTrackingLocalService; + } + + /** + * Sets the sync tracking local service. + * + * @param syncTrackingLocalService the sync tracking local service + */ + public void setSyncTrackingLocalService( + org.opencps.adminconfig.service.SyncTrackingLocalService syncTrackingLocalService) { + this.syncTrackingLocalService = syncTrackingLocalService; + } + + /** + * Returns the sync tracking persistence. + * + * @return the sync tracking persistence + */ + public SyncTrackingPersistence getSyncTrackingPersistence() { + return syncTrackingPersistence; + } + + /** + * Sets the sync tracking persistence. + * + * @param syncTrackingPersistence the sync tracking persistence + */ + public void setSyncTrackingPersistence( + SyncTrackingPersistence syncTrackingPersistence) { + this.syncTrackingPersistence = syncTrackingPersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.kernel.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the class name local service. + * + * @return the class name local service + */ + public com.liferay.portal.kernel.service.ClassNameLocalService getClassNameLocalService() { + return classNameLocalService; + } + + /** + * Sets the class name local service. + * + * @param classNameLocalService the class name local service + */ + public void setClassNameLocalService( + com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService) { + this.classNameLocalService = classNameLocalService; + } + + /** + * Returns the class name persistence. + * + * @return the class name persistence + */ + public ClassNamePersistence getClassNamePersistence() { + return classNamePersistence; + } + + /** + * Sets the class name persistence. + * + * @param classNamePersistence the class name persistence + */ + public void setClassNamePersistence( + ClassNamePersistence classNamePersistence) { + this.classNamePersistence = classNamePersistence; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.kernel.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.kernel.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.kernel.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + persistedModelLocalServiceRegistry.register("org.opencps.adminconfig.model.ApiManager", + apiManagerLocalService); + } + + public void destroy() { + persistedModelLocalServiceRegistry.unregister( + "org.opencps.adminconfig.model.ApiManager"); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + @Override + public String getOSGiServiceIdentifier() { + return ApiManagerLocalService.class.getName(); + } + + protected Class getModelClass() { + return ApiManager.class; + } + + protected String getModelClassName() { + return ApiManager.class.getName(); + } + + /** + * Performs a SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) { + try { + DataSource dataSource = apiManagerPersistence.getDataSource(); + + DB db = DBManagerUtil.getDB(); + + sql = db.buildSQL(sql); + sql = PortalUtil.transformSQL(sql); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = org.opencps.adminconfig.service.AdminConfigLocalService.class) + protected org.opencps.adminconfig.service.AdminConfigLocalService adminConfigLocalService; + @BeanReference(type = AdminConfigPersistence.class) + protected AdminConfigPersistence adminConfigPersistence; + @BeanReference(type = ApiManagerLocalService.class) + protected ApiManagerLocalService apiManagerLocalService; + @BeanReference(type = ApiManagerPersistence.class) + protected ApiManagerPersistence apiManagerPersistence; + @BeanReference(type = org.opencps.adminconfig.service.ApiRoleLocalService.class) + protected org.opencps.adminconfig.service.ApiRoleLocalService apiRoleLocalService; + @BeanReference(type = ApiRolePersistence.class) + protected ApiRolePersistence apiRolePersistence; + @BeanReference(type = org.opencps.adminconfig.service.DynamicReportLocalService.class) + protected org.opencps.adminconfig.service.DynamicReportLocalService dynamicReportLocalService; + @BeanReference(type = DynamicReportPersistence.class) + protected DynamicReportPersistence dynamicReportPersistence; + @BeanReference(type = org.opencps.adminconfig.service.ReportRoleLocalService.class) + protected org.opencps.adminconfig.service.ReportRoleLocalService reportRoleLocalService; + @BeanReference(type = ReportRolePersistence.class) + protected ReportRolePersistence reportRolePersistence; + @BeanReference(type = org.opencps.adminconfig.service.SyncTrackingLocalService.class) + protected org.opencps.adminconfig.service.SyncTrackingLocalService syncTrackingLocalService; + @BeanReference(type = SyncTrackingPersistence.class) + protected SyncTrackingPersistence syncTrackingPersistence; + @ServiceReference(type = com.liferay.counter.kernel.service.CounterLocalService.class) + protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService; + @ServiceReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class) + protected com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService; + @ServiceReference(type = ClassNamePersistence.class) + protected ClassNamePersistence classNamePersistence; + @ServiceReference(type = com.liferay.portal.kernel.service.ResourceLocalService.class) + protected com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService; + @ServiceReference(type = com.liferay.portal.kernel.service.UserLocalService.class) + protected com.liferay.portal.kernel.service.UserLocalService userLocalService; + @ServiceReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + @ServiceReference(type = PersistedModelLocalServiceRegistry.class) + protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/ApiRoleLocalServiceBaseImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/ApiRoleLocalServiceBaseImpl.java new file mode 100644 index 0000000000..d901774179 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/ApiRoleLocalServiceBaseImpl.java @@ -0,0 +1,747 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.base; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.dao.db.DB; +import com.liferay.portal.kernel.dao.db.DBManagerUtil; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; +import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.service.BaseLocalServiceImpl; +import com.liferay.portal.kernel.service.PersistedModelLocalServiceRegistry; +import com.liferay.portal.kernel.service.persistence.ClassNamePersistence; +import com.liferay.portal.kernel.service.persistence.UserPersistence; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.PortalUtil; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import org.opencps.adminconfig.model.ApiRole; +import org.opencps.adminconfig.service.ApiRoleLocalService; +import org.opencps.adminconfig.service.persistence.AdminConfigPersistence; +import org.opencps.adminconfig.service.persistence.ApiManagerPersistence; +import org.opencps.adminconfig.service.persistence.ApiRolePersistence; +import org.opencps.adminconfig.service.persistence.DynamicReportPersistence; +import org.opencps.adminconfig.service.persistence.ReportRolePersistence; +import org.opencps.adminconfig.service.persistence.SyncTrackingPersistence; + +import java.io.Serializable; + +import java.util.List; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the api role local service. + * + *

+ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.opencps.adminconfig.service.impl.ApiRoleLocalServiceImpl}. + *

+ * + * @author binhth + * @see org.opencps.adminconfig.service.impl.ApiRoleLocalServiceImpl + * @see org.opencps.adminconfig.service.ApiRoleLocalServiceUtil + * @generated + */ +@ProviderType +public abstract class ApiRoleLocalServiceBaseImpl extends BaseLocalServiceImpl + implements ApiRoleLocalService, IdentifiableOSGiService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link org.opencps.adminconfig.service.ApiRoleLocalServiceUtil} to access the api role local service. + */ + + /** + * Adds the api role to the database. Also notifies the appropriate model listeners. + * + * @param apiRole the api role + * @return the api role that was added + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public ApiRole addApiRole(ApiRole apiRole) { + apiRole.setNew(true); + + return apiRolePersistence.update(apiRole); + } + + /** + * Creates a new api role with the primary key. Does not add the api role to the database. + * + * @param apiRoleId the primary key for the new api role + * @return the new api role + */ + @Override + @Transactional(enabled = false) + public ApiRole createApiRole(long apiRoleId) { + return apiRolePersistence.create(apiRoleId); + } + + /** + * Deletes the api role with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param apiRoleId the primary key of the api role + * @return the api role that was removed + * @throws PortalException if a api role with the primary key could not be found + */ + @Indexable(type = IndexableType.DELETE) + @Override + public ApiRole deleteApiRole(long apiRoleId) throws PortalException { + return apiRolePersistence.remove(apiRoleId); + } + + /** + * Deletes the api role from the database. Also notifies the appropriate model listeners. + * + * @param apiRole the api role + * @return the api role that was removed + */ + @Indexable(type = IndexableType.DELETE) + @Override + public ApiRole deleteApiRole(ApiRole apiRole) { + return apiRolePersistence.remove(apiRole); + } + + @Override + public DynamicQuery dynamicQuery() { + Class clazz = getClass(); + + return DynamicQueryFactoryUtil.forClass(ApiRole.class, + clazz.getClassLoader()); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery) { + return apiRolePersistence.findWithDynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end) { + return apiRolePersistence.findWithDynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end, OrderByComparator orderByComparator) { + return apiRolePersistence.findWithDynamicQuery(dynamicQuery, start, + end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery) { + return apiRolePersistence.countWithDynamicQuery(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection) { + return apiRolePersistence.countWithDynamicQuery(dynamicQuery, projection); + } + + @Override + public ApiRole fetchApiRole(long apiRoleId) { + return apiRolePersistence.fetchByPrimaryKey(apiRoleId); + } + + /** + * Returns the api role with the primary key. + * + * @param apiRoleId the primary key of the api role + * @return the api role + * @throws PortalException if a api role with the primary key could not be found + */ + @Override + public ApiRole getApiRole(long apiRoleId) throws PortalException { + return apiRolePersistence.findByPrimaryKey(apiRoleId); + } + + @Override + public ActionableDynamicQuery getActionableDynamicQuery() { + ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery(); + + actionableDynamicQuery.setBaseLocalService(apiRoleLocalService); + actionableDynamicQuery.setClassLoader(getClassLoader()); + actionableDynamicQuery.setModelClass(ApiRole.class); + + actionableDynamicQuery.setPrimaryKeyPropertyName("apiRoleId"); + + return actionableDynamicQuery; + } + + @Override + public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery(); + + indexableActionableDynamicQuery.setBaseLocalService(apiRoleLocalService); + indexableActionableDynamicQuery.setClassLoader(getClassLoader()); + indexableActionableDynamicQuery.setModelClass(ApiRole.class); + + indexableActionableDynamicQuery.setPrimaryKeyPropertyName("apiRoleId"); + + return indexableActionableDynamicQuery; + } + + protected void initActionableDynamicQuery( + ActionableDynamicQuery actionableDynamicQuery) { + actionableDynamicQuery.setBaseLocalService(apiRoleLocalService); + actionableDynamicQuery.setClassLoader(getClassLoader()); + actionableDynamicQuery.setModelClass(ApiRole.class); + + actionableDynamicQuery.setPrimaryKeyPropertyName("apiRoleId"); + } + + /** + * @throws PortalException + */ + @Override + public PersistedModel deletePersistedModel(PersistedModel persistedModel) + throws PortalException { + return apiRoleLocalService.deleteApiRole((ApiRole)persistedModel); + } + + @Override + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException { + return apiRolePersistence.findByPrimaryKey(primaryKeyObj); + } + + /** + * Returns a range of all the api roles. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @return the range of api roles + */ + @Override + public List getApiRoles(int start, int end) { + return apiRolePersistence.findAll(start, end); + } + + /** + * Returns the number of api roles. + * + * @return the number of api roles + */ + @Override + public int getApiRolesCount() { + return apiRolePersistence.countAll(); + } + + /** + * Updates the api role in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param apiRole the api role + * @return the api role that was updated + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public ApiRole updateApiRole(ApiRole apiRole) { + return apiRolePersistence.update(apiRole); + } + + /** + * Returns the admin config local service. + * + * @return the admin config local service + */ + public org.opencps.adminconfig.service.AdminConfigLocalService getAdminConfigLocalService() { + return adminConfigLocalService; + } + + /** + * Sets the admin config local service. + * + * @param adminConfigLocalService the admin config local service + */ + public void setAdminConfigLocalService( + org.opencps.adminconfig.service.AdminConfigLocalService adminConfigLocalService) { + this.adminConfigLocalService = adminConfigLocalService; + } + + /** + * Returns the admin config persistence. + * + * @return the admin config persistence + */ + public AdminConfigPersistence getAdminConfigPersistence() { + return adminConfigPersistence; + } + + /** + * Sets the admin config persistence. + * + * @param adminConfigPersistence the admin config persistence + */ + public void setAdminConfigPersistence( + AdminConfigPersistence adminConfigPersistence) { + this.adminConfigPersistence = adminConfigPersistence; + } + + /** + * Returns the api manager local service. + * + * @return the api manager local service + */ + public org.opencps.adminconfig.service.ApiManagerLocalService getApiManagerLocalService() { + return apiManagerLocalService; + } + + /** + * Sets the api manager local service. + * + * @param apiManagerLocalService the api manager local service + */ + public void setApiManagerLocalService( + org.opencps.adminconfig.service.ApiManagerLocalService apiManagerLocalService) { + this.apiManagerLocalService = apiManagerLocalService; + } + + /** + * Returns the api manager persistence. + * + * @return the api manager persistence + */ + public ApiManagerPersistence getApiManagerPersistence() { + return apiManagerPersistence; + } + + /** + * Sets the api manager persistence. + * + * @param apiManagerPersistence the api manager persistence + */ + public void setApiManagerPersistence( + ApiManagerPersistence apiManagerPersistence) { + this.apiManagerPersistence = apiManagerPersistence; + } + + /** + * Returns the api role local service. + * + * @return the api role local service + */ + public ApiRoleLocalService getApiRoleLocalService() { + return apiRoleLocalService; + } + + /** + * Sets the api role local service. + * + * @param apiRoleLocalService the api role local service + */ + public void setApiRoleLocalService(ApiRoleLocalService apiRoleLocalService) { + this.apiRoleLocalService = apiRoleLocalService; + } + + /** + * Returns the api role persistence. + * + * @return the api role persistence + */ + public ApiRolePersistence getApiRolePersistence() { + return apiRolePersistence; + } + + /** + * Sets the api role persistence. + * + * @param apiRolePersistence the api role persistence + */ + public void setApiRolePersistence(ApiRolePersistence apiRolePersistence) { + this.apiRolePersistence = apiRolePersistence; + } + + /** + * Returns the dynamic report local service. + * + * @return the dynamic report local service + */ + public org.opencps.adminconfig.service.DynamicReportLocalService getDynamicReportLocalService() { + return dynamicReportLocalService; + } + + /** + * Sets the dynamic report local service. + * + * @param dynamicReportLocalService the dynamic report local service + */ + public void setDynamicReportLocalService( + org.opencps.adminconfig.service.DynamicReportLocalService dynamicReportLocalService) { + this.dynamicReportLocalService = dynamicReportLocalService; + } + + /** + * Returns the dynamic report persistence. + * + * @return the dynamic report persistence + */ + public DynamicReportPersistence getDynamicReportPersistence() { + return dynamicReportPersistence; + } + + /** + * Sets the dynamic report persistence. + * + * @param dynamicReportPersistence the dynamic report persistence + */ + public void setDynamicReportPersistence( + DynamicReportPersistence dynamicReportPersistence) { + this.dynamicReportPersistence = dynamicReportPersistence; + } + + /** + * Returns the report role local service. + * + * @return the report role local service + */ + public org.opencps.adminconfig.service.ReportRoleLocalService getReportRoleLocalService() { + return reportRoleLocalService; + } + + /** + * Sets the report role local service. + * + * @param reportRoleLocalService the report role local service + */ + public void setReportRoleLocalService( + org.opencps.adminconfig.service.ReportRoleLocalService reportRoleLocalService) { + this.reportRoleLocalService = reportRoleLocalService; + } + + /** + * Returns the report role persistence. + * + * @return the report role persistence + */ + public ReportRolePersistence getReportRolePersistence() { + return reportRolePersistence; + } + + /** + * Sets the report role persistence. + * + * @param reportRolePersistence the report role persistence + */ + public void setReportRolePersistence( + ReportRolePersistence reportRolePersistence) { + this.reportRolePersistence = reportRolePersistence; + } + + /** + * Returns the sync tracking local service. + * + * @return the sync tracking local service + */ + public org.opencps.adminconfig.service.SyncTrackingLocalService getSyncTrackingLocalService() { + return syncTrackingLocalService; + } + + /** + * Sets the sync tracking local service. + * + * @param syncTrackingLocalService the sync tracking local service + */ + public void setSyncTrackingLocalService( + org.opencps.adminconfig.service.SyncTrackingLocalService syncTrackingLocalService) { + this.syncTrackingLocalService = syncTrackingLocalService; + } + + /** + * Returns the sync tracking persistence. + * + * @return the sync tracking persistence + */ + public SyncTrackingPersistence getSyncTrackingPersistence() { + return syncTrackingPersistence; + } + + /** + * Sets the sync tracking persistence. + * + * @param syncTrackingPersistence the sync tracking persistence + */ + public void setSyncTrackingPersistence( + SyncTrackingPersistence syncTrackingPersistence) { + this.syncTrackingPersistence = syncTrackingPersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.kernel.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the class name local service. + * + * @return the class name local service + */ + public com.liferay.portal.kernel.service.ClassNameLocalService getClassNameLocalService() { + return classNameLocalService; + } + + /** + * Sets the class name local service. + * + * @param classNameLocalService the class name local service + */ + public void setClassNameLocalService( + com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService) { + this.classNameLocalService = classNameLocalService; + } + + /** + * Returns the class name persistence. + * + * @return the class name persistence + */ + public ClassNamePersistence getClassNamePersistence() { + return classNamePersistence; + } + + /** + * Sets the class name persistence. + * + * @param classNamePersistence the class name persistence + */ + public void setClassNamePersistence( + ClassNamePersistence classNamePersistence) { + this.classNamePersistence = classNamePersistence; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.kernel.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.kernel.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.kernel.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + persistedModelLocalServiceRegistry.register("org.opencps.adminconfig.model.ApiRole", + apiRoleLocalService); + } + + public void destroy() { + persistedModelLocalServiceRegistry.unregister( + "org.opencps.adminconfig.model.ApiRole"); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + @Override + public String getOSGiServiceIdentifier() { + return ApiRoleLocalService.class.getName(); + } + + protected Class getModelClass() { + return ApiRole.class; + } + + protected String getModelClassName() { + return ApiRole.class.getName(); + } + + /** + * Performs a SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) { + try { + DataSource dataSource = apiRolePersistence.getDataSource(); + + DB db = DBManagerUtil.getDB(); + + sql = db.buildSQL(sql); + sql = PortalUtil.transformSQL(sql); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = org.opencps.adminconfig.service.AdminConfigLocalService.class) + protected org.opencps.adminconfig.service.AdminConfigLocalService adminConfigLocalService; + @BeanReference(type = AdminConfigPersistence.class) + protected AdminConfigPersistence adminConfigPersistence; + @BeanReference(type = org.opencps.adminconfig.service.ApiManagerLocalService.class) + protected org.opencps.adminconfig.service.ApiManagerLocalService apiManagerLocalService; + @BeanReference(type = ApiManagerPersistence.class) + protected ApiManagerPersistence apiManagerPersistence; + @BeanReference(type = ApiRoleLocalService.class) + protected ApiRoleLocalService apiRoleLocalService; + @BeanReference(type = ApiRolePersistence.class) + protected ApiRolePersistence apiRolePersistence; + @BeanReference(type = org.opencps.adminconfig.service.DynamicReportLocalService.class) + protected org.opencps.adminconfig.service.DynamicReportLocalService dynamicReportLocalService; + @BeanReference(type = DynamicReportPersistence.class) + protected DynamicReportPersistence dynamicReportPersistence; + @BeanReference(type = org.opencps.adminconfig.service.ReportRoleLocalService.class) + protected org.opencps.adminconfig.service.ReportRoleLocalService reportRoleLocalService; + @BeanReference(type = ReportRolePersistence.class) + protected ReportRolePersistence reportRolePersistence; + @BeanReference(type = org.opencps.adminconfig.service.SyncTrackingLocalService.class) + protected org.opencps.adminconfig.service.SyncTrackingLocalService syncTrackingLocalService; + @BeanReference(type = SyncTrackingPersistence.class) + protected SyncTrackingPersistence syncTrackingPersistence; + @ServiceReference(type = com.liferay.counter.kernel.service.CounterLocalService.class) + protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService; + @ServiceReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class) + protected com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService; + @ServiceReference(type = ClassNamePersistence.class) + protected ClassNamePersistence classNamePersistence; + @ServiceReference(type = com.liferay.portal.kernel.service.ResourceLocalService.class) + protected com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService; + @ServiceReference(type = com.liferay.portal.kernel.service.UserLocalService.class) + protected com.liferay.portal.kernel.service.UserLocalService userLocalService; + @ServiceReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + @ServiceReference(type = PersistedModelLocalServiceRegistry.class) + protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/DynamicReportLocalServiceBaseImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/DynamicReportLocalServiceBaseImpl.java index c80ef96cdf..936c2bbf85 100644 --- a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/DynamicReportLocalServiceBaseImpl.java +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/DynamicReportLocalServiceBaseImpl.java @@ -45,8 +45,11 @@ import org.opencps.adminconfig.model.DynamicReport; import org.opencps.adminconfig.service.DynamicReportLocalService; import org.opencps.adminconfig.service.persistence.AdminConfigPersistence; +import org.opencps.adminconfig.service.persistence.ApiManagerPersistence; +import org.opencps.adminconfig.service.persistence.ApiRolePersistence; import org.opencps.adminconfig.service.persistence.DynamicReportPersistence; import org.opencps.adminconfig.service.persistence.ReportRolePersistence; +import org.opencps.adminconfig.service.persistence.SyncTrackingPersistence; import java.io.Serializable; @@ -356,6 +359,81 @@ public void setAdminConfigPersistence( this.adminConfigPersistence = adminConfigPersistence; } + /** + * Returns the api manager local service. + * + * @return the api manager local service + */ + public org.opencps.adminconfig.service.ApiManagerLocalService getApiManagerLocalService() { + return apiManagerLocalService; + } + + /** + * Sets the api manager local service. + * + * @param apiManagerLocalService the api manager local service + */ + public void setApiManagerLocalService( + org.opencps.adminconfig.service.ApiManagerLocalService apiManagerLocalService) { + this.apiManagerLocalService = apiManagerLocalService; + } + + /** + * Returns the api manager persistence. + * + * @return the api manager persistence + */ + public ApiManagerPersistence getApiManagerPersistence() { + return apiManagerPersistence; + } + + /** + * Sets the api manager persistence. + * + * @param apiManagerPersistence the api manager persistence + */ + public void setApiManagerPersistence( + ApiManagerPersistence apiManagerPersistence) { + this.apiManagerPersistence = apiManagerPersistence; + } + + /** + * Returns the api role local service. + * + * @return the api role local service + */ + public org.opencps.adminconfig.service.ApiRoleLocalService getApiRoleLocalService() { + return apiRoleLocalService; + } + + /** + * Sets the api role local service. + * + * @param apiRoleLocalService the api role local service + */ + public void setApiRoleLocalService( + org.opencps.adminconfig.service.ApiRoleLocalService apiRoleLocalService) { + this.apiRoleLocalService = apiRoleLocalService; + } + + /** + * Returns the api role persistence. + * + * @return the api role persistence + */ + public ApiRolePersistence getApiRolePersistence() { + return apiRolePersistence; + } + + /** + * Sets the api role persistence. + * + * @param apiRolePersistence the api role persistence + */ + public void setApiRolePersistence(ApiRolePersistence apiRolePersistence) { + this.apiRolePersistence = apiRolePersistence; + } + /** * Returns the dynamic report local service. * @@ -432,6 +510,44 @@ public void setReportRolePersistence( this.reportRolePersistence = reportRolePersistence; } + /** + * Returns the sync tracking local service. + * + * @return the sync tracking local service + */ + public org.opencps.adminconfig.service.SyncTrackingLocalService getSyncTrackingLocalService() { + return syncTrackingLocalService; + } + + /** + * Sets the sync tracking local service. + * + * @param syncTrackingLocalService the sync tracking local service + */ + public void setSyncTrackingLocalService( + org.opencps.adminconfig.service.SyncTrackingLocalService syncTrackingLocalService) { + this.syncTrackingLocalService = syncTrackingLocalService; + } + + /** + * Returns the sync tracking persistence. + * + * @return the sync tracking persistence + */ + public SyncTrackingPersistence getSyncTrackingPersistence() { + return syncTrackingPersistence; + } + + /** + * Sets the sync tracking persistence. + * + * @param syncTrackingPersistence the sync tracking persistence + */ + public void setSyncTrackingPersistence( + SyncTrackingPersistence syncTrackingPersistence) { + this.syncTrackingPersistence = syncTrackingPersistence; + } + /** * Returns the counter local service. * @@ -601,6 +717,14 @@ protected void runSQL(String sql) { protected org.opencps.adminconfig.service.AdminConfigLocalService adminConfigLocalService; @BeanReference(type = AdminConfigPersistence.class) protected AdminConfigPersistence adminConfigPersistence; + @BeanReference(type = org.opencps.adminconfig.service.ApiManagerLocalService.class) + protected org.opencps.adminconfig.service.ApiManagerLocalService apiManagerLocalService; + @BeanReference(type = ApiManagerPersistence.class) + protected ApiManagerPersistence apiManagerPersistence; + @BeanReference(type = org.opencps.adminconfig.service.ApiRoleLocalService.class) + protected org.opencps.adminconfig.service.ApiRoleLocalService apiRoleLocalService; + @BeanReference(type = ApiRolePersistence.class) + protected ApiRolePersistence apiRolePersistence; @BeanReference(type = DynamicReportLocalService.class) protected DynamicReportLocalService dynamicReportLocalService; @BeanReference(type = DynamicReportPersistence.class) @@ -609,6 +733,10 @@ protected void runSQL(String sql) { protected org.opencps.adminconfig.service.ReportRoleLocalService reportRoleLocalService; @BeanReference(type = ReportRolePersistence.class) protected ReportRolePersistence reportRolePersistence; + @BeanReference(type = org.opencps.adminconfig.service.SyncTrackingLocalService.class) + protected org.opencps.adminconfig.service.SyncTrackingLocalService syncTrackingLocalService; + @BeanReference(type = SyncTrackingPersistence.class) + protected SyncTrackingPersistence syncTrackingPersistence; @ServiceReference(type = com.liferay.counter.kernel.service.CounterLocalService.class) protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService; @ServiceReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class) diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/ReportRoleLocalServiceBaseImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/ReportRoleLocalServiceBaseImpl.java index e5b21ab0ae..df19e77bf1 100644 --- a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/ReportRoleLocalServiceBaseImpl.java +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/ReportRoleLocalServiceBaseImpl.java @@ -45,8 +45,11 @@ import org.opencps.adminconfig.model.ReportRole; import org.opencps.adminconfig.service.ReportRoleLocalService; import org.opencps.adminconfig.service.persistence.AdminConfigPersistence; +import org.opencps.adminconfig.service.persistence.ApiManagerPersistence; +import org.opencps.adminconfig.service.persistence.ApiRolePersistence; import org.opencps.adminconfig.service.persistence.DynamicReportPersistence; import org.opencps.adminconfig.service.persistence.ReportRolePersistence; +import org.opencps.adminconfig.service.persistence.SyncTrackingPersistence; import java.io.Serializable; @@ -356,6 +359,81 @@ public void setAdminConfigPersistence( this.adminConfigPersistence = adminConfigPersistence; } + /** + * Returns the api manager local service. + * + * @return the api manager local service + */ + public org.opencps.adminconfig.service.ApiManagerLocalService getApiManagerLocalService() { + return apiManagerLocalService; + } + + /** + * Sets the api manager local service. + * + * @param apiManagerLocalService the api manager local service + */ + public void setApiManagerLocalService( + org.opencps.adminconfig.service.ApiManagerLocalService apiManagerLocalService) { + this.apiManagerLocalService = apiManagerLocalService; + } + + /** + * Returns the api manager persistence. + * + * @return the api manager persistence + */ + public ApiManagerPersistence getApiManagerPersistence() { + return apiManagerPersistence; + } + + /** + * Sets the api manager persistence. + * + * @param apiManagerPersistence the api manager persistence + */ + public void setApiManagerPersistence( + ApiManagerPersistence apiManagerPersistence) { + this.apiManagerPersistence = apiManagerPersistence; + } + + /** + * Returns the api role local service. + * + * @return the api role local service + */ + public org.opencps.adminconfig.service.ApiRoleLocalService getApiRoleLocalService() { + return apiRoleLocalService; + } + + /** + * Sets the api role local service. + * + * @param apiRoleLocalService the api role local service + */ + public void setApiRoleLocalService( + org.opencps.adminconfig.service.ApiRoleLocalService apiRoleLocalService) { + this.apiRoleLocalService = apiRoleLocalService; + } + + /** + * Returns the api role persistence. + * + * @return the api role persistence + */ + public ApiRolePersistence getApiRolePersistence() { + return apiRolePersistence; + } + + /** + * Sets the api role persistence. + * + * @param apiRolePersistence the api role persistence + */ + public void setApiRolePersistence(ApiRolePersistence apiRolePersistence) { + this.apiRolePersistence = apiRolePersistence; + } + /** * Returns the dynamic report local service. * @@ -432,6 +510,44 @@ public void setReportRolePersistence( this.reportRolePersistence = reportRolePersistence; } + /** + * Returns the sync tracking local service. + * + * @return the sync tracking local service + */ + public org.opencps.adminconfig.service.SyncTrackingLocalService getSyncTrackingLocalService() { + return syncTrackingLocalService; + } + + /** + * Sets the sync tracking local service. + * + * @param syncTrackingLocalService the sync tracking local service + */ + public void setSyncTrackingLocalService( + org.opencps.adminconfig.service.SyncTrackingLocalService syncTrackingLocalService) { + this.syncTrackingLocalService = syncTrackingLocalService; + } + + /** + * Returns the sync tracking persistence. + * + * @return the sync tracking persistence + */ + public SyncTrackingPersistence getSyncTrackingPersistence() { + return syncTrackingPersistence; + } + + /** + * Sets the sync tracking persistence. + * + * @param syncTrackingPersistence the sync tracking persistence + */ + public void setSyncTrackingPersistence( + SyncTrackingPersistence syncTrackingPersistence) { + this.syncTrackingPersistence = syncTrackingPersistence; + } + /** * Returns the counter local service. * @@ -601,6 +717,14 @@ protected void runSQL(String sql) { protected org.opencps.adminconfig.service.AdminConfigLocalService adminConfigLocalService; @BeanReference(type = AdminConfigPersistence.class) protected AdminConfigPersistence adminConfigPersistence; + @BeanReference(type = org.opencps.adminconfig.service.ApiManagerLocalService.class) + protected org.opencps.adminconfig.service.ApiManagerLocalService apiManagerLocalService; + @BeanReference(type = ApiManagerPersistence.class) + protected ApiManagerPersistence apiManagerPersistence; + @BeanReference(type = org.opencps.adminconfig.service.ApiRoleLocalService.class) + protected org.opencps.adminconfig.service.ApiRoleLocalService apiRoleLocalService; + @BeanReference(type = ApiRolePersistence.class) + protected ApiRolePersistence apiRolePersistence; @BeanReference(type = org.opencps.adminconfig.service.DynamicReportLocalService.class) protected org.opencps.adminconfig.service.DynamicReportLocalService dynamicReportLocalService; @BeanReference(type = DynamicReportPersistence.class) @@ -609,6 +733,10 @@ protected void runSQL(String sql) { protected ReportRoleLocalService reportRoleLocalService; @BeanReference(type = ReportRolePersistence.class) protected ReportRolePersistence reportRolePersistence; + @BeanReference(type = org.opencps.adminconfig.service.SyncTrackingLocalService.class) + protected org.opencps.adminconfig.service.SyncTrackingLocalService syncTrackingLocalService; + @BeanReference(type = SyncTrackingPersistence.class) + protected SyncTrackingPersistence syncTrackingPersistence; @ServiceReference(type = com.liferay.counter.kernel.service.CounterLocalService.class) protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService; @ServiceReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class) diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/SyncTrackingLocalServiceBaseImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/SyncTrackingLocalServiceBaseImpl.java new file mode 100644 index 0000000000..4e96c21370 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/base/SyncTrackingLocalServiceBaseImpl.java @@ -0,0 +1,869 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.base; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.exportimport.kernel.lar.ExportImportHelperUtil; +import com.liferay.exportimport.kernel.lar.ManifestSummary; +import com.liferay.exportimport.kernel.lar.PortletDataContext; +import com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil; +import com.liferay.exportimport.kernel.lar.StagedModelType; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.dao.db.DB; +import com.liferay.portal.kernel.dao.db.DBManagerUtil; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; +import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.service.BaseLocalServiceImpl; +import com.liferay.portal.kernel.service.PersistedModelLocalServiceRegistry; +import com.liferay.portal.kernel.service.persistence.ClassNamePersistence; +import com.liferay.portal.kernel.service.persistence.UserPersistence; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.PortalUtil; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import org.opencps.adminconfig.model.SyncTracking; +import org.opencps.adminconfig.service.SyncTrackingLocalService; +import org.opencps.adminconfig.service.persistence.AdminConfigPersistence; +import org.opencps.adminconfig.service.persistence.ApiManagerPersistence; +import org.opencps.adminconfig.service.persistence.ApiRolePersistence; +import org.opencps.adminconfig.service.persistence.DynamicReportPersistence; +import org.opencps.adminconfig.service.persistence.ReportRolePersistence; +import org.opencps.adminconfig.service.persistence.SyncTrackingPersistence; + +import java.io.Serializable; + +import java.util.List; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the sync tracking local service. + * + *

+ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.opencps.adminconfig.service.impl.SyncTrackingLocalServiceImpl}. + *

+ * + * @author binhth + * @see org.opencps.adminconfig.service.impl.SyncTrackingLocalServiceImpl + * @see org.opencps.adminconfig.service.SyncTrackingLocalServiceUtil + * @generated + */ +@ProviderType +public abstract class SyncTrackingLocalServiceBaseImpl + extends BaseLocalServiceImpl implements SyncTrackingLocalService, + IdentifiableOSGiService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link org.opencps.adminconfig.service.SyncTrackingLocalServiceUtil} to access the sync tracking local service. + */ + + /** + * Adds the sync tracking to the database. Also notifies the appropriate model listeners. + * + * @param syncTracking the sync tracking + * @return the sync tracking that was added + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public SyncTracking addSyncTracking(SyncTracking syncTracking) { + syncTracking.setNew(true); + + return syncTrackingPersistence.update(syncTracking); + } + + /** + * Creates a new sync tracking with the primary key. Does not add the sync tracking to the database. + * + * @param trackingId the primary key for the new sync tracking + * @return the new sync tracking + */ + @Override + @Transactional(enabled = false) + public SyncTracking createSyncTracking(long trackingId) { + return syncTrackingPersistence.create(trackingId); + } + + /** + * Deletes the sync tracking with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking that was removed + * @throws PortalException if a sync tracking with the primary key could not be found + */ + @Indexable(type = IndexableType.DELETE) + @Override + public SyncTracking deleteSyncTracking(long trackingId) + throws PortalException { + return syncTrackingPersistence.remove(trackingId); + } + + /** + * Deletes the sync tracking from the database. Also notifies the appropriate model listeners. + * + * @param syncTracking the sync tracking + * @return the sync tracking that was removed + */ + @Indexable(type = IndexableType.DELETE) + @Override + public SyncTracking deleteSyncTracking(SyncTracking syncTracking) { + return syncTrackingPersistence.remove(syncTracking); + } + + @Override + public DynamicQuery dynamicQuery() { + Class clazz = getClass(); + + return DynamicQueryFactoryUtil.forClass(SyncTracking.class, + clazz.getClassLoader()); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery) { + return syncTrackingPersistence.findWithDynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end) { + return syncTrackingPersistence.findWithDynamicQuery(dynamicQuery, + start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end, OrderByComparator orderByComparator) { + return syncTrackingPersistence.findWithDynamicQuery(dynamicQuery, + start, end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery) { + return syncTrackingPersistence.countWithDynamicQuery(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection) { + return syncTrackingPersistence.countWithDynamicQuery(dynamicQuery, + projection); + } + + @Override + public SyncTracking fetchSyncTracking(long trackingId) { + return syncTrackingPersistence.fetchByPrimaryKey(trackingId); + } + + /** + * Returns the sync tracking matching the UUID and group. + * + * @param uuid the sync tracking's UUID + * @param groupId the primary key of the group + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchSyncTrackingByUuidAndGroupId(String uuid, + long groupId) { + return syncTrackingPersistence.fetchByUUID_G(uuid, groupId); + } + + /** + * Returns the sync tracking with the primary key. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking + * @throws PortalException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking getSyncTracking(long trackingId) + throws PortalException { + return syncTrackingPersistence.findByPrimaryKey(trackingId); + } + + @Override + public ActionableDynamicQuery getActionableDynamicQuery() { + ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery(); + + actionableDynamicQuery.setBaseLocalService(syncTrackingLocalService); + actionableDynamicQuery.setClassLoader(getClassLoader()); + actionableDynamicQuery.setModelClass(SyncTracking.class); + + actionableDynamicQuery.setPrimaryKeyPropertyName("trackingId"); + + return actionableDynamicQuery; + } + + @Override + public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery(); + + indexableActionableDynamicQuery.setBaseLocalService(syncTrackingLocalService); + indexableActionableDynamicQuery.setClassLoader(getClassLoader()); + indexableActionableDynamicQuery.setModelClass(SyncTracking.class); + + indexableActionableDynamicQuery.setPrimaryKeyPropertyName("trackingId"); + + return indexableActionableDynamicQuery; + } + + protected void initActionableDynamicQuery( + ActionableDynamicQuery actionableDynamicQuery) { + actionableDynamicQuery.setBaseLocalService(syncTrackingLocalService); + actionableDynamicQuery.setClassLoader(getClassLoader()); + actionableDynamicQuery.setModelClass(SyncTracking.class); + + actionableDynamicQuery.setPrimaryKeyPropertyName("trackingId"); + } + + @Override + public ExportActionableDynamicQuery getExportActionableDynamicQuery( + final PortletDataContext portletDataContext) { + final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() { + @Override + public long performCount() throws PortalException { + ManifestSummary manifestSummary = portletDataContext.getManifestSummary(); + + StagedModelType stagedModelType = getStagedModelType(); + + long modelAdditionCount = super.performCount(); + + manifestSummary.addModelAdditionCount(stagedModelType, + modelAdditionCount); + + long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext, + stagedModelType); + + manifestSummary.addModelDeletionCount(stagedModelType, + modelDeletionCount); + + return modelAdditionCount; + } + }; + + initActionableDynamicQuery(exportActionableDynamicQuery); + + exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() { + @Override + public void addCriteria(DynamicQuery dynamicQuery) { + portletDataContext.addDateRangeCriteria(dynamicQuery, + "modifiedDate"); + } + }); + + exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId()); + + exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod() { + @Override + public void performAction(SyncTracking syncTracking) + throws PortalException { + StagedModelDataHandlerUtil.exportStagedModel(portletDataContext, + syncTracking); + } + }); + exportActionableDynamicQuery.setStagedModelType(new StagedModelType( + PortalUtil.getClassNameId(SyncTracking.class.getName()))); + + return exportActionableDynamicQuery; + } + + /** + * @throws PortalException + */ + @Override + public PersistedModel deletePersistedModel(PersistedModel persistedModel) + throws PortalException { + return syncTrackingLocalService.deleteSyncTracking((SyncTracking)persistedModel); + } + + @Override + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException { + return syncTrackingPersistence.findByPrimaryKey(primaryKeyObj); + } + + /** + * Returns all the sync trackings matching the UUID and company. + * + * @param uuid the UUID of the sync trackings + * @param companyId the primary key of the company + * @return the matching sync trackings, or an empty list if no matches were found + */ + @Override + public List getSyncTrackingsByUuidAndCompanyId(String uuid, + long companyId) { + return syncTrackingPersistence.findByUuid_C(uuid, companyId); + } + + /** + * Returns a range of sync trackings matching the UUID and company. + * + * @param uuid the UUID of the sync trackings + * @param companyId the primary key of the company + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching sync trackings, or an empty list if no matches were found + */ + @Override + public List getSyncTrackingsByUuidAndCompanyId(String uuid, + long companyId, int start, int end, + OrderByComparator orderByComparator) { + return syncTrackingPersistence.findByUuid_C(uuid, companyId, start, + end, orderByComparator); + } + + /** + * Returns the sync tracking matching the UUID and group. + * + * @param uuid the sync tracking's UUID + * @param groupId the primary key of the group + * @return the matching sync tracking + * @throws PortalException if a matching sync tracking could not be found + */ + @Override + public SyncTracking getSyncTrackingByUuidAndGroupId(String uuid, + long groupId) throws PortalException { + return syncTrackingPersistence.findByUUID_G(uuid, groupId); + } + + /** + * Returns a range of all the sync trackings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.adminconfig.model.impl.SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of sync trackings + */ + @Override + public List getSyncTrackings(int start, int end) { + return syncTrackingPersistence.findAll(start, end); + } + + /** + * Returns the number of sync trackings. + * + * @return the number of sync trackings + */ + @Override + public int getSyncTrackingsCount() { + return syncTrackingPersistence.countAll(); + } + + /** + * Updates the sync tracking in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param syncTracking the sync tracking + * @return the sync tracking that was updated + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public SyncTracking updateSyncTracking(SyncTracking syncTracking) { + return syncTrackingPersistence.update(syncTracking); + } + + /** + * Returns the admin config local service. + * + * @return the admin config local service + */ + public org.opencps.adminconfig.service.AdminConfigLocalService getAdminConfigLocalService() { + return adminConfigLocalService; + } + + /** + * Sets the admin config local service. + * + * @param adminConfigLocalService the admin config local service + */ + public void setAdminConfigLocalService( + org.opencps.adminconfig.service.AdminConfigLocalService adminConfigLocalService) { + this.adminConfigLocalService = adminConfigLocalService; + } + + /** + * Returns the admin config persistence. + * + * @return the admin config persistence + */ + public AdminConfigPersistence getAdminConfigPersistence() { + return adminConfigPersistence; + } + + /** + * Sets the admin config persistence. + * + * @param adminConfigPersistence the admin config persistence + */ + public void setAdminConfigPersistence( + AdminConfigPersistence adminConfigPersistence) { + this.adminConfigPersistence = adminConfigPersistence; + } + + /** + * Returns the api manager local service. + * + * @return the api manager local service + */ + public org.opencps.adminconfig.service.ApiManagerLocalService getApiManagerLocalService() { + return apiManagerLocalService; + } + + /** + * Sets the api manager local service. + * + * @param apiManagerLocalService the api manager local service + */ + public void setApiManagerLocalService( + org.opencps.adminconfig.service.ApiManagerLocalService apiManagerLocalService) { + this.apiManagerLocalService = apiManagerLocalService; + } + + /** + * Returns the api manager persistence. + * + * @return the api manager persistence + */ + public ApiManagerPersistence getApiManagerPersistence() { + return apiManagerPersistence; + } + + /** + * Sets the api manager persistence. + * + * @param apiManagerPersistence the api manager persistence + */ + public void setApiManagerPersistence( + ApiManagerPersistence apiManagerPersistence) { + this.apiManagerPersistence = apiManagerPersistence; + } + + /** + * Returns the api role local service. + * + * @return the api role local service + */ + public org.opencps.adminconfig.service.ApiRoleLocalService getApiRoleLocalService() { + return apiRoleLocalService; + } + + /** + * Sets the api role local service. + * + * @param apiRoleLocalService the api role local service + */ + public void setApiRoleLocalService( + org.opencps.adminconfig.service.ApiRoleLocalService apiRoleLocalService) { + this.apiRoleLocalService = apiRoleLocalService; + } + + /** + * Returns the api role persistence. + * + * @return the api role persistence + */ + public ApiRolePersistence getApiRolePersistence() { + return apiRolePersistence; + } + + /** + * Sets the api role persistence. + * + * @param apiRolePersistence the api role persistence + */ + public void setApiRolePersistence(ApiRolePersistence apiRolePersistence) { + this.apiRolePersistence = apiRolePersistence; + } + + /** + * Returns the dynamic report local service. + * + * @return the dynamic report local service + */ + public org.opencps.adminconfig.service.DynamicReportLocalService getDynamicReportLocalService() { + return dynamicReportLocalService; + } + + /** + * Sets the dynamic report local service. + * + * @param dynamicReportLocalService the dynamic report local service + */ + public void setDynamicReportLocalService( + org.opencps.adminconfig.service.DynamicReportLocalService dynamicReportLocalService) { + this.dynamicReportLocalService = dynamicReportLocalService; + } + + /** + * Returns the dynamic report persistence. + * + * @return the dynamic report persistence + */ + public DynamicReportPersistence getDynamicReportPersistence() { + return dynamicReportPersistence; + } + + /** + * Sets the dynamic report persistence. + * + * @param dynamicReportPersistence the dynamic report persistence + */ + public void setDynamicReportPersistence( + DynamicReportPersistence dynamicReportPersistence) { + this.dynamicReportPersistence = dynamicReportPersistence; + } + + /** + * Returns the report role local service. + * + * @return the report role local service + */ + public org.opencps.adminconfig.service.ReportRoleLocalService getReportRoleLocalService() { + return reportRoleLocalService; + } + + /** + * Sets the report role local service. + * + * @param reportRoleLocalService the report role local service + */ + public void setReportRoleLocalService( + org.opencps.adminconfig.service.ReportRoleLocalService reportRoleLocalService) { + this.reportRoleLocalService = reportRoleLocalService; + } + + /** + * Returns the report role persistence. + * + * @return the report role persistence + */ + public ReportRolePersistence getReportRolePersistence() { + return reportRolePersistence; + } + + /** + * Sets the report role persistence. + * + * @param reportRolePersistence the report role persistence + */ + public void setReportRolePersistence( + ReportRolePersistence reportRolePersistence) { + this.reportRolePersistence = reportRolePersistence; + } + + /** + * Returns the sync tracking local service. + * + * @return the sync tracking local service + */ + public SyncTrackingLocalService getSyncTrackingLocalService() { + return syncTrackingLocalService; + } + + /** + * Sets the sync tracking local service. + * + * @param syncTrackingLocalService the sync tracking local service + */ + public void setSyncTrackingLocalService( + SyncTrackingLocalService syncTrackingLocalService) { + this.syncTrackingLocalService = syncTrackingLocalService; + } + + /** + * Returns the sync tracking persistence. + * + * @return the sync tracking persistence + */ + public SyncTrackingPersistence getSyncTrackingPersistence() { + return syncTrackingPersistence; + } + + /** + * Sets the sync tracking persistence. + * + * @param syncTrackingPersistence the sync tracking persistence + */ + public void setSyncTrackingPersistence( + SyncTrackingPersistence syncTrackingPersistence) { + this.syncTrackingPersistence = syncTrackingPersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.kernel.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the class name local service. + * + * @return the class name local service + */ + public com.liferay.portal.kernel.service.ClassNameLocalService getClassNameLocalService() { + return classNameLocalService; + } + + /** + * Sets the class name local service. + * + * @param classNameLocalService the class name local service + */ + public void setClassNameLocalService( + com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService) { + this.classNameLocalService = classNameLocalService; + } + + /** + * Returns the class name persistence. + * + * @return the class name persistence + */ + public ClassNamePersistence getClassNamePersistence() { + return classNamePersistence; + } + + /** + * Sets the class name persistence. + * + * @param classNamePersistence the class name persistence + */ + public void setClassNamePersistence( + ClassNamePersistence classNamePersistence) { + this.classNamePersistence = classNamePersistence; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.kernel.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.kernel.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.kernel.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + persistedModelLocalServiceRegistry.register("org.opencps.adminconfig.model.SyncTracking", + syncTrackingLocalService); + } + + public void destroy() { + persistedModelLocalServiceRegistry.unregister( + "org.opencps.adminconfig.model.SyncTracking"); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + @Override + public String getOSGiServiceIdentifier() { + return SyncTrackingLocalService.class.getName(); + } + + protected Class getModelClass() { + return SyncTracking.class; + } + + protected String getModelClassName() { + return SyncTracking.class.getName(); + } + + /** + * Performs a SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) { + try { + DataSource dataSource = syncTrackingPersistence.getDataSource(); + + DB db = DBManagerUtil.getDB(); + + sql = db.buildSQL(sql); + sql = PortalUtil.transformSQL(sql); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = org.opencps.adminconfig.service.AdminConfigLocalService.class) + protected org.opencps.adminconfig.service.AdminConfigLocalService adminConfigLocalService; + @BeanReference(type = AdminConfigPersistence.class) + protected AdminConfigPersistence adminConfigPersistence; + @BeanReference(type = org.opencps.adminconfig.service.ApiManagerLocalService.class) + protected org.opencps.adminconfig.service.ApiManagerLocalService apiManagerLocalService; + @BeanReference(type = ApiManagerPersistence.class) + protected ApiManagerPersistence apiManagerPersistence; + @BeanReference(type = org.opencps.adminconfig.service.ApiRoleLocalService.class) + protected org.opencps.adminconfig.service.ApiRoleLocalService apiRoleLocalService; + @BeanReference(type = ApiRolePersistence.class) + protected ApiRolePersistence apiRolePersistence; + @BeanReference(type = org.opencps.adminconfig.service.DynamicReportLocalService.class) + protected org.opencps.adminconfig.service.DynamicReportLocalService dynamicReportLocalService; + @BeanReference(type = DynamicReportPersistence.class) + protected DynamicReportPersistence dynamicReportPersistence; + @BeanReference(type = org.opencps.adminconfig.service.ReportRoleLocalService.class) + protected org.opencps.adminconfig.service.ReportRoleLocalService reportRoleLocalService; + @BeanReference(type = ReportRolePersistence.class) + protected ReportRolePersistence reportRolePersistence; + @BeanReference(type = SyncTrackingLocalService.class) + protected SyncTrackingLocalService syncTrackingLocalService; + @BeanReference(type = SyncTrackingPersistence.class) + protected SyncTrackingPersistence syncTrackingPersistence; + @ServiceReference(type = com.liferay.counter.kernel.service.CounterLocalService.class) + protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService; + @ServiceReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class) + protected com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService; + @ServiceReference(type = ClassNamePersistence.class) + protected ClassNamePersistence classNamePersistence; + @ServiceReference(type = com.liferay.portal.kernel.service.ResourceLocalService.class) + protected com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService; + @ServiceReference(type = com.liferay.portal.kernel.service.UserLocalService.class) + protected com.liferay.portal.kernel.service.UserLocalService userLocalService; + @ServiceReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + @ServiceReference(type = PersistedModelLocalServiceRegistry.class) + protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry; +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/impl/ApiManagerLocalServiceImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/impl/ApiManagerLocalServiceImpl.java new file mode 100644 index 0000000000..980a638bb5 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/impl/ApiManagerLocalServiceImpl.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.impl; + +import com.liferay.portal.kernel.util.Validator; + +import java.util.Date; +import java.util.List; + +import org.opencps.adminconfig.model.ApiManager; +import org.opencps.adminconfig.service.base.ApiManagerLocalServiceBaseImpl; + +/** + * The implementation of the api manager local service. + * + *

+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.adminconfig.service.ApiManagerLocalService} interface. + * + *

+ * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. + *

+ * + * @author binhth + * @see ApiManagerLocalServiceBaseImpl + * @see org.opencps.adminconfig.service.ApiManagerLocalServiceUtil + */ +public class ApiManagerLocalServiceImpl extends ApiManagerLocalServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. Always use {@link org.opencps.adminconfig.service.ApiManagerLocalServiceUtil} to access the api manager local service. + */ + + public ApiManager updateApiManager( + long userId, long groupId, long apiManagerId, String apiCode, + String apiDescription, String apiName, int apiStatus, String className) { + ApiManager apiManager = null; + Date now = new Date(); + + if (apiManagerId == 0) { + apiManagerId = counterLocalService.increment(ApiManager.class.getName()); + apiManager = apiManagerPersistence.create(apiManagerId); + + apiManager.setCreateDate(now); + apiManager.setModifiedDate(now); + apiManager.setUserId(userId); + apiManager.setGroupId(groupId); + apiManager.setApiCode(apiCode); + apiManager.setApiDescription(apiDescription); + apiManager.setApiName(apiName); + apiManager.setApiStatus(apiStatus); + apiManager.setClassName(className); + } + else { + apiManager = apiManagerPersistence.fetchByPrimaryKey(apiManagerId); + + apiManager.setModifiedDate(now); + apiManager.setUserId(userId); + apiManager.setGroupId(groupId); + apiManager.setApiCode(apiCode); + apiManager.setApiDescription(apiDescription); + apiManager.setApiName(apiName); + apiManager.setApiStatus(apiStatus); + apiManager.setClassName(className); + } + return apiManagerPersistence.update(apiManager); + } + + public List findByG(long groupId) { + return apiManagerPersistence.findByF_GID(groupId); + } + + public int countByG(long groupId) { + return apiManagerPersistence.countByF_GID(groupId); + } + + public ApiManager findByApiCode(String apiCode) { + ApiManager apiManager = apiManagerPersistence.fetchByF_apiCode(apiCode); + if (Validator.isNull(apiManager)) { + return null; + } + return apiManager; + } +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/impl/ApiRoleLocalServiceImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/impl/ApiRoleLocalServiceImpl.java new file mode 100644 index 0000000000..c1435bf823 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/impl/ApiRoleLocalServiceImpl.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.impl; + +import java.util.Date; +import java.util.List; + +import org.opencps.adminconfig.model.ApiRole; +import org.opencps.adminconfig.service.base.ApiRoleLocalServiceBaseImpl; + +/** + * The implementation of the api role local service. + * + *

+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.adminconfig.service.ApiRoleLocalService} interface. + * + *

+ * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. + *

+ * + * @author binhth + * @see ApiRoleLocalServiceBaseImpl + * @see org.opencps.adminconfig.service.ApiRoleLocalServiceUtil + */ +public class ApiRoleLocalServiceImpl extends ApiRoleLocalServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. Always use {@link org.opencps.adminconfig.service.ApiRoleLocalServiceUtil} to access the api role local service. + */ + + public ApiRole updateApiRole( + long userId, long groupId, long apiRoleId, String apiCode, + long roleId, String roleCode, int apiRoleStatus) { + ApiRole apiRole = null; + Date now = new Date(); + + if (apiRoleId == 0) { + apiRoleId = counterLocalService.increment(ApiRole.class.getName()); + apiRole = apiRolePersistence.create(apiRoleId); + + apiRole.setCreateDate(now); + apiRole.setModifiedDate(now); + apiRole.setUserId(userId); + apiRole.setGroupId(groupId); + apiRole.setApiCode(apiCode); + apiRole.setRoleId((int)roleId); + apiRole.setRoleCode(roleCode); + apiRole.setApiRoleStatus(apiRoleStatus); + } + else { + apiRole = apiRolePersistence.fetchByPrimaryKey(apiRoleId); + + apiRole.setModifiedDate(now); + apiRole.setUserId(userId); + apiRole.setGroupId(groupId); + apiRole.setApiCode(apiCode); + apiRole.setRoleId((int)roleId); + apiRole.setRoleCode(roleCode); + apiRole.setApiRoleStatus(apiRoleStatus); + } + return apiRolePersistence.update(apiRole); + } + + public List findByG(long groupId) { + return apiRolePersistence.findByF_GID(groupId); + } + + public int countByG(long groupId) { + return apiRolePersistence.countByF_GID(groupId); + } +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/impl/SyncTrackingLocalServiceImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/impl/SyncTrackingLocalServiceImpl.java new file mode 100644 index 0000000000..7d2eb4cf3b --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/impl/SyncTrackingLocalServiceImpl.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.impl; + +import com.liferay.portal.kernel.util.Validator; + +import java.util.Date; +import java.util.List; + +import org.opencps.adminconfig.exception.NoSuchSyncTrackingException; +import org.opencps.adminconfig.model.SyncTracking; +import org.opencps.adminconfig.service.base.SyncTrackingLocalServiceBaseImpl; + + +/** + * The implementation of the sync tracking local service. + * + *

+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.adminconfig.service.SyncTrackingLocalService} interface. + * + *

+ * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. + *

+ * + * @author binhth + * @see SyncTrackingLocalServiceBaseImpl + * @see org.opencps.adminconfig.service.SyncTrackingLocalServiceUtil + */ +public class SyncTrackingLocalServiceImpl + extends SyncTrackingLocalServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. Always use {@link org.opencps.adminconfig.service.SyncTrackingLocalServiceUtil} to access the sync tracking local service. + */ + + public SyncTracking updateSyncTracking( + long userId, long groupId, long trackingId, String dossierNo, + String referenceUid, String serviceCode, int stateSync, String api, + String bodyRequest, String bodyResponse) { + SyncTracking syncTracking = null; + Date now = new Date(); + + if (trackingId == 0) { + trackingId = counterLocalService.increment(SyncTracking.class.getName()); + syncTracking = syncTrackingPersistence.create(trackingId); + + syncTracking.setCreateDate(now); + syncTracking.setModifiedDate(now); + syncTracking.setGroupId(groupId); + syncTracking.setUserId(userId); + if(Validator.isNotNull(dossierNo)) { + syncTracking.setDossierNo(dossierNo); + } + + if(Validator.isNotNull(referenceUid)) { + syncTracking.setReferenceUid(referenceUid); + } + + if(Validator.isNotNull(serviceCode)) { + syncTracking.setServiceCode(serviceCode); + } + + if(Validator.isNotNull(stateSync)) { + syncTracking.setStateSync(stateSync); + } + + if(Validator.isNotNull(api)) { + syncTracking.setApi(api); + } + + + if(Validator.isNotNull(bodyRequest)) { + syncTracking.setBodyRequest(bodyRequest); + } + + if(Validator.isNotNull(bodyResponse)) { + syncTracking.setResponse(bodyResponse); + } + } + return syncTrackingPersistence.update(syncTracking); + } + + + public List getByDate(Date fromDate, Date toDate, int start, int end) { + return syncTrackingPersistence.findByF_CREATED_BETWEEN(fromDate, toDate, start, end); + } + + public List getByDossierNoAndDate(String dossierNo, Date fromDate, + Date toDate, int start, int end) { + return syncTrackingPersistence.findByF_DOSSIERNO_CREATED_BETWEEN(dossierNo, fromDate, + toDate, start, end); + } + + public List getByServiceCodeAndDate(String serviceCode, + Date fromDate, Date toDate, int start, int end) { + return syncTrackingPersistence.findByF_SERVICECODE_CREATED_BETWEEN(serviceCode, fromDate, + toDate, start, end); + } + + public List getByDossierNoAndServiceCodeAndDate(String dossierNo, String serviceCode, Date fromDate, + Date toDate, int start, int end) { + return syncTrackingPersistence.findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(serviceCode, + dossierNo, fromDate, toDate, start, end); + } + + public List getByReferenceUidAndDate(String referenceUid, Date fromDate, Date toDate + , int start, int end ) { + return syncTrackingPersistence.findByF_REFERENCE_UID_CREATED_BETWEEN(referenceUid, + fromDate, toDate, start, end); + } + + public SyncTracking getByDossierNo(String dossierNo) { + try { + return syncTrackingPersistence.findByF_DossierNo(dossierNo); + } catch (NoSuchSyncTrackingException e) { + return null; + } + } + + public SyncTracking getByReferenceUid(String referenceUid) { + try { + return syncTrackingPersistence.findByF_ReferenceUid(referenceUid); + } catch (NoSuchSyncTrackingException e) { + return null; + } + } + + + public List getByApiAndServiceCodeAndDossierNoAndDate(String api, + String dossierNo, String serviceCode, Date fromDate, + Date toDate, int start, int end) { + + return syncTrackingPersistence.findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + api, serviceCode, dossierNo, fromDate, toDate, start, end); + } + + public List getByApiAndServiceCodeAndDate(String api, + String serviceCode, Date fromDate, + Date toDate, int start, int end) { + + return syncTrackingPersistence.findByF_API_SERVICECODE_CREATED_BETWEEN( + api, serviceCode, fromDate, toDate, start, end); + } + + public List getByApiAndDossierNoAndDate(String api, + String dossierNo, Date fromDate, + Date toDate, int start, int end) { + + return syncTrackingPersistence.findByF_API_DOSSIERNO_CREATED_BETWEEN( + api, dossierNo, fromDate, toDate, start, end); + } + + public List getByApiAndDate(String api, Date fromDate, + Date toDate, int start, int end) { + try { + return syncTrackingPersistence.findByF_API_CREATED_BETWEEN( + api, fromDate, toDate, start, end); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/persistence/impl/ApiManagerPersistenceImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/persistence/impl/ApiManagerPersistenceImpl.java new file mode 100644 index 0000000000..1348d8048d --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/persistence/impl/ApiManagerPersistenceImpl.java @@ -0,0 +1,1805 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.persistence.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.EntityCache; +import com.liferay.portal.kernel.dao.orm.FinderCache; +import com.liferay.portal.kernel.dao.orm.FinderPath; +import com.liferay.portal.kernel.dao.orm.Query; +import com.liferay.portal.kernel.dao.orm.QueryPos; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.dao.orm.Session; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.service.ServiceContextThreadLocal; +import com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import org.opencps.adminconfig.exception.NoSuchApiManagerException; +import org.opencps.adminconfig.model.ApiManager; +import org.opencps.adminconfig.model.impl.ApiManagerImpl; +import org.opencps.adminconfig.model.impl.ApiManagerModelImpl; +import org.opencps.adminconfig.service.persistence.ApiManagerPersistence; + +import java.io.Serializable; + +import java.lang.reflect.InvocationHandler; + +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * The persistence implementation for the api manager service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author binhth + * @see ApiManagerPersistence + * @see org.opencps.adminconfig.service.persistence.ApiManagerUtil + * @generated + */ +@ProviderType +public class ApiManagerPersistenceImpl extends BasePersistenceImpl + implements ApiManagerPersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link ApiManagerUtil} to access the api manager persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + public static final String FINDER_CLASS_NAME_ENTITY = ApiManagerImpl.class.getName(); + public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List1"; + public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List2"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerModelImpl.FINDER_CACHE_ENABLED, ApiManagerImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerModelImpl.FINDER_CACHE_ENABLED, ApiManagerImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); + public static final FinderPath FINDER_PATH_FETCH_BY_F_ID = new FinderPath(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerModelImpl.FINDER_CACHE_ENABLED, ApiManagerImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByF_ID", + new String[] { Long.class.getName() }, + ApiManagerModelImpl.APIMANAGERID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_ID = new FinderPath(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByF_ID", + new String[] { Long.class.getName() }); + + /** + * Returns the api manager where apiManagerId = ? or throws a {@link NoSuchApiManagerException} if it could not be found. + * + * @param apiManagerId the api manager ID + * @return the matching api manager + * @throws NoSuchApiManagerException if a matching api manager could not be found + */ + @Override + public ApiManager findByF_ID(long apiManagerId) + throws NoSuchApiManagerException { + ApiManager apiManager = fetchByF_ID(apiManagerId); + + if (apiManager == null) { + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("apiManagerId="); + msg.append(apiManagerId); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchApiManagerException(msg.toString()); + } + + return apiManager; + } + + /** + * Returns the api manager where apiManagerId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param apiManagerId the api manager ID + * @return the matching api manager, or null if a matching api manager could not be found + */ + @Override + public ApiManager fetchByF_ID(long apiManagerId) { + return fetchByF_ID(apiManagerId, true); + } + + /** + * Returns the api manager where apiManagerId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param apiManagerId the api manager ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching api manager, or null if a matching api manager could not be found + */ + @Override + public ApiManager fetchByF_ID(long apiManagerId, boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { apiManagerId }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_F_ID, + finderArgs, this); + } + + if (result instanceof ApiManager) { + ApiManager apiManager = (ApiManager)result; + + if ((apiManagerId != apiManager.getApiManagerId())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_SELECT_APIMANAGER_WHERE); + + query.append(_FINDER_COLUMN_F_ID_APIMANAGERID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(apiManagerId); + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_F_ID, + finderArgs, list); + } + else { + if (list.size() > 1) { + Collections.sort(list, Collections.reverseOrder()); + + if (_log.isWarnEnabled()) { + _log.warn( + "ApiManagerPersistenceImpl.fetchByF_ID(long, boolean) with parameters (" + + StringUtil.merge(finderArgs) + + ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); + } + } + + ApiManager apiManager = list.get(0); + + result = apiManager; + + cacheResult(apiManager); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_ID, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (ApiManager)result; + } + } + + /** + * Removes the api manager where apiManagerId = ? from the database. + * + * @param apiManagerId the api manager ID + * @return the api manager that was removed + */ + @Override + public ApiManager removeByF_ID(long apiManagerId) + throws NoSuchApiManagerException { + ApiManager apiManager = findByF_ID(apiManagerId); + + return remove(apiManager); + } + + /** + * Returns the number of api managers where apiManagerId = ?. + * + * @param apiManagerId the api manager ID + * @return the number of matching api managers + */ + @Override + public int countByF_ID(long apiManagerId) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_ID; + + Object[] finderArgs = new Object[] { apiManagerId }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_APIMANAGER_WHERE); + + query.append(_FINDER_COLUMN_F_ID_APIMANAGERID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(apiManagerId); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_ID_APIMANAGERID_2 = "apiManager.apiManagerId = ?"; + public static final FinderPath FINDER_PATH_FETCH_BY_F_APICODE = new FinderPath(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerModelImpl.FINDER_CACHE_ENABLED, ApiManagerImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByF_apiCode", + new String[] { String.class.getName() }, + ApiManagerModelImpl.APICODE_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_APICODE = new FinderPath(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByF_apiCode", + new String[] { String.class.getName() }); + + /** + * Returns the api manager where apiCode = ? or throws a {@link NoSuchApiManagerException} if it could not be found. + * + * @param apiCode the api code + * @return the matching api manager + * @throws NoSuchApiManagerException if a matching api manager could not be found + */ + @Override + public ApiManager findByF_apiCode(String apiCode) + throws NoSuchApiManagerException { + ApiManager apiManager = fetchByF_apiCode(apiCode); + + if (apiManager == null) { + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("apiCode="); + msg.append(apiCode); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchApiManagerException(msg.toString()); + } + + return apiManager; + } + + /** + * Returns the api manager where apiCode = ? or returns null if it could not be found. Uses the finder cache. + * + * @param apiCode the api code + * @return the matching api manager, or null if a matching api manager could not be found + */ + @Override + public ApiManager fetchByF_apiCode(String apiCode) { + return fetchByF_apiCode(apiCode, true); + } + + /** + * Returns the api manager where apiCode = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param apiCode the api code + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching api manager, or null if a matching api manager could not be found + */ + @Override + public ApiManager fetchByF_apiCode(String apiCode, boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { apiCode }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_F_APICODE, + finderArgs, this); + } + + if (result instanceof ApiManager) { + ApiManager apiManager = (ApiManager)result; + + if (!Objects.equals(apiCode, apiManager.getApiCode())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_SELECT_APIMANAGER_WHERE); + + boolean bindApiCode = false; + + if (apiCode == null) { + query.append(_FINDER_COLUMN_F_APICODE_APICODE_1); + } + else if (apiCode.equals("")) { + query.append(_FINDER_COLUMN_F_APICODE_APICODE_3); + } + else { + bindApiCode = true; + + query.append(_FINDER_COLUMN_F_APICODE_APICODE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindApiCode) { + qPos.add(apiCode); + } + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_F_APICODE, + finderArgs, list); + } + else { + if (list.size() > 1) { + Collections.sort(list, Collections.reverseOrder()); + + if (_log.isWarnEnabled()) { + _log.warn( + "ApiManagerPersistenceImpl.fetchByF_apiCode(String, boolean) with parameters (" + + StringUtil.merge(finderArgs) + + ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); + } + } + + ApiManager apiManager = list.get(0); + + result = apiManager; + + cacheResult(apiManager); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_APICODE, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (ApiManager)result; + } + } + + /** + * Removes the api manager where apiCode = ? from the database. + * + * @param apiCode the api code + * @return the api manager that was removed + */ + @Override + public ApiManager removeByF_apiCode(String apiCode) + throws NoSuchApiManagerException { + ApiManager apiManager = findByF_apiCode(apiCode); + + return remove(apiManager); + } + + /** + * Returns the number of api managers where apiCode = ?. + * + * @param apiCode the api code + * @return the number of matching api managers + */ + @Override + public int countByF_apiCode(String apiCode) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_APICODE; + + Object[] finderArgs = new Object[] { apiCode }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_APIMANAGER_WHERE); + + boolean bindApiCode = false; + + if (apiCode == null) { + query.append(_FINDER_COLUMN_F_APICODE_APICODE_1); + } + else if (apiCode.equals("")) { + query.append(_FINDER_COLUMN_F_APICODE_APICODE_3); + } + else { + bindApiCode = true; + + query.append(_FINDER_COLUMN_F_APICODE_APICODE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindApiCode) { + qPos.add(apiCode); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_APICODE_APICODE_1 = "apiManager.apiCode IS NULL"; + private static final String _FINDER_COLUMN_F_APICODE_APICODE_2 = "apiManager.apiCode = ?"; + private static final String _FINDER_COLUMN_F_APICODE_APICODE_3 = "(apiManager.apiCode IS NULL OR apiManager.apiCode = '')"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_GID = new FinderPath(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerModelImpl.FINDER_CACHE_ENABLED, ApiManagerImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByF_GID", + new String[] { + Long.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_GID = new FinderPath(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerModelImpl.FINDER_CACHE_ENABLED, ApiManagerImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByF_GID", + new String[] { Long.class.getName() }, + ApiManagerModelImpl.GROUPID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_GID = new FinderPath(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByF_GID", + new String[] { Long.class.getName() }); + + /** + * Returns all the api managers where groupId = ?. + * + * @param groupId the group ID + * @return the matching api managers + */ + @Override + public List findByF_GID(long groupId) { + return findByF_GID(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the api managers where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @return the range of matching api managers + */ + @Override + public List findByF_GID(long groupId, int start, int end) { + return findByF_GID(groupId, start, end, null); + } + + /** + * Returns an ordered range of all the api managers where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching api managers + */ + @Override + public List findByF_GID(long groupId, int start, int end, + OrderByComparator orderByComparator) { + return findByF_GID(groupId, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the api managers where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching api managers + */ + @Override + public List findByF_GID(long groupId, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_GID; + finderArgs = new Object[] { groupId }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_GID; + finderArgs = new Object[] { groupId, start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (ApiManager apiManager : list) { + if ((groupId != apiManager.getGroupId())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(3 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_APIMANAGER_WHERE); + + query.append(_FINDER_COLUMN_F_GID_GROUPID_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(ApiManagerModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first api manager in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching api manager + * @throws NoSuchApiManagerException if a matching api manager could not be found + */ + @Override + public ApiManager findByF_GID_First(long groupId, + OrderByComparator orderByComparator) + throws NoSuchApiManagerException { + ApiManager apiManager = fetchByF_GID_First(groupId, orderByComparator); + + if (apiManager != null) { + return apiManager; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append("}"); + + throw new NoSuchApiManagerException(msg.toString()); + } + + /** + * Returns the first api manager in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching api manager, or null if a matching api manager could not be found + */ + @Override + public ApiManager fetchByF_GID_First(long groupId, + OrderByComparator orderByComparator) { + List list = findByF_GID(groupId, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last api manager in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching api manager + * @throws NoSuchApiManagerException if a matching api manager could not be found + */ + @Override + public ApiManager findByF_GID_Last(long groupId, + OrderByComparator orderByComparator) + throws NoSuchApiManagerException { + ApiManager apiManager = fetchByF_GID_Last(groupId, orderByComparator); + + if (apiManager != null) { + return apiManager; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append("}"); + + throw new NoSuchApiManagerException(msg.toString()); + } + + /** + * Returns the last api manager in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching api manager, or null if a matching api manager could not be found + */ + @Override + public ApiManager fetchByF_GID_Last(long groupId, + OrderByComparator orderByComparator) { + int count = countByF_GID(groupId); + + if (count == 0) { + return null; + } + + List list = findByF_GID(groupId, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the api managers before and after the current api manager in the ordered set where groupId = ?. + * + * @param apiManagerId the primary key of the current api manager + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next api manager + * @throws NoSuchApiManagerException if a api manager with the primary key could not be found + */ + @Override + public ApiManager[] findByF_GID_PrevAndNext(long apiManagerId, + long groupId, OrderByComparator orderByComparator) + throws NoSuchApiManagerException { + ApiManager apiManager = findByPrimaryKey(apiManagerId); + + Session session = null; + + try { + session = openSession(); + + ApiManager[] array = new ApiManagerImpl[3]; + + array[0] = getByF_GID_PrevAndNext(session, apiManager, groupId, + orderByComparator, true); + + array[1] = apiManager; + + array[2] = getByF_GID_PrevAndNext(session, apiManager, groupId, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected ApiManager getByF_GID_PrevAndNext(Session session, + ApiManager apiManager, long groupId, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_APIMANAGER_WHERE); + + query.append(_FINDER_COLUMN_F_GID_GROUPID_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(ApiManagerModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(apiManager); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the api managers where groupId = ? from the database. + * + * @param groupId the group ID + */ + @Override + public void removeByF_GID(long groupId) { + for (ApiManager apiManager : findByF_GID(groupId, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(apiManager); + } + } + + /** + * Returns the number of api managers where groupId = ?. + * + * @param groupId the group ID + * @return the number of matching api managers + */ + @Override + public int countByF_GID(long groupId) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_GID; + + Object[] finderArgs = new Object[] { groupId }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_APIMANAGER_WHERE); + + query.append(_FINDER_COLUMN_F_GID_GROUPID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_GID_GROUPID_2 = "apiManager.groupId = ?"; + + public ApiManagerPersistenceImpl() { + setModelClass(ApiManager.class); + } + + /** + * Caches the api manager in the entity cache if it is enabled. + * + * @param apiManager the api manager + */ + @Override + public void cacheResult(ApiManager apiManager) { + entityCache.putResult(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerImpl.class, apiManager.getPrimaryKey(), apiManager); + + finderCache.putResult(FINDER_PATH_FETCH_BY_F_ID, + new Object[] { apiManager.getApiManagerId() }, apiManager); + + finderCache.putResult(FINDER_PATH_FETCH_BY_F_APICODE, + new Object[] { apiManager.getApiCode() }, apiManager); + + apiManager.resetOriginalValues(); + } + + /** + * Caches the api managers in the entity cache if it is enabled. + * + * @param apiManagers the api managers + */ + @Override + public void cacheResult(List apiManagers) { + for (ApiManager apiManager : apiManagers) { + if (entityCache.getResult( + ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerImpl.class, apiManager.getPrimaryKey()) == null) { + cacheResult(apiManager); + } + else { + apiManager.resetOriginalValues(); + } + } + } + + /** + * Clears the cache for all api managers. + * + *

+ * The {@link EntityCache} and {@link FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache() { + entityCache.clearCache(ApiManagerImpl.class); + + finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + /** + * Clears the cache for the api manager. + * + *

+ * The {@link EntityCache} and {@link FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache(ApiManager apiManager) { + entityCache.removeResult(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerImpl.class, apiManager.getPrimaryKey()); + + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + clearUniqueFindersCache((ApiManagerModelImpl)apiManager, true); + } + + @Override + public void clearCache(List apiManagers) { + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + for (ApiManager apiManager : apiManagers) { + entityCache.removeResult(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerImpl.class, apiManager.getPrimaryKey()); + + clearUniqueFindersCache((ApiManagerModelImpl)apiManager, true); + } + } + + protected void cacheUniqueFindersCache( + ApiManagerModelImpl apiManagerModelImpl) { + Object[] args = new Object[] { apiManagerModelImpl.getApiManagerId() }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_F_ID, args, Long.valueOf(1), + false); + finderCache.putResult(FINDER_PATH_FETCH_BY_F_ID, args, + apiManagerModelImpl, false); + + args = new Object[] { apiManagerModelImpl.getApiCode() }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_F_APICODE, args, + Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_F_APICODE, args, + apiManagerModelImpl, false); + } + + protected void clearUniqueFindersCache( + ApiManagerModelImpl apiManagerModelImpl, boolean clearCurrent) { + if (clearCurrent) { + Object[] args = new Object[] { apiManagerModelImpl.getApiManagerId() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_ID, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_ID, args); + } + + if ((apiManagerModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_F_ID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + apiManagerModelImpl.getOriginalApiManagerId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_ID, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_ID, args); + } + + if (clearCurrent) { + Object[] args = new Object[] { apiManagerModelImpl.getApiCode() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_APICODE, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_APICODE, args); + } + + if ((apiManagerModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_F_APICODE.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + apiManagerModelImpl.getOriginalApiCode() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_APICODE, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_APICODE, args); + } + } + + /** + * Creates a new api manager with the primary key. Does not add the api manager to the database. + * + * @param apiManagerId the primary key for the new api manager + * @return the new api manager + */ + @Override + public ApiManager create(long apiManagerId) { + ApiManager apiManager = new ApiManagerImpl(); + + apiManager.setNew(true); + apiManager.setPrimaryKey(apiManagerId); + + return apiManager; + } + + /** + * Removes the api manager with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager that was removed + * @throws NoSuchApiManagerException if a api manager with the primary key could not be found + */ + @Override + public ApiManager remove(long apiManagerId) + throws NoSuchApiManagerException { + return remove((Serializable)apiManagerId); + } + + /** + * Removes the api manager with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param primaryKey the primary key of the api manager + * @return the api manager that was removed + * @throws NoSuchApiManagerException if a api manager with the primary key could not be found + */ + @Override + public ApiManager remove(Serializable primaryKey) + throws NoSuchApiManagerException { + Session session = null; + + try { + session = openSession(); + + ApiManager apiManager = (ApiManager)session.get(ApiManagerImpl.class, + primaryKey); + + if (apiManager == null) { + if (_log.isDebugEnabled()) { + _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchApiManagerException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return remove(apiManager); + } + catch (NoSuchApiManagerException nsee) { + throw nsee; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + @Override + protected ApiManager removeImpl(ApiManager apiManager) { + Session session = null; + + try { + session = openSession(); + + if (!session.contains(apiManager)) { + apiManager = (ApiManager)session.get(ApiManagerImpl.class, + apiManager.getPrimaryKeyObj()); + } + + if (apiManager != null) { + session.delete(apiManager); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + if (apiManager != null) { + clearCache(apiManager); + } + + return apiManager; + } + + @Override + public ApiManager updateImpl(ApiManager apiManager) { + boolean isNew = apiManager.isNew(); + + if (!(apiManager instanceof ApiManagerModelImpl)) { + InvocationHandler invocationHandler = null; + + if (ProxyUtil.isProxyClass(apiManager.getClass())) { + invocationHandler = ProxyUtil.getInvocationHandler(apiManager); + + throw new IllegalArgumentException( + "Implement ModelWrapper in apiManager proxy " + + invocationHandler.getClass()); + } + + throw new IllegalArgumentException( + "Implement ModelWrapper in custom ApiManager implementation " + + apiManager.getClass()); + } + + ApiManagerModelImpl apiManagerModelImpl = (ApiManagerModelImpl)apiManager; + + ServiceContext serviceContext = ServiceContextThreadLocal.getServiceContext(); + + Date now = new Date(); + + if (isNew && (apiManager.getCreateDate() == null)) { + if (serviceContext == null) { + apiManager.setCreateDate(now); + } + else { + apiManager.setCreateDate(serviceContext.getCreateDate(now)); + } + } + + if (!apiManagerModelImpl.hasSetModifiedDate()) { + if (serviceContext == null) { + apiManager.setModifiedDate(now); + } + else { + apiManager.setModifiedDate(serviceContext.getModifiedDate(now)); + } + } + + Session session = null; + + try { + session = openSession(); + + if (apiManager.isNew()) { + session.save(apiManager); + + apiManager.setNew(false); + } + else { + apiManager = (ApiManager)session.merge(apiManager); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + + if (!ApiManagerModelImpl.COLUMN_BITMASK_ENABLED) { + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + else + if (isNew) { + Object[] args = new Object[] { apiManagerModelImpl.getGroupId() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_GID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_GID, + args); + + finderCache.removeResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL, + FINDER_ARGS_EMPTY); + } + + else { + if ((apiManagerModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_GID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + apiManagerModelImpl.getOriginalGroupId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_GID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_GID, + args); + + args = new Object[] { apiManagerModelImpl.getGroupId() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_GID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_GID, + args); + } + } + + entityCache.putResult(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerImpl.class, apiManager.getPrimaryKey(), apiManager, false); + + clearUniqueFindersCache(apiManagerModelImpl, false); + cacheUniqueFindersCache(apiManagerModelImpl); + + apiManager.resetOriginalValues(); + + return apiManager; + } + + /** + * Returns the api manager with the primary key or throws a {@link com.liferay.portal.kernel.exception.NoSuchModelException} if it could not be found. + * + * @param primaryKey the primary key of the api manager + * @return the api manager + * @throws NoSuchApiManagerException if a api manager with the primary key could not be found + */ + @Override + public ApiManager findByPrimaryKey(Serializable primaryKey) + throws NoSuchApiManagerException { + ApiManager apiManager = fetchByPrimaryKey(primaryKey); + + if (apiManager == null) { + if (_log.isDebugEnabled()) { + _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchApiManagerException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return apiManager; + } + + /** + * Returns the api manager with the primary key or throws a {@link NoSuchApiManagerException} if it could not be found. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager + * @throws NoSuchApiManagerException if a api manager with the primary key could not be found + */ + @Override + public ApiManager findByPrimaryKey(long apiManagerId) + throws NoSuchApiManagerException { + return findByPrimaryKey((Serializable)apiManagerId); + } + + /** + * Returns the api manager with the primary key or returns null if it could not be found. + * + * @param primaryKey the primary key of the api manager + * @return the api manager, or null if a api manager with the primary key could not be found + */ + @Override + public ApiManager fetchByPrimaryKey(Serializable primaryKey) { + Serializable serializable = entityCache.getResult(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerImpl.class, primaryKey); + + if (serializable == nullModel) { + return null; + } + + ApiManager apiManager = (ApiManager)serializable; + + if (apiManager == null) { + Session session = null; + + try { + session = openSession(); + + apiManager = (ApiManager)session.get(ApiManagerImpl.class, + primaryKey); + + if (apiManager != null) { + cacheResult(apiManager); + } + else { + entityCache.putResult(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerImpl.class, primaryKey, nullModel); + } + } + catch (Exception e) { + entityCache.removeResult(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerImpl.class, primaryKey); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return apiManager; + } + + /** + * Returns the api manager with the primary key or returns null if it could not be found. + * + * @param apiManagerId the primary key of the api manager + * @return the api manager, or null if a api manager with the primary key could not be found + */ + @Override + public ApiManager fetchByPrimaryKey(long apiManagerId) { + return fetchByPrimaryKey((Serializable)apiManagerId); + } + + @Override + public Map fetchByPrimaryKeys( + Set primaryKeys) { + if (primaryKeys.isEmpty()) { + return Collections.emptyMap(); + } + + Map map = new HashMap(); + + if (primaryKeys.size() == 1) { + Iterator iterator = primaryKeys.iterator(); + + Serializable primaryKey = iterator.next(); + + ApiManager apiManager = fetchByPrimaryKey(primaryKey); + + if (apiManager != null) { + map.put(primaryKey, apiManager); + } + + return map; + } + + Set uncachedPrimaryKeys = null; + + for (Serializable primaryKey : primaryKeys) { + Serializable serializable = entityCache.getResult(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerImpl.class, primaryKey); + + if (serializable != nullModel) { + if (serializable == null) { + if (uncachedPrimaryKeys == null) { + uncachedPrimaryKeys = new HashSet(); + } + + uncachedPrimaryKeys.add(primaryKey); + } + else { + map.put(primaryKey, (ApiManager)serializable); + } + } + } + + if (uncachedPrimaryKeys == null) { + return map; + } + + StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) + + 1); + + query.append(_SQL_SELECT_APIMANAGER_WHERE_PKS_IN); + + for (Serializable primaryKey : uncachedPrimaryKeys) { + query.append((long)primaryKey); + + query.append(","); + } + + query.setIndex(query.index() - 1); + + query.append(")"); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + for (ApiManager apiManager : (List)q.list()) { + map.put(apiManager.getPrimaryKeyObj(), apiManager); + + cacheResult(apiManager); + + uncachedPrimaryKeys.remove(apiManager.getPrimaryKeyObj()); + } + + for (Serializable primaryKey : uncachedPrimaryKeys) { + entityCache.putResult(ApiManagerModelImpl.ENTITY_CACHE_ENABLED, + ApiManagerImpl.class, primaryKey, nullModel); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + return map; + } + + /** + * Returns all the api managers. + * + * @return the api managers + */ + @Override + public List findAll() { + return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the api managers. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @return the range of api managers + */ + @Override + public List findAll(int start, int end) { + return findAll(start, end, null); + } + + /** + * Returns an ordered range of all the api managers. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of api managers + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator) { + return findAll(start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the api managers. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiManagerModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api managers + * @param end the upper bound of the range of api managers (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of api managers + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL; + finderArgs = FINDER_ARGS_EMPTY; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL; + finderArgs = new Object[] { start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + } + + if (list == null) { + StringBundler query = null; + String sql = null; + + if (orderByComparator != null) { + query = new StringBundler(2 + + (orderByComparator.getOrderByFields().length * 2)); + + query.append(_SQL_SELECT_APIMANAGER); + + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + + sql = query.toString(); + } + else { + sql = _SQL_SELECT_APIMANAGER; + + if (pagination) { + sql = sql.concat(ApiManagerModelImpl.ORDER_BY_JPQL); + } + } + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Removes all the api managers from the database. + * + */ + @Override + public void removeAll() { + for (ApiManager apiManager : findAll()) { + remove(apiManager); + } + } + + /** + * Returns the number of api managers. + * + * @return the number of api managers + */ + @Override + public int countAll() { + Long count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, this); + + if (count == null) { + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(_SQL_COUNT_APIMANAGER); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY, + count); + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + @Override + protected Map getTableColumnsMap() { + return ApiManagerModelImpl.TABLE_COLUMNS_MAP; + } + + /** + * Initializes the api manager persistence. + */ + public void afterPropertiesSet() { + } + + public void destroy() { + entityCache.removeCache(ApiManagerImpl.class.getName()); + finderCache.removeCache(FINDER_CLASS_NAME_ENTITY); + finderCache.removeCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + @ServiceReference(type = EntityCache.class) + protected EntityCache entityCache; + @ServiceReference(type = FinderCache.class) + protected FinderCache finderCache; + private static final String _SQL_SELECT_APIMANAGER = "SELECT apiManager FROM ApiManager apiManager"; + private static final String _SQL_SELECT_APIMANAGER_WHERE_PKS_IN = "SELECT apiManager FROM ApiManager apiManager WHERE apiManagerId IN ("; + private static final String _SQL_SELECT_APIMANAGER_WHERE = "SELECT apiManager FROM ApiManager apiManager WHERE "; + private static final String _SQL_COUNT_APIMANAGER = "SELECT COUNT(apiManager) FROM ApiManager apiManager"; + private static final String _SQL_COUNT_APIMANAGER_WHERE = "SELECT COUNT(apiManager) FROM ApiManager apiManager WHERE "; + private static final String _ORDER_BY_ENTITY_ALIAS = "apiManager."; + private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No ApiManager exists with the primary key "; + private static final String _NO_SUCH_ENTITY_WITH_KEY = "No ApiManager exists with the key {"; + private static final Log _log = LogFactoryUtil.getLog(ApiManagerPersistenceImpl.class); +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/persistence/impl/ApiRolePersistenceImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/persistence/impl/ApiRolePersistenceImpl.java new file mode 100644 index 0000000000..cec2616fd1 --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/persistence/impl/ApiRolePersistenceImpl.java @@ -0,0 +1,1792 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.persistence.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.EntityCache; +import com.liferay.portal.kernel.dao.orm.FinderCache; +import com.liferay.portal.kernel.dao.orm.FinderPath; +import com.liferay.portal.kernel.dao.orm.Query; +import com.liferay.portal.kernel.dao.orm.QueryPos; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.dao.orm.Session; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.service.ServiceContextThreadLocal; +import com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import org.opencps.adminconfig.exception.NoSuchApiRoleException; +import org.opencps.adminconfig.model.ApiRole; +import org.opencps.adminconfig.model.impl.ApiRoleImpl; +import org.opencps.adminconfig.model.impl.ApiRoleModelImpl; +import org.opencps.adminconfig.service.persistence.ApiRolePersistence; + +import java.io.Serializable; + +import java.lang.reflect.InvocationHandler; + +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * The persistence implementation for the api role service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author binhth + * @see ApiRolePersistence + * @see org.opencps.adminconfig.service.persistence.ApiRoleUtil + * @generated + */ +@ProviderType +public class ApiRolePersistenceImpl extends BasePersistenceImpl + implements ApiRolePersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link ApiRoleUtil} to access the api role persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + public static final String FINDER_CLASS_NAME_ENTITY = ApiRoleImpl.class.getName(); + public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List1"; + public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List2"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleModelImpl.FINDER_CACHE_ENABLED, ApiRoleImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleModelImpl.FINDER_CACHE_ENABLED, ApiRoleImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); + public static final FinderPath FINDER_PATH_FETCH_BY_F_ID = new FinderPath(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleModelImpl.FINDER_CACHE_ENABLED, ApiRoleImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByF_ID", + new String[] { Long.class.getName() }, + ApiRoleModelImpl.APIROLEID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_ID = new FinderPath(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByF_ID", + new String[] { Long.class.getName() }); + + /** + * Returns the api role where apiRoleId = ? or throws a {@link NoSuchApiRoleException} if it could not be found. + * + * @param apiRoleId the api role ID + * @return the matching api role + * @throws NoSuchApiRoleException if a matching api role could not be found + */ + @Override + public ApiRole findByF_ID(long apiRoleId) throws NoSuchApiRoleException { + ApiRole apiRole = fetchByF_ID(apiRoleId); + + if (apiRole == null) { + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("apiRoleId="); + msg.append(apiRoleId); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchApiRoleException(msg.toString()); + } + + return apiRole; + } + + /** + * Returns the api role where apiRoleId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param apiRoleId the api role ID + * @return the matching api role, or null if a matching api role could not be found + */ + @Override + public ApiRole fetchByF_ID(long apiRoleId) { + return fetchByF_ID(apiRoleId, true); + } + + /** + * Returns the api role where apiRoleId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param apiRoleId the api role ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching api role, or null if a matching api role could not be found + */ + @Override + public ApiRole fetchByF_ID(long apiRoleId, boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { apiRoleId }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_F_ID, + finderArgs, this); + } + + if (result instanceof ApiRole) { + ApiRole apiRole = (ApiRole)result; + + if ((apiRoleId != apiRole.getApiRoleId())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_SELECT_APIROLE_WHERE); + + query.append(_FINDER_COLUMN_F_ID_APIROLEID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(apiRoleId); + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_F_ID, + finderArgs, list); + } + else { + if (list.size() > 1) { + Collections.sort(list, Collections.reverseOrder()); + + if (_log.isWarnEnabled()) { + _log.warn( + "ApiRolePersistenceImpl.fetchByF_ID(long, boolean) with parameters (" + + StringUtil.merge(finderArgs) + + ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); + } + } + + ApiRole apiRole = list.get(0); + + result = apiRole; + + cacheResult(apiRole); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_ID, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (ApiRole)result; + } + } + + /** + * Removes the api role where apiRoleId = ? from the database. + * + * @param apiRoleId the api role ID + * @return the api role that was removed + */ + @Override + public ApiRole removeByF_ID(long apiRoleId) throws NoSuchApiRoleException { + ApiRole apiRole = findByF_ID(apiRoleId); + + return remove(apiRole); + } + + /** + * Returns the number of api roles where apiRoleId = ?. + * + * @param apiRoleId the api role ID + * @return the number of matching api roles + */ + @Override + public int countByF_ID(long apiRoleId) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_ID; + + Object[] finderArgs = new Object[] { apiRoleId }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_APIROLE_WHERE); + + query.append(_FINDER_COLUMN_F_ID_APIROLEID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(apiRoleId); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_ID_APIROLEID_2 = "apiRole.apiRoleId = ?"; + public static final FinderPath FINDER_PATH_FETCH_BY_F_ROLECODE = new FinderPath(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleModelImpl.FINDER_CACHE_ENABLED, ApiRoleImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByF_roleCode", + new String[] { String.class.getName() }, + ApiRoleModelImpl.ROLECODE_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_ROLECODE = new FinderPath(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByF_roleCode", + new String[] { String.class.getName() }); + + /** + * Returns the api role where roleCode = ? or throws a {@link NoSuchApiRoleException} if it could not be found. + * + * @param roleCode the role code + * @return the matching api role + * @throws NoSuchApiRoleException if a matching api role could not be found + */ + @Override + public ApiRole findByF_roleCode(String roleCode) + throws NoSuchApiRoleException { + ApiRole apiRole = fetchByF_roleCode(roleCode); + + if (apiRole == null) { + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("roleCode="); + msg.append(roleCode); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchApiRoleException(msg.toString()); + } + + return apiRole; + } + + /** + * Returns the api role where roleCode = ? or returns null if it could not be found. Uses the finder cache. + * + * @param roleCode the role code + * @return the matching api role, or null if a matching api role could not be found + */ + @Override + public ApiRole fetchByF_roleCode(String roleCode) { + return fetchByF_roleCode(roleCode, true); + } + + /** + * Returns the api role where roleCode = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param roleCode the role code + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching api role, or null if a matching api role could not be found + */ + @Override + public ApiRole fetchByF_roleCode(String roleCode, boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { roleCode }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_F_ROLECODE, + finderArgs, this); + } + + if (result instanceof ApiRole) { + ApiRole apiRole = (ApiRole)result; + + if (!Objects.equals(roleCode, apiRole.getRoleCode())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_SELECT_APIROLE_WHERE); + + boolean bindRoleCode = false; + + if (roleCode == null) { + query.append(_FINDER_COLUMN_F_ROLECODE_ROLECODE_1); + } + else if (roleCode.equals("")) { + query.append(_FINDER_COLUMN_F_ROLECODE_ROLECODE_3); + } + else { + bindRoleCode = true; + + query.append(_FINDER_COLUMN_F_ROLECODE_ROLECODE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindRoleCode) { + qPos.add(roleCode); + } + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_F_ROLECODE, + finderArgs, list); + } + else { + if (list.size() > 1) { + Collections.sort(list, Collections.reverseOrder()); + + if (_log.isWarnEnabled()) { + _log.warn( + "ApiRolePersistenceImpl.fetchByF_roleCode(String, boolean) with parameters (" + + StringUtil.merge(finderArgs) + + ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); + } + } + + ApiRole apiRole = list.get(0); + + result = apiRole; + + cacheResult(apiRole); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_ROLECODE, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (ApiRole)result; + } + } + + /** + * Removes the api role where roleCode = ? from the database. + * + * @param roleCode the role code + * @return the api role that was removed + */ + @Override + public ApiRole removeByF_roleCode(String roleCode) + throws NoSuchApiRoleException { + ApiRole apiRole = findByF_roleCode(roleCode); + + return remove(apiRole); + } + + /** + * Returns the number of api roles where roleCode = ?. + * + * @param roleCode the role code + * @return the number of matching api roles + */ + @Override + public int countByF_roleCode(String roleCode) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_ROLECODE; + + Object[] finderArgs = new Object[] { roleCode }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_APIROLE_WHERE); + + boolean bindRoleCode = false; + + if (roleCode == null) { + query.append(_FINDER_COLUMN_F_ROLECODE_ROLECODE_1); + } + else if (roleCode.equals("")) { + query.append(_FINDER_COLUMN_F_ROLECODE_ROLECODE_3); + } + else { + bindRoleCode = true; + + query.append(_FINDER_COLUMN_F_ROLECODE_ROLECODE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindRoleCode) { + qPos.add(roleCode); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_ROLECODE_ROLECODE_1 = "apiRole.roleCode IS NULL"; + private static final String _FINDER_COLUMN_F_ROLECODE_ROLECODE_2 = "apiRole.roleCode = ?"; + private static final String _FINDER_COLUMN_F_ROLECODE_ROLECODE_3 = "(apiRole.roleCode IS NULL OR apiRole.roleCode = '')"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_GID = new FinderPath(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleModelImpl.FINDER_CACHE_ENABLED, ApiRoleImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByF_GID", + new String[] { + Long.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_GID = new FinderPath(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleModelImpl.FINDER_CACHE_ENABLED, ApiRoleImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByF_GID", + new String[] { Long.class.getName() }, + ApiRoleModelImpl.GROUPID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_GID = new FinderPath(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByF_GID", + new String[] { Long.class.getName() }); + + /** + * Returns all the api roles where groupId = ?. + * + * @param groupId the group ID + * @return the matching api roles + */ + @Override + public List findByF_GID(long groupId) { + return findByF_GID(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the api roles where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @return the range of matching api roles + */ + @Override + public List findByF_GID(long groupId, int start, int end) { + return findByF_GID(groupId, start, end, null); + } + + /** + * Returns an ordered range of all the api roles where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching api roles + */ + @Override + public List findByF_GID(long groupId, int start, int end, + OrderByComparator orderByComparator) { + return findByF_GID(groupId, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the api roles where groupId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching api roles + */ + @Override + public List findByF_GID(long groupId, int start, int end, + OrderByComparator orderByComparator, boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_GID; + finderArgs = new Object[] { groupId }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_GID; + finderArgs = new Object[] { groupId, start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, finderArgs, + this); + + if ((list != null) && !list.isEmpty()) { + for (ApiRole apiRole : list) { + if ((groupId != apiRole.getGroupId())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(3 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_APIROLE_WHERE); + + query.append(_FINDER_COLUMN_F_GID_GROUPID_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(ApiRoleModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first api role in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching api role + * @throws NoSuchApiRoleException if a matching api role could not be found + */ + @Override + public ApiRole findByF_GID_First(long groupId, + OrderByComparator orderByComparator) + throws NoSuchApiRoleException { + ApiRole apiRole = fetchByF_GID_First(groupId, orderByComparator); + + if (apiRole != null) { + return apiRole; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append("}"); + + throw new NoSuchApiRoleException(msg.toString()); + } + + /** + * Returns the first api role in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching api role, or null if a matching api role could not be found + */ + @Override + public ApiRole fetchByF_GID_First(long groupId, + OrderByComparator orderByComparator) { + List list = findByF_GID(groupId, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last api role in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching api role + * @throws NoSuchApiRoleException if a matching api role could not be found + */ + @Override + public ApiRole findByF_GID_Last(long groupId, + OrderByComparator orderByComparator) + throws NoSuchApiRoleException { + ApiRole apiRole = fetchByF_GID_Last(groupId, orderByComparator); + + if (apiRole != null) { + return apiRole; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append("}"); + + throw new NoSuchApiRoleException(msg.toString()); + } + + /** + * Returns the last api role in the ordered set where groupId = ?. + * + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching api role, or null if a matching api role could not be found + */ + @Override + public ApiRole fetchByF_GID_Last(long groupId, + OrderByComparator orderByComparator) { + int count = countByF_GID(groupId); + + if (count == 0) { + return null; + } + + List list = findByF_GID(groupId, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the api roles before and after the current api role in the ordered set where groupId = ?. + * + * @param apiRoleId the primary key of the current api role + * @param groupId the group ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next api role + * @throws NoSuchApiRoleException if a api role with the primary key could not be found + */ + @Override + public ApiRole[] findByF_GID_PrevAndNext(long apiRoleId, long groupId, + OrderByComparator orderByComparator) + throws NoSuchApiRoleException { + ApiRole apiRole = findByPrimaryKey(apiRoleId); + + Session session = null; + + try { + session = openSession(); + + ApiRole[] array = new ApiRoleImpl[3]; + + array[0] = getByF_GID_PrevAndNext(session, apiRole, groupId, + orderByComparator, true); + + array[1] = apiRole; + + array[2] = getByF_GID_PrevAndNext(session, apiRole, groupId, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected ApiRole getByF_GID_PrevAndNext(Session session, ApiRole apiRole, + long groupId, OrderByComparator orderByComparator, + boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_APIROLE_WHERE); + + query.append(_FINDER_COLUMN_F_GID_GROUPID_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(ApiRoleModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(apiRole); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the api roles where groupId = ? from the database. + * + * @param groupId the group ID + */ + @Override + public void removeByF_GID(long groupId) { + for (ApiRole apiRole : findByF_GID(groupId, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(apiRole); + } + } + + /** + * Returns the number of api roles where groupId = ?. + * + * @param groupId the group ID + * @return the number of matching api roles + */ + @Override + public int countByF_GID(long groupId) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_GID; + + Object[] finderArgs = new Object[] { groupId }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_APIROLE_WHERE); + + query.append(_FINDER_COLUMN_F_GID_GROUPID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_GID_GROUPID_2 = "apiRole.groupId = ?"; + + public ApiRolePersistenceImpl() { + setModelClass(ApiRole.class); + } + + /** + * Caches the api role in the entity cache if it is enabled. + * + * @param apiRole the api role + */ + @Override + public void cacheResult(ApiRole apiRole) { + entityCache.putResult(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleImpl.class, apiRole.getPrimaryKey(), apiRole); + + finderCache.putResult(FINDER_PATH_FETCH_BY_F_ID, + new Object[] { apiRole.getApiRoleId() }, apiRole); + + finderCache.putResult(FINDER_PATH_FETCH_BY_F_ROLECODE, + new Object[] { apiRole.getRoleCode() }, apiRole); + + apiRole.resetOriginalValues(); + } + + /** + * Caches the api roles in the entity cache if it is enabled. + * + * @param apiRoles the api roles + */ + @Override + public void cacheResult(List apiRoles) { + for (ApiRole apiRole : apiRoles) { + if (entityCache.getResult(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleImpl.class, apiRole.getPrimaryKey()) == null) { + cacheResult(apiRole); + } + else { + apiRole.resetOriginalValues(); + } + } + } + + /** + * Clears the cache for all api roles. + * + *

+ * The {@link EntityCache} and {@link FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache() { + entityCache.clearCache(ApiRoleImpl.class); + + finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + /** + * Clears the cache for the api role. + * + *

+ * The {@link EntityCache} and {@link FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache(ApiRole apiRole) { + entityCache.removeResult(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleImpl.class, apiRole.getPrimaryKey()); + + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + clearUniqueFindersCache((ApiRoleModelImpl)apiRole, true); + } + + @Override + public void clearCache(List apiRoles) { + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + for (ApiRole apiRole : apiRoles) { + entityCache.removeResult(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleImpl.class, apiRole.getPrimaryKey()); + + clearUniqueFindersCache((ApiRoleModelImpl)apiRole, true); + } + } + + protected void cacheUniqueFindersCache(ApiRoleModelImpl apiRoleModelImpl) { + Object[] args = new Object[] { apiRoleModelImpl.getApiRoleId() }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_F_ID, args, Long.valueOf(1), + false); + finderCache.putResult(FINDER_PATH_FETCH_BY_F_ID, args, + apiRoleModelImpl, false); + + args = new Object[] { apiRoleModelImpl.getRoleCode() }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_F_ROLECODE, args, + Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_F_ROLECODE, args, + apiRoleModelImpl, false); + } + + protected void clearUniqueFindersCache(ApiRoleModelImpl apiRoleModelImpl, + boolean clearCurrent) { + if (clearCurrent) { + Object[] args = new Object[] { apiRoleModelImpl.getApiRoleId() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_ID, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_ID, args); + } + + if ((apiRoleModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_F_ID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { apiRoleModelImpl.getOriginalApiRoleId() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_ID, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_ID, args); + } + + if (clearCurrent) { + Object[] args = new Object[] { apiRoleModelImpl.getRoleCode() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_ROLECODE, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_ROLECODE, args); + } + + if ((apiRoleModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_F_ROLECODE.getColumnBitmask()) != 0) { + Object[] args = new Object[] { apiRoleModelImpl.getOriginalRoleCode() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_ROLECODE, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_ROLECODE, args); + } + } + + /** + * Creates a new api role with the primary key. Does not add the api role to the database. + * + * @param apiRoleId the primary key for the new api role + * @return the new api role + */ + @Override + public ApiRole create(long apiRoleId) { + ApiRole apiRole = new ApiRoleImpl(); + + apiRole.setNew(true); + apiRole.setPrimaryKey(apiRoleId); + + return apiRole; + } + + /** + * Removes the api role with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param apiRoleId the primary key of the api role + * @return the api role that was removed + * @throws NoSuchApiRoleException if a api role with the primary key could not be found + */ + @Override + public ApiRole remove(long apiRoleId) throws NoSuchApiRoleException { + return remove((Serializable)apiRoleId); + } + + /** + * Removes the api role with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param primaryKey the primary key of the api role + * @return the api role that was removed + * @throws NoSuchApiRoleException if a api role with the primary key could not be found + */ + @Override + public ApiRole remove(Serializable primaryKey) + throws NoSuchApiRoleException { + Session session = null; + + try { + session = openSession(); + + ApiRole apiRole = (ApiRole)session.get(ApiRoleImpl.class, primaryKey); + + if (apiRole == null) { + if (_log.isDebugEnabled()) { + _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchApiRoleException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return remove(apiRole); + } + catch (NoSuchApiRoleException nsee) { + throw nsee; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + @Override + protected ApiRole removeImpl(ApiRole apiRole) { + Session session = null; + + try { + session = openSession(); + + if (!session.contains(apiRole)) { + apiRole = (ApiRole)session.get(ApiRoleImpl.class, + apiRole.getPrimaryKeyObj()); + } + + if (apiRole != null) { + session.delete(apiRole); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + if (apiRole != null) { + clearCache(apiRole); + } + + return apiRole; + } + + @Override + public ApiRole updateImpl(ApiRole apiRole) { + boolean isNew = apiRole.isNew(); + + if (!(apiRole instanceof ApiRoleModelImpl)) { + InvocationHandler invocationHandler = null; + + if (ProxyUtil.isProxyClass(apiRole.getClass())) { + invocationHandler = ProxyUtil.getInvocationHandler(apiRole); + + throw new IllegalArgumentException( + "Implement ModelWrapper in apiRole proxy " + + invocationHandler.getClass()); + } + + throw new IllegalArgumentException( + "Implement ModelWrapper in custom ApiRole implementation " + + apiRole.getClass()); + } + + ApiRoleModelImpl apiRoleModelImpl = (ApiRoleModelImpl)apiRole; + + ServiceContext serviceContext = ServiceContextThreadLocal.getServiceContext(); + + Date now = new Date(); + + if (isNew && (apiRole.getCreateDate() == null)) { + if (serviceContext == null) { + apiRole.setCreateDate(now); + } + else { + apiRole.setCreateDate(serviceContext.getCreateDate(now)); + } + } + + if (!apiRoleModelImpl.hasSetModifiedDate()) { + if (serviceContext == null) { + apiRole.setModifiedDate(now); + } + else { + apiRole.setModifiedDate(serviceContext.getModifiedDate(now)); + } + } + + Session session = null; + + try { + session = openSession(); + + if (apiRole.isNew()) { + session.save(apiRole); + + apiRole.setNew(false); + } + else { + apiRole = (ApiRole)session.merge(apiRole); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + + if (!ApiRoleModelImpl.COLUMN_BITMASK_ENABLED) { + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + else + if (isNew) { + Object[] args = new Object[] { apiRoleModelImpl.getGroupId() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_GID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_GID, + args); + + finderCache.removeResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL, + FINDER_ARGS_EMPTY); + } + + else { + if ((apiRoleModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_GID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + apiRoleModelImpl.getOriginalGroupId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_GID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_GID, + args); + + args = new Object[] { apiRoleModelImpl.getGroupId() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_GID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_GID, + args); + } + } + + entityCache.putResult(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleImpl.class, apiRole.getPrimaryKey(), apiRole, false); + + clearUniqueFindersCache(apiRoleModelImpl, false); + cacheUniqueFindersCache(apiRoleModelImpl); + + apiRole.resetOriginalValues(); + + return apiRole; + } + + /** + * Returns the api role with the primary key or throws a {@link com.liferay.portal.kernel.exception.NoSuchModelException} if it could not be found. + * + * @param primaryKey the primary key of the api role + * @return the api role + * @throws NoSuchApiRoleException if a api role with the primary key could not be found + */ + @Override + public ApiRole findByPrimaryKey(Serializable primaryKey) + throws NoSuchApiRoleException { + ApiRole apiRole = fetchByPrimaryKey(primaryKey); + + if (apiRole == null) { + if (_log.isDebugEnabled()) { + _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchApiRoleException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return apiRole; + } + + /** + * Returns the api role with the primary key or throws a {@link NoSuchApiRoleException} if it could not be found. + * + * @param apiRoleId the primary key of the api role + * @return the api role + * @throws NoSuchApiRoleException if a api role with the primary key could not be found + */ + @Override + public ApiRole findByPrimaryKey(long apiRoleId) + throws NoSuchApiRoleException { + return findByPrimaryKey((Serializable)apiRoleId); + } + + /** + * Returns the api role with the primary key or returns null if it could not be found. + * + * @param primaryKey the primary key of the api role + * @return the api role, or null if a api role with the primary key could not be found + */ + @Override + public ApiRole fetchByPrimaryKey(Serializable primaryKey) { + Serializable serializable = entityCache.getResult(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleImpl.class, primaryKey); + + if (serializable == nullModel) { + return null; + } + + ApiRole apiRole = (ApiRole)serializable; + + if (apiRole == null) { + Session session = null; + + try { + session = openSession(); + + apiRole = (ApiRole)session.get(ApiRoleImpl.class, primaryKey); + + if (apiRole != null) { + cacheResult(apiRole); + } + else { + entityCache.putResult(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleImpl.class, primaryKey, nullModel); + } + } + catch (Exception e) { + entityCache.removeResult(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleImpl.class, primaryKey); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return apiRole; + } + + /** + * Returns the api role with the primary key or returns null if it could not be found. + * + * @param apiRoleId the primary key of the api role + * @return the api role, or null if a api role with the primary key could not be found + */ + @Override + public ApiRole fetchByPrimaryKey(long apiRoleId) { + return fetchByPrimaryKey((Serializable)apiRoleId); + } + + @Override + public Map fetchByPrimaryKeys( + Set primaryKeys) { + if (primaryKeys.isEmpty()) { + return Collections.emptyMap(); + } + + Map map = new HashMap(); + + if (primaryKeys.size() == 1) { + Iterator iterator = primaryKeys.iterator(); + + Serializable primaryKey = iterator.next(); + + ApiRole apiRole = fetchByPrimaryKey(primaryKey); + + if (apiRole != null) { + map.put(primaryKey, apiRole); + } + + return map; + } + + Set uncachedPrimaryKeys = null; + + for (Serializable primaryKey : primaryKeys) { + Serializable serializable = entityCache.getResult(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleImpl.class, primaryKey); + + if (serializable != nullModel) { + if (serializable == null) { + if (uncachedPrimaryKeys == null) { + uncachedPrimaryKeys = new HashSet(); + } + + uncachedPrimaryKeys.add(primaryKey); + } + else { + map.put(primaryKey, (ApiRole)serializable); + } + } + } + + if (uncachedPrimaryKeys == null) { + return map; + } + + StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) + + 1); + + query.append(_SQL_SELECT_APIROLE_WHERE_PKS_IN); + + for (Serializable primaryKey : uncachedPrimaryKeys) { + query.append((long)primaryKey); + + query.append(","); + } + + query.setIndex(query.index() - 1); + + query.append(")"); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + for (ApiRole apiRole : (List)q.list()) { + map.put(apiRole.getPrimaryKeyObj(), apiRole); + + cacheResult(apiRole); + + uncachedPrimaryKeys.remove(apiRole.getPrimaryKeyObj()); + } + + for (Serializable primaryKey : uncachedPrimaryKeys) { + entityCache.putResult(ApiRoleModelImpl.ENTITY_CACHE_ENABLED, + ApiRoleImpl.class, primaryKey, nullModel); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + return map; + } + + /** + * Returns all the api roles. + * + * @return the api roles + */ + @Override + public List findAll() { + return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the api roles. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @return the range of api roles + */ + @Override + public List findAll(int start, int end) { + return findAll(start, end, null); + } + + /** + * Returns an ordered range of all the api roles. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of api roles + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator) { + return findAll(start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the api roles. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ApiRoleModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of api roles + * @param end the upper bound of the range of api roles (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of api roles + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator, boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL; + finderArgs = FINDER_ARGS_EMPTY; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL; + finderArgs = new Object[] { start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, finderArgs, + this); + } + + if (list == null) { + StringBundler query = null; + String sql = null; + + if (orderByComparator != null) { + query = new StringBundler(2 + + (orderByComparator.getOrderByFields().length * 2)); + + query.append(_SQL_SELECT_APIROLE); + + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + + sql = query.toString(); + } + else { + sql = _SQL_SELECT_APIROLE; + + if (pagination) { + sql = sql.concat(ApiRoleModelImpl.ORDER_BY_JPQL); + } + } + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Removes all the api roles from the database. + * + */ + @Override + public void removeAll() { + for (ApiRole apiRole : findAll()) { + remove(apiRole); + } + } + + /** + * Returns the number of api roles. + * + * @return the number of api roles + */ + @Override + public int countAll() { + Long count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, this); + + if (count == null) { + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(_SQL_COUNT_APIROLE); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY, + count); + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + @Override + protected Map getTableColumnsMap() { + return ApiRoleModelImpl.TABLE_COLUMNS_MAP; + } + + /** + * Initializes the api role persistence. + */ + public void afterPropertiesSet() { + } + + public void destroy() { + entityCache.removeCache(ApiRoleImpl.class.getName()); + finderCache.removeCache(FINDER_CLASS_NAME_ENTITY); + finderCache.removeCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + @ServiceReference(type = EntityCache.class) + protected EntityCache entityCache; + @ServiceReference(type = FinderCache.class) + protected FinderCache finderCache; + private static final String _SQL_SELECT_APIROLE = "SELECT apiRole FROM ApiRole apiRole"; + private static final String _SQL_SELECT_APIROLE_WHERE_PKS_IN = "SELECT apiRole FROM ApiRole apiRole WHERE apiRoleId IN ("; + private static final String _SQL_SELECT_APIROLE_WHERE = "SELECT apiRole FROM ApiRole apiRole WHERE "; + private static final String _SQL_COUNT_APIROLE = "SELECT COUNT(apiRole) FROM ApiRole apiRole"; + private static final String _SQL_COUNT_APIROLE_WHERE = "SELECT COUNT(apiRole) FROM ApiRole apiRole WHERE "; + private static final String _ORDER_BY_ENTITY_ALIAS = "apiRole."; + private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No ApiRole exists with the primary key "; + private static final String _NO_SUCH_ENTITY_WITH_KEY = "No ApiRole exists with the key {"; + private static final Log _log = LogFactoryUtil.getLog(ApiRolePersistenceImpl.class); +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/persistence/impl/SyncTrackingPersistenceImpl.java b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/persistence/impl/SyncTrackingPersistenceImpl.java new file mode 100644 index 0000000000..d1ff8c037f --- /dev/null +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/java/org/opencps/adminconfig/service/persistence/impl/SyncTrackingPersistenceImpl.java @@ -0,0 +1,11445 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.adminconfig.service.persistence.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.EntityCache; +import com.liferay.portal.kernel.dao.orm.FinderCache; +import com.liferay.portal.kernel.dao.orm.FinderPath; +import com.liferay.portal.kernel.dao.orm.Query; +import com.liferay.portal.kernel.dao.orm.QueryPos; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.dao.orm.Session; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.service.ServiceContextThreadLocal; +import com.liferay.portal.kernel.service.persistence.CompanyProvider; +import com.liferay.portal.kernel.service.persistence.CompanyProviderWrapper; +import com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.SetUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.kernel.uuid.PortalUUIDUtil; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import org.opencps.adminconfig.exception.NoSuchSyncTrackingException; +import org.opencps.adminconfig.model.SyncTracking; +import org.opencps.adminconfig.model.impl.SyncTrackingImpl; +import org.opencps.adminconfig.model.impl.SyncTrackingModelImpl; +import org.opencps.adminconfig.service.persistence.SyncTrackingPersistence; + +import java.io.Serializable; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationHandler; + +import java.sql.Timestamp; + +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * The persistence implementation for the sync tracking service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author binhth + * @see SyncTrackingPersistence + * @see org.opencps.adminconfig.service.persistence.SyncTrackingUtil + * @generated + */ +@ProviderType +public class SyncTrackingPersistenceImpl extends BasePersistenceImpl + implements SyncTrackingPersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link SyncTrackingUtil} to access the sync tracking persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + public static final String FINDER_CLASS_NAME_ENTITY = SyncTrackingImpl.class.getName(); + public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List1"; + public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List2"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid", + new String[] { + String.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid", + new String[] { String.class.getName() }, + SyncTrackingModelImpl.UUID_COLUMN_BITMASK | + SyncTrackingModelImpl.CREATEDATE_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid", + new String[] { String.class.getName() }); + + /** + * Returns all the sync trackings where uuid = ?. + * + * @param uuid the uuid + * @return the matching sync trackings + */ + @Override + public List findByUuid(String uuid) { + return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the sync trackings where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + @Override + public List findByUuid(String uuid, int start, int end) { + return findByUuid(uuid, start, end, null); + } + + /** + * Returns an ordered range of all the sync trackings where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + @Override + public List findByUuid(String uuid, int start, int end, + OrderByComparator orderByComparator) { + return findByUuid(uuid, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the sync trackings where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + @Override + public List findByUuid(String uuid, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID; + finderArgs = new Object[] { uuid }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID; + finderArgs = new Object[] { uuid, start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SyncTracking syncTracking : list) { + if (!Objects.equals(uuid, syncTracking.getUuid())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(3 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first sync tracking in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByUuid_First(String uuid, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByUuid_First(uuid, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the first sync tracking in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByUuid_First(String uuid, + OrderByComparator orderByComparator) { + List list = findByUuid(uuid, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last sync tracking in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByUuid_Last(String uuid, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByUuid_Last(uuid, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the last sync tracking in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByUuid_Last(String uuid, + OrderByComparator orderByComparator) { + int count = countByUuid(uuid); + + if (count == 0) { + return null; + } + + List list = findByUuid(uuid, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where uuid = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking[] findByUuid_PrevAndNext(long trackingId, String uuid, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByPrimaryKey(trackingId); + + Session session = null; + + try { + session = openSession(); + + SyncTracking[] array = new SyncTrackingImpl[3]; + + array[0] = getByUuid_PrevAndNext(session, syncTracking, uuid, + orderByComparator, true); + + array[1] = syncTracking; + + array[2] = getByUuid_PrevAndNext(session, syncTracking, uuid, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SyncTracking getByUuid_PrevAndNext(Session session, + SyncTracking syncTracking, String uuid, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(syncTracking); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the sync trackings where uuid = ? from the database. + * + * @param uuid the uuid + */ + @Override + public void removeByUuid(String uuid) { + for (SyncTracking syncTracking : findByUuid(uuid, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching sync trackings + */ + @Override + public int countByUuid(String uuid) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID; + + Object[] finderArgs = new Object[] { uuid }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_UUID_UUID_1 = "syncTracking.uuid IS NULL"; + private static final String _FINDER_COLUMN_UUID_UUID_2 = "syncTracking.uuid = ?"; + private static final String _FINDER_COLUMN_UUID_UUID_3 = "(syncTracking.uuid IS NULL OR syncTracking.uuid = '')"; + public static final FinderPath FINDER_PATH_FETCH_BY_UUID_G = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByUUID_G", + new String[] { String.class.getName(), Long.class.getName() }, + SyncTrackingModelImpl.UUID_COLUMN_BITMASK | + SyncTrackingModelImpl.GROUPID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_UUID_G = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUUID_G", + new String[] { String.class.getName(), Long.class.getName() }); + + /** + * Returns the sync tracking where uuid = ? and groupId = ? or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByUUID_G(String uuid, long groupId) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByUUID_G(uuid, groupId); + + if (syncTracking == null) { + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append(", groupId="); + msg.append(groupId); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + return syncTracking; + } + + /** + * Returns the sync tracking where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByUUID_G(String uuid, long groupId) { + return fetchByUUID_G(uuid, groupId, true); + } + + /** + * Returns the sync tracking where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByUUID_G(String uuid, long groupId, + boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { uuid, groupId }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_UUID_G, + finderArgs, this); + } + + if (result instanceof SyncTracking) { + SyncTracking syncTracking = (SyncTracking)result; + + if (!Objects.equals(uuid, syncTracking.getUuid()) || + (groupId != syncTracking.getGroupId())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_G_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_G_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_G_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(groupId); + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, + finderArgs, list); + } + else { + SyncTracking syncTracking = list.get(0); + + result = syncTracking; + + cacheResult(syncTracking); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (SyncTracking)result; + } + } + + /** + * Removes the sync tracking where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the sync tracking that was removed + */ + @Override + public SyncTracking removeByUUID_G(String uuid, long groupId) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByUUID_G(uuid, groupId); + + return remove(syncTracking); + } + + /** + * Returns the number of sync trackings where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching sync trackings + */ + @Override + public int countByUUID_G(String uuid, long groupId) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; + + Object[] finderArgs = new Object[] { uuid, groupId }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_G_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_G_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_G_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(groupId); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_UUID_G_UUID_1 = "syncTracking.uuid IS NULL AND "; + private static final String _FINDER_COLUMN_UUID_G_UUID_2 = "syncTracking.uuid = ? AND "; + private static final String _FINDER_COLUMN_UUID_G_UUID_3 = "(syncTracking.uuid IS NULL OR syncTracking.uuid = '') AND "; + private static final String _FINDER_COLUMN_UUID_G_GROUPID_2 = "syncTracking.groupId = ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid_C", + new String[] { + String.class.getName(), Long.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid_C", + new String[] { String.class.getName(), Long.class.getName() }, + SyncTrackingModelImpl.UUID_COLUMN_BITMASK | + SyncTrackingModelImpl.COMPANYID_COLUMN_BITMASK | + SyncTrackingModelImpl.CREATEDATE_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_UUID_C = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid_C", + new String[] { String.class.getName(), Long.class.getName() }); + + /** + * Returns all the sync trackings where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the matching sync trackings + */ + @Override + public List findByUuid_C(String uuid, long companyId) { + return findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the sync trackings where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + @Override + public List findByUuid_C(String uuid, long companyId, + int start, int end) { + return findByUuid_C(uuid, companyId, start, end, null); + } + + /** + * Returns an ordered range of all the sync trackings where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + @Override + public List findByUuid_C(String uuid, long companyId, + int start, int end, OrderByComparator orderByComparator) { + return findByUuid_C(uuid, companyId, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the sync trackings where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + @Override + public List findByUuid_C(String uuid, long companyId, + int start, int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C; + finderArgs = new Object[] { uuid, companyId }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C; + finderArgs = new Object[] { + uuid, companyId, + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SyncTracking syncTracking : list) { + if (!Objects.equals(uuid, syncTracking.getUuid()) || + (companyId != syncTracking.getCompanyId())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_C_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_C_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_C_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(companyId); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByUuid_C_First(String uuid, long companyId, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByUuid_C_First(uuid, companyId, + orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append(", companyId="); + msg.append(companyId); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the first sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByUuid_C_First(String uuid, long companyId, + OrderByComparator orderByComparator) { + List list = findByUuid_C(uuid, companyId, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByUuid_C_Last(String uuid, long companyId, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByUuid_C_Last(uuid, companyId, + orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append(", companyId="); + msg.append(companyId); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the last sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByUuid_C_Last(String uuid, long companyId, + OrderByComparator orderByComparator) { + int count = countByUuid_C(uuid, companyId); + + if (count == 0) { + return null; + } + + List list = findByUuid_C(uuid, companyId, count - 1, + count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where uuid = ? and companyId = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking[] findByUuid_C_PrevAndNext(long trackingId, + String uuid, long companyId, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByPrimaryKey(trackingId); + + Session session = null; + + try { + session = openSession(); + + SyncTracking[] array = new SyncTrackingImpl[3]; + + array[0] = getByUuid_C_PrevAndNext(session, syncTracking, uuid, + companyId, orderByComparator, true); + + array[1] = syncTracking; + + array[2] = getByUuid_C_PrevAndNext(session, syncTracking, uuid, + companyId, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SyncTracking getByUuid_C_PrevAndNext(Session session, + SyncTracking syncTracking, String uuid, long companyId, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_C_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_C_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_C_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(companyId); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(syncTracking); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the sync trackings where uuid = ? and companyId = ? from the database. + * + * @param uuid the uuid + * @param companyId the company ID + */ + @Override + public void removeByUuid_C(String uuid, long companyId) { + for (SyncTracking syncTracking : findByUuid_C(uuid, companyId, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the number of matching sync trackings + */ + @Override + public int countByUuid_C(String uuid, long companyId) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C; + + Object[] finderArgs = new Object[] { uuid, companyId }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_C_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_C_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_C_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(companyId); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_UUID_C_UUID_1 = "syncTracking.uuid IS NULL AND "; + private static final String _FINDER_COLUMN_UUID_C_UUID_2 = "syncTracking.uuid = ? AND "; + private static final String _FINDER_COLUMN_UUID_C_UUID_3 = "(syncTracking.uuid IS NULL OR syncTracking.uuid = '') AND "; + private static final String _FINDER_COLUMN_UUID_C_COMPANYID_2 = "syncTracking.companyId = ?"; + public static final FinderPath FINDER_PATH_FETCH_BY_F_REFERENCEUID = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByF_ReferenceUid", + new String[] { String.class.getName() }, + SyncTrackingModelImpl.REFERENCEUID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_REFERENCEUID = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByF_ReferenceUid", + new String[] { String.class.getName() }); + + /** + * Returns the sync tracking where referenceUid = ? or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param referenceUid the reference uid + * @return the matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_ReferenceUid(String referenceUid) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_ReferenceUid(referenceUid); + + if (syncTracking == null) { + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("referenceUid="); + msg.append(referenceUid); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + return syncTracking; + } + + /** + * Returns the sync tracking where referenceUid = ? or returns null if it could not be found. Uses the finder cache. + * + * @param referenceUid the reference uid + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_ReferenceUid(String referenceUid) { + return fetchByF_ReferenceUid(referenceUid, true); + } + + /** + * Returns the sync tracking where referenceUid = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param referenceUid the reference uid + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_ReferenceUid(String referenceUid, + boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { referenceUid }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_F_REFERENCEUID, + finderArgs, this); + } + + if (result instanceof SyncTracking) { + SyncTracking syncTracking = (SyncTracking)result; + + if (!Objects.equals(referenceUid, syncTracking.getReferenceUid())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindReferenceUid = false; + + if (referenceUid == null) { + query.append(_FINDER_COLUMN_F_REFERENCEUID_REFERENCEUID_1); + } + else if (referenceUid.equals("")) { + query.append(_FINDER_COLUMN_F_REFERENCEUID_REFERENCEUID_3); + } + else { + bindReferenceUid = true; + + query.append(_FINDER_COLUMN_F_REFERENCEUID_REFERENCEUID_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindReferenceUid) { + qPos.add(referenceUid); + } + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_F_REFERENCEUID, + finderArgs, list); + } + else { + if (list.size() > 1) { + Collections.sort(list, Collections.reverseOrder()); + + if (_log.isWarnEnabled()) { + _log.warn( + "SyncTrackingPersistenceImpl.fetchByF_ReferenceUid(String, boolean) with parameters (" + + StringUtil.merge(finderArgs) + + ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); + } + } + + SyncTracking syncTracking = list.get(0); + + result = syncTracking; + + cacheResult(syncTracking); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_REFERENCEUID, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (SyncTracking)result; + } + } + + /** + * Removes the sync tracking where referenceUid = ? from the database. + * + * @param referenceUid the reference uid + * @return the sync tracking that was removed + */ + @Override + public SyncTracking removeByF_ReferenceUid(String referenceUid) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByF_ReferenceUid(referenceUid); + + return remove(syncTracking); + } + + /** + * Returns the number of sync trackings where referenceUid = ?. + * + * @param referenceUid the reference uid + * @return the number of matching sync trackings + */ + @Override + public int countByF_ReferenceUid(String referenceUid) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_REFERENCEUID; + + Object[] finderArgs = new Object[] { referenceUid }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindReferenceUid = false; + + if (referenceUid == null) { + query.append(_FINDER_COLUMN_F_REFERENCEUID_REFERENCEUID_1); + } + else if (referenceUid.equals("")) { + query.append(_FINDER_COLUMN_F_REFERENCEUID_REFERENCEUID_3); + } + else { + bindReferenceUid = true; + + query.append(_FINDER_COLUMN_F_REFERENCEUID_REFERENCEUID_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindReferenceUid) { + qPos.add(referenceUid); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_REFERENCEUID_REFERENCEUID_1 = "syncTracking.referenceUid IS NULL"; + private static final String _FINDER_COLUMN_F_REFERENCEUID_REFERENCEUID_2 = "syncTracking.referenceUid = ?"; + private static final String _FINDER_COLUMN_F_REFERENCEUID_REFERENCEUID_3 = "(syncTracking.referenceUid IS NULL OR syncTracking.referenceUid = '')"; + public static final FinderPath FINDER_PATH_FETCH_BY_F_DOSSIERNO = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByF_DossierNo", + new String[] { String.class.getName() }, + SyncTrackingModelImpl.DOSSIERNO_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_DOSSIERNO = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByF_DossierNo", + new String[] { String.class.getName() }); + + /** + * Returns the sync tracking where dossierNo = ? or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param dossierNo the dossier no + * @return the matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_DossierNo(String dossierNo) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_DossierNo(dossierNo); + + if (syncTracking == null) { + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("dossierNo="); + msg.append(dossierNo); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + return syncTracking; + } + + /** + * Returns the sync tracking where dossierNo = ? or returns null if it could not be found. Uses the finder cache. + * + * @param dossierNo the dossier no + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_DossierNo(String dossierNo) { + return fetchByF_DossierNo(dossierNo, true); + } + + /** + * Returns the sync tracking where dossierNo = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param dossierNo the dossier no + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_DossierNo(String dossierNo, + boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { dossierNo }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_F_DOSSIERNO, + finderArgs, this); + } + + if (result instanceof SyncTracking) { + SyncTracking syncTracking = (SyncTracking)result; + + if (!Objects.equals(dossierNo, syncTracking.getDossierNo())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_DOSSIERNO_DOSSIERNO_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_F_DOSSIERNO, + finderArgs, list); + } + else { + if (list.size() > 1) { + Collections.sort(list, Collections.reverseOrder()); + + if (_log.isWarnEnabled()) { + _log.warn( + "SyncTrackingPersistenceImpl.fetchByF_DossierNo(String, boolean) with parameters (" + + StringUtil.merge(finderArgs) + + ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); + } + } + + SyncTracking syncTracking = list.get(0); + + result = syncTracking; + + cacheResult(syncTracking); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_DOSSIERNO, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (SyncTracking)result; + } + } + + /** + * Removes the sync tracking where dossierNo = ? from the database. + * + * @param dossierNo the dossier no + * @return the sync tracking that was removed + */ + @Override + public SyncTracking removeByF_DossierNo(String dossierNo) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByF_DossierNo(dossierNo); + + return remove(syncTracking); + } + + /** + * Returns the number of sync trackings where dossierNo = ?. + * + * @param dossierNo the dossier no + * @return the number of matching sync trackings + */ + @Override + public int countByF_DossierNo(String dossierNo) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_DOSSIERNO; + + Object[] finderArgs = new Object[] { dossierNo }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_DOSSIERNO_DOSSIERNO_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_DOSSIERNO_DOSSIERNO_1 = "syncTracking.dossierNo IS NULL"; + private static final String _FINDER_COLUMN_F_DOSSIERNO_DOSSIERNO_2 = "syncTracking.dossierNo = ?"; + private static final String _FINDER_COLUMN_F_DOSSIERNO_DOSSIERNO_3 = "(syncTracking.dossierNo IS NULL OR syncTracking.dossierNo = '')"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_PROTOCOL = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByF_Protocol", + new String[] { + String.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByF_Protocol", + new String[] { String.class.getName() }, + SyncTrackingModelImpl.PROTOCOL_COLUMN_BITMASK | + SyncTrackingModelImpl.CREATEDATE_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_PROTOCOL = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByF_Protocol", + new String[] { String.class.getName() }); + + /** + * Returns all the sync trackings where protocol = ?. + * + * @param protocol the protocol + * @return the matching sync trackings + */ + @Override + public List findByF_Protocol(String protocol) { + return findByF_Protocol(protocol, QueryUtil.ALL_POS, QueryUtil.ALL_POS, + null); + } + + /** + * Returns a range of all the sync trackings where protocol = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + @Override + public List findByF_Protocol(String protocol, int start, + int end) { + return findByF_Protocol(protocol, start, end, null); + } + + /** + * Returns an ordered range of all the sync trackings where protocol = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_Protocol(String protocol, int start, + int end, OrderByComparator orderByComparator) { + return findByF_Protocol(protocol, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the sync trackings where protocol = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_Protocol(String protocol, int start, + int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL; + finderArgs = new Object[] { protocol }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_PROTOCOL; + finderArgs = new Object[] { protocol, start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SyncTracking syncTracking : list) { + if (!Objects.equals(protocol, syncTracking.getProtocol())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(3 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindProtocol = false; + + if (protocol == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_PROTOCOL_1); + } + else if (protocol.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_PROTOCOL_3); + } + else { + bindProtocol = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_PROTOCOL_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindProtocol) { + qPos.add(protocol); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first sync tracking in the ordered set where protocol = ?. + * + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_Protocol_First(String protocol, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_Protocol_First(protocol, + orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("protocol="); + msg.append(protocol); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the first sync tracking in the ordered set where protocol = ?. + * + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_Protocol_First(String protocol, + OrderByComparator orderByComparator) { + List list = findByF_Protocol(protocol, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last sync tracking in the ordered set where protocol = ?. + * + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_Protocol_Last(String protocol, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_Protocol_Last(protocol, + orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("protocol="); + msg.append(protocol); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the last sync tracking in the ordered set where protocol = ?. + * + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_Protocol_Last(String protocol, + OrderByComparator orderByComparator) { + int count = countByF_Protocol(protocol); + + if (count == 0) { + return null; + } + + List list = findByF_Protocol(protocol, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where protocol = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param protocol the protocol + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking[] findByF_Protocol_PrevAndNext(long trackingId, + String protocol, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByPrimaryKey(trackingId); + + Session session = null; + + try { + session = openSession(); + + SyncTracking[] array = new SyncTrackingImpl[3]; + + array[0] = getByF_Protocol_PrevAndNext(session, syncTracking, + protocol, orderByComparator, true); + + array[1] = syncTracking; + + array[2] = getByF_Protocol_PrevAndNext(session, syncTracking, + protocol, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SyncTracking getByF_Protocol_PrevAndNext(Session session, + SyncTracking syncTracking, String protocol, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindProtocol = false; + + if (protocol == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_PROTOCOL_1); + } + else if (protocol.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_PROTOCOL_3); + } + else { + bindProtocol = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_PROTOCOL_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindProtocol) { + qPos.add(protocol); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(syncTracking); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the sync trackings where protocol = ? from the database. + * + * @param protocol the protocol + */ + @Override + public void removeByF_Protocol(String protocol) { + for (SyncTracking syncTracking : findByF_Protocol(protocol, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings where protocol = ?. + * + * @param protocol the protocol + * @return the number of matching sync trackings + */ + @Override + public int countByF_Protocol(String protocol) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_PROTOCOL; + + Object[] finderArgs = new Object[] { protocol }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindProtocol = false; + + if (protocol == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_PROTOCOL_1); + } + else if (protocol.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_PROTOCOL_3); + } + else { + bindProtocol = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_PROTOCOL_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindProtocol) { + qPos.add(protocol); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_PROTOCOL_PROTOCOL_1 = "syncTracking.protocol IS NULL"; + private static final String _FINDER_COLUMN_F_PROTOCOL_PROTOCOL_2 = "syncTracking.protocol = ?"; + private static final String _FINDER_COLUMN_F_PROTOCOL_PROTOCOL_3 = "(syncTracking.protocol IS NULL OR syncTracking.protocol = '')"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_PROTOCOL_DOSSIERNO = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "findByF_Protocol_DossierNo", + new String[] { + String.class.getName(), String.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL_DOSSIERNO = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "findByF_Protocol_DossierNo", + new String[] { String.class.getName(), String.class.getName() }, + SyncTrackingModelImpl.PROTOCOL_COLUMN_BITMASK | + SyncTrackingModelImpl.DOSSIERNO_COLUMN_BITMASK | + SyncTrackingModelImpl.CREATEDATE_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_PROTOCOL_DOSSIERNO = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByF_Protocol_DossierNo", + new String[] { String.class.getName(), String.class.getName() }); + + /** + * Returns all the sync trackings where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @return the matching sync trackings + */ + @Override + public List findByF_Protocol_DossierNo(String protocol, + String dossierNo) { + return findByF_Protocol_DossierNo(protocol, dossierNo, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the sync trackings where protocol = ? and dossierNo = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + @Override + public List findByF_Protocol_DossierNo(String protocol, + String dossierNo, int start, int end) { + return findByF_Protocol_DossierNo(protocol, dossierNo, start, end, null); + } + + /** + * Returns an ordered range of all the sync trackings where protocol = ? and dossierNo = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_Protocol_DossierNo(String protocol, + String dossierNo, int start, int end, + OrderByComparator orderByComparator) { + return findByF_Protocol_DossierNo(protocol, dossierNo, start, end, + orderByComparator, true); + } + + /** + * Returns an ordered range of all the sync trackings where protocol = ? and dossierNo = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_Protocol_DossierNo(String protocol, + String dossierNo, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL_DOSSIERNO; + finderArgs = new Object[] { protocol, dossierNo }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_PROTOCOL_DOSSIERNO; + finderArgs = new Object[] { + protocol, dossierNo, + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SyncTracking syncTracking : list) { + if (!Objects.equals(protocol, syncTracking.getProtocol()) || + !Objects.equals(dossierNo, + syncTracking.getDossierNo())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindProtocol = false; + + if (protocol == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_PROTOCOL_1); + } + else if (protocol.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_PROTOCOL_3); + } + else { + bindProtocol = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_PROTOCOL_2); + } + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_DOSSIERNO_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindProtocol) { + qPos.add(protocol); + } + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_Protocol_DossierNo_First(String protocol, + String dossierNo, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_Protocol_DossierNo_First(protocol, + dossierNo, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("protocol="); + msg.append(protocol); + + msg.append(", dossierNo="); + msg.append(dossierNo); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the first sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_Protocol_DossierNo_First(String protocol, + String dossierNo, OrderByComparator orderByComparator) { + List list = findByF_Protocol_DossierNo(protocol, + dossierNo, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_Protocol_DossierNo_Last(String protocol, + String dossierNo, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_Protocol_DossierNo_Last(protocol, + dossierNo, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("protocol="); + msg.append(protocol); + + msg.append(", dossierNo="); + msg.append(dossierNo); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the last sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_Protocol_DossierNo_Last(String protocol, + String dossierNo, OrderByComparator orderByComparator) { + int count = countByF_Protocol_DossierNo(protocol, dossierNo); + + if (count == 0) { + return null; + } + + List list = findByF_Protocol_DossierNo(protocol, + dossierNo, count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where protocol = ? and dossierNo = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param protocol the protocol + * @param dossierNo the dossier no + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking[] findByF_Protocol_DossierNo_PrevAndNext( + long trackingId, String protocol, String dossierNo, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByPrimaryKey(trackingId); + + Session session = null; + + try { + session = openSession(); + + SyncTracking[] array = new SyncTrackingImpl[3]; + + array[0] = getByF_Protocol_DossierNo_PrevAndNext(session, + syncTracking, protocol, dossierNo, orderByComparator, true); + + array[1] = syncTracking; + + array[2] = getByF_Protocol_DossierNo_PrevAndNext(session, + syncTracking, protocol, dossierNo, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SyncTracking getByF_Protocol_DossierNo_PrevAndNext( + Session session, SyncTracking syncTracking, String protocol, + String dossierNo, OrderByComparator orderByComparator, + boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindProtocol = false; + + if (protocol == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_PROTOCOL_1); + } + else if (protocol.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_PROTOCOL_3); + } + else { + bindProtocol = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_PROTOCOL_2); + } + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_DOSSIERNO_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindProtocol) { + qPos.add(protocol); + } + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(syncTracking); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the sync trackings where protocol = ? and dossierNo = ? from the database. + * + * @param protocol the protocol + * @param dossierNo the dossier no + */ + @Override + public void removeByF_Protocol_DossierNo(String protocol, String dossierNo) { + for (SyncTracking syncTracking : findByF_Protocol_DossierNo(protocol, + dossierNo, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings where protocol = ? and dossierNo = ?. + * + * @param protocol the protocol + * @param dossierNo the dossier no + * @return the number of matching sync trackings + */ + @Override + public int countByF_Protocol_DossierNo(String protocol, String dossierNo) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_PROTOCOL_DOSSIERNO; + + Object[] finderArgs = new Object[] { protocol, dossierNo }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindProtocol = false; + + if (protocol == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_PROTOCOL_1); + } + else if (protocol.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_PROTOCOL_3); + } + else { + bindProtocol = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_PROTOCOL_2); + } + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_DOSSIERNO_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindProtocol) { + qPos.add(protocol); + } + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_PROTOCOL_1 = "syncTracking.protocol IS NULL AND "; + private static final String _FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_PROTOCOL_2 = "syncTracking.protocol = ? AND "; + private static final String _FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_PROTOCOL_3 = "(syncTracking.protocol IS NULL OR syncTracking.protocol = '') AND "; + private static final String _FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_DOSSIERNO_1 = "syncTracking.dossierNo IS NULL"; + private static final String _FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_DOSSIERNO_2 = "syncTracking.dossierNo = ?"; + private static final String _FINDER_COLUMN_F_PROTOCOL_DOSSIERNO_DOSSIERNO_3 = "(syncTracking.dossierNo IS NULL OR syncTracking.dossierNo = '')"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_PROTOCOL_SERVICECODE = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "findByF_Protocol_ServiceCode", + new String[] { + String.class.getName(), String.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL_SERVICECODE = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "findByF_Protocol_ServiceCode", + new String[] { String.class.getName(), String.class.getName() }, + SyncTrackingModelImpl.PROTOCOL_COLUMN_BITMASK | + SyncTrackingModelImpl.SERVICECODE_COLUMN_BITMASK | + SyncTrackingModelImpl.CREATEDATE_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_PROTOCOL_SERVICECODE = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByF_Protocol_ServiceCode", + new String[] { String.class.getName(), String.class.getName() }); + + /** + * Returns all the sync trackings where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @return the matching sync trackings + */ + @Override + public List findByF_Protocol_ServiceCode(String protocol, + String serviceCode) { + return findByF_Protocol_ServiceCode(protocol, serviceCode, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the sync trackings where protocol = ? and serviceCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param serviceCode the service code + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + @Override + public List findByF_Protocol_ServiceCode(String protocol, + String serviceCode, int start, int end) { + return findByF_Protocol_ServiceCode(protocol, serviceCode, start, end, + null); + } + + /** + * Returns an ordered range of all the sync trackings where protocol = ? and serviceCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param serviceCode the service code + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_Protocol_ServiceCode(String protocol, + String serviceCode, int start, int end, + OrderByComparator orderByComparator) { + return findByF_Protocol_ServiceCode(protocol, serviceCode, start, end, + orderByComparator, true); + } + + /** + * Returns an ordered range of all the sync trackings where protocol = ? and serviceCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param protocol the protocol + * @param serviceCode the service code + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_Protocol_ServiceCode(String protocol, + String serviceCode, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL_SERVICECODE; + finderArgs = new Object[] { protocol, serviceCode }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_PROTOCOL_SERVICECODE; + finderArgs = new Object[] { + protocol, serviceCode, + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SyncTracking syncTracking : list) { + if (!Objects.equals(protocol, syncTracking.getProtocol()) || + !Objects.equals(serviceCode, + syncTracking.getServiceCode())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindProtocol = false; + + if (protocol == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_PROTOCOL_1); + } + else if (protocol.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_PROTOCOL_3); + } + else { + bindProtocol = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_PROTOCOL_2); + } + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_SERVICECODE_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindProtocol) { + qPos.add(protocol); + } + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_Protocol_ServiceCode_First(String protocol, + String serviceCode, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_Protocol_ServiceCode_First(protocol, + serviceCode, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("protocol="); + msg.append(protocol); + + msg.append(", serviceCode="); + msg.append(serviceCode); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the first sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_Protocol_ServiceCode_First(String protocol, + String serviceCode, OrderByComparator orderByComparator) { + List list = findByF_Protocol_ServiceCode(protocol, + serviceCode, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_Protocol_ServiceCode_Last(String protocol, + String serviceCode, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_Protocol_ServiceCode_Last(protocol, + serviceCode, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("protocol="); + msg.append(protocol); + + msg.append(", serviceCode="); + msg.append(serviceCode); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the last sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_Protocol_ServiceCode_Last(String protocol, + String serviceCode, OrderByComparator orderByComparator) { + int count = countByF_Protocol_ServiceCode(protocol, serviceCode); + + if (count == 0) { + return null; + } + + List list = findByF_Protocol_ServiceCode(protocol, + serviceCode, count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where protocol = ? and serviceCode = ?. + * + * @param trackingId the primary key of the current sync tracking + * @param protocol the protocol + * @param serviceCode the service code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking[] findByF_Protocol_ServiceCode_PrevAndNext( + long trackingId, String protocol, String serviceCode, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByPrimaryKey(trackingId); + + Session session = null; + + try { + session = openSession(); + + SyncTracking[] array = new SyncTrackingImpl[3]; + + array[0] = getByF_Protocol_ServiceCode_PrevAndNext(session, + syncTracking, protocol, serviceCode, orderByComparator, true); + + array[1] = syncTracking; + + array[2] = getByF_Protocol_ServiceCode_PrevAndNext(session, + syncTracking, protocol, serviceCode, orderByComparator, + false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SyncTracking getByF_Protocol_ServiceCode_PrevAndNext( + Session session, SyncTracking syncTracking, String protocol, + String serviceCode, OrderByComparator orderByComparator, + boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindProtocol = false; + + if (protocol == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_PROTOCOL_1); + } + else if (protocol.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_PROTOCOL_3); + } + else { + bindProtocol = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_PROTOCOL_2); + } + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_SERVICECODE_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindProtocol) { + qPos.add(protocol); + } + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(syncTracking); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the sync trackings where protocol = ? and serviceCode = ? from the database. + * + * @param protocol the protocol + * @param serviceCode the service code + */ + @Override + public void removeByF_Protocol_ServiceCode(String protocol, + String serviceCode) { + for (SyncTracking syncTracking : findByF_Protocol_ServiceCode( + protocol, serviceCode, QueryUtil.ALL_POS, QueryUtil.ALL_POS, + null)) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings where protocol = ? and serviceCode = ?. + * + * @param protocol the protocol + * @param serviceCode the service code + * @return the number of matching sync trackings + */ + @Override + public int countByF_Protocol_ServiceCode(String protocol, String serviceCode) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_PROTOCOL_SERVICECODE; + + Object[] finderArgs = new Object[] { protocol, serviceCode }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindProtocol = false; + + if (protocol == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_PROTOCOL_1); + } + else if (protocol.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_PROTOCOL_3); + } + else { + bindProtocol = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_PROTOCOL_2); + } + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_PROTOCOL_SERVICECODE_SERVICECODE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindProtocol) { + qPos.add(protocol); + } + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_PROTOCOL_SERVICECODE_PROTOCOL_1 = + "syncTracking.protocol IS NULL AND "; + private static final String _FINDER_COLUMN_F_PROTOCOL_SERVICECODE_PROTOCOL_2 = + "syncTracking.protocol = ? AND "; + private static final String _FINDER_COLUMN_F_PROTOCOL_SERVICECODE_PROTOCOL_3 = + "(syncTracking.protocol IS NULL OR syncTracking.protocol = '') AND "; + private static final String _FINDER_COLUMN_F_PROTOCOL_SERVICECODE_SERVICECODE_1 = + "syncTracking.serviceCode IS NULL"; + private static final String _FINDER_COLUMN_F_PROTOCOL_SERVICECODE_SERVICECODE_2 = + "syncTracking.serviceCode = ?"; + private static final String _FINDER_COLUMN_F_PROTOCOL_SERVICECODE_SERVICECODE_3 = + "(syncTracking.serviceCode IS NULL OR syncTracking.serviceCode = '')"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByF_CREATED_BETWEEN", + new String[] { + Date.class.getName(), Date.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByF_CREATED_BETWEEN", + new String[] { Date.class.getName(), Date.class.getName() }); + + /** + * Returns all the sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + @Override + public List findByF_CREATED_BETWEEN(Date createDate, + Date modifiedDate) { + return findByF_CREATED_BETWEEN(createDate, modifiedDate, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + @Override + public List findByF_CREATED_BETWEEN(Date createDate, + Date modifiedDate, int start, int end) { + return findByF_CREATED_BETWEEN(createDate, modifiedDate, start, end, + null); + } + + /** + * Returns an ordered range of all the sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_CREATED_BETWEEN(Date createDate, + Date modifiedDate, int start, int end, + OrderByComparator orderByComparator) { + return findByF_CREATED_BETWEEN(createDate, modifiedDate, start, end, + orderByComparator, true); + } + + /** + * Returns an ordered range of all the sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_CREATED_BETWEEN(Date createDate, + Date modifiedDate, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_CREATED_BETWEEN; + finderArgs = new Object[] { + _getTime(createDate), _getTime(modifiedDate), + + start, end, orderByComparator + }; + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SyncTracking syncTracking : list) { + if ((createDate.getTime() > syncTracking.getCreateDate() + .getTime()) || + (modifiedDate.getTime() < syncTracking.getModifiedDate() + .getTime())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_CREATED_BETWEEN_First(Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_CREATED_BETWEEN_First(createDate, + modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the first sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_CREATED_BETWEEN_First(Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) { + List list = findByF_CREATED_BETWEEN(createDate, + modifiedDate, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_CREATED_BETWEEN_Last(Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_CREATED_BETWEEN_Last(createDate, + modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the last sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_CREATED_BETWEEN_Last(Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) { + int count = countByF_CREATED_BETWEEN(createDate, modifiedDate); + + if (count == 0) { + return null; + } + + List list = findByF_CREATED_BETWEEN(createDate, + modifiedDate, count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking[] findByF_CREATED_BETWEEN_PrevAndNext(long trackingId, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByPrimaryKey(trackingId); + + Session session = null; + + try { + session = openSession(); + + SyncTracking[] array = new SyncTrackingImpl[3]; + + array[0] = getByF_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, createDate, modifiedDate, orderByComparator, + true); + + array[1] = syncTracking; + + array[2] = getByF_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, createDate, modifiedDate, orderByComparator, + false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SyncTracking getByF_CREATED_BETWEEN_PrevAndNext(Session session, + SyncTracking syncTracking, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(syncTracking); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the sync trackings where createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param createDate the create date + * @param modifiedDate the modified date + */ + @Override + public void removeByF_CREATED_BETWEEN(Date createDate, Date modifiedDate) { + for (SyncTracking syncTracking : findByF_CREATED_BETWEEN(createDate, + modifiedDate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings where createDate ≥ ? and modifiedDate ≤ ?. + * + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + @Override + public int countByF_CREATED_BETWEEN(Date createDate, Date modifiedDate) { + FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_CREATED_BETWEEN; + + Object[] finderArgs = new Object[] { + _getTime(createDate), _getTime(modifiedDate) + }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_CREATED_BETWEEN_CREATEDATE_1 = "syncTracking.createDate IS NULL AND "; + private static final String _FINDER_COLUMN_F_CREATED_BETWEEN_CREATEDATE_2 = "syncTracking.createDate >= ? AND "; + private static final String _FINDER_COLUMN_F_CREATED_BETWEEN_MODIFIEDDATE_1 = "syncTracking.modifiedDate IS NULL"; + private static final String _FINDER_COLUMN_F_CREATED_BETWEEN_MODIFIEDDATE_2 = "syncTracking.modifiedDate <= ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_DOSSIERNO_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "findByF_DOSSIERNO_CREATED_BETWEEN", + new String[] { + String.class.getName(), Date.class.getName(), + Date.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_DOSSIERNO_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "countByF_DOSSIERNO_CREATED_BETWEEN", + new String[] { + String.class.getName(), Date.class.getName(), + Date.class.getName() + }); + + /** + * Returns all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + @Override + public List findByF_DOSSIERNO_CREATED_BETWEEN( + String dossierNo, Date createDate, Date modifiedDate) { + return findByF_DOSSIERNO_CREATED_BETWEEN(dossierNo, createDate, + modifiedDate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + @Override + public List findByF_DOSSIERNO_CREATED_BETWEEN( + String dossierNo, Date createDate, Date modifiedDate, int start, int end) { + return findByF_DOSSIERNO_CREATED_BETWEEN(dossierNo, createDate, + modifiedDate, start, end, null); + } + + /** + * Returns an ordered range of all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_DOSSIERNO_CREATED_BETWEEN( + String dossierNo, Date createDate, Date modifiedDate, int start, + int end, OrderByComparator orderByComparator) { + return findByF_DOSSIERNO_CREATED_BETWEEN(dossierNo, createDate, + modifiedDate, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_DOSSIERNO_CREATED_BETWEEN( + String dossierNo, Date createDate, Date modifiedDate, int start, + int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_DOSSIERNO_CREATED_BETWEEN; + finderArgs = new Object[] { + dossierNo, _getTime(createDate), _getTime(modifiedDate), + + start, end, orderByComparator + }; + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SyncTracking syncTracking : list) { + if (!Objects.equals(dossierNo, syncTracking.getDossierNo()) || + (createDate.getTime() > syncTracking.getCreateDate() + .getTime()) || + (modifiedDate.getTime() < syncTracking.getModifiedDate() + .getTime())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_DOSSIERNO_CREATED_BETWEEN_First( + String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_DOSSIERNO_CREATED_BETWEEN_First(dossierNo, + createDate, modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("dossierNo="); + msg.append(dossierNo); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the first sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_DOSSIERNO_CREATED_BETWEEN_First( + String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + List list = findByF_DOSSIERNO_CREATED_BETWEEN(dossierNo, + createDate, modifiedDate, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_DOSSIERNO_CREATED_BETWEEN_Last( + String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_DOSSIERNO_CREATED_BETWEEN_Last(dossierNo, + createDate, modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("dossierNo="); + msg.append(dossierNo); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the last sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_DOSSIERNO_CREATED_BETWEEN_Last( + String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + int count = countByF_DOSSIERNO_CREATED_BETWEEN(dossierNo, createDate, + modifiedDate); + + if (count == 0) { + return null; + } + + List list = findByF_DOSSIERNO_CREATED_BETWEEN(dossierNo, + createDate, modifiedDate, count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking[] findByF_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + long trackingId, String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByPrimaryKey(trackingId); + + Session session = null; + + try { + session = openSession(); + + SyncTracking[] array = new SyncTrackingImpl[3]; + + array[0] = getByF_DOSSIERNO_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, dossierNo, createDate, modifiedDate, + orderByComparator, true); + + array[1] = syncTracking; + + array[2] = getByF_DOSSIERNO_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, dossierNo, createDate, modifiedDate, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SyncTracking getByF_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + Session session, SyncTracking syncTracking, String dossierNo, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(syncTracking); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + */ + @Override + public void removeByF_DOSSIERNO_CREATED_BETWEEN(String dossierNo, + Date createDate, Date modifiedDate) { + for (SyncTracking syncTracking : findByF_DOSSIERNO_CREATED_BETWEEN( + dossierNo, createDate, modifiedDate, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings where dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + @Override + public int countByF_DOSSIERNO_CREATED_BETWEEN(String dossierNo, + Date createDate, Date modifiedDate) { + FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_DOSSIERNO_CREATED_BETWEEN; + + Object[] finderArgs = new Object[] { + dossierNo, _getTime(createDate), _getTime(modifiedDate) + }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1 = + "syncTracking.dossierNo IS NULL AND "; + private static final String _FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2 = + "syncTracking.dossierNo = ? AND "; + private static final String _FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3 = + "(syncTracking.dossierNo IS NULL OR syncTracking.dossierNo = '') AND "; + private static final String _FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1 = + "syncTracking.createDate IS NULL AND "; + private static final String _FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2 = + "syncTracking.createDate >= ? AND "; + private static final String _FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1 = + "syncTracking.modifiedDate IS NULL"; + private static final String _FINDER_COLUMN_F_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2 = + "syncTracking.modifiedDate <= ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_REFERENCE_UID_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "findByF_REFERENCE_UID_CREATED_BETWEEN", + new String[] { + String.class.getName(), Date.class.getName(), + Date.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_REFERENCE_UID_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "countByF_REFERENCE_UID_CREATED_BETWEEN", + new String[] { + String.class.getName(), Date.class.getName(), + Date.class.getName() + }); + + /** + * Returns all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + @Override + public List findByF_REFERENCE_UID_CREATED_BETWEEN( + String referenceUid, Date createDate, Date modifiedDate) { + return findByF_REFERENCE_UID_CREATED_BETWEEN(referenceUid, createDate, + modifiedDate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + @Override + public List findByF_REFERENCE_UID_CREATED_BETWEEN( + String referenceUid, Date createDate, Date modifiedDate, int start, + int end) { + return findByF_REFERENCE_UID_CREATED_BETWEEN(referenceUid, createDate, + modifiedDate, start, end, null); + } + + /** + * Returns an ordered range of all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_REFERENCE_UID_CREATED_BETWEEN( + String referenceUid, Date createDate, Date modifiedDate, int start, + int end, OrderByComparator orderByComparator) { + return findByF_REFERENCE_UID_CREATED_BETWEEN(referenceUid, createDate, + modifiedDate, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_REFERENCE_UID_CREATED_BETWEEN( + String referenceUid, Date createDate, Date modifiedDate, int start, + int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_REFERENCE_UID_CREATED_BETWEEN; + finderArgs = new Object[] { + referenceUid, _getTime(createDate), _getTime(modifiedDate), + + start, end, orderByComparator + }; + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SyncTracking syncTracking : list) { + if (!Objects.equals(referenceUid, + syncTracking.getReferenceUid()) || + (createDate.getTime() > syncTracking.getCreateDate() + .getTime()) || + (modifiedDate.getTime() < syncTracking.getModifiedDate() + .getTime())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindReferenceUid = false; + + if (referenceUid == null) { + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_REFERENCEUID_1); + } + else if (referenceUid.equals("")) { + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_REFERENCEUID_3); + } + else { + bindReferenceUid = true; + + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_REFERENCEUID_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindReferenceUid) { + qPos.add(referenceUid); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_REFERENCE_UID_CREATED_BETWEEN_First( + String referenceUid, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_REFERENCE_UID_CREATED_BETWEEN_First(referenceUid, + createDate, modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("referenceUid="); + msg.append(referenceUid); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the first sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_REFERENCE_UID_CREATED_BETWEEN_First( + String referenceUid, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + List list = findByF_REFERENCE_UID_CREATED_BETWEEN(referenceUid, + createDate, modifiedDate, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_REFERENCE_UID_CREATED_BETWEEN_Last( + String referenceUid, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_REFERENCE_UID_CREATED_BETWEEN_Last(referenceUid, + createDate, modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("referenceUid="); + msg.append(referenceUid); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the last sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_REFERENCE_UID_CREATED_BETWEEN_Last( + String referenceUid, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + int count = countByF_REFERENCE_UID_CREATED_BETWEEN(referenceUid, + createDate, modifiedDate); + + if (count == 0) { + return null; + } + + List list = findByF_REFERENCE_UID_CREATED_BETWEEN(referenceUid, + createDate, modifiedDate, count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking[] findByF_REFERENCE_UID_CREATED_BETWEEN_PrevAndNext( + long trackingId, String referenceUid, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByPrimaryKey(trackingId); + + Session session = null; + + try { + session = openSession(); + + SyncTracking[] array = new SyncTrackingImpl[3]; + + array[0] = getByF_REFERENCE_UID_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, referenceUid, createDate, modifiedDate, + orderByComparator, true); + + array[1] = syncTracking; + + array[2] = getByF_REFERENCE_UID_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, referenceUid, createDate, modifiedDate, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SyncTracking getByF_REFERENCE_UID_CREATED_BETWEEN_PrevAndNext( + Session session, SyncTracking syncTracking, String referenceUid, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindReferenceUid = false; + + if (referenceUid == null) { + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_REFERENCEUID_1); + } + else if (referenceUid.equals("")) { + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_REFERENCEUID_3); + } + else { + bindReferenceUid = true; + + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_REFERENCEUID_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindReferenceUid) { + qPos.add(referenceUid); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(syncTracking); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + */ + @Override + public void removeByF_REFERENCE_UID_CREATED_BETWEEN(String referenceUid, + Date createDate, Date modifiedDate) { + for (SyncTracking syncTracking : findByF_REFERENCE_UID_CREATED_BETWEEN( + referenceUid, createDate, modifiedDate, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings where referenceUid = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param referenceUid the reference uid + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + @Override + public int countByF_REFERENCE_UID_CREATED_BETWEEN(String referenceUid, + Date createDate, Date modifiedDate) { + FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_REFERENCE_UID_CREATED_BETWEEN; + + Object[] finderArgs = new Object[] { + referenceUid, _getTime(createDate), _getTime(modifiedDate) + }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindReferenceUid = false; + + if (referenceUid == null) { + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_REFERENCEUID_1); + } + else if (referenceUid.equals("")) { + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_REFERENCEUID_3); + } + else { + bindReferenceUid = true; + + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_REFERENCEUID_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindReferenceUid) { + qPos.add(referenceUid); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_REFERENCEUID_1 = + "syncTracking.referenceUid IS NULL AND "; + private static final String _FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_REFERENCEUID_2 = + "syncTracking.referenceUid = ? AND "; + private static final String _FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_REFERENCEUID_3 = + "(syncTracking.referenceUid IS NULL OR syncTracking.referenceUid = '') AND "; + private static final String _FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_CREATEDATE_1 = + "syncTracking.createDate IS NULL AND "; + private static final String _FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_CREATEDATE_2 = + "syncTracking.createDate >= ? AND "; + private static final String _FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_MODIFIEDDATE_1 = + "syncTracking.modifiedDate IS NULL"; + private static final String _FINDER_COLUMN_F_REFERENCE_UID_CREATED_BETWEEN_MODIFIEDDATE_2 = + "syncTracking.modifiedDate <= ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_SERVICECODE_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "findByF_SERVICECODE_CREATED_BETWEEN", + new String[] { + String.class.getName(), Date.class.getName(), + Date.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_SERVICECODE_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "countByF_SERVICECODE_CREATED_BETWEEN", + new String[] { + String.class.getName(), Date.class.getName(), + Date.class.getName() + }); + + /** + * Returns all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + @Override + public List findByF_SERVICECODE_CREATED_BETWEEN( + String serviceCode, Date createDate, Date modifiedDate) { + return findByF_SERVICECODE_CREATED_BETWEEN(serviceCode, createDate, + modifiedDate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + @Override + public List findByF_SERVICECODE_CREATED_BETWEEN( + String serviceCode, Date createDate, Date modifiedDate, int start, + int end) { + return findByF_SERVICECODE_CREATED_BETWEEN(serviceCode, createDate, + modifiedDate, start, end, null); + } + + /** + * Returns an ordered range of all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_SERVICECODE_CREATED_BETWEEN( + String serviceCode, Date createDate, Date modifiedDate, int start, + int end, OrderByComparator orderByComparator) { + return findByF_SERVICECODE_CREATED_BETWEEN(serviceCode, createDate, + modifiedDate, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_SERVICECODE_CREATED_BETWEEN( + String serviceCode, Date createDate, Date modifiedDate, int start, + int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_SERVICECODE_CREATED_BETWEEN; + finderArgs = new Object[] { + serviceCode, _getTime(createDate), _getTime(modifiedDate), + + start, end, orderByComparator + }; + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SyncTracking syncTracking : list) { + if (!Objects.equals(serviceCode, + syncTracking.getServiceCode()) || + (createDate.getTime() > syncTracking.getCreateDate() + .getTime()) || + (modifiedDate.getTime() < syncTracking.getModifiedDate() + .getTime())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_SERVICECODE_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_SERVICECODE_CREATED_BETWEEN_First( + String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_SERVICECODE_CREATED_BETWEEN_First(serviceCode, + createDate, modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("serviceCode="); + msg.append(serviceCode); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the first sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_SERVICECODE_CREATED_BETWEEN_First( + String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + List list = findByF_SERVICECODE_CREATED_BETWEEN(serviceCode, + createDate, modifiedDate, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_SERVICECODE_CREATED_BETWEEN_Last( + String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_SERVICECODE_CREATED_BETWEEN_Last(serviceCode, + createDate, modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("serviceCode="); + msg.append(serviceCode); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the last sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_SERVICECODE_CREATED_BETWEEN_Last( + String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + int count = countByF_SERVICECODE_CREATED_BETWEEN(serviceCode, + createDate, modifiedDate); + + if (count == 0) { + return null; + } + + List list = findByF_SERVICECODE_CREATED_BETWEEN(serviceCode, + createDate, modifiedDate, count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking[] findByF_SERVICECODE_CREATED_BETWEEN_PrevAndNext( + long trackingId, String serviceCode, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByPrimaryKey(trackingId); + + Session session = null; + + try { + session = openSession(); + + SyncTracking[] array = new SyncTrackingImpl[3]; + + array[0] = getByF_SERVICECODE_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, serviceCode, createDate, modifiedDate, + orderByComparator, true); + + array[1] = syncTracking; + + array[2] = getByF_SERVICECODE_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, serviceCode, createDate, modifiedDate, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SyncTracking getByF_SERVICECODE_CREATED_BETWEEN_PrevAndNext( + Session session, SyncTracking syncTracking, String serviceCode, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_SERVICECODE_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(syncTracking); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + */ + @Override + public void removeByF_SERVICECODE_CREATED_BETWEEN(String serviceCode, + Date createDate, Date modifiedDate) { + for (SyncTracking syncTracking : findByF_SERVICECODE_CREATED_BETWEEN( + serviceCode, createDate, modifiedDate, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings where serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + @Override + public int countByF_SERVICECODE_CREATED_BETWEEN(String serviceCode, + Date createDate, Date modifiedDate) { + FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_SERVICECODE_CREATED_BETWEEN; + + Object[] finderArgs = new Object[] { + serviceCode, _getTime(createDate), _getTime(modifiedDate) + }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_SERVICECODE_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_SERVICECODE_1 = + "syncTracking.serviceCode IS NULL AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_SERVICECODE_2 = + "syncTracking.serviceCode = ? AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_SERVICECODE_3 = + "(syncTracking.serviceCode IS NULL OR syncTracking.serviceCode = '') AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_CREATEDATE_1 = + "syncTracking.createDate IS NULL AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_CREATEDATE_2 = + "syncTracking.createDate >= ? AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_1 = + "syncTracking.modifiedDate IS NULL"; + private static final String _FINDER_COLUMN_F_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_2 = + "syncTracking.modifiedDate <= ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN", + new String[] { + String.class.getName(), String.class.getName(), + Date.class.getName(), Date.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "countByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN", + new String[] { + String.class.getName(), String.class.getName(), + Date.class.getName(), Date.class.getName() + }); + + /** + * Returns all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + @Override + public List findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, Date modifiedDate) { + return findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(serviceCode, + dossierNo, createDate, modifiedDate, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + @Override + public List findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end) { + return findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(serviceCode, + dossierNo, createDate, modifiedDate, start, end, null); + } + + /** + * Returns an ordered range of all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end, + OrderByComparator orderByComparator) { + return findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(serviceCode, + dossierNo, createDate, modifiedDate, start, end, orderByComparator, + true); + } + + /** + * Returns an ordered range of all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN; + finderArgs = new Object[] { + serviceCode, dossierNo, _getTime(createDate), + _getTime(modifiedDate), + + start, end, orderByComparator + }; + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SyncTracking syncTracking : list) { + if (!Objects.equals(serviceCode, + syncTracking.getServiceCode()) || + !Objects.equals(dossierNo, + syncTracking.getDossierNo()) || + (createDate.getTime() > syncTracking.getCreateDate() + .getTime()) || + (modifiedDate.getTime() < syncTracking.getModifiedDate() + .getTime())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(6); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_2); + } + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First(serviceCode, + dossierNo, createDate, modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(10); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("serviceCode="); + msg.append(serviceCode); + + msg.append(", dossierNo="); + msg.append(dossierNo); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the first sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) { + List list = findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(serviceCode, + dossierNo, createDate, modifiedDate, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last(serviceCode, + dossierNo, createDate, modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(10); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("serviceCode="); + msg.append(serviceCode); + + msg.append(", dossierNo="); + msg.append(dossierNo); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the last sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last( + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) { + int count = countByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(serviceCode, + dossierNo, createDate, modifiedDate); + + if (count == 0) { + return null; + } + + List list = findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(serviceCode, + dossierNo, createDate, modifiedDate, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking[] findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + long trackingId, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByPrimaryKey(trackingId); + + Session session = null; + + try { + session = openSession(); + + SyncTracking[] array = new SyncTrackingImpl[3]; + + array[0] = getByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, serviceCode, dossierNo, createDate, + modifiedDate, orderByComparator, true); + + array[1] = syncTracking; + + array[2] = getByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, serviceCode, dossierNo, createDate, + modifiedDate, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SyncTracking getByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + Session session, SyncTracking syncTracking, String serviceCode, + String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(7 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(6); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_2); + } + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(syncTracking); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + */ + @Override + public void removeByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, Date modifiedDate) { + for (SyncTracking syncTracking : findByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + serviceCode, dossierNo, createDate, modifiedDate, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings where serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + @Override + public int countByF_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String serviceCode, String dossierNo, Date createDate, Date modifiedDate) { + FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN; + + Object[] finderArgs = new Object[] { + serviceCode, dossierNo, _getTime(createDate), + _getTime(modifiedDate) + }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(5); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_2); + } + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_1 = + "syncTracking.serviceCode IS NULL AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_2 = + "syncTracking.serviceCode = ? AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_3 = + "(syncTracking.serviceCode IS NULL OR syncTracking.serviceCode = '') AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1 = + "syncTracking.dossierNo IS NULL AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2 = + "syncTracking.dossierNo = ? AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3 = + "(syncTracking.dossierNo IS NULL OR syncTracking.dossierNo = '') AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1 = + "syncTracking.createDate IS NULL AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2 = + "syncTracking.createDate >= ? AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1 = + "syncTracking.modifiedDate IS NULL"; + private static final String _FINDER_COLUMN_F_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2 = + "syncTracking.modifiedDate <= ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN", + new String[] { + String.class.getName(), String.class.getName(), + String.class.getName(), Date.class.getName(), + Date.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "countByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN", + new String[] { + String.class.getName(), String.class.getName(), + String.class.getName(), Date.class.getName(), + Date.class.getName() + }); + + /** + * Returns all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + @Override + public List findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate) { + return findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(api, + serviceCode, dossierNo, createDate, modifiedDate, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + @Override + public List findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end) { + return findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(api, + serviceCode, dossierNo, createDate, modifiedDate, start, end, null); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end, + OrderByComparator orderByComparator) { + return findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(api, + serviceCode, dossierNo, createDate, modifiedDate, start, end, + orderByComparator, true); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN; + finderArgs = new Object[] { + api, serviceCode, dossierNo, _getTime(createDate), + _getTime(modifiedDate), + + start, end, orderByComparator + }; + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SyncTracking syncTracking : list) { + if (!Objects.equals(api, syncTracking.getApi()) || + !Objects.equals(serviceCode, + syncTracking.getServiceCode()) || + !Objects.equals(dossierNo, + syncTracking.getDossierNo()) || + (createDate.getTime() > syncTracking.getCreateDate() + .getTime()) || + (modifiedDate.getTime() < syncTracking.getModifiedDate() + .getTime())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(7 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(7); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindApi = false; + + if (api == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_API_1); + } + else if (api.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_API_3); + } + else { + bindApi = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_API_2); + } + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_2); + } + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindApi) { + qPos.add(api); + } + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First(api, + serviceCode, dossierNo, createDate, modifiedDate, + orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(12); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("api="); + msg.append(api); + + msg.append(", serviceCode="); + msg.append(serviceCode); + + msg.append(", dossierNo="); + msg.append(dossierNo); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_First( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) { + List list = findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(api, + serviceCode, dossierNo, createDate, modifiedDate, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last(api, + serviceCode, dossierNo, createDate, modifiedDate, + orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(12); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("api="); + msg.append(api); + + msg.append(", serviceCode="); + msg.append(serviceCode); + + msg.append(", dossierNo="); + msg.append(dossierNo); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_Last( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) { + int count = countByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(api, + serviceCode, dossierNo, createDate, modifiedDate); + + if (count == 0) { + return null; + } + + List list = findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(api, + serviceCode, dossierNo, createDate, modifiedDate, count - 1, + count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking[] findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + long trackingId, String api, String serviceCode, String dossierNo, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByPrimaryKey(trackingId); + + Session session = null; + + try { + session = openSession(); + + SyncTracking[] array = new SyncTrackingImpl[3]; + + array[0] = getByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, api, serviceCode, dossierNo, createDate, + modifiedDate, orderByComparator, true); + + array[1] = syncTracking; + + array[2] = getByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, api, serviceCode, dossierNo, createDate, + modifiedDate, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SyncTracking getByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + Session session, SyncTracking syncTracking, String api, + String serviceCode, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator, + boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(8 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(7); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindApi = false; + + if (api == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_API_1); + } + else if (api.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_API_3); + } + else { + bindApi = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_API_2); + } + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_2); + } + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindApi) { + qPos.add(api); + } + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(syncTracking); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + */ + @Override + public void removeByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + String api, String serviceCode, String dossierNo, Date createDate, + Date modifiedDate) { + for (SyncTracking syncTracking : findByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN( + api, serviceCode, dossierNo, createDate, modifiedDate, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings where api = ? and serviceCode = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + @Override + public int countByF_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN(String api, + String serviceCode, String dossierNo, Date createDate, Date modifiedDate) { + FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN; + + Object[] finderArgs = new Object[] { + api, serviceCode, dossierNo, _getTime(createDate), + _getTime(modifiedDate) + }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(6); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindApi = false; + + if (api == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_API_1); + } + else if (api.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_API_3); + } + else { + bindApi = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_API_2); + } + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_2); + } + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindApi) { + qPos.add(api); + } + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_API_1 = + "syncTracking.api IS NULL AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_API_2 = + "syncTracking.api = ? AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_API_3 = + "(syncTracking.api IS NULL OR syncTracking.api = '') AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_1 = + "syncTracking.serviceCode IS NULL AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_2 = + "syncTracking.serviceCode = ? AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_SERVICECODE_3 = + "(syncTracking.serviceCode IS NULL OR syncTracking.serviceCode = '') AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1 = + "syncTracking.dossierNo IS NULL AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2 = + "syncTracking.dossierNo = ? AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3 = + "(syncTracking.dossierNo IS NULL OR syncTracking.dossierNo = '') AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1 = + "syncTracking.createDate IS NULL AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2 = + "syncTracking.createDate >= ? AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1 = + "syncTracking.modifiedDate IS NULL"; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2 = + "syncTracking.modifiedDate <= ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_API_SERVICECODE_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "findByF_API_SERVICECODE_CREATED_BETWEEN", + new String[] { + String.class.getName(), String.class.getName(), + Date.class.getName(), Date.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_API_SERVICECODE_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "countByF_API_SERVICECODE_CREATED_BETWEEN", + new String[] { + String.class.getName(), String.class.getName(), + Date.class.getName(), Date.class.getName() + }); + + /** + * Returns all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + @Override + public List findByF_API_SERVICECODE_CREATED_BETWEEN( + String api, String serviceCode, Date createDate, Date modifiedDate) { + return findByF_API_SERVICECODE_CREATED_BETWEEN(api, serviceCode, + createDate, modifiedDate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + @Override + public List findByF_API_SERVICECODE_CREATED_BETWEEN( + String api, String serviceCode, Date createDate, Date modifiedDate, + int start, int end) { + return findByF_API_SERVICECODE_CREATED_BETWEEN(api, serviceCode, + createDate, modifiedDate, start, end, null); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_API_SERVICECODE_CREATED_BETWEEN( + String api, String serviceCode, Date createDate, Date modifiedDate, + int start, int end, OrderByComparator orderByComparator) { + return findByF_API_SERVICECODE_CREATED_BETWEEN(api, serviceCode, + createDate, modifiedDate, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_API_SERVICECODE_CREATED_BETWEEN( + String api, String serviceCode, Date createDate, Date modifiedDate, + int start, int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_API_SERVICECODE_CREATED_BETWEEN; + finderArgs = new Object[] { + api, serviceCode, _getTime(createDate), _getTime(modifiedDate), + + start, end, orderByComparator + }; + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SyncTracking syncTracking : list) { + if (!Objects.equals(api, syncTracking.getApi()) || + !Objects.equals(serviceCode, + syncTracking.getServiceCode()) || + (createDate.getTime() > syncTracking.getCreateDate() + .getTime()) || + (modifiedDate.getTime() < syncTracking.getModifiedDate() + .getTime())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(6); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindApi = false; + + if (api == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_API_1); + } + else if (api.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_API_3); + } + else { + bindApi = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_API_2); + } + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_SERVICECODE_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindApi) { + qPos.add(api); + } + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_API_SERVICECODE_CREATED_BETWEEN_First( + String api, String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_API_SERVICECODE_CREATED_BETWEEN_First(api, + serviceCode, createDate, modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(10); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("api="); + msg.append(api); + + msg.append(", serviceCode="); + msg.append(serviceCode); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_API_SERVICECODE_CREATED_BETWEEN_First( + String api, String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + List list = findByF_API_SERVICECODE_CREATED_BETWEEN(api, + serviceCode, createDate, modifiedDate, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_API_SERVICECODE_CREATED_BETWEEN_Last( + String api, String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_API_SERVICECODE_CREATED_BETWEEN_Last(api, + serviceCode, createDate, modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(10); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("api="); + msg.append(api); + + msg.append(", serviceCode="); + msg.append(serviceCode); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_API_SERVICECODE_CREATED_BETWEEN_Last( + String api, String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + int count = countByF_API_SERVICECODE_CREATED_BETWEEN(api, serviceCode, + createDate, modifiedDate); + + if (count == 0) { + return null; + } + + List list = findByF_API_SERVICECODE_CREATED_BETWEEN(api, + serviceCode, createDate, modifiedDate, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking[] findByF_API_SERVICECODE_CREATED_BETWEEN_PrevAndNext( + long trackingId, String api, String serviceCode, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByPrimaryKey(trackingId); + + Session session = null; + + try { + session = openSession(); + + SyncTracking[] array = new SyncTrackingImpl[3]; + + array[0] = getByF_API_SERVICECODE_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, api, serviceCode, createDate, modifiedDate, + orderByComparator, true); + + array[1] = syncTracking; + + array[2] = getByF_API_SERVICECODE_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, api, serviceCode, createDate, modifiedDate, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SyncTracking getByF_API_SERVICECODE_CREATED_BETWEEN_PrevAndNext( + Session session, SyncTracking syncTracking, String api, + String serviceCode, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(7 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(6); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindApi = false; + + if (api == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_API_1); + } + else if (api.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_API_3); + } + else { + bindApi = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_API_2); + } + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_SERVICECODE_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindApi) { + qPos.add(api); + } + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(syncTracking); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + */ + @Override + public void removeByF_API_SERVICECODE_CREATED_BETWEEN(String api, + String serviceCode, Date createDate, Date modifiedDate) { + for (SyncTracking syncTracking : findByF_API_SERVICECODE_CREATED_BETWEEN( + api, serviceCode, createDate, modifiedDate, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings where api = ? and serviceCode = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param serviceCode the service code + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + @Override + public int countByF_API_SERVICECODE_CREATED_BETWEEN(String api, + String serviceCode, Date createDate, Date modifiedDate) { + FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_API_SERVICECODE_CREATED_BETWEEN; + + Object[] finderArgs = new Object[] { + api, serviceCode, _getTime(createDate), _getTime(modifiedDate) + }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(5); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindApi = false; + + if (api == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_API_1); + } + else if (api.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_API_3); + } + else { + bindApi = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_API_2); + } + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_SERVICECODE_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindApi) { + qPos.add(api); + } + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_API_1 = + "syncTracking.api IS NULL AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_API_2 = + "syncTracking.api = ? AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_API_3 = + "(syncTracking.api IS NULL OR syncTracking.api = '') AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_SERVICECODE_1 = + "syncTracking.serviceCode IS NULL AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_SERVICECODE_2 = + "syncTracking.serviceCode = ? AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_SERVICECODE_3 = + "(syncTracking.serviceCode IS NULL OR syncTracking.serviceCode = '') AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_CREATEDATE_1 = + "syncTracking.createDate IS NULL AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_CREATEDATE_2 = + "syncTracking.createDate >= ? AND "; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_1 = + "syncTracking.modifiedDate IS NULL"; + private static final String _FINDER_COLUMN_F_API_SERVICECODE_CREATED_BETWEEN_MODIFIEDDATE_2 = + "syncTracking.modifiedDate <= ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_API_DOSSIERNO_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "findByF_API_DOSSIERNO_CREATED_BETWEEN", + new String[] { + String.class.getName(), String.class.getName(), + Date.class.getName(), Date.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_API_DOSSIERNO_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "countByF_API_DOSSIERNO_CREATED_BETWEEN", + new String[] { + String.class.getName(), String.class.getName(), + Date.class.getName(), Date.class.getName() + }); + + /** + * Returns all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + @Override + public List findByF_API_DOSSIERNO_CREATED_BETWEEN( + String api, String dossierNo, Date createDate, Date modifiedDate) { + return findByF_API_DOSSIERNO_CREATED_BETWEEN(api, dossierNo, + createDate, modifiedDate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + @Override + public List findByF_API_DOSSIERNO_CREATED_BETWEEN( + String api, String dossierNo, Date createDate, Date modifiedDate, + int start, int end) { + return findByF_API_DOSSIERNO_CREATED_BETWEEN(api, dossierNo, + createDate, modifiedDate, start, end, null); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_API_DOSSIERNO_CREATED_BETWEEN( + String api, String dossierNo, Date createDate, Date modifiedDate, + int start, int end, OrderByComparator orderByComparator) { + return findByF_API_DOSSIERNO_CREATED_BETWEEN(api, dossierNo, + createDate, modifiedDate, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_API_DOSSIERNO_CREATED_BETWEEN( + String api, String dossierNo, Date createDate, Date modifiedDate, + int start, int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_API_DOSSIERNO_CREATED_BETWEEN; + finderArgs = new Object[] { + api, dossierNo, _getTime(createDate), _getTime(modifiedDate), + + start, end, orderByComparator + }; + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SyncTracking syncTracking : list) { + if (!Objects.equals(api, syncTracking.getApi()) || + !Objects.equals(dossierNo, + syncTracking.getDossierNo()) || + (createDate.getTime() > syncTracking.getCreateDate() + .getTime()) || + (modifiedDate.getTime() < syncTracking.getModifiedDate() + .getTime())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(6); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindApi = false; + + if (api == null) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_API_1); + } + else if (api.equals("")) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_API_3); + } + else { + bindApi = true; + + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_API_2); + } + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindApi) { + qPos.add(api); + } + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_API_DOSSIERNO_CREATED_BETWEEN_First( + String api, String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_API_DOSSIERNO_CREATED_BETWEEN_First(api, + dossierNo, createDate, modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(10); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("api="); + msg.append(api); + + msg.append(", dossierNo="); + msg.append(dossierNo); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_API_DOSSIERNO_CREATED_BETWEEN_First( + String api, String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + List list = findByF_API_DOSSIERNO_CREATED_BETWEEN(api, + dossierNo, createDate, modifiedDate, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_API_DOSSIERNO_CREATED_BETWEEN_Last(String api, + String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_API_DOSSIERNO_CREATED_BETWEEN_Last(api, + dossierNo, createDate, modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(10); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("api="); + msg.append(api); + + msg.append(", dossierNo="); + msg.append(dossierNo); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_API_DOSSIERNO_CREATED_BETWEEN_Last( + String api, String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + int count = countByF_API_DOSSIERNO_CREATED_BETWEEN(api, dossierNo, + createDate, modifiedDate); + + if (count == 0) { + return null; + } + + List list = findByF_API_DOSSIERNO_CREATED_BETWEEN(api, + dossierNo, createDate, modifiedDate, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking[] findByF_API_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + long trackingId, String api, String dossierNo, Date createDate, + Date modifiedDate, OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByPrimaryKey(trackingId); + + Session session = null; + + try { + session = openSession(); + + SyncTracking[] array = new SyncTrackingImpl[3]; + + array[0] = getByF_API_DOSSIERNO_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, api, dossierNo, createDate, modifiedDate, + orderByComparator, true); + + array[1] = syncTracking; + + array[2] = getByF_API_DOSSIERNO_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, api, dossierNo, createDate, modifiedDate, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SyncTracking getByF_API_DOSSIERNO_CREATED_BETWEEN_PrevAndNext( + Session session, SyncTracking syncTracking, String api, + String dossierNo, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(7 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(6); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindApi = false; + + if (api == null) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_API_1); + } + else if (api.equals("")) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_API_3); + } + else { + bindApi = true; + + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_API_2); + } + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindApi) { + qPos.add(api); + } + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(syncTracking); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + */ + @Override + public void removeByF_API_DOSSIERNO_CREATED_BETWEEN(String api, + String dossierNo, Date createDate, Date modifiedDate) { + for (SyncTracking syncTracking : findByF_API_DOSSIERNO_CREATED_BETWEEN( + api, dossierNo, createDate, modifiedDate, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings where api = ? and dossierNo = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param dossierNo the dossier no + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + @Override + public int countByF_API_DOSSIERNO_CREATED_BETWEEN(String api, + String dossierNo, Date createDate, Date modifiedDate) { + FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_API_DOSSIERNO_CREATED_BETWEEN; + + Object[] finderArgs = new Object[] { + api, dossierNo, _getTime(createDate), _getTime(modifiedDate) + }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(5); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindApi = false; + + if (api == null) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_API_1); + } + else if (api.equals("")) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_API_3); + } + else { + bindApi = true; + + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_API_2); + } + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindApi) { + qPos.add(api); + } + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_API_1 = + "syncTracking.api IS NULL AND "; + private static final String _FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_API_2 = + "syncTracking.api = ? AND "; + private static final String _FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_API_3 = + "(syncTracking.api IS NULL OR syncTracking.api = '') AND "; + private static final String _FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_1 = + "syncTracking.dossierNo IS NULL AND "; + private static final String _FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_2 = + "syncTracking.dossierNo = ? AND "; + private static final String _FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_DOSSIERNO_3 = + "(syncTracking.dossierNo IS NULL OR syncTracking.dossierNo = '') AND "; + private static final String _FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_1 = + "syncTracking.createDate IS NULL AND "; + private static final String _FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_CREATEDATE_2 = + "syncTracking.createDate >= ? AND "; + private static final String _FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_1 = + "syncTracking.modifiedDate IS NULL"; + private static final String _FINDER_COLUMN_F_API_DOSSIERNO_CREATED_BETWEEN_MODIFIEDDATE_2 = + "syncTracking.modifiedDate <= ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_API_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "findByF_API_CREATED_BETWEEN", + new String[] { + String.class.getName(), Date.class.getName(), + Date.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_API_CREATED_BETWEEN = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "countByF_API_CREATED_BETWEEN", + new String[] { + String.class.getName(), Date.class.getName(), + Date.class.getName() + }); + + /** + * Returns all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @return the matching sync trackings + */ + @Override + public List findByF_API_CREATED_BETWEEN(String api, + Date createDate, Date modifiedDate) { + return findByF_API_CREATED_BETWEEN(api, createDate, modifiedDate, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of matching sync trackings + */ + @Override + public List findByF_API_CREATED_BETWEEN(String api, + Date createDate, Date modifiedDate, int start, int end) { + return findByF_API_CREATED_BETWEEN(api, createDate, modifiedDate, + start, end, null); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_API_CREATED_BETWEEN(String api, + Date createDate, Date modifiedDate, int start, int end, + OrderByComparator orderByComparator) { + return findByF_API_CREATED_BETWEEN(api, createDate, modifiedDate, + start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching sync trackings + */ + @Override + public List findByF_API_CREATED_BETWEEN(String api, + Date createDate, Date modifiedDate, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_API_CREATED_BETWEEN; + finderArgs = new Object[] { + api, _getTime(createDate), _getTime(modifiedDate), + + start, end, orderByComparator + }; + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (SyncTracking syncTracking : list) { + if (!Objects.equals(api, syncTracking.getApi()) || + (createDate.getTime() > syncTracking.getCreateDate() + .getTime()) || + (modifiedDate.getTime() < syncTracking.getModifiedDate() + .getTime())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindApi = false; + + if (api == null) { + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_API_1); + } + else if (api.equals("")) { + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_API_3); + } + else { + bindApi = true; + + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_API_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindApi) { + qPos.add(api); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_API_CREATED_BETWEEN_First(String api, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_API_CREATED_BETWEEN_First(api, + createDate, modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("api="); + msg.append(api); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the first sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_API_CREATED_BETWEEN_First(String api, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + List list = findByF_API_CREATED_BETWEEN(api, createDate, + modifiedDate, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_API_CREATED_BETWEEN_Last(String api, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_API_CREATED_BETWEEN_Last(api, + createDate, modifiedDate, orderByComparator); + + if (syncTracking != null) { + return syncTracking; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("api="); + msg.append(api); + + msg.append(", createDate="); + msg.append(createDate); + + msg.append(", modifiedDate="); + msg.append(modifiedDate); + + msg.append("}"); + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + /** + * Returns the last sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_API_CREATED_BETWEEN_Last(String api, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) { + int count = countByF_API_CREATED_BETWEEN(api, createDate, modifiedDate); + + if (count == 0) { + return null; + } + + List list = findByF_API_CREATED_BETWEEN(api, createDate, + modifiedDate, count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the sync trackings before and after the current sync tracking in the ordered set where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param trackingId the primary key of the current sync tracking + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking[] findByF_API_CREATED_BETWEEN_PrevAndNext( + long trackingId, String api, Date createDate, Date modifiedDate, + OrderByComparator orderByComparator) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByPrimaryKey(trackingId); + + Session session = null; + + try { + session = openSession(); + + SyncTracking[] array = new SyncTrackingImpl[3]; + + array[0] = getByF_API_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, api, createDate, modifiedDate, + orderByComparator, true); + + array[1] = syncTracking; + + array[2] = getByF_API_CREATED_BETWEEN_PrevAndNext(session, + syncTracking, api, createDate, modifiedDate, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected SyncTracking getByF_API_CREATED_BETWEEN_PrevAndNext( + Session session, SyncTracking syncTracking, String api, + Date createDate, Date modifiedDate, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + boolean bindApi = false; + + if (api == null) { + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_API_1); + } + else if (api.equals("")) { + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_API_3); + } + else { + bindApi = true; + + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_API_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindApi) { + qPos.add(api); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(syncTracking); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ? from the database. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + */ + @Override + public void removeByF_API_CREATED_BETWEEN(String api, Date createDate, + Date modifiedDate) { + for (SyncTracking syncTracking : findByF_API_CREATED_BETWEEN(api, + createDate, modifiedDate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, + null)) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings where api = ? and createDate ≥ ? and modifiedDate ≤ ?. + * + * @param api the api + * @param createDate the create date + * @param modifiedDate the modified date + * @return the number of matching sync trackings + */ + @Override + public int countByF_API_CREATED_BETWEEN(String api, Date createDate, + Date modifiedDate) { + FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_API_CREATED_BETWEEN; + + Object[] finderArgs = new Object[] { + api, _getTime(createDate), _getTime(modifiedDate) + }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + boolean bindApi = false; + + if (api == null) { + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_API_1); + } + else if (api.equals("")) { + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_API_3); + } + else { + bindApi = true; + + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_API_2); + } + + boolean bindCreateDate = false; + + if (createDate == null) { + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_CREATEDATE_1); + } + else { + bindCreateDate = true; + + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_CREATEDATE_2); + } + + boolean bindModifiedDate = false; + + if (modifiedDate == null) { + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_MODIFIEDDATE_1); + } + else { + bindModifiedDate = true; + + query.append(_FINDER_COLUMN_F_API_CREATED_BETWEEN_MODIFIEDDATE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindApi) { + qPos.add(api); + } + + if (bindCreateDate) { + qPos.add(new Timestamp(createDate.getTime())); + } + + if (bindModifiedDate) { + qPos.add(new Timestamp(modifiedDate.getTime())); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_API_CREATED_BETWEEN_API_1 = "syncTracking.api IS NULL AND "; + private static final String _FINDER_COLUMN_F_API_CREATED_BETWEEN_API_2 = "syncTracking.api = ? AND "; + private static final String _FINDER_COLUMN_F_API_CREATED_BETWEEN_API_3 = "(syncTracking.api IS NULL OR syncTracking.api = '') AND "; + private static final String _FINDER_COLUMN_F_API_CREATED_BETWEEN_CREATEDATE_1 = + "syncTracking.createDate IS NULL AND "; + private static final String _FINDER_COLUMN_F_API_CREATED_BETWEEN_CREATEDATE_2 = + "syncTracking.createDate >= ? AND "; + private static final String _FINDER_COLUMN_F_API_CREATED_BETWEEN_MODIFIEDDATE_1 = + "syncTracking.modifiedDate IS NULL"; + private static final String _FINDER_COLUMN_F_API_CREATED_BETWEEN_MODIFIEDDATE_2 = + "syncTracking.modifiedDate <= ?"; + + public SyncTrackingPersistenceImpl() { + setModelClass(SyncTracking.class); + + try { + Field field = BasePersistenceImpl.class.getDeclaredField( + "_dbColumnNames"); + + field.setAccessible(true); + + Map dbColumnNames = new HashMap(); + + dbColumnNames.put("uuid", "uuid_"); + + field.set(this, dbColumnNames); + } + catch (Exception e) { + if (_log.isDebugEnabled()) { + _log.debug(e, e); + } + } + } + + /** + * Caches the sync tracking in the entity cache if it is enabled. + * + * @param syncTracking the sync tracking + */ + @Override + public void cacheResult(SyncTracking syncTracking) { + entityCache.putResult(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingImpl.class, syncTracking.getPrimaryKey(), syncTracking); + + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, + new Object[] { syncTracking.getUuid(), syncTracking.getGroupId() }, + syncTracking); + + finderCache.putResult(FINDER_PATH_FETCH_BY_F_REFERENCEUID, + new Object[] { syncTracking.getReferenceUid() }, syncTracking); + + finderCache.putResult(FINDER_PATH_FETCH_BY_F_DOSSIERNO, + new Object[] { syncTracking.getDossierNo() }, syncTracking); + + syncTracking.resetOriginalValues(); + } + + /** + * Caches the sync trackings in the entity cache if it is enabled. + * + * @param syncTrackings the sync trackings + */ + @Override + public void cacheResult(List syncTrackings) { + for (SyncTracking syncTracking : syncTrackings) { + if (entityCache.getResult( + SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingImpl.class, syncTracking.getPrimaryKey()) == null) { + cacheResult(syncTracking); + } + else { + syncTracking.resetOriginalValues(); + } + } + } + + /** + * Clears the cache for all sync trackings. + * + *

+ * The {@link EntityCache} and {@link FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache() { + entityCache.clearCache(SyncTrackingImpl.class); + + finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + /** + * Clears the cache for the sync tracking. + * + *

+ * The {@link EntityCache} and {@link FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache(SyncTracking syncTracking) { + entityCache.removeResult(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingImpl.class, syncTracking.getPrimaryKey()); + + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + clearUniqueFindersCache((SyncTrackingModelImpl)syncTracking, true); + } + + @Override + public void clearCache(List syncTrackings) { + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + for (SyncTracking syncTracking : syncTrackings) { + entityCache.removeResult(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingImpl.class, syncTracking.getPrimaryKey()); + + clearUniqueFindersCache((SyncTrackingModelImpl)syncTracking, true); + } + } + + protected void cacheUniqueFindersCache( + SyncTrackingModelImpl syncTrackingModelImpl) { + Object[] args = new Object[] { + syncTrackingModelImpl.getUuid(), + syncTrackingModelImpl.getGroupId() + }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, + Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, + syncTrackingModelImpl, false); + + args = new Object[] { syncTrackingModelImpl.getReferenceUid() }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_F_REFERENCEUID, args, + Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_F_REFERENCEUID, args, + syncTrackingModelImpl, false); + + args = new Object[] { syncTrackingModelImpl.getDossierNo() }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_F_DOSSIERNO, args, + Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_F_DOSSIERNO, args, + syncTrackingModelImpl, false); + } + + protected void clearUniqueFindersCache( + SyncTrackingModelImpl syncTrackingModelImpl, boolean clearCurrent) { + if (clearCurrent) { + Object[] args = new Object[] { + syncTrackingModelImpl.getUuid(), + syncTrackingModelImpl.getGroupId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); + } + + if ((syncTrackingModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + syncTrackingModelImpl.getOriginalUuid(), + syncTrackingModelImpl.getOriginalGroupId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); + } + + if (clearCurrent) { + Object[] args = new Object[] { syncTrackingModelImpl.getReferenceUid() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_REFERENCEUID, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_REFERENCEUID, args); + } + + if ((syncTrackingModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_F_REFERENCEUID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + syncTrackingModelImpl.getOriginalReferenceUid() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_REFERENCEUID, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_REFERENCEUID, args); + } + + if (clearCurrent) { + Object[] args = new Object[] { syncTrackingModelImpl.getDossierNo() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_DOSSIERNO, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_DOSSIERNO, args); + } + + if ((syncTrackingModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_F_DOSSIERNO.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + syncTrackingModelImpl.getOriginalDossierNo() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_DOSSIERNO, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_DOSSIERNO, args); + } + } + + /** + * Creates a new sync tracking with the primary key. Does not add the sync tracking to the database. + * + * @param trackingId the primary key for the new sync tracking + * @return the new sync tracking + */ + @Override + public SyncTracking create(long trackingId) { + SyncTracking syncTracking = new SyncTrackingImpl(); + + syncTracking.setNew(true); + syncTracking.setPrimaryKey(trackingId); + + String uuid = PortalUUIDUtil.generate(); + + syncTracking.setUuid(uuid); + + syncTracking.setCompanyId(companyProvider.getCompanyId()); + + return syncTracking; + } + + /** + * Removes the sync tracking with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking that was removed + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking remove(long trackingId) + throws NoSuchSyncTrackingException { + return remove((Serializable)trackingId); + } + + /** + * Removes the sync tracking with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param primaryKey the primary key of the sync tracking + * @return the sync tracking that was removed + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking remove(Serializable primaryKey) + throws NoSuchSyncTrackingException { + Session session = null; + + try { + session = openSession(); + + SyncTracking syncTracking = (SyncTracking)session.get(SyncTrackingImpl.class, + primaryKey); + + if (syncTracking == null) { + if (_log.isDebugEnabled()) { + _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchSyncTrackingException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return remove(syncTracking); + } + catch (NoSuchSyncTrackingException nsee) { + throw nsee; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + @Override + protected SyncTracking removeImpl(SyncTracking syncTracking) { + Session session = null; + + try { + session = openSession(); + + if (!session.contains(syncTracking)) { + syncTracking = (SyncTracking)session.get(SyncTrackingImpl.class, + syncTracking.getPrimaryKeyObj()); + } + + if (syncTracking != null) { + session.delete(syncTracking); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + if (syncTracking != null) { + clearCache(syncTracking); + } + + return syncTracking; + } + + @Override + public SyncTracking updateImpl(SyncTracking syncTracking) { + boolean isNew = syncTracking.isNew(); + + if (!(syncTracking instanceof SyncTrackingModelImpl)) { + InvocationHandler invocationHandler = null; + + if (ProxyUtil.isProxyClass(syncTracking.getClass())) { + invocationHandler = ProxyUtil.getInvocationHandler(syncTracking); + + throw new IllegalArgumentException( + "Implement ModelWrapper in syncTracking proxy " + + invocationHandler.getClass()); + } + + throw new IllegalArgumentException( + "Implement ModelWrapper in custom SyncTracking implementation " + + syncTracking.getClass()); + } + + SyncTrackingModelImpl syncTrackingModelImpl = (SyncTrackingModelImpl)syncTracking; + + if (Validator.isNull(syncTracking.getUuid())) { + String uuid = PortalUUIDUtil.generate(); + + syncTracking.setUuid(uuid); + } + + ServiceContext serviceContext = ServiceContextThreadLocal.getServiceContext(); + + Date now = new Date(); + + if (isNew && (syncTracking.getCreateDate() == null)) { + if (serviceContext == null) { + syncTracking.setCreateDate(now); + } + else { + syncTracking.setCreateDate(serviceContext.getCreateDate(now)); + } + } + + if (!syncTrackingModelImpl.hasSetModifiedDate()) { + if (serviceContext == null) { + syncTracking.setModifiedDate(now); + } + else { + syncTracking.setModifiedDate(serviceContext.getModifiedDate(now)); + } + } + + Session session = null; + + try { + session = openSession(); + + if (syncTracking.isNew()) { + session.save(syncTracking); + + syncTracking.setNew(false); + } + else { + syncTracking = (SyncTracking)session.merge(syncTracking); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + + if (!SyncTrackingModelImpl.COLUMN_BITMASK_ENABLED) { + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + else + if (isNew) { + Object[] args = new Object[] { syncTrackingModelImpl.getUuid() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + + args = new Object[] { + syncTrackingModelImpl.getUuid(), + syncTrackingModelImpl.getCompanyId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, + args); + + args = new Object[] { syncTrackingModelImpl.getProtocol() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_PROTOCOL, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL, + args); + + args = new Object[] { + syncTrackingModelImpl.getProtocol(), + syncTrackingModelImpl.getDossierNo() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_PROTOCOL_DOSSIERNO, + args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL_DOSSIERNO, + args); + + args = new Object[] { + syncTrackingModelImpl.getProtocol(), + syncTrackingModelImpl.getServiceCode() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_PROTOCOL_SERVICECODE, + args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL_SERVICECODE, + args); + + finderCache.removeResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL, + FINDER_ARGS_EMPTY); + } + + else { + if ((syncTrackingModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + syncTrackingModelImpl.getOriginalUuid() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + + args = new Object[] { syncTrackingModelImpl.getUuid() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + } + + if ((syncTrackingModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + syncTrackingModelImpl.getOriginalUuid(), + syncTrackingModelImpl.getOriginalCompanyId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, + args); + + args = new Object[] { + syncTrackingModelImpl.getUuid(), + syncTrackingModelImpl.getCompanyId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, + args); + } + + if ((syncTrackingModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + syncTrackingModelImpl.getOriginalProtocol() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_PROTOCOL, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL, + args); + + args = new Object[] { syncTrackingModelImpl.getProtocol() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_PROTOCOL, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL, + args); + } + + if ((syncTrackingModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL_DOSSIERNO.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + syncTrackingModelImpl.getOriginalProtocol(), + syncTrackingModelImpl.getOriginalDossierNo() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_PROTOCOL_DOSSIERNO, + args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL_DOSSIERNO, + args); + + args = new Object[] { + syncTrackingModelImpl.getProtocol(), + syncTrackingModelImpl.getDossierNo() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_PROTOCOL_DOSSIERNO, + args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL_DOSSIERNO, + args); + } + + if ((syncTrackingModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL_SERVICECODE.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + syncTrackingModelImpl.getOriginalProtocol(), + syncTrackingModelImpl.getOriginalServiceCode() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_PROTOCOL_SERVICECODE, + args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL_SERVICECODE, + args); + + args = new Object[] { + syncTrackingModelImpl.getProtocol(), + syncTrackingModelImpl.getServiceCode() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_PROTOCOL_SERVICECODE, + args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_PROTOCOL_SERVICECODE, + args); + } + } + + entityCache.putResult(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingImpl.class, syncTracking.getPrimaryKey(), syncTracking, + false); + + clearUniqueFindersCache(syncTrackingModelImpl, false); + cacheUniqueFindersCache(syncTrackingModelImpl); + + syncTracking.resetOriginalValues(); + + return syncTracking; + } + + /** + * Returns the sync tracking with the primary key or throws a {@link com.liferay.portal.kernel.exception.NoSuchModelException} if it could not be found. + * + * @param primaryKey the primary key of the sync tracking + * @return the sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking findByPrimaryKey(Serializable primaryKey) + throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByPrimaryKey(primaryKey); + + if (syncTracking == null) { + if (_log.isDebugEnabled()) { + _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchSyncTrackingException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return syncTracking; + } + + /** + * Returns the sync tracking with the primary key or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking + * @throws NoSuchSyncTrackingException if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking findByPrimaryKey(long trackingId) + throws NoSuchSyncTrackingException { + return findByPrimaryKey((Serializable)trackingId); + } + + /** + * Returns the sync tracking with the primary key or returns null if it could not be found. + * + * @param primaryKey the primary key of the sync tracking + * @return the sync tracking, or null if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking fetchByPrimaryKey(Serializable primaryKey) { + Serializable serializable = entityCache.getResult(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingImpl.class, primaryKey); + + if (serializable == nullModel) { + return null; + } + + SyncTracking syncTracking = (SyncTracking)serializable; + + if (syncTracking == null) { + Session session = null; + + try { + session = openSession(); + + syncTracking = (SyncTracking)session.get(SyncTrackingImpl.class, + primaryKey); + + if (syncTracking != null) { + cacheResult(syncTracking); + } + else { + entityCache.putResult(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingImpl.class, primaryKey, nullModel); + } + } + catch (Exception e) { + entityCache.removeResult(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingImpl.class, primaryKey); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return syncTracking; + } + + /** + * Returns the sync tracking with the primary key or returns null if it could not be found. + * + * @param trackingId the primary key of the sync tracking + * @return the sync tracking, or null if a sync tracking with the primary key could not be found + */ + @Override + public SyncTracking fetchByPrimaryKey(long trackingId) { + return fetchByPrimaryKey((Serializable)trackingId); + } + + @Override + public Map fetchByPrimaryKeys( + Set primaryKeys) { + if (primaryKeys.isEmpty()) { + return Collections.emptyMap(); + } + + Map map = new HashMap(); + + if (primaryKeys.size() == 1) { + Iterator iterator = primaryKeys.iterator(); + + Serializable primaryKey = iterator.next(); + + SyncTracking syncTracking = fetchByPrimaryKey(primaryKey); + + if (syncTracking != null) { + map.put(primaryKey, syncTracking); + } + + return map; + } + + Set uncachedPrimaryKeys = null; + + for (Serializable primaryKey : primaryKeys) { + Serializable serializable = entityCache.getResult(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingImpl.class, primaryKey); + + if (serializable != nullModel) { + if (serializable == null) { + if (uncachedPrimaryKeys == null) { + uncachedPrimaryKeys = new HashSet(); + } + + uncachedPrimaryKeys.add(primaryKey); + } + else { + map.put(primaryKey, (SyncTracking)serializable); + } + } + } + + if (uncachedPrimaryKeys == null) { + return map; + } + + StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) + + 1); + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE_PKS_IN); + + for (Serializable primaryKey : uncachedPrimaryKeys) { + query.append((long)primaryKey); + + query.append(","); + } + + query.setIndex(query.index() - 1); + + query.append(")"); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + for (SyncTracking syncTracking : (List)q.list()) { + map.put(syncTracking.getPrimaryKeyObj(), syncTracking); + + cacheResult(syncTracking); + + uncachedPrimaryKeys.remove(syncTracking.getPrimaryKeyObj()); + } + + for (Serializable primaryKey : uncachedPrimaryKeys) { + entityCache.putResult(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingImpl.class, primaryKey, nullModel); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + return map; + } + + /** + * Returns all the sync trackings. + * + * @return the sync trackings + */ + @Override + public List findAll() { + return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the sync trackings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @return the range of sync trackings + */ + @Override + public List findAll(int start, int end) { + return findAll(start, end, null); + } + + /** + * Returns an ordered range of all the sync trackings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of sync trackings + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator) { + return findAll(start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the sync trackings. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link SyncTrackingModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of sync trackings + * @param end the upper bound of the range of sync trackings (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of sync trackings + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL; + finderArgs = FINDER_ARGS_EMPTY; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL; + finderArgs = new Object[] { start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + } + + if (list == null) { + StringBundler query = null; + String sql = null; + + if (orderByComparator != null) { + query = new StringBundler(2 + + (orderByComparator.getOrderByFields().length * 2)); + + query.append(_SQL_SELECT_SYNCTRACKING); + + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + + sql = query.toString(); + } + else { + sql = _SQL_SELECT_SYNCTRACKING; + + if (pagination) { + sql = sql.concat(SyncTrackingModelImpl.ORDER_BY_JPQL); + } + } + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Removes all the sync trackings from the database. + * + */ + @Override + public void removeAll() { + for (SyncTracking syncTracking : findAll()) { + remove(syncTracking); + } + } + + /** + * Returns the number of sync trackings. + * + * @return the number of sync trackings + */ + @Override + public int countAll() { + Long count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, this); + + if (count == null) { + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(_SQL_COUNT_SYNCTRACKING); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY, + count); + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + @Override + public Set getBadColumnNames() { + return _badColumnNames; + } + + @Override + protected Map getTableColumnsMap() { + return SyncTrackingModelImpl.TABLE_COLUMNS_MAP; + } + + /** + * Initializes the sync tracking persistence. + */ + public void afterPropertiesSet() { + } + + public void destroy() { + entityCache.removeCache(SyncTrackingImpl.class.getName()); + finderCache.removeCache(FINDER_CLASS_NAME_ENTITY); + finderCache.removeCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + @ServiceReference(type = CompanyProviderWrapper.class) + protected CompanyProvider companyProvider; + @ServiceReference(type = EntityCache.class) + protected EntityCache entityCache; + @ServiceReference(type = FinderCache.class) + protected FinderCache finderCache; + + private Long _getTime(Date date) { + if (date == null) { + return null; + } + + return date.getTime(); + } + + private static final String _SQL_SELECT_SYNCTRACKING = "SELECT syncTracking FROM SyncTracking syncTracking"; + private static final String _SQL_SELECT_SYNCTRACKING_WHERE_PKS_IN = "SELECT syncTracking FROM SyncTracking syncTracking WHERE trackingId IN ("; + private static final String _SQL_SELECT_SYNCTRACKING_WHERE = "SELECT syncTracking FROM SyncTracking syncTracking WHERE "; + private static final String _SQL_COUNT_SYNCTRACKING = "SELECT COUNT(syncTracking) FROM SyncTracking syncTracking"; + private static final String _SQL_COUNT_SYNCTRACKING_WHERE = "SELECT COUNT(syncTracking) FROM SyncTracking syncTracking WHERE "; + private static final String _ORDER_BY_ENTITY_ALIAS = "syncTracking."; + private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No SyncTracking exists with the primary key "; + private static final String _NO_SUCH_ENTITY_WITH_KEY = "No SyncTracking exists with the key {"; + private static final Log _log = LogFactoryUtil.getLog(SyncTrackingPersistenceImpl.class); + private static final Set _badColumnNames = SetUtil.fromArray(new String[] { + "uuid" + }); +} \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/module-hbm.xml b/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/module-hbm.xml index 7212e48888..bae29d7231 100644 --- a/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/module-hbm.xml +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/module-hbm.xml @@ -3,8 +3,11 @@ + + + @@ -21,6 +24,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -46,4 +76,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/portlet-model-hints.xml b/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/portlet-model-hints.xml index d97032d038..116ac1b2b0 100644 --- a/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/portlet-model-hints.xml +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/portlet-model-hints.xml @@ -31,6 +31,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -66,4 +89,26 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/spring/module-spring.xml b/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/spring/module-spring.xml index 17a59b38b0..f82dad2180 100644 --- a/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/spring/module-spring.xml +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/spring/module-spring.xml @@ -9,8 +9,14 @@ > + + + + + + \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/sql/indexes.sql b/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/sql/indexes.sql index cd176033a0..92faa3c968 100644 --- a/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/sql/indexes.sql +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/sql/indexes.sql @@ -1,7 +1,37 @@ create index IX_6D65FCCE on opencps_adminconfig (code_[$COLUMN_LENGTH:255$]); +create index IX_4F7DE08C on opencps_api_manager (apiCode[$COLUMN_LENGTH:75$]); +create index IX_2B94549F on opencps_api_manager (groupId); + +create index IX_7F39107A on opencps_api_mânger (dynamicReportId, roleId); +create index IX_B62F9FEE on opencps_api_mânger (roleId); + +create index IX_57B8BA6 on opencps_api_role (groupId); +create index IX_9B97863B on opencps_api_role (roleCode[$COLUMN_LENGTH:75$]); + create index IX_D64CC8C9 on opencps_dynamicreport (groupId, reportCode[$COLUMN_LENGTH:128$]); create index IX_F3E18AD6 on opencps_dynamicreport (groupId, reportType[$COLUMN_LENGTH:128$]); create index IX_A0A5C810 on opencps_reportrole (dynamicReportId, roleId); -create index IX_19973198 on opencps_reportrole (roleId); \ No newline at end of file +create index IX_19973198 on opencps_reportrole (roleId); + +create index IX_7DCDD958 on opencps_synctracking (api[$COLUMN_LENGTH:75$], createDate, modifiedDate); +create index IX_99F57BF6 on opencps_synctracking (api[$COLUMN_LENGTH:75$], dossierNo[$COLUMN_LENGTH:75$], createDate, modifiedDate); +create index IX_5298CB8C on opencps_synctracking (api[$COLUMN_LENGTH:75$], serviceCode[$COLUMN_LENGTH:75$], createDate, modifiedDate); +create index IX_4154E142 on opencps_synctracking (api[$COLUMN_LENGTH:75$], serviceCode[$COLUMN_LENGTH:75$], dossierNo[$COLUMN_LENGTH:75$], createDate, modifiedDate); +create index IX_E86A01E4 on opencps_synctracking (createDate, modifiedDate); +create index IX_ACD6C3EA on opencps_synctracking (dossierNo[$COLUMN_LENGTH:75$], createDate, modifiedDate); +create index IX_5D8AF1B8 on opencps_synctracking (groupId, createDate, modifiedDate); +create index IX_FC376796 on opencps_synctracking (groupId, dossierNo[$COLUMN_LENGTH:75$], createDate, modifiedDate); +create index IX_C61B1D01 on opencps_synctracking (groupId, protocol[$COLUMN_LENGTH:75$], dossierNo[$COLUMN_LENGTH:75$]); +create index IX_E5F3717 on opencps_synctracking (groupId, protocol[$COLUMN_LENGTH:75$], serviceCode[$COLUMN_LENGTH:75$]); +create index IX_1A268FF1 on opencps_synctracking (groupId, referenceUid[$COLUMN_LENGTH:75$], createDate, modifiedDate); +create index IX_2C0E4F2C on opencps_synctracking (groupId, serviceCode[$COLUMN_LENGTH:75$], createDate, modifiedDate); +create index IX_1366D9A2 on opencps_synctracking (groupId, serviceCode[$COLUMN_LENGTH:75$], dossierNo[$COLUMN_LENGTH:75$], createDate, modifiedDate); +create index IX_7C85A155 on opencps_synctracking (protocol[$COLUMN_LENGTH:75$], dossierNo[$COLUMN_LENGTH:75$]); +create index IX_D439F66B on opencps_synctracking (protocol[$COLUMN_LENGTH:75$], serviceCode[$COLUMN_LENGTH:75$]); +create index IX_DB1FE31D on opencps_synctracking (referenceUid[$COLUMN_LENGTH:75$], createDate, modifiedDate); +create index IX_3247E680 on opencps_synctracking (serviceCode[$COLUMN_LENGTH:75$], createDate, modifiedDate); +create index IX_6E6325CE on opencps_synctracking (serviceCode[$COLUMN_LENGTH:75$], dossierNo[$COLUMN_LENGTH:75$], createDate, modifiedDate); +create index IX_27BF4A4F on opencps_synctracking (uuid_[$COLUMN_LENGTH:75$], companyId); +create unique index IX_49E41891 on opencps_synctracking (uuid_[$COLUMN_LENGTH:75$], groupId); \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/sql/tables.sql b/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/sql/tables.sql index 965306504e..a398f4f556 100644 --- a/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/sql/tables.sql +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/resources/META-INF/sql/tables.sql @@ -13,6 +13,37 @@ create table opencps_adminconfig ( publicManager BOOLEAN ); +create table opencps_api_manager ( + apiManagerId LONG not null primary key, + groupId LONG, + apiCode VARCHAR(75) null, + createDate DATE null, + modifiedDate DATE null, + userId LONG, + apiName VARCHAR(75) null, + apiDescription VARCHAR(75) null, + apiStatus INTEGER, + className VARCHAR(75) null +); + +create table opencps_api_mânger ( + reportRoleId LONG not null primary key, + dynamicReportId LONG, + roleId LONG +); + +create table opencps_api_role ( + apiRoleId LONG not null primary key, + groupId LONG, + createDate DATE null, + modifiedDate DATE null, + userId LONG, + apiCode VARCHAR(75) null, + roleId INTEGER, + roleCode VARCHAR(75) null, + apiRoleStatus INTEGER +); + create table opencps_dynamicreport ( dynamicReportId LONG not null primary key, groupId LONG, @@ -34,4 +65,27 @@ create table opencps_reportrole ( reportRoleId LONG not null primary key, dynamicReportId LONG, roleId LONG +); + +create table opencps_synctracking ( + uuid_ VARCHAR(75) null, + trackingId LONG not null primary key, + companyId LONG, + groupId LONG, + userId LONG, + userName VARCHAR(75) null, + createDate DATE null, + modifiedDate DATE null, + dossierNo VARCHAR(75) null, + referenceUid VARCHAR(75) null, + serverNo VARCHAR(75) null, + protocol VARCHAR(75) null, + stateSync INTEGER, + serviceCode VARCHAR(75) null, + api VARCHAR(75) null, + fromUnit VARCHAR(75) null, + toUnit VARCHAR(75) null, + bodyRequest VARCHAR(75) null, + response VARCHAR(75) null, + metaData VARCHAR(75) null ); \ No newline at end of file diff --git a/modules/backend-admin-config/backend-admin-config-service/src/main/resources/service.properties b/modules/backend-admin-config/backend-admin-config-service/src/main/resources/service.properties index 0daa5d2a18..6a4c54831c 100644 --- a/modules/backend-admin-config/backend-admin-config-service/src/main/resources/service.properties +++ b/modules/backend-admin-config/backend-admin-config-service/src/main/resources/service.properties @@ -13,5 +13,5 @@ ## build.namespace=ADMIN_CONFIG - build.number=162 - build.date=1614053787185 \ No newline at end of file + build.number=174 + build.date=1617960246205 diff --git a/modules/backend-api-rest-v2-1/bnd.bnd b/modules/backend-api-rest-v2-1/bnd.bnd index 2cd3df1291..431c7d786e 100644 --- a/modules/backend-api-rest-v2-1/bnd.bnd +++ b/modules/backend-api-rest-v2-1/bnd.bnd @@ -4,4 +4,8 @@ Bundle-Version: 1.0.0 Include-Resource:configuration=src/main/resources/configuration - +Export-Package: \ + io.swagger.annotations,\ + io.swagger.annotations.*,\ + org.json.simple.parser.*,\ + org.json.simple.*,\ diff --git a/modules/backend-api-rest/src/main/java/backend/api/rest/application/BackendAPIRestApplication.java b/modules/backend-api-rest/src/main/java/backend/api/rest/application/BackendAPIRestApplication.java index 4a04d3f030..b76344c954 100644 --- a/modules/backend-api-rest/src/main/java/backend/api/rest/application/BackendAPIRestApplication.java +++ b/modules/backend-api-rest/src/main/java/backend/api/rest/application/BackendAPIRestApplication.java @@ -188,6 +188,7 @@ public Set getSingletons() { singletons.add(new QLVGManagementImpl()); singletons.add(new QLCDManagementImpl()); singletons.add(new Mofa2ManagementImpl()); + singletons.add(new SupportSearchManagementImpl()); // singletons.add(new DossierStatisticManagementImpl()); singletons.add(this); diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiManagerDetailModel.java b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiManagerDetailModel.java new file mode 100644 index 0000000000..960739170a --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiManagerDetailModel.java @@ -0,0 +1,287 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2021.04.04 at 10:50:48 PM ICT +// + + +package org.opencps.api.adminconfig.model; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="apiManagerId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *         <element name="groupId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *         <element name="createDate" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="modifiedDate" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="userId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *         <element name="apiCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="apiName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="apiDescription" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="apiStatus" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="className" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "apiManagerId", + "groupId", + "createDate", + "modifiedDate", + "userId", + "apiCode", + "apiName", + "apiDescription", + "apiStatus", + "className" +}) +@XmlRootElement(name = "ApiManagerDetailModel") +public class ApiManagerDetailModel { + + protected long apiManagerId; + protected long groupId; + @XmlElement(required = true) + protected String createDate; + @XmlElement(required = true) + protected String modifiedDate; + protected long userId; + @XmlElement(required = true) + protected String apiCode; + @XmlElement(required = true) + protected String apiName; + @XmlElement(required = true) + protected String apiDescription; + protected int apiStatus; + @XmlElement(required = true) + protected String className; + + /** + * Gets the value of the apiManagerId property. + * + */ + public long getApiManagerId() { + return apiManagerId; + } + + /** + * Sets the value of the apiManagerId property. + * + */ + public void setApiManagerId(long value) { + this.apiManagerId = value; + } + + /** + * Gets the value of the groupId property. + * + */ + public long getGroupId() { + return groupId; + } + + /** + * Sets the value of the groupId property. + * + */ + public void setGroupId(long value) { + this.groupId = value; + } + + /** + * Gets the value of the createDate property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCreateDate() { + return createDate; + } + + /** + * Sets the value of the createDate property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCreateDate(String value) { + this.createDate = value; + } + + /** + * Gets the value of the modifiedDate property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getModifiedDate() { + return modifiedDate; + } + + /** + * Sets the value of the modifiedDate property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setModifiedDate(String value) { + this.modifiedDate = value; + } + + /** + * Gets the value of the userId property. + * + */ + public long getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(long value) { + this.userId = value; + } + + /** + * Gets the value of the apiCode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getApiCode() { + return apiCode; + } + + /** + * Sets the value of the apiCode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setApiCode(String value) { + this.apiCode = value; + } + + /** + * Gets the value of the apiName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getApiName() { + return apiName; + } + + /** + * Sets the value of the apiName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setApiName(String value) { + this.apiName = value; + } + + /** + * Gets the value of the apiDescription property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getApiDescription() { + return apiDescription; + } + + /** + * Sets the value of the apiDescription property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setApiDescription(String value) { + this.apiDescription = value; + } + + /** + * Gets the value of the apiStatus property. + * + */ + public int getApiStatus() { + return apiStatus; + } + + /** + * Sets the value of the apiStatus property. + * + */ + public void setApiStatus(int value) { + this.apiStatus = value; + } + + /** + * Gets the value of the className property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getClassName() { + return className; + } + + /** + * Sets the value of the className property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setClassName(String value) { + this.className = value; + } + +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiManagerInputModel.java b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiManagerInputModel.java new file mode 100644 index 0000000000..def27e25ef --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiManagerInputModel.java @@ -0,0 +1,227 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2021.04.04 at 10:50:48 PM ICT +// + + +package org.opencps.api.adminconfig.model; + +import javax.ws.rs.FormParam; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="modifiedDate" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="userId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *         <element name="apiCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="apiName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="apiDescription" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="apiStatus" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *         <element name="className" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "modifiedDate", + "userId", + "apiCode", + "apiName", + "apiDescription", + "apiStatus", + "className" +}) +@XmlRootElement(name = "ApiManagerInputModel") +public class ApiManagerInputModel { + + @XmlElement(required = true) + protected String modifiedDate; + protected long userId; + @XmlElement(required = true) + @FormParam("apiCode") + protected String apiCode; + @XmlElement(required = true) + @FormParam("apiName") + protected String apiName; + @XmlElement(required = true) + @FormParam("apiDescription") + protected String apiDescription; + @FormParam("apiStatus") + protected int apiStatus; + @XmlElement(required = true) + @FormParam("className") + protected String className; + + /** + * Gets the value of the modifiedDate property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getModifiedDate() { + return modifiedDate; + } + + /** + * Sets the value of the modifiedDate property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setModifiedDate(String value) { + this.modifiedDate = value; + } + + /** + * Gets the value of the userId property. + * + */ + public long getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(long value) { + this.userId = value; + } + + /** + * Gets the value of the apiCode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getApiCode() { + return apiCode; + } + + /** + * Sets the value of the apiCode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setApiCode(String value) { + this.apiCode = value; + } + + /** + * Gets the value of the apiName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getApiName() { + return apiName; + } + + /** + * Sets the value of the apiName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setApiName(String value) { + this.apiName = value; + } + + /** + * Gets the value of the apiDescription property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getApiDescription() { + return apiDescription; + } + + /** + * Sets the value of the apiDescription property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setApiDescription(String value) { + this.apiDescription = value; + } + + /** + * Gets the value of the apiStatus property. + * + */ + public int getApiStatus() { + return apiStatus; + } + + /** + * Sets the value of the apiStatus property. + * + */ + public void setApiStatus(int value) { + this.apiStatus = value; + } + + /** + * Gets the value of the className property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getClassName() { + return className; + } + + /** + * Sets the value of the className property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setClassName(String value) { + this.className = value; + } + +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiManagerModel.java b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiManagerModel.java new file mode 100644 index 0000000000..c2f9fb55e1 --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiManagerModel.java @@ -0,0 +1,287 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2021.04.04 at 10:50:48 PM ICT +// + + +package org.opencps.api.adminconfig.model; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ApiManagerModel complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ApiManagerModel">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <sequence>
+ *           <element name="apiManagerId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *           <element name="groupId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *           <element name="createDate" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *           <element name="modifiedDate" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *           <element name="userId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *           <element name="apiCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *           <element name="apiName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *           <element name="apiDescription" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *           <element name="apiStatus" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *           <element name="className" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         </sequence>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ApiManagerModel", propOrder = { + "apiManagerId", + "groupId", + "createDate", + "modifiedDate", + "userId", + "apiCode", + "apiName", + "apiDescription", + "apiStatus", + "className" +}) +public class ApiManagerModel { + + protected long apiManagerId; + protected long groupId; + @XmlElement(required = true) + protected String createDate; + @XmlElement(required = true) + protected String modifiedDate; + protected long userId; + @XmlElement(required = true) + protected String apiCode; + @XmlElement(required = true) + protected String apiName; + @XmlElement(required = true) + protected String apiDescription; + protected int apiStatus; + @XmlElement(required = true) + protected String className; + + /** + * Gets the value of the apiManagerId property. + * + */ + public long getApiManagerId() { + return apiManagerId; + } + + /** + * Sets the value of the apiManagerId property. + * + */ + public void setApiManagerId(long value) { + this.apiManagerId = value; + } + + /** + * Gets the value of the groupId property. + * + */ + public long getGroupId() { + return groupId; + } + + /** + * Sets the value of the groupId property. + * + */ + public void setGroupId(long value) { + this.groupId = value; + } + + /** + * Gets the value of the createDate property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCreateDate() { + return createDate; + } + + /** + * Sets the value of the createDate property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCreateDate(String value) { + this.createDate = value; + } + + /** + * Gets the value of the modifiedDate property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getModifiedDate() { + return modifiedDate; + } + + /** + * Sets the value of the modifiedDate property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setModifiedDate(String value) { + this.modifiedDate = value; + } + + /** + * Gets the value of the userId property. + * + */ + public long getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(long value) { + this.userId = value; + } + + /** + * Gets the value of the apiCode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getApiCode() { + return apiCode; + } + + /** + * Sets the value of the apiCode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setApiCode(String value) { + this.apiCode = value; + } + + /** + * Gets the value of the apiName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getApiName() { + return apiName; + } + + /** + * Sets the value of the apiName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setApiName(String value) { + this.apiName = value; + } + + /** + * Gets the value of the apiDescription property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getApiDescription() { + return apiDescription; + } + + /** + * Sets the value of the apiDescription property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setApiDescription(String value) { + this.apiDescription = value; + } + + /** + * Gets the value of the apiStatus property. + * + */ + public int getApiStatus() { + return apiStatus; + } + + /** + * Sets the value of the apiStatus property. + * + */ + public void setApiStatus(int value) { + this.apiStatus = value; + } + + /** + * Gets the value of the className property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getClassName() { + return className; + } + + /** + * Sets the value of the className property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setClassName(String value) { + this.className = value; + } + +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiManagerResultsModel.java b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiManagerResultsModel.java new file mode 100644 index 0000000000..445ada968d --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiManagerResultsModel.java @@ -0,0 +1,103 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2021.04.04 at 10:50:48 PM ICT +// + + +package org.opencps.api.adminconfig.model; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="total" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
+ *         <element name="data" type="{}ApiManagerModel" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "total", + "data" +}) +@XmlRootElement(name = "ApiManagerResultsModel") +public class ApiManagerResultsModel { + + protected Integer total; + protected List data; + + /** + * Gets the value of the total property. + * + * @return + * possible object is + * {@link Integer } + * + */ + public Integer getTotal() { + return total; + } + + /** + * Sets the value of the total property. + * + * @param value + * allowed object is + * {@link Integer } + * + */ + public void setTotal(Integer value) { + this.total = value; + } + + /** + * Gets the value of the data property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the data property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getData().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ApiManagerModel } + * + * + */ + public List getData() { + if (data == null) { + data = new ArrayList(); + } + return this.data; + } + +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiRoleDetailModel.java b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiRoleDetailModel.java new file mode 100644 index 0000000000..7b7e3f91df --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiRoleDetailModel.java @@ -0,0 +1,250 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2021.04.04 at 10:50:48 PM ICT +// + + +package org.opencps.api.adminconfig.model; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="apiRoleId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *         <element name="groupId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *         <element name="createDate" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="modifiedDate" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="userId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *         <element name="apiCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="roleId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *         <element name="roleCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="apiRoleStatus" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "apiRoleId", + "groupId", + "createDate", + "modifiedDate", + "userId", + "apiCode", + "roleId", + "roleCode", + "apiRoleStatus" +}) +@XmlRootElement(name = "ApiRoleDetailModel") +public class ApiRoleDetailModel { + + protected long apiRoleId; + protected long groupId; + @XmlElement(required = true) + protected String createDate; + @XmlElement(required = true) + protected String modifiedDate; + protected long userId; + @XmlElement(required = true) + protected String apiCode; + protected long roleId; + @XmlElement(required = true) + protected String roleCode; + protected int apiRoleStatus; + + /** + * Gets the value of the apiRoleId property. + * + */ + public long getApiRoleId() { + return apiRoleId; + } + + /** + * Sets the value of the apiRoleId property. + * + */ + public void setApiRoleId(long value) { + this.apiRoleId = value; + } + + /** + * Gets the value of the groupId property. + * + */ + public long getGroupId() { + return groupId; + } + + /** + * Sets the value of the groupId property. + * + */ + public void setGroupId(long value) { + this.groupId = value; + } + + /** + * Gets the value of the createDate property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCreateDate() { + return createDate; + } + + /** + * Sets the value of the createDate property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCreateDate(String value) { + this.createDate = value; + } + + /** + * Gets the value of the modifiedDate property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getModifiedDate() { + return modifiedDate; + } + + /** + * Sets the value of the modifiedDate property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setModifiedDate(String value) { + this.modifiedDate = value; + } + + /** + * Gets the value of the userId property. + * + */ + public long getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(long value) { + this.userId = value; + } + + /** + * Gets the value of the apiCode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getApiCode() { + return apiCode; + } + + /** + * Sets the value of the apiCode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setApiCode(String value) { + this.apiCode = value; + } + + /** + * Gets the value of the roleId property. + * + */ + public long getRoleId() { + return roleId; + } + + /** + * Sets the value of the roleId property. + * + */ + public void setRoleId(long value) { + this.roleId = value; + } + + /** + * Gets the value of the roleCode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRoleCode() { + return roleCode; + } + + /** + * Sets the value of the roleCode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRoleCode(String value) { + this.roleCode = value; + } + + /** + * Gets the value of the apiRoleStatus property. + * + */ + public int getApiRoleStatus() { + return apiRoleStatus; + } + + /** + * Sets the value of the apiRoleStatus property. + * + */ + public void setApiRoleStatus(int value) { + this.apiRoleStatus = value; + } + +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiRoleInputModel.java b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiRoleInputModel.java new file mode 100644 index 0000000000..a32c4093f3 --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiRoleInputModel.java @@ -0,0 +1,189 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2021.04.04 at 10:50:48 PM ICT +// + + +package org.opencps.api.adminconfig.model; + +import javax.ws.rs.FormParam; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="modifiedDate" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="userId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *         <element name="apiCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="roleId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *         <element name="roleCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="apiRoleStatus" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "modifiedDate", + "userId", + "apiCode", + "roleId", + "roleCode", + "apiRoleStatus" +}) +@XmlRootElement(name = "ApiRoleInputModel") +public class ApiRoleInputModel { + + @XmlElement(required = true) + protected String modifiedDate; + protected long userId; + @XmlElement(required = true) + @FormParam("apiCode") + protected String apiCode; + @FormParam("roleId") + protected long roleId; + @XmlElement(required = true) + @FormParam("roleCode") + protected String roleCode; + @FormParam("apiRoleStatus") + protected int apiRoleStatus; + + /** + * Gets the value of the modifiedDate property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getModifiedDate() { + return modifiedDate; + } + + /** + * Sets the value of the modifiedDate property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setModifiedDate(String value) { + this.modifiedDate = value; + } + + /** + * Gets the value of the userId property. + * + */ + public long getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(long value) { + this.userId = value; + } + + /** + * Gets the value of the apiCode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getApiCode() { + return apiCode; + } + + /** + * Sets the value of the apiCode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setApiCode(String value) { + this.apiCode = value; + } + + /** + * Gets the value of the roleId property. + * + */ + public long getRoleId() { + return roleId; + } + + /** + * Sets the value of the roleId property. + * + */ + public void setRoleId(long value) { + this.roleId = value; + } + + /** + * Gets the value of the roleCode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRoleCode() { + return roleCode; + } + + /** + * Sets the value of the roleCode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRoleCode(String value) { + this.roleCode = value; + } + + /** + * Gets the value of the apiRoleStatus property. + * + */ + public int getApiRoleStatus() { + return apiRoleStatus; + } + + /** + * Sets the value of the apiRoleStatus property. + * + */ + public void setApiRoleStatus(int value) { + this.apiRoleStatus = value; + } + +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiRoleModel.java b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiRoleModel.java new file mode 100644 index 0000000000..261c43926a --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiRoleModel.java @@ -0,0 +1,260 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2021.04.04 at 10:50:48 PM ICT +// + + +package org.opencps.api.adminconfig.model; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ApiRoleModel complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ApiRoleModel">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="apiRoleId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *         <element name="groupId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *         <element name="createDate" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="modifiedDate" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="userId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *         <element name="apiCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="roleId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ *         <element name="roleCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="apiRoleStatus" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ApiRoleModel", propOrder = { + "apiRoleId", + "groupId", + "createDate", + "modifiedDate", + "userId", + "apiCode", + "roleId", + "roleCode", + "roleName", + "apiRoleStatus" +}) +public class ApiRoleModel { + + protected long apiRoleId; + protected long groupId; + @XmlElement(required = true) + protected String createDate; + @XmlElement(required = true) + protected String modifiedDate; + protected long userId; + @XmlElement(required = true) + protected String apiCode; + protected long roleId; + @XmlElement(required = true) + protected String roleCode; + @XmlElement(required = true) + protected String roleName; + protected int apiRoleStatus; + + /** + * Gets the value of the apiRoleId property. + * + */ + public long getApiRoleId() { + return apiRoleId; + } + + /** + * Sets the value of the apiRoleId property. + * + */ + public void setApiRoleId(long value) { + this.apiRoleId = value; + } + + /** + * Gets the value of the groupId property. + * + */ + public long getGroupId() { + return groupId; + } + + /** + * Sets the value of the groupId property. + * + */ + public void setGroupId(long value) { + this.groupId = value; + } + + /** + * Gets the value of the createDate property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCreateDate() { + return createDate; + } + + /** + * Sets the value of the createDate property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCreateDate(String value) { + this.createDate = value; + } + + /** + * Gets the value of the modifiedDate property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getModifiedDate() { + return modifiedDate; + } + + /** + * Sets the value of the modifiedDate property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setModifiedDate(String value) { + this.modifiedDate = value; + } + + /** + * Gets the value of the userId property. + * + */ + public long getUserId() { + return userId; + } + + /** + * Sets the value of the userId property. + * + */ + public void setUserId(long value) { + this.userId = value; + } + + /** + * Gets the value of the apiCode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getApiCode() { + return apiCode; + } + + /** + * Sets the value of the apiCode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setApiCode(String value) { + this.apiCode = value; + } + + /** + * Gets the value of the roleId property. + * + */ + public long getRoleId() { + return roleId; + } + + /** + * Sets the value of the roleId property. + * + */ + public void setRoleId(long value) { + this.roleId = value; + } + + /** + * Gets the value of the roleCode property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRoleCode() { + return roleCode; + } + + /** + * Sets the value of the roleCode property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRoleCode(String value) { + this.roleCode = value; + } + + + public String getRoleName() { + return roleName; + } + + public void setRoleName(String roleName) { + this.roleName = roleName; + } + + /** + * Gets the value of the apiRoleStatus property. + * + */ + public int getApiRoleStatus() { + return apiRoleStatus; + } + + /** + * Sets the value of the apiRoleStatus property. + * + */ + public void setApiRoleStatus(int value) { + this.apiRoleStatus = value; + } + +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiRoleResultsModel.java b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiRoleResultsModel.java new file mode 100644 index 0000000000..cd91eb830e --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ApiRoleResultsModel.java @@ -0,0 +1,103 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2021.04.04 at 10:50:48 PM ICT +// + + +package org.opencps.api.adminconfig.model; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="total" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
+ *         <element name="data" type="{}ApiRoleModel" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "total", + "data" +}) +@XmlRootElement(name = "ApiRoleResultsModel") +public class ApiRoleResultsModel { + + protected Integer total; + protected List data; + + /** + * Gets the value of the total property. + * + * @return + * possible object is + * {@link Integer } + * + */ + public Integer getTotal() { + return total; + } + + /** + * Sets the value of the total property. + * + * @param value + * allowed object is + * {@link Integer } + * + */ + public void setTotal(Integer value) { + this.total = value; + } + + /** + * Gets the value of the data property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the data property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getData().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ApiRoleModel } + * + * + */ + public List getData() { + if (data == null) { + data = new ArrayList(); + } + return this.data; + } + +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/DtoResponse.java b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/DtoResponse.java new file mode 100644 index 0000000000..d8bc0f66b2 --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/DtoResponse.java @@ -0,0 +1,35 @@ +package org.opencps.api.adminconfig.model; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "total", + "data" +}) +@XmlRootElement(name = "data") +public class DtoResponse { + protected Integer total; + protected List data; + + public Integer getTotal() { + return total; + } + + public void setTotal(Integer value) { + this.total = value; + } + + public List getData() { + if (data == null) { + data = new ArrayList(); + } + return this.data; + } +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/LogReportResultResponse.java b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/LogReportResultResponse.java new file mode 100644 index 0000000000..959c80c03c --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/LogReportResultResponse.java @@ -0,0 +1,40 @@ +package org.opencps.api.adminconfig.model; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.opencps.dossiermgt.action.util.ConstantUtils; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "total", + "data" + }) +@XmlRootElement(name = "data") +public class LogReportResultResponse { + + private int total; + private List data; + + public int getTotal() { + return total; + } + + public void setTotal(int total) { + this.total = total; + } + + public List getData() { + if (data == null) { + data = new ArrayList(); + } + return this.data; + } + +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/LogReportStatisticData.java b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/LogReportStatisticData.java new file mode 100644 index 0000000000..8afa604002 --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/LogReportStatisticData.java @@ -0,0 +1,56 @@ +package org.opencps.api.adminconfig.model; + +public class LogReportStatisticData { + + private String apiCode; + private String apiName; + private String apiDescription; + private long groupId; + private int totalAccess = 0; + private int totalAccessSuc = 0; + private int totalAccessFal = 0; + public String getApiCode() { + return apiCode; + } + public void setApiCode(String apiCode) { + this.apiCode = apiCode; + } + public String getApiName() { + return apiName; + } + public void setApiName(String apiName) { + this.apiName = apiName; + } + public long getGroupId() { + return groupId; + } + public void setGroupId(long groupId) { + this.groupId = groupId; + } + public int getTotalAccess() { + return totalAccess; + } + public void setTotalAccess(int totalAccess) { + this.totalAccess = totalAccess; + } + public int getTotalAccessSuc() { + return totalAccessSuc; + } + public void setTotalAccessSuc(int totalAccessSuc) { + this.totalAccessSuc = totalAccessSuc; + } + public int getTotalAccessFal() { + return totalAccessFal; + } + public void setTotalAccessFal(int totalAccessFal) { + this.totalAccessFal = totalAccessFal; + } + public String getApiDescription() { + return apiDescription; + } + public void setApiDescription(String apiDescription) { + this.apiDescription = apiDescription; + } + + +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ObjectFactory.java b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ObjectFactory.java new file mode 100644 index 0000000000..978e732aa8 --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/ObjectFactory.java @@ -0,0 +1,124 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2021.04.04 at 10:50:48 PM ICT +// + + +package org.opencps.api.adminconfig.model; + +import javax.xml.bind.annotation.XmlRegistry; + + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the generated package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: generated + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link ApiManagerDetailModel } + * + */ + public ApiManagerDetailModel createApiManagerDetailModel() { + return new ApiManagerDetailModel(); + } + + /** + * Create an instance of {@link ApiRoleResultsModel } + * + */ + public ApiRoleResultsModel createApiRoleResultsModel() { + return new ApiRoleResultsModel(); + } + + /** + * Create an instance of {@link ApiRoleModel } + * + */ + public ApiRoleModel createApiRoleModel() { + return new ApiRoleModel(); + } + + /** + * Create an instance of {@link ApiManagerInputModel } + * + */ + public ApiManagerInputModel createApiManagerInputModel() { + return new ApiManagerInputModel(); + } + + /** + * Create an instance of {@link ApiManagerResultsModel } + * + */ + public ApiManagerResultsModel createApiManagerResultsModel() { + return new ApiManagerResultsModel(); + } + + /** + * Create an instance of {@link ApiManagerModel } + * + */ + public ApiManagerModel createApiManagerModel() { + return new ApiManagerModel(); + } + + /** + * Create an instance of {@link ApiRoleDetailModel } + * + */ + public ApiRoleDetailModel createApiRoleDetailModel() { + return new ApiRoleDetailModel(); + } + + /** + * Create an instance of {@link ApiRoleInputModel } + * + */ + public ApiRoleInputModel createApiRoleInputModel() { + return new ApiRoleInputModel(); + } + + public SyncTrackingQuery createSyncTrackingQuery() { + return new SyncTrackingQuery(); + } + + public DtoResponse createDtoResponse() { + return new DtoResponse(); + } + + public SyncTrackingResponse createSyncTrackingResponse() { + return new SyncTrackingResponse(); + } + + public LogReportResultResponse createLogReportResultResponse() { + return new LogReportResultResponse(); + } + + public LogReportStatisticData createLogReportStatisticData() { + return new LogReportStatisticData(); + } + +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/SyncTrackingQuery.java b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/SyncTrackingQuery.java new file mode 100644 index 0000000000..13035ade63 --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/SyncTrackingQuery.java @@ -0,0 +1,39 @@ +package org.opencps.api.adminconfig.model; + +import javax.ws.rs.QueryParam; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "SyncTrackingQuery") +public class SyncTrackingQuery { + public Long groupId; + @QueryParam(value = "dossierNo") + public String dossierNo; + @QueryParam(value = "referenceUid") + public String referenceUid; + @QueryParam(value = "fromDate") + public String fromDate; + @QueryParam(value = "toDate") + public String toDate; + @QueryParam(value = "unit") + public String unit; + @QueryParam(value = "protocol") + public String protocol; + @QueryParam(value = "stateSync") + public Integer stateSync; + @QueryParam(value = "serviceCode") + public String serviceCode; + @QueryParam(value = "api") + public String api; + @QueryParam(value = "fromUnit") + public String fromUnit; + @QueryParam(value = "toUnit") + public String[] toUnit; + @QueryParam(value = "start") + public Integer start; + @QueryParam(value = "end") + public Integer end; + public String bodyRequest; + public String bodyResponse; + public String toUnitSingle; + public Long trackingId; +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/SyncTrackingResponse.java b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/SyncTrackingResponse.java new file mode 100644 index 0000000000..f3623e79c3 --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/adminconfig/model/SyncTrackingResponse.java @@ -0,0 +1,100 @@ +package org.opencps.api.adminconfig.model; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SyncTrackingResponse", propOrder = { + "dossierNo", + "createDate", + "stateSync", + "serviceCode", + "fromUnit", + "toUnit", + "bodyRequest", + "bodyResponse", + "api", + "trackingId", + "groupId" +}) +public class SyncTrackingResponse { + public String dossierNo; + public Long createDate; + public Integer stateSync; + public String serviceCode; + public String fromUnit; + public String toUnit; + public String bodyRequest; + public String bodyResponse; + public String api; + public Long trackingId; + public Long groupId; + public String getDossierNo() { + return dossierNo; + } + public void setDossierNo(String dossierNo) { + this.dossierNo = dossierNo; + } + public Long getCreateDate() { + return createDate; + } + public void setCreateDate(Long createDate) { + this.createDate = createDate; + } + public Integer getStateSync() { + return stateSync; + } + public void setStateSync(Integer stateSync) { + this.stateSync = stateSync; + } + public String getServiceCode() { + return serviceCode; + } + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + public String getFromUnit() { + return fromUnit; + } + public void setFromUnit(String fromUnit) { + this.fromUnit = fromUnit; + } + public String getToUnit() { + return toUnit; + } + public void setToUnit(String toUnit) { + this.toUnit = toUnit; + } + public String getBodyRequest() { + return bodyRequest; + } + public void setBodyRequest(String bodyRequest) { + this.bodyRequest = bodyRequest; + } + public String getBodyResponse() { + return bodyResponse; + } + public void setBodyResponse(String bodyResponse) { + this.bodyResponse = bodyResponse; + } + public String getApi() { + return api; + } + public void setApi(String api) { + this.api = api; + } + public Long getTrackingId() { + return trackingId; + } + public void setTrackingId(Long trackingId) { + this.trackingId = trackingId; + } + public Long getGroupId() { + return groupId; + } + public void setGroupId(Long groupId) { + this.groupId = groupId; + } + +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/constants/SupportSearchConstants.java b/modules/backend-api-rest/src/main/java/org/opencps/api/constants/SupportSearchConstants.java new file mode 100644 index 0000000000..3f090689d1 --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/constants/SupportSearchConstants.java @@ -0,0 +1,171 @@ +package org.opencps.api.constants; + +import com.liferay.portal.kernel.json.JSONArray; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import org.opencps.api.controller.util.DateTimeUtil; +import org.opencps.dossiermgt.model.Dossier; +import org.opencps.dossiermgt.model.DossierAction; +import org.opencps.dossiermgt.model.DossierSync; + +import java.util.List; + +public class SupportSearchConstants { + + + public static final String HO_SO_DVC = "HoSoDVC"; + public static final String HO_SO_MCDT = "HoSoMCDT"; + // =================== + public static final String INFO = "info"; + + // =================== + public static final String DOSSIER_SYNC = "dossierSync"; + public static final String ACTION_CODE = "actionCode"; + public static final String SYNC_TYPE = "syncType"; + public static final String PAYLOAD = "payload"; + public static final String STATE_ = "state_"; + public static final String RETRY = "retry"; + public static final String CREATE_DATE = "createDate"; + public static final String MODIFIED_DATE = "modifiedDate"; + public static final String SUDMIT_DATE = "submitDate"; + public static final String RECEIVE_DATE= "receiveDate"; + public static final String DUE_DATE = "dueDate"; + public static final String RELEASE_DATE = "releaseDate"; + public static final String FINISH_DATE = "finishDate"; + public static final String LOCK_STATE = "lockState"; + public static final String REGISTER_BOOK_CODE = "registerBookCode"; + public static final String PROCESS_NO = "processNo"; + public static final String GOV_AGENCY_CODE = "govAgencyCode"; + +// =================== + public static final String DOSSIER = "dossier"; + public static final String DOSSIER_ID = "dossierID"; + public static final String DOSSIER_NO = "dossierNO"; + public static final String REFERENCE_UID = "referenceUid"; + public static final String DOSSIER_STATUS = "dossierStatus"; + public static final String DOSSIER_STATUS_TEXT = "dossierStatusText"; + public static final String DOSSIER_SUB_STATUS_= "dossierSubStatus"; + public static final String DOSSIER_SUB_STATUS_TEXT_= "dossierSubStatusText"; + public static final String DOSSIER_ACTION_ID = "dossierActionId"; + public static final String ORIGINALITY = "originality"; + public static final String ONLINE = "online_"; + public static final String ORIGIN_DOSSIER_NO= "originDossierNo"; + public static final String ORIGIN_DOSSIER_ID= "originDossierId"; + +// =================== + public static final String DOSSIER_ACTION = "dossierAction"; + public static final String FROM_STEP_CODE = "fromStepCode"; + public static final String FROM_STEP_NAME = "fromStepName"; + public static final String ACTION_NAME = "actionName"; + public static final String STEP_CODE = "stepCode"; + public static final String STEP_NAME = "stepName"; + public static final String PENDING = "pending"; + +// ======================= + public static final String DOSSIER_BETWEEN = "dossierBetween"; + public static final String DOSSIER_TRANFER = "dossierTranfer"; + +// ======================= + public static final String DOSSIER_FILE = "dossierFile"; + public static final String URL_DOSSIER_FILE = "url"; + + public static JSONObject convertDossierSyncToObject(DossierSync dossierSync){ + + JSONObject entityDossierSync = JSONFactoryUtil.createJSONObject(); + + entityDossierSync.put(SupportSearchConstants.ACTION_CODE, dossierSync.getDossierId()); + entityDossierSync.put(SupportSearchConstants.SYNC_TYPE, dossierSync.getSyncType()); + entityDossierSync.put(SupportSearchConstants.STATE_, dossierSync.getState()); + entityDossierSync.put(SupportSearchConstants.RETRY, dossierSync.getRetry()); + entityDossierSync.put(SupportSearchConstants.CREATE_DATE, DateTimeUtil.convertDatetoDateTimeString(dossierSync.getCreateDate())); + entityDossierSync.put(SupportSearchConstants.MODIFIED_DATE, DateTimeUtil.convertDatetoDateTimeString(dossierSync.getModifiedDate())); + entityDossierSync.put(SupportSearchConstants.PAYLOAD, dossierSync.getPayload()); + + return entityDossierSync; + } + public static JSONObject convertDossierActionToObject(DossierAction dossierAction){ + JSONObject entityDossierAction = JSONFactoryUtil.createJSONObject(); + + entityDossierAction.put(SupportSearchConstants.DOSSIER_ID, dossierAction.getDossierId()); + entityDossierAction.put(SupportSearchConstants.FROM_STEP_CODE, dossierAction.getFromStepCode()); + entityDossierAction.put(SupportSearchConstants.FROM_STEP_NAME, dossierAction.getFromStepName()); + entityDossierAction.put(SupportSearchConstants.ACTION_CODE, dossierAction.getActionCode()); + entityDossierAction.put(SupportSearchConstants.ACTION_NAME, dossierAction.getActionName()); + entityDossierAction.put(SupportSearchConstants.STEP_CODE, dossierAction.getStepCode()); + entityDossierAction.put(SupportSearchConstants.STEP_NAME, dossierAction.getStepName()); + entityDossierAction.put(SupportSearchConstants.PENDING, dossierAction.getPending()); + entityDossierAction.put(SupportSearchConstants.DOSSIER_ACTION_ID, dossierAction.getDossierActionId()); + entityDossierAction.put(SupportSearchConstants.CREATE_DATE, DateTimeUtil.convertDatetoDateTimeString(dossierAction.getCreateDate())); + entityDossierAction.put(SupportSearchConstants.MODIFIED_DATE, DateTimeUtil.convertDatetoDateTimeString(dossierAction.getModifiedDate())); + + return entityDossierAction; + } + + public static JSONArray convertListSyncToArray(List ListDossierSync){ + JSONArray DossierSyncArray = JSONFactoryUtil.createJSONArray(); + for(DossierSync dossierSync : ListDossierSync){ + JSONObject entityDossierSync = JSONFactoryUtil.createJSONObject(); + entityDossierSync.put(SupportSearchConstants.ACTION_CODE, dossierSync.getActionCode()); + entityDossierSync.put(SupportSearchConstants.SYNC_TYPE, dossierSync.getSyncType()); + entityDossierSync.put(SupportSearchConstants.STATE_, dossierSync.getState()); + entityDossierSync.put(SupportSearchConstants.RETRY, dossierSync.getRetry()); + entityDossierSync.put(SupportSearchConstants.CREATE_DATE, DateTimeUtil.convertDatetoDateTimeString(dossierSync.getCreateDate())); + entityDossierSync.put(SupportSearchConstants.MODIFIED_DATE, DateTimeUtil.convertDatetoDateTimeString(dossierSync.getModifiedDate())); + entityDossierSync.put(SupportSearchConstants.PAYLOAD, dossierSync.getPayload()); + + DossierSyncArray.put(entityDossierSync); + } + return DossierSyncArray; + } + + public static JSONArray convertListActionToArray(List ListDossierAction){ + JSONArray DossierActionArray = JSONFactoryUtil.createJSONArray(); + for(DossierAction dossierAction : ListDossierAction){ + JSONObject entityDossierAction = JSONFactoryUtil.createJSONObject(); + + entityDossierAction.put(SupportSearchConstants.DOSSIER_ID, dossierAction.getDossierId()); + entityDossierAction.put(SupportSearchConstants.FROM_STEP_CODE, dossierAction.getFromStepCode()); + entityDossierAction.put(SupportSearchConstants.FROM_STEP_NAME, dossierAction.getFromStepName()); + entityDossierAction.put(SupportSearchConstants.ACTION_CODE, dossierAction.getActionCode()); + entityDossierAction.put(SupportSearchConstants.ACTION_NAME, dossierAction.getActionName()); + entityDossierAction.put(SupportSearchConstants.STEP_CODE, dossierAction.getStepCode()); + entityDossierAction.put(SupportSearchConstants.STEP_NAME, dossierAction.getStepName()); + entityDossierAction.put(SupportSearchConstants.PENDING, dossierAction.getPending()); + entityDossierAction.put(SupportSearchConstants.DOSSIER_ACTION_ID, dossierAction.getDossierActionId()); + entityDossierAction.put(SupportSearchConstants.CREATE_DATE, DateTimeUtil.convertDatetoDateTimeString(dossierAction.getCreateDate())); + entityDossierAction.put(SupportSearchConstants.MODIFIED_DATE, DateTimeUtil.convertDatetoDateTimeString(dossierAction.getModifiedDate())); + + DossierActionArray.put(entityDossierAction); + } + return DossierActionArray; + } + public static JSONObject convertDossierToJSONObject (Dossier dossier){ + + JSONObject dossierObject = JSONFactoryUtil.createJSONObject(); + + dossierObject.put(SupportSearchConstants.DOSSIER_ID, dossier.getDossierId()); + dossierObject.put(SupportSearchConstants.DOSSIER_NO, dossier.getDossierNo()); + dossierObject.put(SupportSearchConstants.REFERENCE_UID, dossier.getReferenceUid()); + dossierObject.put(SupportSearchConstants.DOSSIER_STATUS, dossier.getDossierStatus()); + dossierObject.put(SupportSearchConstants.DOSSIER_STATUS_TEXT, dossier.getDossierStatusText()); + dossierObject.put(SupportSearchConstants.DOSSIER_SUB_STATUS_, dossier.getDossierSubStatus()); + dossierObject.put(SupportSearchConstants.DOSSIER_SUB_STATUS_TEXT_, dossier.getDossierSubStatusText()); + dossierObject.put(SupportSearchConstants.DOSSIER_ACTION_ID, dossier.getDossierActionId()); + dossierObject.put(SupportSearchConstants.CREATE_DATE, DateTimeUtil.convertDatetoDateTimeString(dossier.getCreateDate())); + dossierObject.put(SupportSearchConstants.MODIFIED_DATE, DateTimeUtil.convertDatetoDateTimeString(dossier.getModifiedDate())); + dossierObject.put(SupportSearchConstants.ORIGINALITY, dossier.getOriginality()); + dossierObject.put(SupportSearchConstants.ONLINE, dossier.getOnline()); + dossierObject.put(SupportSearchConstants.ORIGIN_DOSSIER_ID, dossier.getOriginDossierId()); + dossierObject.put(SupportSearchConstants.ORIGIN_DOSSIER_NO, dossier.getOriginDossierNo()); + dossierObject.put(SupportSearchConstants.SUDMIT_DATE, DateTimeUtil.convertDatetoDateTimeString(dossier.getSubmitDate())); + dossierObject.put(SupportSearchConstants.RECEIVE_DATE, DateTimeUtil.convertDatetoDateTimeString(dossier.getReceiveDate())); + dossierObject.put(SupportSearchConstants.DUE_DATE, DateTimeUtil.convertDatetoDateTimeString(dossier.getDueDate())); + dossierObject.put(SupportSearchConstants.RELEASE_DATE, DateTimeUtil.convertDatetoDateTimeString(dossier.getReleaseDate())); + dossierObject.put(SupportSearchConstants.FINISH_DATE, DateTimeUtil.convertDatetoDateTimeString(dossier.getFinishDate())); + dossierObject.put(SupportSearchConstants.LOCK_STATE, dossier.getLockState()); + dossierObject.put(SupportSearchConstants.REGISTER_BOOK_CODE, dossier.getRegisterBookCode()); + dossierObject.put(SupportSearchConstants.PROCESS_NO, dossier.getProcessNo()); + dossierObject.put(SupportSearchConstants.GOV_AGENCY_CODE, dossier.getGovAgencyCode()); + return dossierObject; + } +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/AdminConfigManagement.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/AdminConfigManagement.java index 98ae4b2dd7..bbfb58336d 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/AdminConfigManagement.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/AdminConfigManagement.java @@ -8,20 +8,40 @@ import java.util.Locale; import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.BeanParam; import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; import javax.ws.rs.FormParam; +import javax.ws.rs.GET; +import javax.ws.rs.OPTIONS; import javax.ws.rs.POST; +import javax.ws.rs.PUT; import javax.ws.rs.Path; +import javax.ws.rs.PathParam; import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; +import org.opencps.api.adminconfig.model.ApiManagerDetailModel; +import org.opencps.api.adminconfig.model.ApiManagerInputModel; +import org.opencps.api.adminconfig.model.ApiManagerResultsModel; +import org.opencps.api.adminconfig.model.ApiRoleDetailModel; +import org.opencps.api.adminconfig.model.ApiRoleInputModel; +import org.opencps.api.adminconfig.model.ApiRoleResultsModel; +import org.opencps.api.adminconfig.model.DtoResponse; +import org.opencps.api.adminconfig.model.LogReportResultResponse; +import org.opencps.api.adminconfig.model.SyncTrackingQuery; +import org.opencps.api.faq.model.QuestionDetailModel; +import org.opencps.api.faq.model.QuestionInputModel; +import org.opencps.api.faq.model.QuestionResultsModel; import org.opencps.api.usermgt.model.ApplicantModel; import org.opencps.exception.model.ExceptionModel; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; @@ -47,4 +67,261 @@ public Response exportDataConfig(@Context HttpServletRequest request, @Context H @Context Company company, @Context Locale locale, @Context User user, @Context ServiceContext serviceContext, @FormParam("columnName") String columnName, @FormParam("content") String content); + + @GET + @Path("/apiManagers") + @Consumes({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "Get all api managers", response = ApiManagerResultsModel.class) + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) + }) + public Response getApiManagers( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext); + + @POST + @Path("/apiManagers") + @Consumes({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "Add a question", response = ApiManagerDetailModel.class) + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns an apimanager was created", response = ApiManagerDetailModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = "Internal error", response = ExceptionModel.class) + }) + public Response addApiManager( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, + @BeanParam ApiManagerInputModel input); + + @PUT + @Path("/apiManagers/{id}") + @Consumes({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "Update a api manager", response = ApiManagerDetailModel.class) + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a question was created", response = QuestionDetailModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = "Internal error", response = ExceptionModel.class) + }) + public Response updateApiManager( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, @PathParam("id") String id, + @BeanParam ApiManagerInputModel input); + + @DELETE + @Path("/apiManagers/{id}") + @Consumes({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "Delete a api manager", response = ApiManagerDetailModel.class) + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a api manager was deleted", response = ApiManagerDetailModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = "Internal error", response = ExceptionModel.class) + }) + public Response deleteApiManager( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, @PathParam("id") String id); + + @OPTIONS + @Path("/apiManagers/{id}") + @Consumes({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "Detail a api manager", response = ApiManagerDetailModel.class) + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a api manager was created", response = ApiManagerDetailModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = "Internal error", response = ExceptionModel.class) + }) + public Response detailApiManager( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, @PathParam("id") String id); + + @GET + @Path("/apiRoles") + @Consumes({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "Get all api roles", response = ApiRoleResultsModel.class) + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) + }) + public Response getApiRoles( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext); + + @POST + @Path("/apiRoles") + @Consumes({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "Add a api role", response = ApiRoleDetailModel.class) + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns an api role was created", response = ApiRoleDetailModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = "Internal error", response = ExceptionModel.class) + }) + public Response addApiRole( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, + @BeanParam ApiRoleInputModel input); + + @PUT + @Path("/apiRoles/{id}") + @Consumes({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "Update a api role", response = ApiRoleDetailModel.class) + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a apr role was created", response = ApiRoleDetailModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = "Internal error", response = ExceptionModel.class) + }) + public Response updateApiRole( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, @PathParam("id") String id, + @BeanParam ApiRoleInputModel input); + + @DELETE + @Path("/apiRoles/{id}") + @Consumes({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "Delete a api role", response = ApiRoleDetailModel.class) + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a api role was deleted", response = ApiRoleDetailModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = "Internal error", response = ExceptionModel.class) + }) + public Response deleteApiRole( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, @PathParam("id") String id); + + @OPTIONS + @Path("/apiRoles/{id}") + @Consumes({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "Detail a api role", response = ApiRoleDetailModel.class) + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a api role was created", response = ApiRoleDetailModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = "Internal error", response = ExceptionModel.class) + }) + public Response detailApiRole( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, @PathParam("id") String id); + + + @GET + @Path("/log-report") + @Consumes({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "Get all log report", response = DtoResponse.class) + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) + }) + public Response getLogReport( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, @BeanParam SyncTrackingQuery input); + + @GET + @Path("/statistic/log-report") + @Consumes({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, + MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "Get all log report", response = LogReportResultResponse.class) + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) + }) + public Response getStatisticLogReport( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, @BeanParam SyncTrackingQuery input); } diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/DossierFileManagement.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/DossierFileManagement.java index 2b1f0d83a3..eef569400d 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/DossierFileManagement.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/DossierFileManagement.java @@ -203,6 +203,8 @@ public Response downloadByDossierId_ReferenceUid( @ApiParam(value = "referenceUid of dossierfile", required = true) @PathParam("referenceUid") String referenceUid, @ApiParam(value = "password for access dossier file", required = false) @PathParam("password") String password); + + @GET @Path("/{id}/files/{referenceUid}/public/{password}") @Consumes({ @@ -732,4 +734,28 @@ public Response updateDossierFileFormDataByDossierId( @Context Company company, @Context Locale locale, @Context User user, @Context ServiceContext serviceContext, @BeanParam DossierSearchModel query); + + @POST + @Path("/{id}/file/eforms") + @Consumes(MediaType.MULTIPART_FORM_DATA) + @Produces({ + MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON + }) + @ApiOperation(value = "addDossierFileByEform)", response = DossierFileModel.class) + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns the DossierFileModel was updated", response = DossierFileResultsModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) + }) + public Response addDossierFileByEform( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, + @ApiParam(value = "id of dossier", required = true) @PathParam("id") long id, + @ApiParam(value = "dossier PartNo", required = true) @FormParam("dossierPartNo") String dossierPartNo, + @ApiParam(value = "display name dossier file", required = true) @FormParam("displayName") String displayName, + @ApiParam(value = "file entry id dossier file", required = true) @FormParam("fileEntryId") long fileEntryId, + @ApiParam(value = "eform file", required = true) @FormParam("eform") boolean eform); + } diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/DossierManagement.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/DossierManagement.java index 22ea5fb915..a88a871bc4 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/DossierManagement.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/DossierManagement.java @@ -3,6 +3,7 @@ import com.liferay.portal.kernel.model.Company; import com.liferay.portal.kernel.model.User; +import com.liferay.portal.kernel.scheduler.SchedulerException; import com.liferay.portal.kernel.service.ServiceContext; import java.net.HttpURLConnection; @@ -54,6 +55,52 @@ @Api(value = "/dossiers", tags = "dossiers") public interface DossierManagement { + @GET + @Path("/{nameScheduler}/count") + @Consumes({ + MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "View Count of Scheduler") + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a list of Dossiers have been filtered", response = DossierResultsModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) + }) + public Response getCountofScheduler( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, @PathParam("nameScheduler") String nameScheduler, + @FormParam("type") String type + ) throws SchedulerException; + + @POST + @Path("/{nameScheduler}/count") + @Consumes({ + MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "View Count of Scheduler") + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a list of Dossiers have been filtered", response = DossierResultsModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) + }) + public Response ResetCountofScheduler( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, @PathParam("nameScheduler") String nameScheduler, + @FormParam("type") String type + ) throws SchedulerException; + + + @POST @Path("/direct") @Consumes({ diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/QLVGManagement.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/QLVGManagement.java index 62b510291d..121920815c 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/QLVGManagement.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/QLVGManagement.java @@ -38,7 +38,8 @@ public Response updateProfile(@Context HttpServletRequest request, @Context Http @Multipart("file") File file, @Multipart("displayName") String displayName, @Multipart("fileType") String fileType, - @Multipart("actionCode") String actionCode); + @Multipart("actionCode") String actionCode, + @Multipart("sequence") int sequence); @GET @Path("/{dossierId}/qlvbcts") diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/SupportSearchManagement.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/SupportSearchManagement.java new file mode 100644 index 0000000000..bffd088009 --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/SupportSearchManagement.java @@ -0,0 +1,94 @@ +package org.opencps.api.controller; + +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.model.Company; +import com.liferay.portal.kernel.model.User; +import com.liferay.portal.kernel.service.ServiceContext; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import org.opencps.api.dossier.model.DossierResultsModel; +import org.opencps.exception.model.ExceptionModel; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import java.net.HttpURLConnection; +import java.util.Locale; + +@Path("") +@Api(value = "", tags = "") +public interface SupportSearchManagement { + + @GET + @Path("/supportSearch/{dossierId}") + @Consumes({ + MediaType.APPLICATION_JSON + }) + @Produces({ + MediaType.APPLICATION_JSON + }) + @ApiOperation(value = "support Search Dossiers") + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a list of Dossiers have been filtered", response = DossierResultsModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) + }) + public Response getSupportSearchDossiers( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, + @PathParam("dossierId") String dossierId, + @QueryParam("isCallAgain") Boolean isCallAgain, + @QueryParam("refUid") String referenceUid); + + @POST + @Path("/supportSearch/{id}") + @Consumes({ + MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED + }) + @Produces({ + MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED + }) + @ApiOperation(value = "support Search Dossiers") + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a list of Dossiers have been filtered", response = DossierResultsModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) + }) + public Response resetStateRetry( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, @PathParam("id") long id, + @FormParam("status") int status, @FormParam("table") String table + ); + + + + @PUT + @Path("/supportUser") + @Consumes({ + MediaType.APPLICATION_JSON + }) + @Produces({ + MediaType.APPLICATION_JSON + }) + @ApiOperation(value = "update Email user") + @ApiResponses(value = { + @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a list of Dossiers have been filtered", response = DossierResultsModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class), + @ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) + }) + public Response supportUser( + @Context HttpServletRequest request, @Context HttpHeaders header, + @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext + ) throws PortalException; +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/AdminConfigManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/AdminConfigManagementImpl.java index 051d9a0fb7..5665ed0008 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/AdminConfigManagementImpl.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/AdminConfigManagementImpl.java @@ -8,6 +8,7 @@ import com.liferay.portal.kernel.dao.orm.ProjectionList; import com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil; import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil; +import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.json.JSONArray; import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONObject; @@ -23,11 +24,17 @@ import com.liferay.portal.kernel.util.TimeZoneUtil; import com.liferay.portal.kernel.util.Validator; -import java.io.*; +import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; import java.lang.reflect.Method; import java.net.HttpURLConnection; import java.net.URL; import java.text.DateFormat; +import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.List; @@ -35,21 +42,52 @@ import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; +import javax.ws.rs.core.Response.ResponseBuilder; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; -import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.usermodel.BorderStyle; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.CellStyle; +import org.apache.poi.ss.usermodel.FillPatternType; +import org.apache.poi.ss.usermodel.Font; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.apache.poi.ss.usermodel.IndexedColors; +import org.apache.poi.ss.usermodel.Row; import org.opencps.adminconfig.model.AdminConfig; +import org.opencps.adminconfig.model.ApiManager; +import org.opencps.adminconfig.model.ApiRole; import org.opencps.adminconfig.service.AdminConfigLocalServiceUtil; +import org.opencps.adminconfig.service.ApiManagerLocalServiceUtil; +import org.opencps.adminconfig.service.ApiRoleLocalServiceUtil; +import org.opencps.api.adminconfig.model.ApiManagerDetailModel; +import org.opencps.api.adminconfig.model.ApiManagerInputModel; +import org.opencps.api.adminconfig.model.ApiManagerModel; +import org.opencps.api.adminconfig.model.ApiManagerResultsModel; +import org.opencps.api.adminconfig.model.ApiRoleDetailModel; +import org.opencps.api.adminconfig.model.ApiRoleInputModel; +import org.opencps.api.adminconfig.model.ApiRoleModel; +import org.opencps.api.adminconfig.model.ApiRoleResultsModel; +import org.opencps.api.adminconfig.model.DtoResponse; +import org.opencps.api.adminconfig.model.LogReportResultResponse; +import org.opencps.api.adminconfig.model.LogReportStatisticData; +import org.opencps.api.adminconfig.model.SyncTrackingQuery; +import org.opencps.api.adminconfig.model.SyncTrackingResponse; import org.opencps.api.constants.ConstantUtils; import org.opencps.api.constants.StatisticManagementConstants; import org.opencps.api.controller.AdminConfigManagement; import org.opencps.api.controller.util.MessageUtil; +import org.opencps.api.controller.util.OpenCPSUtils; +import org.opencps.auth.api.BackendAuth; +import org.opencps.auth.api.BackendAuthImpl; +import org.opencps.auth.api.exception.UnauthenticationException; +import org.opencps.auth.utils.APIDateTimeUtils; import org.opencps.dossiermgt.action.util.OpenCPSConfigUtil; import org.opencps.dossiermgt.model.DeliverableType; import org.opencps.dossiermgt.service.DeliverableTypeLocalServiceUtil; +import org.opencps.usermgt.model.JobPos; +import org.opencps.usermgt.service.JobPosLocalServiceUtil; import org.springframework.http.HttpStatus; import backend.admin.config.whiteboard.BundleLoader; @@ -148,7 +186,25 @@ private static String convertDateToString(Date date) { private static final String CLASSNAME_DELIVERABLE_TYPE = "opencps_deliverabletype"; private static final String TYPE_CODE = "typeCode"; private static final String NOK = "NOK"; - + + private final String ACCESS_CONTROL_ALLOW_ORIGIN_HEADER = "Access-Control-Allow-Origin"; + private final String ACCESS_CONTROL_ALLOW_CREDENTIALS = "Access-Control-Allow-Credentials"; + private final String ACCESS_CONTROL_ALLOW_HEADERS = "Access-Control-Allow-Headers"; + private final String ACCESS_CONTROL_ALLOW_METHODS = "Access-Control-Allow-Methods"; + private final String ORIGIN_HEADER = "Origin"; + private final String METHOD_POST = "POST"; + private final String METHOD_GET = "GET"; + private final String METHOD_PUT = "PUT"; + private final String METHOD_DELETE = "DELETE"; + private final String ALLOW_HEADERS = "origin, content-type, accept, authorization, groupid, token"; + + private void buildCrossOriginHeader(ResponseBuilder builder, HttpServletRequest request, String method) { + builder.header(ACCESS_CONTROL_ALLOW_ORIGIN_HEADER, request.getHeader(ORIGIN_HEADER)); + builder.header(ACCESS_CONTROL_ALLOW_CREDENTIALS, "true"); + builder.header(ACCESS_CONTROL_ALLOW_HEADERS, ALLOW_HEADERS); + builder.header(ACCESS_CONTROL_ALLOW_METHODS, method); + } + @Override public Response onMessage(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, User u, ServiceContext serviceContext, String text) { @@ -158,7 +214,7 @@ public Response onMessage(HttpServletRequest request, HttpHeaders header, Compan try { JSONObject message = JSONFactoryUtil.createJSONObject(text); - _log.info("SOCKET MESSAGE: " + message.toJSONString()); + _log.debug("SOCKET MESSAGE: " + message.toJSONString()); try { if (message.getString(TYPE).equals(ADMIN)) { @@ -391,7 +447,6 @@ public Response onMessage(HttpServletRequest request, HttpHeaders header, Compan JSONObject postData = message.getJSONObject(DATA); JSONObject messageError = JSONFactoryUtil.createJSONObject(); - _log.info("Data: " + postData); if("0".equals(id)) { if (Validator.isNotNull(code) && (CLASSNAME_DELIVERABLE_TYPE.equals(code))) { @@ -590,7 +645,7 @@ public Response exportDataConfig(HttpServletRequest request, HttpHeaders header, String fileName = headerData.getString(NAME) + StringPool.UNDERLINE + String.format("%d.xls", System.currentTimeMillis()); - _log.info("fileName: "+fileName); + _log.debug("fileName: "+fileName); File exportDir = new File(StatisticManagementConstants.FOLDER_EXPORTED); if (!exportDir.exists()) { @@ -711,4 +766,425 @@ private static CellStyle createStyleForContent(HSSFSheet sheet) { return cellStyle; } + @Override + public Response getApiManagers(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, + User user, ServiceContext serviceContext) { + + BackendAuth auth = new BackendAuthImpl(); + long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); + + try { + + if (!auth.isAuth(serviceContext)) { + throw new UnauthenticationException(); + } + + List lstApiManagers = ApiManagerLocalServiceUtil.findByG(groupId); + ApiManagerResultsModel result = new ApiManagerResultsModel(); + result.setTotal(ApiManagerLocalServiceUtil.countByG(groupId)); + List lstModels = new ArrayList<>(); + if (lstApiManagers != null && lstApiManagers.size() > 0) { + for (ApiManager apiManager : lstApiManagers) { + ApiManagerModel model = new ApiManagerModel(); + model.setApiCode(apiManager.getApiCode()); + model.setApiDescription(apiManager.getApiDescription()); + model.setApiName(apiManager.getApiName()); + model.setApiManagerId(apiManager.getApiManagerId()); + model.setApiStatus(apiManager.getApiStatus()); + model.setClassName(apiManager.getClassName()); + model.setCreateDate(APIDateTimeUtils.convertDateToString(apiManager.getCreateDate())); + model.setModifiedDate(APIDateTimeUtils.convertDateToString(apiManager.getModifiedDate())); + model.setUserId(user.getUserId()); + model.setGroupId(groupId); + + lstModels.add(model); + } + result.getData().addAll(lstModels); + } + + ResponseBuilder builder = Response.status(HttpURLConnection.HTTP_OK).entity(result); + buildCrossOriginHeader(builder, request, METHOD_GET); + + return builder.build(); + } + catch (Exception e) { + return BusinessExceptionImpl.processException(e); + } + } + + @Override + public Response addApiManager(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, + User user, ServiceContext serviceContext, ApiManagerInputModel input) { + + BackendAuth auth = new BackendAuthImpl(); + long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); + + try { + + if (!auth.isAuth(serviceContext)) { + throw new UnauthenticationException(); + } + + ApiManager apiManager = ApiManagerLocalServiceUtil.updateApiManager( + user.getUserId(), groupId, 0l, input.getApiCode(), + input.getApiDescription(), input.getApiName(), + input.getApiStatus(), input.getClassName()); + if (apiManager != null) { + ApiManagerDetailModel result = new ApiManagerDetailModel(); + result.setApiCode(apiManager.getApiCode()); + result.setApiDescription(apiManager.getApiDescription()); + result.setApiName(apiManager.getApiName()); + result.setApiStatus(apiManager.getApiStatus()); + result.setClassName(apiManager.getClassName()); + result.setCreateDate(APIDateTimeUtils.convertDateToString(apiManager.getCreateDate())); + result.setModifiedDate(APIDateTimeUtils.convertDateToString(apiManager.getModifiedDate())); + result.setGroupId(apiManager.getGroupId()); + result.setUserId(apiManager.getUserId()); + result.setApiManagerId(apiManager.getApiManagerId()); + + ResponseBuilder builder = Response.status(HttpURLConnection.HTTP_OK).entity(result); + buildCrossOriginHeader(builder, request, METHOD_POST); + + return builder.build(); + } + else { + throw new Exception(MessageUtil.getMessage(ConstantUtils.API_MESSAGE_ERROR_PROCESS_DATABASE)); + } + } + catch (Exception e) { + return BusinessExceptionImpl.processException(e); + } + } + + @Override + public Response updateApiManager(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, + User user, ServiceContext serviceContext, String id, ApiManagerInputModel input) { + + BackendAuth auth = new BackendAuthImpl(); + long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); + long apiManagerId = GetterUtil.getLong(id); + + try { + + if (!auth.isAuth(serviceContext)) { + throw new UnauthenticationException(); + } + + ApiManager apiManager = ApiManagerLocalServiceUtil.updateApiManager( + user.getUserId(), groupId, apiManagerId, input.getApiCode(), + input.getApiDescription(), input.getApiName(), input.getApiStatus(), input.getClassName()); + if (apiManager != null) { + + ApiManagerDetailModel result = new ApiManagerDetailModel(); + result.setApiCode(apiManager.getApiCode()); + result.setApiDescription(apiManager.getApiDescription()); + result.setApiName(apiManager.getApiName()); + result.setApiStatus(apiManager.getApiStatus()); + result.setClassName(apiManager.getClassName()); + result.setCreateDate(APIDateTimeUtils.convertDateToString(apiManager.getCreateDate())); + result.setModifiedDate(APIDateTimeUtils.convertDateToString(apiManager.getModifiedDate())); + result.setGroupId(apiManager.getGroupId()); + result.setUserId(apiManager.getUserId()); + result.setApiManagerId(apiManager.getApiManagerId()); + + ResponseBuilder builder = Response.status(HttpURLConnection.HTTP_OK).entity(result); + buildCrossOriginHeader(builder, request, METHOD_PUT); + + return builder.build(); + } + else { + throw new Exception(MessageUtil.getMessage(ConstantUtils.API_JSON_MESSAGE_PROCESSDBERROR)); + } + } + catch (Exception e) { + return BusinessExceptionImpl.processException(e); + } + } + + @Override + public Response deleteApiManager(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, + User user, ServiceContext serviceContext, String id) { + + BackendAuth auth = new BackendAuthImpl(); + long apiManagerId = GetterUtil.getLong(id); + + try { + + if (!auth.isAuth(serviceContext)) { + throw new UnauthenticationException(); + } + + ApiManagerLocalServiceUtil.deleteApiManager(apiManagerId); + + ResponseBuilder builder = Response.status(HttpURLConnection.HTTP_OK).entity(MessageUtil.getMessage(ConstantUtils.API_MESSAGE_DELETESUCCESS)); + buildCrossOriginHeader(builder, request, METHOD_DELETE); + + return builder.build(); + } + catch (PortalException e) { + _log.debug(e); + return Response.status(HttpURLConnection.HTTP_INTERNAL_ERROR).entity( + MessageUtil.getMessage(ConstantUtils.API_MESSAGE_DELETEFAILURE)).build(); + } + } + + @Override + public Response detailApiManager(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, + User user, ServiceContext serviceContext, String id) { + + ResponseBuilder builder = Response.status(HttpURLConnection.HTTP_OK).entity(StringPool.BLANK); + buildCrossOriginHeader(builder, request, METHOD_GET + StringPool.COMMA + METHOD_PUT + StringPool.COMMA + METHOD_DELETE); + return builder.build(); + } + + @Override + public Response getApiRoles(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, + User user, ServiceContext serviceContext) { + + BackendAuth auth = new BackendAuthImpl(); + long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); + + try { + + if (!auth.isAuth(serviceContext)) { + throw new UnauthenticationException(); + } + + List lstApiRoles = ApiRoleLocalServiceUtil.findByG(groupId); + ApiRoleResultsModel result = new ApiRoleResultsModel(); + result.setTotal(ApiRoleLocalServiceUtil.countByG(groupId)); + List lstModels = new ArrayList<>(); + if (lstApiRoles != null && lstApiRoles.size() > 0) { + for (ApiRole apiRole : lstApiRoles) { + ApiRoleModel model = new ApiRoleModel(); + model.setApiCode(apiRole.getApiCode()); + model.setApiRoleId(apiRole.getRoleId()); + model.setRoleCode(apiRole.getRoleCode()); + model.setApiRoleId(apiRole.getApiRoleId()); + model.setApiRoleStatus(apiRole.getApiRoleStatus()); + model.setCreateDate(APIDateTimeUtils.convertDateToString(apiRole.getCreateDate())); + model.setModifiedDate(APIDateTimeUtils.convertDateToString(apiRole.getModifiedDate())); + model.setUserId(user.getUserId()); + model.setGroupId(groupId); + + JobPos jobPos = JobPosLocalServiceUtil.fetchByF_mappingRoleId(groupId, apiRole.getRoleId()); + if (Validator.isNotNull(jobPos)) { + model.setRoleName(jobPos.getTitle()); + } + lstModels.add(model); + } + result.getData().addAll(lstModels); + } + + ResponseBuilder builder = Response.status(HttpURLConnection.HTTP_OK).entity(result); + buildCrossOriginHeader(builder, request, METHOD_GET); + + return builder.build(); + } + catch (Exception e) { + return BusinessExceptionImpl.processException(e); + } + } + + @Override + public Response addApiRole(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, + User user, ServiceContext serviceContext, ApiRoleInputModel input) { + + BackendAuth auth = new BackendAuthImpl(); + long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); + + try { + + if (!auth.isAuth(serviceContext)) { + throw new UnauthenticationException(); + } + + ApiRole apiRole = ApiRoleLocalServiceUtil.updateApiRole( + user.getUserId(), groupId, 0l, input.getApiCode(), + input.getRoleId(), input.getRoleCode(), + input.getApiRoleStatus()); + if (apiRole != null) { + ApiRoleDetailModel result = new ApiRoleDetailModel(); + result.setApiCode(apiRole.getApiCode()); + result.setRoleId(apiRole.getRoleId()); + result.setRoleCode(apiRole.getRoleCode()); + result.setApiRoleStatus(apiRole.getApiRoleStatus()); + result.setCreateDate(APIDateTimeUtils.convertDateToString(apiRole.getCreateDate())); + result.setModifiedDate(APIDateTimeUtils.convertDateToString(apiRole.getModifiedDate())); + result.setGroupId(apiRole.getGroupId()); + result.setUserId(apiRole.getUserId()); + result.setApiRoleId(apiRole.getApiRoleId()); + + ResponseBuilder builder = Response.status(HttpURLConnection.HTTP_OK).entity(result); + buildCrossOriginHeader(builder, request, METHOD_POST); + + return builder.build(); + } + else { + throw new Exception(MessageUtil.getMessage(ConstantUtils.API_MESSAGE_ERROR_PROCESS_DATABASE)); + } + } + catch (Exception e) { + return BusinessExceptionImpl.processException(e); + } + } + + @Override + public Response updateApiRole(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, + User user, ServiceContext serviceContext, String id, ApiRoleInputModel input) { + + BackendAuth auth = new BackendAuthImpl(); + long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); + long apiRoleId = GetterUtil.getLong(id); + + try { + + if (!auth.isAuth(serviceContext)) { + throw new UnauthenticationException(); + } + + ApiRole apiRole= ApiRoleLocalServiceUtil.updateApiRole( + user.getUserId(), groupId, apiRoleId, input.getApiCode(), + input.getRoleId(), input.getRoleCode(), input.getApiRoleStatus()); + if (apiRole != null) { + + ApiRoleDetailModel result = new ApiRoleDetailModel(); + result.setApiCode(apiRole.getApiCode()); + result.setRoleId(apiRole.getRoleId()); + result.setRoleCode(apiRole.getRoleCode()); + result.setApiRoleStatus(apiRole.getApiRoleStatus()); + result.setCreateDate(APIDateTimeUtils.convertDateToString(apiRole.getCreateDate())); + result.setModifiedDate(APIDateTimeUtils.convertDateToString(apiRole.getModifiedDate())); + result.setGroupId(apiRole.getGroupId()); + result.setUserId(apiRole.getUserId()); + result.setApiRoleId(apiRole.getApiRoleId()); + + ResponseBuilder builder = Response.status(HttpURLConnection.HTTP_OK).entity(result); + buildCrossOriginHeader(builder, request, METHOD_PUT); + + return builder.build(); + } + else { + throw new Exception(MessageUtil.getMessage(ConstantUtils.API_JSON_MESSAGE_PROCESSDBERROR)); + } + } + catch (Exception e) { + return BusinessExceptionImpl.processException(e); + } + } + + @Override + public Response deleteApiRole(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, + User user, ServiceContext serviceContext, String id) { + + BackendAuth auth = new BackendAuthImpl(); + long apiRoleId = GetterUtil.getLong(id); + + try { + + if (!auth.isAuth(serviceContext)) { + throw new UnauthenticationException(); + } + + ApiRoleLocalServiceUtil.deleteApiRole(apiRoleId); + + ResponseBuilder builder = Response.status(HttpURLConnection.HTTP_OK).entity(MessageUtil.getMessage(ConstantUtils.API_MESSAGE_DELETESUCCESS)); + buildCrossOriginHeader(builder, request, METHOD_DELETE); + + return builder.build(); + } + catch (PortalException e) { + _log.debug(e); + return Response.status(HttpURLConnection.HTTP_INTERNAL_ERROR).entity( + MessageUtil.getMessage(ConstantUtils.API_MESSAGE_DELETEFAILURE)).build(); + } + } + + @Override + public Response detailApiRole(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, + User user, ServiceContext serviceContext, String id) { + + ResponseBuilder builder = Response.status(HttpURLConnection.HTTP_OK).entity(StringPool.BLANK); + buildCrossOriginHeader(builder, request, METHOD_GET + StringPool.COMMA + METHOD_PUT + StringPool.COMMA + METHOD_DELETE); + return builder.build(); + } + + @Override + public Response getLogReport(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, + User user, ServiceContext serviceContext, SyncTrackingQuery input) { + + BackendAuth auth = new BackendAuthImpl(); + DtoResponse response = new DtoResponse(); + + try { + if (!auth.isAuth(serviceContext)) { + throw new UnauthenticationException(); + } + response = new OpenCPSUtils().getLogReports(input,false); + _log.debug("Response :" + JSONFactoryUtil.looseSerialize(response)); + + return Response.status(HttpURLConnection.HTTP_OK).entity(response).build(); + + } catch (Exception e) { + return BusinessExceptionImpl.processException(e); + } + + } + + @Override + public Response getStatisticLogReport(HttpServletRequest request, HttpHeaders header, Company company, + Locale locale, User user, ServiceContext serviceContext, SyncTrackingQuery input) { + + BackendAuth auth = new BackendAuthImpl(); + LogReportResultResponse response = new LogReportResultResponse(); + + try { + + if (!auth.isAuth(serviceContext)) { + throw new UnauthenticationException(); + } + if (Validator.isNull(input.end) || input.end== 0) { + input.start = 0; + input.end = 999; + } + List liStatisticDatas = new ArrayList<>(); + DtoResponse dtoResponse = new OpenCPSUtils().getLogReports(input,true); + if (dtoResponse != null) { + List syList = dtoResponse.getData(); + if (Validator.isNotNull(syList) && syList.size() > 0) { + for (SyncTrackingResponse reTrackingResponse : syList) { + LogReportStatisticData data = new LogReportStatisticData(); + data.setGroupId(reTrackingResponse.groupId); + ApiManager apiManager = ApiManagerLocalServiceUtil.findByApiCode(reTrackingResponse.api); + if (Validator.isNotNull(apiManager)) { + data.setApiCode(apiManager.getApiCode()); + data.setApiDescription(apiManager.getApiDescription()); + data.setApiName(apiManager.getApiName()); + } + updateLogReportStaticData(data, reTrackingResponse); + _log.debug("-----------------"); + _log.debug("data: " + JSONFactoryUtil.looseSerialize(data)); + liStatisticDatas.add(data); + } + } + } + response.getData().addAll(liStatisticDatas); + response.setTotal(liStatisticDatas.size()); + return Response.status(HttpURLConnection.HTTP_OK).entity(response).build(); + + } catch (Exception e) { + return BusinessExceptionImpl.processException(e); + } + } + + private void updateLogReportStaticData(LogReportStatisticData logData, SyncTrackingResponse response) { + + if (response.getStateSync() == 0) { + logData.setTotalAccessFal(logData.getTotalAccessFal() + 1); + }else { + logData.setTotalAccessSuc(logData.getTotalAccessSuc() + 1); + } + logData.setTotalAccess(logData.getTotalAccess() + 1); + } + } diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/ApplicantDataManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/ApplicantDataManagementImpl.java index bab43e3fcd..dbfc60d99c 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/ApplicantDataManagementImpl.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/ApplicantDataManagementImpl.java @@ -57,8 +57,8 @@ public Response addApplicantData(HttpServletRequest request, HttpHeaders header, User user, ServiceContext serviceContext, Attachment file, String fileTemplateNo, String fileNo, String fileName, String applicantIdNo, String status) { //Mặc định groupId =0 -// long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); - long groupId = ApplicantTerm.GROUP_ID_DEFAULT; + long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); +// long groupId = ApplicantTerm.GROUP_ID_DEFAULT; DataHandler dataHandler = (file != null) ? file.getDataHandler() : null; ApplicantData applicantData = null; @@ -68,7 +68,6 @@ public Response addApplicantData(HttpServletRequest request, HttpHeaders header, if(Validator.isNull(dataHandler)) { throw new Exception("obj null"); } - if(dataHandler.getInputStream() != null) { applicantData = ApplicantDataLocalServiceUtil.createApplicantData(groupId, fileTemplateNo, fileNo, fileName, applicantIdNo, statusInt, dataHandler.getName(), dataHandler.getInputStream(), serviceContext); ApplicantDataDetailModel result = ApplicantDataUtils.mappingToApplicantDataModel(applicantData); @@ -167,16 +166,17 @@ public Response updateApplicantData(HttpServletRequest request, HttpHeaders head ApplicantData applicantData = null; try { - int statusInt = Validator.isNotNull(status) ? Integer.parseInt(status) : 0; + if(Validator.isNull(dataHandler)) { throw new Exception("obj null"); } - if(Validator.isNotNull(dataHandler.getInputStream()) && dataHandler.getName() !=null){ + if(Validator.isNotNull(dataHandler.getInputStream()) && dataHandler.getName() !=null && !dataHandler.getName().equals("file")){ _log.debug("dataHandler: " + dataHandler.getName()); - applicantData = ApplicantDataLocalServiceUtil.updateApplicantData(groupId, id, fileTemplateNo, fileNo, fileName, applicantIdNo, statusInt, + applicantData = ApplicantDataLocalServiceUtil.updateApplicantData(groupId, id, fileTemplateNo, fileNo, fileName, applicantIdNo, status, dataHandler.getName(), dataHandler.getInputStream(), serviceContext); }else{ - applicantData = ApplicantDataLocalServiceUtil.updateApplicantData(groupId, id, fileTemplateNo, fileNo, fileName, applicantIdNo, statusInt, serviceContext); + _log.debug("dataHandler nulllllllll: " + dataHandler.getName()); + applicantData = ApplicantDataLocalServiceUtil.updateApplicantData(groupId, id, fileTemplateNo, fileNo, fileName, applicantIdNo, status, serviceContext); } ApplicantDataDetailModel result = ApplicantDataUtils.mappingToApplicantDataModel(applicantData); diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/ApplicantManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/ApplicantManagementImpl.java index e94ef1d809..66607330b0 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/ApplicantManagementImpl.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/ApplicantManagementImpl.java @@ -83,6 +83,7 @@ import org.opencps.api.controller.util.EmployeeUtils; import org.opencps.api.controller.util.MessageUtil; import org.opencps.api.controller.util.NGSPRestClient; +import org.opencps.api.controller.util.OpenCPSUtils; import org.opencps.api.employee.model.EmployeeAccountInputModel; import org.opencps.api.employee.model.EmployeeAccountModel; import org.opencps.api.usermgt.model.ApplicantInputModel; @@ -141,12 +142,17 @@ import vn.gov.ngsp.DKDN.GTVT.Models.MToken; public class ApplicantManagementImpl implements ApplicantManagement { + + private static final String API_LIST_APPLICANT = "API_LIST_APPLICANT"; + private static final String API_VIEW_APPLICANT = "API_VIEW_APPLICANT"; + private final String USER_03 = "USER-03"; private final String USER_05 = "USER-05"; @Override public Response register(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, User user, ServiceContext serviceContext, ApplicantInputModel input) { + _log.info("111111"); ApplicantActions actions = new ApplicantActionsImpl(); ApplicantModel result = new ApplicantModel(); @@ -159,9 +165,11 @@ public Response register(HttpServletRequest request, HttpHeaders header, Company String districtName = StringPool.BLANK; String wardName = StringPool.BLANK; + _log.info("Input :" + JSONFactoryUtil.looseSerialize(input)); if (!auth2.checkToken(request, header)) { throw new UnauthenticationException(); } + _log.info("222222"); String applicantName = HtmlUtil.escape(input.getApplicantName()); String applicantIdType = HtmlUtil.escape(input.getApplicantIdType()); String applicantIdNo = HtmlUtil.escape(input.getApplicantIdNo()); @@ -186,6 +194,7 @@ public Response register(HttpServletRequest request, HttpHeaders header, Company wardName = getDictItemName(groupId, ADMINISTRATIVE_REGION, input.getWardCode()); } + _log.info("3333333"); Applicant applicant = actions.register(serviceContext, groupId, applicantName, applicantIdType, applicantIdNo, input.getApplicantIdDate(), contactEmail, address, cityCode, cityName, districtCode, districtName, @@ -385,6 +394,9 @@ public Response getApplicants(HttpServletRequest request, HttpHeaders header, Co ApplicantActions actions = new ApplicantActionsImpl(); ApplicantResultsModel results = new ApplicantResultsModel(); BackendAuth auth = new BackendAuthImpl(); + long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); + JSONObject bodyResponse = JSONFactoryUtil.createJSONObject(); + try { if (!auth.isAuth(serviceContext)) { @@ -410,7 +422,6 @@ public Response getApplicants(HttpServletRequest request, HttpHeaders header, Co APIDateTimeUtils.convertNormalDateToLuceneDate( query.getToRegistryDate()); - long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); LinkedHashMap params = new LinkedHashMap(); @@ -434,14 +445,29 @@ public Response getApplicants(HttpServletRequest request, HttpHeaders header, Co serviceContext.getCompanyId(), groupId, params, sorts, query.getStart(), query.getEnd(), serviceContext); + results.setTotal(jsonData.getInt(ConstantUtils.TOTAL)); if (jsonData != null && jsonData.getInt(ConstantUtils.TOTAL) > 0) { results.getData().addAll(ApplicantUtils.mappingToApplicantResults((List) jsonData.get(ConstantUtils.DATA))); + + bodyResponse.put("status", HttpURLConnection.HTTP_OK); + bodyResponse.put("total", results.getTotal()); } + + // ghi log vao syncTracking + OpenCPSUtils.addSyncTracking(API_LIST_APPLICANT, user.getUserId(), + groupId, StringPool.NULL,StringPool.NULL, StringPool.NULL, 1, + JSONFactoryUtil.looseSerialize(query), bodyResponse.toJSONString()); return Response.status(HttpURLConnection.HTTP_OK).entity(results).build(); } catch (Exception e) { + + bodyResponse.put("status", HttpURLConnection.HTTP_INTERNAL_ERROR); + // ghi log vao syncTracking + OpenCPSUtils.addSyncTracking(API_LIST_APPLICANT, user.getUserId(), + groupId, StringPool.NULL,StringPool.NULL, StringPool.NULL, 0, + JSONFactoryUtil.looseSerialize(query), bodyResponse.toJSONString()); return BusinessExceptionImpl.processException(e); } } @@ -480,6 +506,11 @@ public Response getApplicantDetail(HttpServletRequest request, HttpHeaders heade applicant = actions.getApplicantDetail(serviceContext, id); results = ApplicantUtils.mappingToApplicantModel(applicant); + + // ghi log vao syncTracking + OpenCPSUtils.addSyncTracking(API_VIEW_APPLICANT, user.getUserId(), + applicant.getGroupId(), StringPool.NULL,StringPool.NULL, StringPool.NULL, 1, + String.valueOf(id), JSONFactoryUtil.looseSerialize(results)); return Response.status(HttpURLConnection.HTTP_OK).entity(results).build(); } else { @@ -487,6 +518,10 @@ public Response getApplicantDetail(HttpServletRequest request, HttpHeaders heade } } catch (Exception e) { + // ghi log vao syncTracking + OpenCPSUtils.addSyncTracking(API_VIEW_APPLICANT, user.getUserId(), + applicant.getGroupId(), StringPool.NULL,StringPool.NULL, StringPool.NULL, 0, + String.valueOf(id), JSONFactoryUtil.looseSerialize(results)); return BusinessExceptionImpl.processException(e); } } @@ -1451,6 +1486,7 @@ public Response registerWithCaptcha(HttpServletRequest request, HttpHeaders head : "FAILED")); result = ApplicantUtils.mappingToApplicantModel(applicant); + return Response.status(HttpURLConnection.HTTP_OK).entity(result).build(); } } diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DVCQGIManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DVCQGIManagementImpl.java index 66024c1990..c0d099d0d0 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DVCQGIManagementImpl.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DVCQGIManagementImpl.java @@ -353,9 +353,8 @@ public Response doCreateDossierSuaDoiBoSungFromDVCQG(HttpServletRequest request, boolean isUpdating = bodyFull.getBoolean("isUpdating"); String service = bodyFull.getString("service"); if(Validator.isNotNull(service) && "NhanChungTuThueDat".equals(service)) { - boolean isSync = bodyFull.getBoolean("isSync"); //API nhận chứng từ thanh toán thuế đất cho hồ sơ từ Cổng DVCQG - result = actionImpl.doCreateUpdateDossierFromDVCQG(company, user, groupId, serviceContext, data, isUpdating, isSync); + result = actionImpl.doCreateUpdateDossierFromDVCQG(company, user, groupId, serviceContext, data, isUpdating); }else { result = actionImpl.doCreateDossierSuaDoiBoSungFromDVCQG(company, user, groupId, serviceContext, data, isUpdating); } diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DefaultSignatureManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DefaultSignatureManagementImpl.java index e092ac94b1..18b851a79a 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DefaultSignatureManagementImpl.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DefaultSignatureManagementImpl.java @@ -42,11 +42,7 @@ import java.io.OutputStreamWriter; import java.net.HttpURLConnection; import java.net.URL; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; +import java.util.*; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.core.HttpHeaders; @@ -1394,13 +1390,16 @@ public Response vgcaDossierFilesBySignature(HttpServletRequest request, HttpHead DLFileEntry dlFileEntry = DLFileEntryLocalServiceUtil.fetchDLFileEntry(oldFileEntryId); DLFileEntry newFileEntry = DLFileEntryLocalServiceUtil.fetchDLFileEntry(fileEntryId); File fileSigned = DLFileEntryLocalServiceUtil.getFile(fileEntryId, newFileEntry.getVersion(), false); - - DLAppLocalServiceUtil.updateFileEntry(user.getUserId(), dlFileEntry.getFileEntryId(), dlFileEntry.getTitle(), - dlFileEntry.getMimeType(), dlFileEntry.getTitle(), dlFileEntry.getDescription(), - StringPool.BLANK, true, fileSigned, serviceContext); - - DLAppLocalServiceUtil.deleteFileEntry(newFileEntry.getFileEntryId()); - + try { + FileEntry fileEntry = DLAppLocalServiceUtil.updateFileEntry(user.getUserId(), dlFileEntry.getFileEntryId(), dlFileEntry.getTitle(), + dlFileEntry.getMimeType(), dlFileEntry.getTitle(), dlFileEntry.getDescription(), + StringPool.BLANK, true, fileSigned, serviceContext); + _log.debug("File Upload : " + fileEntry.getFileEntryId()); + + DLAppLocalServiceUtil.deleteFileEntry(newFileEntry.getFileEntryId()); + }catch (Exception e ){ + e.getMessage(); + } // Update deliverable with deliverableType DossierFile dossierFile = DossierFileLocalServiceUtil.getByFileEntryId(fileEntryId); if (dossierFile != null) { @@ -1420,6 +1419,48 @@ public Response vgcaDossierFilesBySignature(HttpServletRequest request, HttpHead signOk = false; } } + // Xử lý file -> cập nhật giấy phép, ưu tiên file đính kèm + // file đính kèm Efrom = false + // không xử lý file isRemoved ( file đã xóa) + List lstFile = DossierFileLocalServiceUtil.getAllDossierFile(dossierId); + long fileEntryIdByFile = 0; + long fileEntryIdByEform = 0; + if(lstFile !=null && lstFile.size() >0){ + for(DossierFile dossierFile : lstFile){ + if(!dossierFile.isEForm() && !dossierFile.isRemoved()){ + fileEntryIdByFile = dossierFile.getFileEntryId(); + }else if(!dossierFile.isRemoved() ){ + fileEntryIdByEform = dossierFile.getFileEntryId(); + } + } + } + + // Cập nhật lai deliverable + DossierFile dossierFileOld = null; + if(fileEntryIdByFile > 0 || fileEntryIdByEform >0) { + dossierFileOld = DossierFileLocalServiceUtil.getByFileEntryId(fileEntryIdByFile); + + if(dossierFileOld == null){ + dossierFileOld = DossierFileLocalServiceUtil.getByFileEntryId(fileEntryIdByEform); + } + _log.debug("dossierFileOld: " + dossierFileOld.getDossierFileId()); + if (dossierFileOld != null) { + String deliverableCode = dossierFileOld.getDeliverableCode(); + _log.debug("deliverableCode: " + deliverableCode); + if (Validator.isNotNull(deliverableCode)) { + Deliverable deliverable = DeliverableLocalServiceUtil.getByCode(deliverableCode); + if (deliverable != null) { + String deliState = String.valueOf(deliverable.getDeliverableState()); + if (!DeliverableTerm.DELIVERABLE_STATE_VALID.equals(deliState)) { + deliverable.setDeliverableState(DeliverableTerm.DELIVERABLE_STATE_VALID_INT); + deliverable.setFileEntryId(dossierFileOld.getFileEntryId()); + deliverable.setFileAttachs(String.valueOf(dossierFileOld.getFileEntryId())); + } + DeliverableLocalServiceUtil.updateDeliverable(deliverable); + } + } + } + } //Next action Dossier dossier = DossierLocalServiceUtil.fetchDossier(dossierId); diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DeliverablesManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DeliverablesManagementImpl.java index 1335897702..0ffcd39f23 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DeliverablesManagementImpl.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DeliverablesManagementImpl.java @@ -22,6 +22,7 @@ import org.opencps.api.controller.util.DeliverableUtils; import org.opencps.api.controller.util.MessageUtil; import org.opencps.api.controller.util.OneGateUtils; +import org.opencps.api.controller.util.OpenCPSUtils; import org.opencps.api.deliverable.model.DeliverableInputModel; import org.opencps.api.deliverable.model.DeliverableModel; import org.opencps.api.deliverable.model.DeliverableSearchModel; @@ -76,6 +77,9 @@ public class DeliverablesManagementImpl implements DeliverablesManagement { private static Log _log = LogFactoryUtil.getLog(DeliverablesManagementImpl.class); + + private static final String API_LIST_DELIVERABLE = "API_LIST_DELIVERABLE"; + private static final String API_VIEW_DELIVERABLE = "API_VIEW_DELIVERABLE"; @SuppressWarnings("unchecked") @Override @@ -86,6 +90,9 @@ public Response getDeliverables( // TODO BackendAuth auth = new BackendAuthImpl(); + long groupId = + GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); + JSONObject bodyResponse = JSONFactoryUtil.createJSONObject(); try { @@ -97,10 +104,7 @@ public Response getDeliverables( if (search.getEnd() == 0) { search.setStart(QueryUtil.ALL_POS); search.setEnd(QueryUtil.ALL_POS); - } - - long groupId = - GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); + } // Default sort by modifiedDate String dateSort = String.format(MessageUtil.getMessage(ConstantUtils.QUERY_SORT), Field.MODIFIED_DATE); @@ -155,6 +159,7 @@ public Response getDeliverables( // .addAll(DeliverableUtils.mappingToDeliverableResultModel((List) // jsonData.get(ConstantUtils.DATA))); List docList = (List) jsonData.get(ConstantUtils.DATA); + JSONArray formDataArr = JSONFactoryUtil.createJSONArray(); for (Document doc : docList) { @@ -170,12 +175,25 @@ public Response getDeliverables( formDataArr.put(formJson); } results.put(ConstantUtils.DATA, formDataArr); - + + bodyResponse.put("status", HttpURLConnection.HTTP_OK); + bodyResponse.put("total", results.getInt(ConstantUtils.TOTAL)); + // ghi log vao syncTracking + OpenCPSUtils.addSyncTracking(API_LIST_DELIVERABLE, user.getUserId(), + groupId, StringPool.NULL,StringPool.NULL, StringPool.NULL, 1, + JSONFactoryUtil.looseSerialize(search), bodyResponse.toJSONString()); + return Response.status(HttpURLConnection.HTTP_OK).entity( JSONFactoryUtil.looseSerialize(results)).build(); // return Response.status(HttpURLConnection.HTTP_OK).entity(results).build(); } catch (Exception e) { + + bodyResponse.put("status", HttpURLConnection.HTTP_INTERNAL_ERROR); + // ghi log vao syncTracking + OpenCPSUtils.addSyncTracking(API_LIST_DELIVERABLE, user.getUserId(), + groupId, StringPool.NULL,StringPool.NULL, StringPool.NULL, 0, + JSONFactoryUtil.looseSerialize(search), bodyResponse.toJSONString()); return BusinessExceptionImpl.processException(e); } @@ -236,7 +254,7 @@ public Response getDeliverablesDetail( // TODO Add Deliverable Type BackendAuth auth = new BackendAuthImpl(); - // long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); + long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); try { if (!auth.isAuth(serviceContext)) { @@ -256,10 +274,19 @@ public Response getDeliverablesDetail( throw new Exception(); } + // ghi log vao syncTracking + OpenCPSUtils.addSyncTracking(API_VIEW_DELIVERABLE, user.getUserId(), + deliverableInfo.getGroupId(), StringPool.NULL,StringPool.NULL, StringPool.NULL, 1, + String.valueOf(id), JSONFactoryUtil.looseSerialize(results)); + return Response.status(HttpURLConnection.HTTP_OK).entity(results).build(); } catch (Exception e) { + // ghi log vao syncTracking + OpenCPSUtils.addSyncTracking(API_VIEW_DELIVERABLE, user.getUserId(), + groupId, StringPool.NULL,StringPool.NULL, StringPool.NULL, 0, + String.valueOf(id), StringPool.NULL); return BusinessExceptionImpl.processException(e); } } diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DossierDocumentManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DossierDocumentManagementImpl.java index b987f5f51c..97e20c7eca 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DossierDocumentManagementImpl.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DossierDocumentManagementImpl.java @@ -157,7 +157,7 @@ public Response getPreview(HttpServletRequest request, HttpHeaders header, Compa try { Date dateStart1 = new Date(); String previewResponse = (String) MessageBusUtil - .sendSynchronousMessage(ConstantUtils.DOSSIERDOCUMENT_JASPER_ENGINE_PREVIEW, message, 10000); + .sendSynchronousMessage(ConstantUtils.DOSSIERDOCUMENT_JASPER_ENGINE_PREVIEW, message, 20000); File file = new File(previewResponse); diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DossierFileManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DossierFileManagementImpl.java index 560876b848..e0597dca24 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DossierFileManagementImpl.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DossierFileManagementImpl.java @@ -23,10 +23,13 @@ import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; +import java.net.URL; import java.util.*; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import javax.activation.DataHandler; import javax.servlet.http.HttpServletRequest; @@ -41,6 +44,7 @@ import org.opencps.api.constants.ConstantUtils; import org.opencps.api.controller.DossierFileManagement; import org.opencps.api.controller.util.*; +import org.opencps.api.controller.util.DossierFileUtils; import org.opencps.api.dossier.model.DossierDataModel; import org.opencps.api.dossier.model.DossierResultsModel; import org.opencps.api.dossier.model.DossierSearchModel; @@ -55,24 +59,26 @@ import org.opencps.auth.utils.APIDateTimeUtils; import org.opencps.cache.actions.CacheActions; import org.opencps.cache.actions.impl.CacheActionsImpl; +import org.opencps.communication.model.ServerConfig; +import org.opencps.communication.service.ServerConfigLocalServiceUtil; import org.opencps.dossiermgt.action.DossierActions; import org.opencps.dossiermgt.action.DossierFileActions; import org.opencps.dossiermgt.action.impl.DossierActionsImpl; import org.opencps.dossiermgt.action.impl.DossierFileActionsImpl; -import org.opencps.dossiermgt.action.util.CheckFileUtils; -import org.opencps.dossiermgt.action.util.OpenCPSConfigUtil; -import org.opencps.dossiermgt.action.util.ReadFilePropertiesUtils; -import org.opencps.dossiermgt.action.util.SpecialCharacterUtils; +import org.opencps.dossiermgt.action.util.*; import org.opencps.dossiermgt.constants.DossierFileTerm; +import org.opencps.dossiermgt.constants.DossierPartTerm; import org.opencps.dossiermgt.constants.DossierTerm; +import org.opencps.dossiermgt.constants.FrequencyOfficeConstants; import org.opencps.dossiermgt.model.Dossier; import org.opencps.dossiermgt.model.DossierFile; -import org.opencps.dossiermgt.service.CPSDossierBusinessLocalServiceUtil; -import org.opencps.dossiermgt.service.DossierFileLocalServiceUtil; -import org.opencps.dossiermgt.service.DossierLocalServiceUtil; +import org.opencps.dossiermgt.model.DossierPart; +import org.opencps.dossiermgt.service.*; import backend.auth.api.exception.BusinessExceptionImpl; import org.opencps.kernel.util.FileUploadUtil; +import org.opencps.usermgt.service.ApplicantDataLocalServiceUtil; +import org.opencps.usermgt.service.impl.ApplicantDataLocalServiceImpl; import service.ImportFile; import service.dependencies.ImportFileImpl; @@ -437,6 +443,8 @@ public Response downloadByDossierId_ReferenceUid( } } + + @Override public Response updateDossierFile( HttpServletRequest request, HttpHeaders header, Company company, @@ -1540,31 +1548,85 @@ public Response cloneFromApplicantData( long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); try { - + Dossier dossier = DossierLocalServiceUtil.fetchDossier(id); DossierFileActions action = new DossierFileActionsImpl(); DossierFileModel result; - if (Validator.isNotNull(fileEntryId)) { - FileEntry fileEntryOld = DLAppLocalServiceUtil.getFileEntry(fileEntryId); - String fileTemplateNo = dossierTemplateNo + dossierPartNo; - DossierFile dossierFile = - action.addDossierFileByFileEntryId( - groupId, id, UUID.randomUUID().toString(), - dossierTemplateNo, dossierPartNo, fileTemplateNo, - displayName, displayName, fileEntryOld.getSize(), fileEntryOld.getContentStream(), StringPool.BLANK, String.valueOf(false), - fileEntryOld.getFileEntryId(), serviceContext); - _log.debug("__End add file at:" + new Date()); - dossierFile.setRemoved(false); - _log.debug("__Start update dossier file at:" + new Date()); - dossierFile = DossierFileLocalServiceUtil.updateDossierFile(dossierFile); - - result = DossierFileUtils.mappingToDossierFileModel(dossierFile); - return Response.status(HttpURLConnection.HTTP_OK).entity(result).build(); + String ipServerStr = StringPool.BLANK; + FileEntry fileEntry = null; + + List listConfig = new ArrayList<>(); + + listConfig = ServerConfigLocalServiceUtil.getByServerAndProtocol("SERVER_" + dossier.getGovAgencyCode(), "API_SYNC"); + ServerConfig serverConfig = listConfig.get(0); + + String urlDocument = regex(uri); + _log.debug("uriSub: " + urlDocument); + + JSONObject configJson = JSONFactoryUtil.createJSONObject(serverConfig.getConfigs()); + String urlCall = configJson.getString("url"); + Pattern pattern = Pattern.compile("https?:\\/\\/([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})\\:?([0-9]{1,5})?"); + Matcher matcher = pattern.matcher(urlCall); + + if (matcher.find()) { + ipServerStr = matcher.group(0) + urlDocument; } - } - catch (Exception e) { + _log.info("ipServerStr: " + ipServerStr); + URL url = new URL(ipServerStr); + java.net.HttpURLConnection httpConn = (java.net.HttpURLConnection) url.openConnection(); + int responseCode = httpConn.getResponseCode(); + + // always check HTTP response code first + if (responseCode == java.net.HttpURLConnection.HTTP_OK) { + InputStream inputStream = httpConn.getInputStream(); + + if (inputStream != null) { + try { + fileEntry = ApplicantDataLocalServiceUtil.uploadFileDLEntry(serviceContext.getUserId(), groupId, inputStream, displayName, StringPool.BLANK, + 0, serviceContext); + + if (fileEntry != null) { + fileEntryId = fileEntry.getFileEntryId(); + } + } catch (Exception e) { + _log.debug(e); + } + } + + _log.debug("fileEntry: " + JSONFactoryUtil.looseSerialize(fileEntry)); + if (Validator.isNotNull(fileEntry)) { + FileEntry fileEntryOld = DLAppLocalServiceUtil.getFileEntry(fileEntryId); + String fileTemplateNo = dossierTemplateNo + dossierPartNo; + DossierFile dossierFile = + action.addDossierFileByFileEntryId( + groupId, id, UUID.randomUUID().toString(), + dossierTemplateNo, dossierPartNo, fileTemplateNo, + displayName, displayName, fileEntryOld.getSize(), fileEntryOld.getContentStream(), StringPool.BLANK, String.valueOf(false), + fileEntryOld.getFileEntryId(), serviceContext); + _log.debug("__End add file at:" + new Date()); + dossierFile.setRemoved(false); + _log.debug("__Start update dossier file at:" + new Date()); + dossierFile = DossierFileLocalServiceUtil.updateDossierFile(dossierFile); + + result = DossierFileUtils.mappingToDossierFileModel(dossierFile); + return Response.status(HttpURLConnection.HTTP_OK).entity(result).build(); + } + } + } catch (Exception e) { return BusinessExceptionImpl.processException(e); } - return Response.status(HttpURLConnection.HTTP_FORBIDDEN).build(); + return Response.status(HttpURLConnection.HTTP_FORBIDDEN).build(); + } + public String regex(String url){ + Pattern pattern = Pattern.compile("https?:\\/\\/([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})\\:?([0-9]{1,5})?"); + Matcher matcher = pattern.matcher(url); + String substr = StringPool.BLANK; + if (matcher.find()) + { + String ip = matcher.group(0); + substr = url.replace(ip,""); + } + return substr; + } @Override @@ -1792,4 +1854,40 @@ public Response updateDossierFileFormDataByDossierId(HttpServletRequest request, } } + @Override + public Response addDossierFileByEform(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, User user, ServiceContext serviceContext, + long id, String dossierPartNo, String displayName, long fileEntryId, boolean eform) { + long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); + DossierFile dossierFile = null; + try { + if(!eform && Validator.isNotNull(dossierPartNo)){ + String referenceFileUid = DossierNumberGenerator.generateReferenceUID(groupId); + Dossier dossier = DossierLocalServiceUtil.fetchDossier(id); + if(Validator.isNotNull(dossier)) { + _log.info("Them DossierFile :" + dossier.getDossierId()); + DossierPart dossierPart = DossierPartLocalServiceUtil.fetchByTemplatePartNo(groupId, + dossier.getDossierTemplateNo(), dossierPartNo); + dossierFile = DossierFileLocalServiceUtil.addDossierFileEForm(groupId, id, + referenceFileUid, dossier.getDossierTemplateNo(), dossierPartNo, dossierPart.getFileTemplateNo(), + displayName, displayName, 0, null, + StringPool.BLANK, "true", serviceContext); + + if(fileEntryId > 0 && Validator.isNotNull(dossierFile)) { + _log.info("Update fileEntryId :" + dossier.getDossierId()); + dossierFile.setEForm(false); + dossierFile.setFileEntryId(fileEntryId); + //File sinh từ eForm default PDF +// String fileName = dossierFile.getDisplayName(); + dossierFile.setDisplayName(dossierFile.getDisplayName() + ".pdf"); + _log.info("Log dossierFile : " + dossierFile.getDossierFileId() + " DisplayName : " + dossierFile.getDisplayName()); + DossierFileLocalServiceUtil.updateDossierFile(dossierFile); + } + } + + } + }catch (Exception e) { + e.getMessage(); + } + return null; + } } diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DossierManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DossierManagementImpl.java index 8c3e5fb710..fb21f137a6 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DossierManagementImpl.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/DossierManagementImpl.java @@ -5,16 +5,15 @@ import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.liferay.document.library.kernel.model.DLFileEntry; +import com.liferay.document.library.kernel.service.DLAppLocalServiceUtil; import com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil; import com.liferay.expando.kernel.model.ExpandoBridge; import com.liferay.exportimport.kernel.lar.StagedModelType; import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; import com.liferay.portal.kernel.dao.orm.QueryUtil; import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.json.JSONArray; -import com.liferay.portal.kernel.json.JSONException; -import com.liferay.portal.kernel.json.JSONFactoryUtil; -import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.json.*; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.messaging.Message; @@ -25,7 +24,11 @@ import com.liferay.portal.kernel.model.Group; import com.liferay.portal.kernel.model.Role; import com.liferay.portal.kernel.model.User; +import com.liferay.portal.kernel.portlet.BaseJSPSettingsConfigurationAction; import com.liferay.portal.kernel.repository.model.FileEntry; +import com.liferay.portal.kernel.scheduler.SchedulerEngineHelperUtil; +import com.liferay.portal.kernel.scheduler.SchedulerException; +import com.liferay.portal.kernel.scheduler.messaging.SchedulerResponse; import com.liferay.portal.kernel.search.Document; import com.liferay.portal.kernel.search.Field; import com.liferay.portal.kernel.search.Indexer; @@ -53,6 +56,7 @@ import java.awt.image.BufferedImage; import java.io.*; import java.io.File; +import java.lang.reflect.Method; import java.net.URL; import java.net.URLConnection; import java.sql.Connection; @@ -82,8 +86,10 @@ import org.apache.commons.httpclient.util.HttpURLConnection; import org.apache.commons.lang3.time.DateUtils; import org.apache.cxf.jaxrs.ext.multipart.Attachment; +import org.apache.http.client.methods.HttpGet; import org.opencps.api.constants.ConstantUtils; import org.opencps.api.constants.DossierManagementConstants; +import org.opencps.api.constants.SupportSearchConstants; import org.opencps.api.controller.DossierManagement; import org.opencps.api.controller.util.ConvertDossierFromV1Dot9Utils; import org.opencps.api.controller.util.DossierFileUtils; @@ -134,20 +140,26 @@ import org.opencps.dossiermgt.model.DossierActionUser; import org.opencps.dossiermgt.rest.utils.SyncServerTerm; import org.opencps.dossiermgt.scheduler.InvokeREST; +import org.opencps.dossiermgt.scheduler.PublishEventScheduler; import org.opencps.dossiermgt.scheduler.RESTFulConfiguration; import org.opencps.dossiermgt.service.*; import org.opencps.dossiermgt.service.persistence.DossierActionUserPK; import org.opencps.dossiermgt.service.persistence.DossierFileUtil; import org.opencps.dossiermgt.service.persistence.ProcessActionUtil; import org.opencps.dossiermgt.service.persistence.ServiceProcessUtil; +import org.opencps.kernel.prop.PropKeys; import org.opencps.usermgt.action.ApplicantActions; import org.opencps.usermgt.action.impl.ApplicantActionsImpl; import org.opencps.usermgt.constants.ApplicantTerm; import org.opencps.usermgt.constants.UserTerm; import org.opencps.usermgt.model.Applicant; +import org.opencps.usermgt.model.ApplicantData; import org.opencps.usermgt.model.Employee; +import org.opencps.usermgt.model.FileItem; +import org.opencps.usermgt.service.ApplicantDataLocalServiceUtil; import org.opencps.usermgt.service.ApplicantLocalServiceUtil; import org.opencps.usermgt.service.EmployeeLocalServiceUtil; +import org.opencps.usermgt.service.FileItemLocalServiceUtil; import backend.auth.api.exception.BusinessExceptionImpl; import backend.auth.api.exception.ErrorMsgModel; @@ -170,6 +182,7 @@ public class DossierManagementImpl implements DossierManagement { public static final String RT_CORRECTING = "correcting"; public static final String RT_SUBMITTING = "submitting"; + public static final String ALL_AGENCY = "all"; private static final String CONFIG_DVCQG_INTEGRATION = "DVCQG_INTEGRATION"; @@ -187,6 +200,95 @@ private String getBodyError(String code, String message) { return body.toString(); } + @Override + public Response getCountofScheduler(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, User user, ServiceContext serviceContext, String nameScheduler, String type) throws SchedulerException { + + JSONObject response = JSONFactoryUtil.createJSONObject(); + if(Validator.isNotNull("type")){ + if(type.equals("admin") ){ + if(nameScheduler.equalsIgnoreCase("PublishEventScheduler") + || nameScheduler.equalsIgnoreCase("PublishEventHSKMScheduler") + || nameScheduler.equalsIgnoreCase("DossierSyncProcessingScheduler") + || nameScheduler.equalsIgnoreCase("FakeCounterScheduler")) + { + List schedulerResponses = + SchedulerEngineHelperUtil.getScheduledJobs(); + Method method; + for (SchedulerResponse schedulerResponse : schedulerResponses){ + if(schedulerResponse.getJobName().contains(nameScheduler)){ + try { + method = Class.forName(schedulerResponse.getJobName()).getMethod("getCount"); + response.put("count", method.invoke(null)); + return Response.status(HttpURLConnection.HTTP_OK).entity(response.toJSONString()).build(); + } catch (Exception e){ + _log.error(e); + return BusinessExceptionImpl.processException(e); + } + } + } + response.put("Message", "Scheduler doesn't found in opencpsscheduler:list"); + return Response.status(HttpURLConnection.HTTP_OK).entity(response.toJSONString()).build(); + } else { + response.put("Message", "Scheduler doesn't exist or not found"); + return Response.status(HttpURLConnection.HTTP_OK).entity(response.toJSONString()).build(); + } + + } else { + response.put("Message", "Unauthorized Information."); + return Response.status(HttpURLConnection.HTTP_UNAUTHORIZED).entity(response.toJSONString()).build(); + } + } else { + response.put("Message", "Non-Authoritative Information."); + return Response.status(HttpURLConnection.HTTP_NOT_AUTHORITATIVE).entity(response.toJSONString()).build(); + } + + } + + @Override + public Response ResetCountofScheduler(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, User user, ServiceContext serviceContext, String nameScheduler, String type) throws SchedulerException { + JSONObject response = JSONFactoryUtil.createJSONObject(); + if(Validator.isNotNull("type")){ + if(type.equalsIgnoreCase("admin") ){ + if(nameScheduler.equalsIgnoreCase("PublishEventScheduler") + || nameScheduler.equalsIgnoreCase("PublishEventHSKMScheduler") + || nameScheduler.equalsIgnoreCase("DossierSyncProcessingScheduler") + || nameScheduler.equalsIgnoreCase("FakeCounterScheduler")) + { + List schedulerResponses = + SchedulerEngineHelperUtil.getScheduledJobs(); + Method method; + for (SchedulerResponse schedulerResponse : schedulerResponses){ + if(schedulerResponse.getJobName().contains(nameScheduler)){ + try { + method = Class.forName(schedulerResponse.getJobName()).getMethod("resetCount"); + response.put("count", method.invoke(null)); + return Response.status(HttpURLConnection.HTTP_OK).entity(response.toJSONString()).build(); + } catch (Exception e){ + _log.error(e); + return BusinessExceptionImpl.processException(e); + } + } + } + response.put("Message", "Scheduler doesn't found in opencpsscheduler:list"); + return Response.status(HttpURLConnection.HTTP_OK).entity(response.toJSONString()).build(); + } else { + response.put("Message", "Scheduler doesn't exist or not found"); + return Response.status(HttpURLConnection.HTTP_OK).entity(response.toJSONString()).build(); + } + + } else { + response.put("Message", "Unauthorized Information."); + return Response.status(HttpURLConnection.HTTP_UNAUTHORIZED).entity(response.toJSONString()).build(); + } + } else { + response.put("Message", "Non-Authoritative Information."); + return Response.status(HttpURLConnection.HTTP_NOT_AUTHORITATIVE).entity(response.toJSONString()).build(); + } + + } + + + @Override public Response getDirectDossiers(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, User user, ServiceContext serviceContext, @@ -769,7 +871,7 @@ public Response getDossiers( //Truong hop 1 employee cùng ở 2 site. Lấy role ở site đó và param groupId sẽ search theo Employee List userRoles = user.getRoles(); for (Role r : userRoles) { - _log.info("GetName: " + r.getName()); +// _log.info("GetName: " + r.getName()); if (r.getName().startsWith(ConstantUtils.GLOBAL_VIEW_ALL)) { query.setGlobalViewAll(true); break; @@ -1387,7 +1489,7 @@ public Response getDossierProcessList( //Truong hop 1 employee cùng ở 2 site. Lấy role ở site đó và param groupId sẽ search theo Employee List userRoles = user.getRoles(); for (Role r : userRoles) { - _log.info("GetName: " + r.getName()); +// _log.info("GetName: " + r.getName()); if (r.getName().startsWith(ConstantUtils.GLOBAL_VIEW_ALL)) { query.setGlobalViewAll(true); break; @@ -2271,6 +2373,34 @@ public Response doAction( } } } + + + //day du lieu vao kho du lieu cong dan + try { + if (Validator.isNotNull(dossier) && dossier.getDossierStatus().contentEquals(DossierTerm.DOSSIER_STATUS_DONE)) { + List lstDossierFiles = DossierFileLocalServiceUtil.findByDID_GROUP(groupId, dossier.getDossierId()); + if (Validator.isNotNull(lstDossierFiles) && lstDossierFiles.size() > 0) { + for (DossierFile doFile : lstDossierFiles) { + String fileTemplateNo = doFile.getFileTemplateNo(); + _log.debug("fileTemplateNo : " + fileTemplateNo); + if (Validator.isNotNull(fileTemplateNo) && doFile.getDossierPartType() == 2) { + FileItem fileItem = FileItemLocalServiceUtil.findByG_FTN(0, fileTemplateNo); + if (doFile.getFileEntryId() > 0) { + FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(doFile.getFileEntryId()); + if (Validator.isNotNull(fileItem) && Validator.isNotNull(fileEntry)) { + ApplicantData applicantData = ApplicantDataLocalServiceUtil.createApplicantData( + serviceContext, 0, fileTemplateNo, fileEntry.getFileName(), doFile.getDisplayName(), doFile.getFileEntryId(), StringPool.BLANK, 1, dossier.getApplicantIdNo(), 0); + _log.debug("Kho dữ liệu công dân : " + JSONFactoryUtil.looseSerialize(applicantData)); + ApplicantDataLocalServiceUtil.updateApplicantData(applicantData); + } + } + } + } + } + } + }catch (Exception e){ + e.getMessage(); + } _log.debug("Doaction oke with dossierActionId: " + dossierResult.getDossierActionId()); long dossierActionId = dossierResult.getDossierActionId(); @@ -2292,6 +2422,7 @@ public Response doAction( _log.debug("Result post action:" + result); } } + return Response.status(HttpURLConnection.HTTP_OK).entity(dAction).build(); } @@ -2765,7 +2896,8 @@ public Response getDossierMarks( DossierMarkResultsModel result = new DossierMarkResultsModel(); List lstDossierMark = - actions.getDossierMarks(groupId, dossierId); + actions.findDossierMarkByDossierId(groupId, dossierId); + _log.info("lstDossierMark: " + lstDossierMark.size()); List outputs = DossierMarkUtils.mappingDossierMarks(lstDossierMark); diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/Mofa2ManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/Mofa2ManagementImpl.java index 0e51aae1f9..a8e2b42768 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/Mofa2ManagementImpl.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/Mofa2ManagementImpl.java @@ -40,6 +40,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Iterator; public class Mofa2ManagementImpl implements Mofa2Management { @@ -70,7 +71,9 @@ public Response createMofa2(HttpServletRequest request, HttpHeaders header, Serv } return null; } - + public static final String CA_NHAN = "CaNhan"; + public static final String PHEP_NHAP_CANH = "PhepNhapCanh"; + public static final String HS_THI_THUC_NOI = "HsThiThucNoi"; public static String insertMofa2(long groupId, Dossier dossier, String serverCode, JSONArray arrayFile){ String serverUrl = StringPool.BLANK; try { @@ -93,6 +96,7 @@ public static String insertMofa2(long groupId, Dossier dossier, String serverCod /** Thanh Vien */ jsonBody.put("Ten", org.json.JSONObject.NULL); jsonBody.put("ID", org.json.JSONObject.NULL); + jsonBody.put("ReferenceUid", dossier.getDossierId()); jsonBody.put("DossierId", dossier.getDossierId()); jsonBody.put("Ten_Kd",org.json.JSONObject.NULL); jsonBody.put("Ten_Co_Quan", org.json.JSONObject.NULL); @@ -133,16 +137,17 @@ public static String insertMofa2(long groupId, Dossier dossier, String serverCod if (arrayFile != null) { for (int i = 0; i < arrayFile.length(); i++) { JSONObject thanhvienJSON = arrayFile.getJSONObject(i); + _log.info("thanhvienJSON" + JSONFactoryUtil.looseSerialize(thanhvienJSON)); JSONObject hsThiThucJson = JSONFactoryUtil.createJSONObject(); try { //Cá Nhân - JSONObject caNhan = thanhvienJSON.getJSONObject("CaNhan"); + JSONObject caNhan = thanhvienJSON.getJSONObject(CA_NHAN); if (caNhan != null) { hsThiThucJson.put("CaNhan", caNhan); } //PhepNhapCanh - JSONObject phepNhapCanh = thanhvienJSON.getJSONObject("PhepNhapCanh"); + JSONObject phepNhapCanh = thanhvienJSON.getJSONObject(PHEP_NHAP_CANH); if (phepNhapCanh != null) { hsThiThucJson.put("PhepNhapCanh", phepNhapCanh); }else{ @@ -173,7 +178,7 @@ public static String insertMofa2(long groupId, Dossier dossier, String serverCod hsThiThucJson.put("HsThanNhan", hsThanNhan); } //HS Thi Thuc Noi - JSONObject hsThiThucNoi = thanhvienJSON.getJSONObject("HsThiThucNoi"); + JSONObject hsThiThucNoi = thanhvienJSON.getJSONObject(HS_THI_THUC_NOI); if (hsThiThucNoi != null) { hsThiThucJson.put("HsThiThucNoi", hsThiThucNoi); } @@ -216,211 +221,30 @@ public static String insertMofa2(long groupId, Dossier dossier, String serverCod } private static JSONObject hsThiThuc(JSONObject thanhvienJSON, JSONObject hsThiThucJson, int arrayLength) { - hsThiThucJson.put("Id", Validator.isNotNull(thanhvienJSON.getString("Id")) ? thanhvienJSON.getString("Id") : org.json.JSONObject.NULL); - hsThiThucJson.put("Ca_Nhan_Id", Validator.isNotNull(thanhvienJSON.getString("Ca_Nhan_Id"))? thanhvienJSON.getString("Ca_Nhan_Id") : org.json.JSONObject.NULL); - hsThiThucJson.put("Quoc_Tich_Hn_Id", Validator.isNotNull(thanhvienJSON.getString("Quoc_Tich_Hn_Id")) ? thanhvienJSON.getString("Quoc_Tich_Hn_Id") : org.json.JSONObject.NULL); - hsThiThucJson.put("So_Ho_Chieu", Validator.isNotNull(thanhvienJSON.getString("So_Ho_Chieu")) ? thanhvienJSON.getString("So_Ho_Chieu") : org.json.JSONObject.NULL); - hsThiThucJson.put("Ma_To_Khai", Validator.isNotNull(thanhvienJSON.getString("Ma_To_Khai")) ? thanhvienJSON.getString("Ma_To_Khai") : org.json.JSONObject.NULL); - hsThiThucJson.put("Buoc_Xl", Validator.isNotNull(thanhvienJSON.getString("Buoc_Xl")) ? thanhvienJSON.getString("Buoc_Xl"): org.json.JSONObject.NULL); - hsThiThucJson.put("So_Bien_Nhan", Validator.isNotNull(thanhvienJSON.getString("So_Bien_Nhan")) ? thanhvienJSON.getString("So_Bien_Nhan") : org.json.JSONObject.NULL); - hsThiThucJson.put("Ten", Validator.isNotNull(thanhvienJSON.getString("Ten")) ? thanhvienJSON.getString("Ten") : org.json.JSONObject.NULL); - hsThiThucJson.put("Ten_Kd", Validator.isNotNull(thanhvienJSON.getString("Ten_Kd")) ? thanhvienJSON.getString("Ten_Kd") : org.json.JSONObject.NULL); - hsThiThucJson.put("So_Dien_Thoai", Validator.isNotNull(thanhvienJSON.getString("So_Dien_Thoai")) ? thanhvienJSON.getString("So_Dien_Thoai") : org.json.JSONObject.NULL); - hsThiThucJson.put("So_Dien_Thoai_Cq", Validator.isNotNull(thanhvienJSON.getString("So_Dien_Thoai_Cq")) ? thanhvienJSON.getString("So_Dien_Thoai_Cq") : org.json.JSONObject.NULL); - hsThiThucJson.put("So_Luong_Hc", Validator.isNotNull(thanhvienJSON.getString("So_Luong_Hc")) ? thanhvienJSON.getString("So_Luong_Hc") : org.json.JSONObject.NULL); - hsThiThucJson.put("So_Luong_To_Khai", Validator.isNotNull(thanhvienJSON.getString("So_Luong_To_Khai")) ? thanhvienJSON.getString("So_Luong_To_Khai") : org.json.JSONObject.NULL); - hsThiThucJson.put("Giay_To_Kem_Theo", Validator.isNotNull(thanhvienJSON.getString("Giay_To_Kem_Theo")) ? thanhvienJSON.getString("Giay_To_Kem_Theo") : org.json.JSONObject.NULL); - hsThiThucJson.put("Noi_Hen_Tra_Kq_Id", Validator.isNotNull(thanhvienJSON.getString("Noi_Hen_Tra_Kq_Id")) ? thanhvienJSON.getString("Noi_Hen_Tra_Kq_Id") : org.json.JSONObject.NULL); - hsThiThucJson.put("Noi_Hen_Tra_Kq", Validator.isNotNull(thanhvienJSON.getString("Noi_Hen_Tra_Kq")) ? thanhvienJSON.getString("Noi_Hen_Tra_Kq") : org.json.JSONObject.NULL ); - hsThiThucJson.put("Ngay_Hen_Tra", Validator.isNotNull(thanhvienJSON.getString("Ngay_Hen_Tra")) ? thanhvienJSON.getString("Ngay_Hen_Tra") : org.json.JSONObject.NULL); - hsThiThucJson.put("Du_Kien_Thu", Validator.isNotNull(thanhvienJSON.getString("Du_Kien_Thu")) ? thanhvienJSON.getString("Du_Kien_Thu") : org.json.JSONObject.NULL); - hsThiThucJson.put("Don_Vi_Tien_Te", Validator.isNotNull(thanhvienJSON.getString("Don_Vi_Tien_Te")) ? thanhvienJSON.getString("Don_Vi_Tien_Te") : org.json.JSONObject.NULL); - hsThiThucJson.put("Ngay_Huy", Validator.isNotNull(thanhvienJSON.getString("Ngay_Huy")) ? thanhvienJSON.getString("Ngay_Huy") : org.json.JSONObject.NULL); - hsThiThucJson.put("Nguoi_Huy", Validator.isNotNull(thanhvienJSON.getString("Nguoi_Huy")) ? thanhvienJSON.getString("Nguoi_Huy") : org.json.JSONObject.NULL); - hsThiThucJson.put("Ly_Do_Huy", Validator.isNotNull(thanhvienJSON.getString("Ly_Do_Huy")) ? thanhvienJSON.getString("Ly_Do_Huy") : org.json.JSONObject.NULL); - hsThiThucJson.put("Ghi_Chu", Validator.isNotNull(thanhvienJSON.getString("Ghi_Chu")) ? thanhvienJSON.getString("Ghi_Chu"): org.json.JSONObject.NULL); - hsThiThucJson.put("Nguoi_Tao", Validator.isNotNull(thanhvienJSON.getString("Nguoi_Tao")) ? thanhvienJSON.getString("Nguoi_Tao") : org.json.JSONObject.NULL); - hsThiThucJson.put("Ngay_Tao", Validator.isNotNull(thanhvienJSON.getString("Ngay_Tao")) ? thanhvienJSON.getString("Ngay_Tao") : org.json.JSONObject.NULL); - hsThiThucJson.put("Ngay_Lap_Phieu", Validator.isNotNull(thanhvienJSON.getString("Ngay_Lap_Phieu")) ? thanhvienJSON.getString("Ngay_Lap_Phieu") : org.json.JSONObject.NULL); - hsThiThucJson.put("Nguoi_Sua_Cuoi", Validator.isNotNull(thanhvienJSON.getString("Nguoi_Sua_Cuoi")) ? thanhvienJSON.getString("Nguoi_Sua_Cuoi") : org.json.JSONObject.NULL); - hsThiThucJson.put("Ngay_Sua_Cuoi", Validator.isNotNull(thanhvienJSON.getString("Ngay_Sua_Cuoi")) ? thanhvienJSON.getString("Ngay_Sua_Cuoi") : org.json.JSONObject.NULL); - hsThiThucJson.put("LOAI", Validator.isNotNull(thanhvienJSON.getString("LOAI")) ? thanhvienJSON.getString("LOAI") : org.json.JSONObject.NULL); - hsThiThucJson.put("Nguoi_Nhan", Validator.isNotNull(thanhvienJSON.getString("Nguoi_Nhan")) ? thanhvienJSON.getString("Nguoi_Nhan") : org.json.JSONObject.NULL); - hsThiThucJson.put("Ngay_Nhan", Validator.isNotNull(thanhvienJSON.getString("Ngay_Nhan")) ? thanhvienJSON.getString("Ngay_Nhan") : org.json.JSONObject.NULL); - hsThiThucJson.put("Bl_Ten_Cq_Ca_Nhan", Validator.isNotNull(thanhvienJSON.getString("Bl_Ten_Cq_Ca_Nhan")) ? thanhvienJSON.getString("Bl_Ten_Cq_Ca_Nhan") : org.json.JSONObject.NULL); - hsThiThucJson.put("Bl_Dia_Chi_Id", Validator.isNotNull(thanhvienJSON.getString("Bl_Dia_Chi_Id")) ? thanhvienJSON.getString("Bl_Dia_Chi_Id") : org.json.JSONObject.NULL); - hsThiThucJson.put("Bl_Dia_Chi_Chi_Tiet", Validator.isNotNull(thanhvienJSON.getString("Bl_Dia_Chi_Chi_Tiet")) ? thanhvienJSON.getString("Bl_Dia_Chi_Chi_Tiet") : org.json.JSONObject.NULL); - hsThiThucJson.put("Bl_So_Dien_Thoai", Validator.isNotNull(thanhvienJSON.getString("Bl_So_Dien_Thoai")) ? thanhvienJSON.getString("Bl_So_Dien_Thoai") : org.json.JSONObject.NULL); - hsThiThucJson.put("So_Cv_Den", Validator.isNotNull(thanhvienJSON.getString("So_Cv_Den")) ? thanhvienJSON.getString("So_Cv_Den") : org.json.JSONObject.NULL); - hsThiThucJson.put("Ngay_Cv_Den", Validator.isNotNull(thanhvienJSON.getString("Ngay_Cv_Den")) ? thanhvienJSON.getString("Ngay_Cv_Den") : org.json.JSONObject.NULL); - hsThiThucJson.put("Loai_Cv_Den", Validator.isNotNull(thanhvienJSON.getString("Loai_Cv_Den")) ? thanhvienJSON.getString("Loai_Cv_Den") : org.json.JSONObject.NULL); - hsThiThucJson.put("Noi_Gui_Cv_Den", Validator.isNotNull(thanhvienJSON.getString("Noi_Gui_Cv_Den")) ? thanhvienJSON.getString("Noi_Gui_Cv_Den") : org.json.JSONObject.NULL); - hsThiThucJson.put("Noi_Dung_Tra_Loi", Validator.isNotNull(thanhvienJSON.getString("Noi_Dung_Tra_Loi")) ? thanhvienJSON.getString("Noi_Dung_Tra_Loi") : org.json.JSONObject.NULL); - hsThiThucJson.put("Ngay_Luu_Ho_So", Validator.isNotNull(thanhvienJSON.getString("Ngay_Luu_Ho_So")) ? thanhvienJSON.getString("Ngay_Luu_Ho_So") : org.json.JSONObject.NULL); - hsThiThucJson.put("Nguoi_Luu_Ho_So", Validator.isNotNull(thanhvienJSON.getString("Nguoi_Luu_Ho_So")) ? thanhvienJSON.getString("Nguoi_Luu_Ho_So") : org.json.JSONObject.NULL); - hsThiThucJson.put("so_ho_so", arrayLength); - hsThiThucJson.put("So_Giay_Hen", Validator.isNotNull(thanhvienJSON.getString("So_Giay_Hen")) ? thanhvienJSON.getString("So_Giay_Hen") : org.json.JSONObject.NULL); - hsThiThucJson.put("Noi_Gui_Cv_Den_Id", Validator.isNotNull(thanhvienJSON.getString("Noi_Gui_Cv_Den_Id")) ? thanhvienJSON.getString("Noi_Gui_Cv_Den_Id"): org.json.JSONObject.NULL); - hsThiThucJson.put("Loai_To_Khai", Validator.isNotNull(thanhvienJSON.getString("Loai_To_Khai")) ? thanhvienJSON.getString("Loai_To_Khai"): org.json.JSONObject.NULL); - hsThiThucJson.put("Noi_Nop_Hs_Id", Validator.isNotNull(thanhvienJSON.getString("Noi_Nop_Hs_Id")) ? thanhvienJSON.getString("Noi_Nop_Hs_Id"): org.json.JSONObject.NULL); - return hsThiThucJson; - } - - private static JSONObject hsPhepNhapCanh(JSONObject phepNhapCanh ) { - JSONObject hsThiThucJson = JSONFactoryUtil.createJSONObject(); - JSONArray arrayPhepNhapCanhChiTiet = JSONFactoryUtil.createJSONArray(); - JSONArray arrayChiTiet = JSONFactoryUtil.createJSONArray(); - JSONObject jsonPhepNhapCanh = JSONFactoryUtil.createJSONObject(); - JSONObject jsonChiTiet = JSONFactoryUtil.createJSONObject(); - - JSONArray phepNhapCanhChiTiet = phepNhapCanh.getJSONArray("PhepNhapCanhChiTiet"); - JSONObject object = phepNhapCanhChiTiet.getJSONObject(0); - try { - //PhepNhapCanhChiTiet - jsonChiTiet.put("Id", object.getString("Id")); - jsonChiTiet.put("Phep_Nhap_Canh_Id", object.getString("Phep_Nhap_Canh_Id")); - jsonChiTiet.put("Ten", object.getString("Ten")); - jsonChiTiet.put("Ten_Kd", object.getString("Ten_Kd")); - jsonChiTiet.put("Ngay_Sinh", object.getString("Ngay_Sinh")); - jsonChiTiet.put("Def_Ngay_Sinh", object.getString("Def_Ngay_Sinh")); - jsonChiTiet.put("Quoc_Tich_Id", object.getString("Quoc_Tich_Id")); - jsonChiTiet.put("So_Ho_Chieu", object.getString("So_Ho_Chieu")); - jsonChiTiet.put("Duoc_Nc_Tu_Ngay", object.getString("Duoc_Nc_Tu_Ngay")); - jsonChiTiet.put("Duoc_Nc_Den_Ngay", object.getString("Duoc_Nc_Den_Ngay")); - jsonChiTiet.put("Gia_Tri_Tt", object.getString("Gia_Tri_Tt")); - jsonChiTiet.put("Ngay_Tao", object.getString("Ngay_Tao")); - jsonChiTiet.put("Nguoi_Tao", object.getString("Nguoi_Tao")); - jsonChiTiet.put("Muc_Dich_Id", object.getString("Muc_Dich_Id")); - jsonChiTiet.put("Ky_Hieu_Tt", object.getString("Ky_Hieu_Tt")); - jsonChiTiet.put("Hs_Thi_Thuc_Id", object.getString("Hs_Thi_Thuc_Id")); - jsonChiTiet.put("So_Fax", object.getString("So_Fax")); - jsonChiTiet.put("Ngay_Fax", object.getString("Ngay_Fax")); - jsonChiTiet.put("Co_Quan_De_Nghi_Ten", object.getString("Co_Quan_De_Nghi_Ten")); - jsonChiTiet.put("Co_Quan_De_Nghi_Id", object.getString("Co_Quan_De_Nghi_Id")); - jsonChiTiet.put("Don_Vi_Nhan_Phep_Id", object.getString("Don_Vi_Nhan_Phep_Id")); - arrayChiTiet.put(jsonChiTiet); - arrayPhepNhapCanhChiTiet.put(arrayChiTiet); - jsonPhepNhapCanh.put("PhepNhapCanhChiTiet", arrayPhepNhapCanhChiTiet); - - //PhepNhapCanh Body - jsonPhepNhapCanh.put("Id", phepNhapCanh.getString("Id")); - jsonPhepNhapCanh.put("So_Fax", phepNhapCanh.getString("So_Fax")); - jsonPhepNhapCanh.put("Ngay_Fax", phepNhapCanh.getString("Ngay_Fax")); - jsonPhepNhapCanh.put("Ma_So_Khach", phepNhapCanh.getString("Ma_So_Khach")); - jsonPhepNhapCanh.put("Don_Vi_Cap_Phep_Id", phepNhapCanh.getString("Don_Vi_Cap_Phep_Id")); - jsonPhepNhapCanh.put("Ngay_Tao", phepNhapCanh.getString("Ngay_Tao")); - jsonPhepNhapCanh.put("Nguoi_Tao", phepNhapCanh.getString("Nguoi_Tao")); - jsonPhepNhapCanh.put("Trang_Thai", phepNhapCanh.getString("Trang_Thai")); - jsonPhepNhapCanh.put("Co_Quan_De_Nghi_Ten", phepNhapCanh.getString("Co_Quan_De_Nghi_Ten")); - jsonPhepNhapCanh.put("Co_Quan_De_Nghi_Id", phepNhapCanh.getString("Co_Quan_De_Nghi_Id")); - jsonPhepNhapCanh.put("Nguoi_Ky", phepNhapCanh.getString("Nguoi_Ky")); - jsonPhepNhapCanh.put("Chuc_Vu", phepNhapCanh.getString("Chuc_Vu")); - - hsThiThucJson.put("PhepNhapCanh", jsonPhepNhapCanh); - } catch (Exception e) { - e.getMessage(); - } - return hsThiThucJson; - } - - private static JSONObject hsCaNhan(JSONObject canhan ){ - JSONObject hsThiThucJson = JSONFactoryUtil.createJSONObject(); - JSONObject jsonCaNhan = JSONFactoryUtil.createJSONObject(); - jsonCaNhan.put("Id", canhan.getString("Id")); - jsonCaNhan.put("ca_nhan_goc_id", canhan.getString("ca_nhan_goc_id")); - jsonCaNhan.put("noi_sinh", canhan.getString("noi_sinh")); - jsonCaNhan.put("Ten", canhan.getString("Ten")); - jsonCaNhan.put("Ten_Kd", canhan.getString("Ten_Kd")); - jsonCaNhan.put("Ngay_Sinh", canhan.getString("Ngay_Sinh")); - jsonCaNhan.put("Def_Ngay_Sinh", canhan.getString("Def_Ngay_Sinh")); - jsonCaNhan.put("Gioi_Tinh", canhan.getString("Gioi_Tinh")); - jsonCaNhan.put("Quoc_Tich_Hn_Id", canhan.getString("Quoc_Tich_Hn_Id")); - jsonCaNhan.put("So_Ho_Chieu", canhan.getString("So_Ho_Chieu")); - jsonCaNhan.put("Quoc_Tich_Goc_Id", canhan.getString("Quoc_Tich_Goc_Id")); - jsonCaNhan.put("Ngay_Tao", canhan.getString("Ngay_Tao")); - jsonCaNhan.put("Nguoi_Tao", canhan.getString("Nguoi_Tao")); - hsThiThucJson.put("CaNhan", jsonCaNhan); + if(Validator.isNotNull(thanhvienJSON)){ + Iterator keys = thanhvienJSON.keys(); + while (keys.hasNext()) { + String key = keys.next(); + String value = thanhvienJSON.getString(key); + if (Validator.isNotNull(value)) { + if(key.equals("so_ho_so")){ + hsThiThucJson.put(key, arrayLength); + }else { + if(!key.equals(CA_NHAN) && !key.equals(HS_THI_THUC_NOI) && !key.equals(PHEP_NHAP_CANH)) { + hsThiThucJson.put(key, value); + } + } + }else{ + hsThiThucJson.put(key, org.json.JSONObject.NULL); + } + } + } +// hsThiThucJson.put("Duyet_Gia_Tri_Tt", Validator.isNotNull(thanhvienJSON.getString("xin_ky_hieu_tt")) ? thanhvienJSON.getString("xin_ky_hieu_tt"): org.json.JSONObject.NULL); // Số lần của thông tin duyệt +// hsThiThucJson.put("Duyet_Tt_Tu_Ngay", Validator.isNotNull(thanhvienJSON.getString("Xin_Tt_Tu_Ngay")) ? thanhvienJSON.getString("Xin_Tt_Tu_Ngay"): org.json.JSONObject.NULL); // Duyệt nhập cảnh từ ngày +// hsThiThucJson.put("Duyet_Tt_Den_Ngay", Validator.isNotNull(thanhvienJSON.getString("Xin_Tt_Den_Ngay")) ? thanhvienJSON.getString("Xin_Tt_Den_Ngay"): org.json.JSONObject.NULL); // Duyệt nhập cảnh đến ngày return hsThiThucJson; } - - private static JSONArray hsAnh(JSONArray hsAnh , Dossier dossier){ - JSONArray hsThiThucArray = JSONFactoryUtil.createJSONArray(); - JSONObject hsThiThucJson = JSONFactoryUtil.createJSONObject(); - //HS Anh - JSONObject jsonHsAnh = JSONFactoryUtil.createJSONObject(); - JSONArray arrayHsAnh = JSONFactoryUtil.createJSONArray(); - for (int t = 0; t < hsAnh.length(); t++) { - JSONObject hsAnhJSON = hsAnh.getJSONObject(t); - jsonHsAnh.put("Id", ""); - jsonHsAnh.put("Hs_Ho_So_Id", hsAnhJSON.getString("Hs_Ho_So_Id")); - jsonHsAnh.put("Anh", hsAnhJSON.getString("Anh")); - jsonHsAnh.put("Loai_Anh", hsAnhJSON.getString("Loai_Anh")); - jsonHsAnh.put("Chu_Hs", hsAnhJSON.getString("Chu_Hs")); - jsonHsAnh.put("Ngay_Tao", dossier.getCreateDate()); - jsonHsAnh.put("Nguoi_Tao", ""); - arrayHsAnh.put(jsonHsAnh); - } - hsThiThucJson.put("HsAnh", arrayHsAnh); - hsThiThucArray.put(hsThiThucJson); - return hsThiThucArray; - } - - - private static JSONArray hsTreEm(JSONArray hsTreEm , Dossier dossier){ - JSONArray hsThiThucArray = JSONFactoryUtil.createJSONArray(); - //HS tre em di cung - JSONObject jsonHsTreEm = JSONFactoryUtil.createJSONObject(); - JSONArray arrayHsTreEm = JSONFactoryUtil.createJSONArray(); - JSONObject hsThiThucJson = JSONFactoryUtil.createJSONObject(); - - for (int t = 0; t < hsTreEm.length(); t++) { - JSONObject hsTreEmJSON = hsTreEm.getJSONObject(t); - jsonHsTreEm.put("Id", ""); - jsonHsTreEm.put("Ten", hsTreEmJSON.getString("Ten")); - jsonHsTreEm.put("Ten_Kd", hsTreEmJSON.getString("Ten_Kd")); - jsonHsTreEm.put("Ngay_Sinh", hsTreEmJSON.getString("Ngay_Sinh")); - jsonHsTreEm.put("Def_Ngay_Sinh", hsTreEmJSON.getString("Ngay_Sinh")); - jsonHsTreEm.put("Quoc_Tich_Id", hsTreEmJSON.getString("Quoc_Tich_Id")); - jsonHsTreEm.put("So_Ho_Chieu", hsTreEmJSON.getString("So_Ho_Chieu")); - jsonHsTreEm.put("Qhgd_Id", hsTreEmJSON.getString("Qhgd_Id")); - jsonHsTreEm.put("Hs_Thi_Thuc_Id", ""); - jsonHsTreEm.put("Ngay_Tao", dossier.getCreateDate()); - jsonHsTreEm.put("Nguoi_Tao", ""); - arrayHsTreEm.put(jsonHsTreEm); - } - hsThiThucJson.put("HsTreEmDiCung", arrayHsTreEm); - hsThiThucArray.put(hsThiThucJson); - return hsThiThucArray; - } - - - private static JSONArray hsThanNhan(JSONArray hsThanNhan, Dossier dossier){ - JSONArray hsThiThucArray = JSONFactoryUtil.createJSONArray(); - //Hs thân nhân - JSONObject jsonHsThanNhan = JSONFactoryUtil.createJSONObject(); - JSONArray arrayHsThanNhan = JSONFactoryUtil.createJSONArray(); - JSONObject hsThiThucJson = JSONFactoryUtil.createJSONObject(); - - for (int t = 0; t < hsThanNhan.length(); t++) { - JSONObject hsThanNhanJSON = hsThanNhan.getJSONObject(t); - jsonHsThanNhan.put("Id", hsThanNhanJSON.getString("")); - jsonHsThanNhan.put("Qhgd_Id", hsThanNhanJSON.getString("Qhgd_Id")); - jsonHsThanNhan.put("Ten", hsThanNhanJSON.getString("Ten")); - jsonHsThanNhan.put("Ten_Kd", hsThanNhanJSON.getString("Ten_Kd")); - jsonHsThanNhan.put("Ngay_Sinh", hsThanNhanJSON.getString("Ngay_Sinh")); - jsonHsThanNhan.put("Def_Ngay_Sinh", hsThanNhanJSON.getString("Def_Ngay_Sinh")); - jsonHsThanNhan.put("Quoc_Tich_Id", hsThanNhanJSON.getString("Quoc_Tich_Id")); - jsonHsThanNhan.put("Dia_Chi_Thuong_Tru", hsThanNhanJSON.getString("Dia_Chi_Thuong_Tru")); - jsonHsThanNhan.put("Nguoi_Tao", hsThanNhanJSON.getString("")); - jsonHsThanNhan.put("Ngay_Tao", dossier.getCreateDate()); - arrayHsThanNhan.put(jsonHsThanNhan); - } - hsThiThucJson.put("HsThanNhan", arrayHsThanNhan); - hsThiThucArray.put(hsThiThucJson); - return hsThiThucArray; - } - @Override public Response getKTHoChieu(HttpServletRequest request, HttpHeaders header, ServiceContext serviceContext, long ktHoChieu, String soHC, String soPhep) { diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/PaymentFileManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/PaymentFileManagementImpl.java index 11dc76c9bd..c29b70435a 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/PaymentFileManagementImpl.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/PaymentFileManagementImpl.java @@ -907,7 +907,7 @@ public Response getPaymentFileByDossierId(HttpServletRequest request, HttpHeader return Response.status(HttpURLConnection.HTTP_OK).entity(result).build(); } catch (Exception e) { - return BusinessExceptionImpl.processException(e); + return Response.status(HttpURLConnection.HTTP_INTERNAL_ERROR).entity(e.getMessage()).build(); } } diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/QLCDManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/QLCDManagementImpl.java index 04e71d853c..dbee88159c 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/QLCDManagementImpl.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/QLCDManagementImpl.java @@ -29,6 +29,7 @@ public QLCDManagementImpl() { @Override public Response forwardApi(String body) { + _log.info("forwarding api..."); String type = "noType"; try { if(Validator.isNull(body)) { @@ -51,8 +52,8 @@ public Response forwardApi(String body) { throw new Exception("Parse config json error"); } - String server = configJson.getString(QLCDConstants.CONFIG_SERVER); - if(Validator.isNull(server) || server.isEmpty()) { + String unit = configJson.getString(QLCDConstants.CONFIG_SERVER); + if(Validator.isNull(unit) || unit.isEmpty()) { throw new Exception("No server config was found"); } @@ -64,15 +65,20 @@ public Response forwardApi(String body) { type = bodyJson.getString("type"); String responseCongDan = ""; - if(server.equals(SERVER_HAUGIANG)) { - String token = qlcdAction.getToken(); - responseCongDan = qlcdAction.sendData(token, bodyJson); - } + JSONObject typeServer = JSONFactoryUtil.createJSONObject(); + + typeServer.put("partnerCode", QLCDConstants.UNIT_HG); + + String token = qlcdAction.getToken(unit); + responseCongDan = qlcdAction.sendData(token, bodyJson, unit); return Response.status(HttpURLConnection.HTTP_OK).entity(responseCongDan).build(); } catch (Exception e) { _log.error("Error when forward api " + type, e); - return Response.status(HttpURLConnection.HTTP_BAD_REQUEST).entity(null).build(); + JSONObject errorResponse = JSONFactoryUtil.createJSONObject(); + errorResponse.put("message", "Error"); + errorResponse.put("errorCode", e.getMessage()); + return Response.status(HttpURLConnection.HTTP_BAD_REQUEST).entity(errorResponse.toJSONString()).build(); } } } diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/QLVGManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/QLVGManagementImpl.java index 164e4028ab..53b1a2b082 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/QLVGManagementImpl.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/QLVGManagementImpl.java @@ -20,6 +20,7 @@ import org.opencps.dossiermgt.action.impl.QLVBIntegrationActionImpl; import org.opencps.dossiermgt.action.util.DossierFileUtils; import org.opencps.dossiermgt.constants.QLVBConstants; +import org.opencps.dossiermgt.input.model.ProfileInModel; import org.opencps.dossiermgt.model.Dossier; import org.opencps.dossiermgt.service.CPSDossierBusinessLocalServiceUtil; import org.opencps.dossiermgt.service.DossierLocalServiceUtil; @@ -131,7 +132,7 @@ public Response updateProfile(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, User user, ServiceContext serviceContext, String id, File file, String displayName, String fileType, - String actionCode) { + String actionCode, int sequence) { _log.info("Eoffice system calling api FDS..."); JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); try { @@ -151,6 +152,7 @@ public Response updateProfile(HttpServletRequest request, HttpHeaders header, || displayName.isEmpty() || fileType.isEmpty() || actionCode.isEmpty() + || Validator.isNull(sequence) ) { jsonObject.put("message", "Data is invalid"); jsonObject.put("code", "01"); @@ -204,9 +206,12 @@ public Response updateProfile(HttpServletRequest request, HttpHeaders header, inputStream, "", dossier, displayName, fileType, "false", dossierPartNo, "", "" ); + ProfileInModel input = new ProfileInModel(); + input.setStatusQLVB(String.valueOf(sequence)); + //Do action QLVBIntegrationAction docAction = new QLVBIntegrationActionImpl(serverConfig); - docAction.doAction(groupId, serviceContext, dossier, actionCode); + docAction.doAction(groupId, serviceContext, dossier, actionCode, input); jsonObject.put("message", "Success"); jsonObject.put("code", "00"); diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/ServiceInfoManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/ServiceInfoManagementImpl.java index d12cca1b6a..a6ca6a84e4 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/ServiceInfoManagementImpl.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/ServiceInfoManagementImpl.java @@ -39,6 +39,7 @@ import java.net.URL; import java.util.ArrayList; import java.util.Base64; +import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; @@ -57,9 +58,12 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.IOUtils; import org.apache.cxf.jaxrs.ext.multipart.Attachment; +import org.opencps.adminconfig.model.ApiManager; +import org.opencps.adminconfig.service.ApiManagerLocalServiceUtil; import org.opencps.api.constants.ConstantUtils; import org.opencps.api.controller.ServiceInfoManagement; import org.opencps.api.controller.util.MessageUtil; +import org.opencps.api.controller.util.OpenCPSUtils; import org.opencps.api.controller.util.ServiceInfoUtils; import org.opencps.api.serviceinfo.model.FileTemplateModel; import org.opencps.api.serviceinfo.model.FileTemplateResultsModel; @@ -84,7 +88,6 @@ import org.opencps.dossiermgt.action.ServiceInfoActions; import org.opencps.dossiermgt.action.impl.DVCQGIntegrationActionImpl; import org.opencps.dossiermgt.action.impl.ServiceInfoActionsImpl; -import org.opencps.dossiermgt.action.util.OpenCPSConfigUtil; import org.opencps.dossiermgt.action.util.SpecialCharacterUtils; import org.opencps.dossiermgt.constants.DossierTerm; import org.opencps.dossiermgt.constants.ServiceInfoTerm; @@ -101,6 +104,9 @@ public class ServiceInfoManagementImpl implements ServiceInfoManagement { + private static final String API_LIST_SERVICEINFO = "API_LIST_SERVICEINFO"; + private static final String API_VIEW_SERVICEINFO = "API_VIEW_SERVICEINFO"; + @SuppressWarnings("unchecked") @Override public Response getServiceInfos(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, @@ -109,6 +115,8 @@ public Response getServiceInfos(HttpServletRequest request, HttpHeaders header, ServiceInfoActions actions = new ServiceInfoActionsImpl(); ServiceInfoResultsModel results = new ServiceInfoResultsModel(); + JSONObject bodyResponse = JSONFactoryUtil.createJSONObject(); + long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); try { if (query.getEnd() == 0) { @@ -119,7 +127,6 @@ public Response getServiceInfos(HttpServletRequest request, HttpHeaders header, } - long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); long userId = user.getUserId(); LinkedHashMap params = new LinkedHashMap(); @@ -238,9 +245,23 @@ public Response getServiceInfos(HttpServletRequest request, HttpHeaders header, // // builder.cacheControl(cc); // -// return builder.build(); +// return builder.build(); + + bodyResponse.put("status", HttpURLConnection.HTTP_OK); + bodyResponse.put("total", results.getTotal()); + // ghi log vao syncTracking + OpenCPSUtils.addSyncTracking(API_LIST_SERVICEINFO, user.getUserId(), + groupId, StringPool.NULL,StringPool.NULL, StringPool.NULL, 1, + JSONFactoryUtil.looseSerialize(query), bodyResponse.toJSONString()); + return Response.status(HttpURLConnection.HTTP_OK).entity(results).build(); } catch (Exception e) { + _log.error(e.getMessage()); + // ghi log vao syncTracking + bodyResponse.put("status", HttpURLConnection.HTTP_INTERNAL_ERROR); + OpenCPSUtils.addSyncTracking(API_LIST_SERVICEINFO, user.getUserId(), + groupId, StringPool.NULL,StringPool.NULL, StringPool.NULL, 0, + JSONFactoryUtil.looseSerialize(query), bodyResponse.toJSONString()); return BusinessExceptionImpl.processException(e); } @@ -309,9 +330,10 @@ public Response getDetailServiceInfo(HttpServletRequest request, HttpHeaders hea ServiceInfoActions actions = new ServiceInfoActionsImpl(); ServiceInfoDetailModel results = new ServiceInfoDetailModel(); + long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); try { - long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); + long userId = user.getUserId(); ServiceInfo serviceInfo = null; @@ -343,9 +365,19 @@ public Response getDetailServiceInfo(HttpServletRequest request, HttpHeaders hea return builder.build(); */ - return Response.status(HttpURLConnection.HTTP_OK).entity(results).build(); + + // ghi log vao syncTracking + OpenCPSUtils.addSyncTracking(API_VIEW_SERVICEINFO, user.getUserId(), + groupId, StringPool.NULL,StringPool.NULL, serviceInfo.getServiceCode(), 1, + id, JSONFactoryUtil.looseSerialize(results)); + + return Response.status(HttpURLConnection.HTTP_OK).entity(results).build(); } catch (Exception e) { + // ghi log vao syncTracking + OpenCPSUtils.addSyncTracking(API_VIEW_SERVICEINFO, user.getUserId(), + groupId, StringPool.NULL,StringPool.NULL, StringPool.NULL, 0, + id, StringPool.NULL); return BusinessExceptionImpl.processException(e); } } diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/SupportSearchManagementImpl.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/SupportSearchManagementImpl.java new file mode 100644 index 0000000000..421708cfdb --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/impl/SupportSearchManagementImpl.java @@ -0,0 +1,334 @@ +package org.opencps.api.controller.impl; + +import backend.auth.api.exception.BusinessExceptionImpl; +import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.json.JSONArray; +import com.liferay.portal.kernel.json.JSONException; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.model.Company; +import com.liferay.portal.kernel.model.User; +import com.liferay.portal.kernel.search.Field; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.service.UserLocalServiceUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.PropsUtil; +import com.liferay.portal.kernel.util.Validator; +import org.apache.commons.httpclient.util.HttpURLConnection; +import org.opencps.api.constants.SupportSearchConstants; +import org.opencps.api.controller.SupportSearchManagement; +import org.opencps.api.controller.util.DossierUtils; +import org.opencps.communication.model.ServerConfig; +import org.opencps.communication.service.ServerConfigLocalServiceUtil; +import org.opencps.dossiermgt.model.*; +import org.opencps.dossiermgt.model.impl.PublishQueueImpl; +import org.opencps.dossiermgt.service.*; +import org.opencps.kernel.prop.PropKeys; +import org.opencps.usermgt.model.Applicant; +import org.opencps.usermgt.service.ApplicantLocalServiceUtil; +import org.opencps.usermgt.service.impl.ApplicantLocalServiceImpl; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.Response; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.URL; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.Locale; + +public class SupportSearchManagementImpl implements SupportSearchManagement { + + private static final int DICH_VU_CONG = 1; + private static final int MOT_CUA = 2; + private static final String SERVER_NO_DVC = "SERVER_DVC"; + private static final String PROTOCOL = "API_SYNC"; + private static final String REFUID = "refUid"; + + private static final String EMAIL = "email"; + private static final String DATA = "data"; + + private static final String OPENCPS_DOSSIERSYNC = "ds"; + private static final String OPENCPS_PUBLISH_QUEUE = "pq"; + + @Override + public Response getSupportSearchDossiers(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, User user, ServiceContext serviceContext, String dossierId, Boolean isCallAgain, String referenceUid) { + if(Validator.isNull(isCallAgain)){ + isCallAgain = true; + } + Integer type = null; + String liferay_home = PropsUtil.get("liferay.home"); + if(liferay_home.contains("dvc")){ + type = DICH_VU_CONG; + } else if(liferay_home.contains("mcdt")) { + type = MOT_CUA; + } + + JSONObject response = JSONFactoryUtil.createJSONObject(); + long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); + + if(type==DICH_VU_CONG) { + try { + if(Validator.isNull(referenceUid)){ + response.put(SupportSearchConstants.HO_SO_DVC, supportSearchDVC(groupId, dossierId)); + } else { + response.put(SupportSearchConstants.HO_SO_DVC, supportSearchDVC(groupId, referenceUid)); + } + + if(isCallAgain){ + Dossier dossier = DossierUtils.getDossierNew(dossierId, groupId); + ServerConfig serverConfig = ServerConfigLocalServiceUtil.getByServerNO_PROTOCOL(dossier.getServerNo(), PROTOCOL, dossier.getGroupId()); + + JSONObject config = JSONFactoryUtil.createJSONObject(serverConfig.getConfigs()); + + String url = config.get("url").toString() + "/supportSearch/" + + dossier.getDossierId() + StringPool.QUESTION +StringPool.AMPERSAND+"isCallAgain"+StringPool.EQUAL+"false"+StringPool.AMPERSAND+REFUID+StringPool.EQUAL+dossier.getReferenceUid(); + + JSONObject responeUrl = sendRequestToURL(url, config.getLong("groupId")); + JSONObject hoSoMCDT = JSONFactoryUtil.createJSONObject(); + + if(Validator.isNotNull(responeUrl)){ + hoSoMCDT = JSONFactoryUtil.createJSONObject(responeUrl.get(SupportSearchConstants.HO_SO_MCDT).toString()); + } + + response.put(SupportSearchConstants.HO_SO_MCDT, hoSoMCDT); + } + } catch (Exception e){ + _log.error(e); + return BusinessExceptionImpl.processException(e); + } + } else if(type==MOT_CUA) { + try { + if(Validator.isNull(referenceUid)){ + response.put(SupportSearchConstants.HO_SO_MCDT, supportSearchDVC(groupId, dossierId)); + } else { + response.put(SupportSearchConstants.HO_SO_MCDT, supportSearchDVC(groupId, referenceUid)); + } + + if(isCallAgain){ + Dossier dossier = DossierUtils.getDossierNew(dossierId, groupId); + ServerConfig serverConfig = ServerConfigLocalServiceUtil.getByServerNO_PROTOCOL(SERVER_NO_DVC, PROTOCOL, dossier.getGroupId()); + JSONObject config = JSONFactoryUtil.createJSONObject(serverConfig.getConfigs()); + + String url = config.get("url").toString() + "/supportSearch/" + + dossier.getDossierId() + StringPool.QUESTION + StringPool.AMPERSAND+"isCallAgain"+StringPool.EQUAL+"false" + +StringPool.AMPERSAND+REFUID+StringPool.EQUAL+dossier.getReferenceUid(); + + JSONObject responeUrl = sendRequestToURL(url, config.getLong("groupId")); + JSONObject hoSoDVC = JSONFactoryUtil.createJSONObject(responeUrl.get(SupportSearchConstants.HO_SO_DVC).toString()); + + response.put(SupportSearchConstants.HO_SO_DVC, hoSoDVC); + } + } + catch (Exception e){ + _log.error(e); + return BusinessExceptionImpl.processException(e); + } + } + + return Response.status(HttpURLConnection.HTTP_OK).entity(response.toJSONString()).build(); + } + + @Override + public Response resetStateRetry(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, User user, ServiceContext serviceContext, long id, int status, String table) { + + if(table.equalsIgnoreCase(OPENCPS_PUBLISH_QUEUE)) { + PublishQueue publishQueue = null; + try { + publishQueue = PublishQueueLocalServiceUtil.getPublishQueue(id); + } catch (Exception ex){ + _log.error(ex.getMessage()); + } + if(Validator.isNotNull(publishQueue)){ + publishQueue.setStatus(status); + publishQueue.setRetry(0); + publishQueue.setModifiedDate(new Date()); + try { + PublishQueueLocalServiceUtil.updatePublishQueue(publishQueue); + return Response.status(HttpURLConnection.HTTP_OK).entity("OK").build(); + } catch (Exception e){ + _log.error(e.getMessage()); + return BusinessExceptionImpl.processException(e); + } + } + } else if(table.equalsIgnoreCase(OPENCPS_DOSSIERSYNC)) { + DossierSync dossierSync = null; + try { + dossierSync = DossierSyncLocalServiceUtil.getDossierSync(id); + } catch (Exception ex){ + _log.error(ex.getMessage()); + } + if(Validator.isNotNull(dossierSync)){ + dossierSync.setState(status); + dossierSync.setRetry(0); + dossierSync.setModifiedDate(new Date()); + try { + DossierSyncLocalServiceUtil.updateDossierSync(dossierSync); + return Response.status(HttpURLConnection.HTTP_OK).entity("OK").build(); + } catch (Exception e){ + _log.error(e.getMessage()); + return BusinessExceptionImpl.processException(e); + } + } + } + return Response.status(HttpURLConnection.HTTP_OK).entity("Tham số truyền vào cho API không đúng!").build(); + } + + @Override + public Response supportUser(HttpServletRequest request, HttpHeaders header, Company company, Locale locale, User user, ServiceContext serviceContext) throws PortalException { + JSONObject response = JSONFactoryUtil.createJSONObject(); + + Date now = new Date(); + + Calendar cal = Calendar.getInstance(); + cal.setTime(now); + cal.add(Calendar.DATE, -30); + Date thirtyDayAgo = cal.getTime(); + thirtyDayAgo.setHours(0); + thirtyDayAgo.setMinutes(0); + thirtyDayAgo.setSeconds(0); + try { + + List applicantList = ApplicantLocalServiceUtil.getListApplicationByG_NotEqualZero_CDateToNow(thirtyDayAgo); + + if(applicantList.size() == 0){ + response.put("applicantList", applicantList.size()); + return Response.status(HttpURLConnection.HTTP_OK).entity(response.toJSONString()).build(); + } + JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); + for(Applicant applicant : applicantList){ + User userQuery = UserLocalServiceUtil.getUser(applicant.getMappingUserId()); + if(Validator.isNull(userQuery.getEmailAddress())){ + userQuery.setEmailAddress(applicant.getContactEmail()); + userQuery.setModifiedDate(new Date()); + UserLocalServiceUtil.updateUser(userQuery); + JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); + jsonObject.put("Email", applicant.getContactEmail()); + jsonArray.put(jsonObject); + } + + } + response.put("Message", "Update complete! " + jsonArray.length() + " Users has NULL EMAIL"); + response.put(DATA, jsonArray); + return Response.status(HttpURLConnection.HTTP_OK).entity(response.toJSONString()).build(); + } catch (Exception ex){ + _log.error(ex.getMessage()); + return BusinessExceptionImpl.processException(ex); + } + + + + } + + public JSONObject SupportSeachContent(long groupId, String key){ + JSONObject body = JSONFactoryUtil.createJSONObject(); + + Dossier dossier = DossierUtils.getDossierNew(key, groupId); + JSONObject dossierObject = SupportSearchConstants.convertDossierToJSONObject(dossier); + body.put(SupportSearchConstants.INFO, dossierObject); + + List ListDossierSync = DossierSyncLocalServiceUtil.findByG_DID(dossier.getGroupId(), dossier.getDossierId()); + JSONArray DossierSyncArray = SupportSearchConstants.convertListSyncToArray(ListDossierSync); + body.put(SupportSearchConstants.DOSSIER_SYNC, DossierSyncArray); + + List ListDossierAction = + DossierActionLocalServiceUtil.findByG_DID(dossier.getGroupId(), dossier.getDossierId()); + + JSONArray DossierActionArray = SupportSearchConstants.convertListActionToArray(ListDossierAction); + body.put(SupportSearchConstants.DOSSIER_ACTION, DossierActionArray); + + List dossierFileList = DossierFileLocalServiceUtil.findByDID_GROUP(dossier.getGroupId(), dossier.getDossierId()); + + if(dossierFileList.size() >0) { + JSONArray dossierFileArray = JSONFactoryUtil.createJSONArray(); + for( DossierFile dossierFile : dossierFileList ){ + JSONObject dossiferFileObject = JSONFactoryUtil.createJSONObject(); + String urlAPI = PropsUtil.get(PropKeys.PORTAL_DOMAIN)+"/o/rest/v2/dossiers/"+dossierFile.getDossierId()+"/files/"+dossierFile.getReferenceUid()+"/preview.pdf"; + dossiferFileObject.put(SupportSearchConstants.URL_DOSSIER_FILE, urlAPI); + dossierFileArray.put(dossiferFileObject); + } + body.put(SupportSearchConstants.DOSSIER_FILE, dossierFileArray); + } else { + body.put(SupportSearchConstants.DOSSIER_FILE, JSONFactoryUtil.createJSONArray()); + } + return body; + } + + private JSONObject supportSearchDVC(long groupId, String key){ + + JSONObject body = JSONFactoryUtil.createJSONObject(); + JSONObject dossierObj = SupportSeachContent(groupId, key); + body.put(SupportSearchConstants.DOSSIER, dossierObj); + Dossier dossier = DossierUtils.getDossierNew(key, groupId); + + List DossierBetweenList = DossierLocalServiceUtil.findDossierTransferByORIGIN_NO_ORIGIN_ID_ORIGINALITY(dossier.getDossierNo(), dossier.getDossierId(), null); + + if(DossierBetweenList.size()>0){ + + Dossier dossierBetween = DossierBetweenList.get(0); + + JSONObject jsonObject = SupportSeachContent(groupId, String.valueOf(dossierBetween.getDossierId())); + + body.put(SupportSearchConstants.DOSSIER_BETWEEN, jsonObject); + + } else { + body.put(SupportSearchConstants.DOSSIER_BETWEEN, JSONFactoryUtil.createJSONObject()); + } + + List DossierTransferList = DossierLocalServiceUtil.findDossierTransferByORIGIN_NO_ORIGIN_ID_ORIGINALITY(dossier.getDossierNo(), null, 2); + + if(DossierTransferList.size()>0){ + + Dossier dossierTransfer = DossierTransferList.get(0); + + JSONObject jsonObject = SupportSeachContent(groupId, String.valueOf(dossierTransfer.getDossierId())); + + body.put(SupportSearchConstants.DOSSIER_TRANFER, jsonObject); + + } else { + body.put(SupportSearchConstants.DOSSIER_TRANFER, JSONFactoryUtil.createJSONObject()); + } + + return body; + } + private JSONObject sendRequestToURL(String urlAddress, long groupId) throws IOException, JSONException { + JSONObject myResponse = null; + URL obj = new URL(urlAddress); + java.net.HttpURLConnection connection = (java.net.HttpURLConnection) obj.openConnection(); + connection.setRequestProperty("groupId", String.valueOf(groupId)); + connection.setRequestMethod("GET"); + try { + int responseCode = connection.getResponseCode(); + + _log.debug("responseCode = " + responseCode); + + // Thực hiện đọc + BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); + String inputLine; + StringBuffer response = new StringBuffer(); + + while ((inputLine = in.readLine()) != null) { + response.append(inputLine); + } + + in.close(); + + if(responseCode==200){ + myResponse = JSONFactoryUtil.createJSONObject(response.toString()); + } else { + myResponse = null; + } + } catch(Exception ex) { + myResponse = null; + } + return myResponse; + } + + Log _log = LogFactoryUtil.getLog(SupportSearchManagementImpl.class); +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/DateTimeUtil.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/DateTimeUtil.java new file mode 100644 index 0000000000..9556565d9a --- /dev/null +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/DateTimeUtil.java @@ -0,0 +1,19 @@ +package org.opencps.api.controller.util; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; + +public class DateTimeUtil { + public static final String _YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; + + public static String convertDatetoDateTimeString(Date date) { + if (date == null) { + return null; + } + date.setSeconds(0); + DateFormat dateFormat = new SimpleDateFormat(_YYYY_MM_DD_HH_MM_SS); + String strDate = dateFormat.format(date); + return strDate; + } +} diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/DossierDocumentUtils.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/DossierDocumentUtils.java index 3f8788428e..4af3f9009d 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/DossierDocumentUtils.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/DossierDocumentUtils.java @@ -373,6 +373,11 @@ public static JSONObject processMergeDossierFormData(Dossier dossier, JSONObject } jsonData.put(DossierTerm.DOSSIER_MARKS, dossierMarkArr); + _log.info("DossierId: " + dossierId + ", DossierMarkLength: " + dossierMarkArr.length()); + if(dossierMarkArr.length()> 0) { + _log.info("First element of dossierMarkArr:" + dossierMarkArr.getJSONObject(0)); + } + PaymentFile payment = PaymentFileLocalServiceUtil.getByDossierId(groupId, dossierId); if (payment != null) { diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/DossierUtils.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/DossierUtils.java index d7ccf7e559..9a75ac37cf 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/DossierUtils.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/DossierUtils.java @@ -1330,6 +1330,32 @@ public static Dossier getDossier(String id, long groupId) { } } + public static Dossier getDossierNew(String id, long groupId) { + long dossierId = GetterUtil.getLong(id); + if (dossierId > 0) { + try { + return DossierLocalServiceUtil.getDossier(dossierId); + } catch (PortalException e) { + _log.error(e); + return null; + } + } else { + Dossier dossier = DossierLocalServiceUtil.fetchByDO_NO(id); + if(Validator.isNotNull(dossier)){ + return dossier; + } + + Dossier dossier2 = DossierLocalServiceUtil.getByDossierNo(groupId, id); + + if (Validator.isNull(dossier2)) { + return DossierLocalServiceUtil.getByRef(groupId, id); + + } else { + return dossier2; + } + } + } + //LamTV: Process get process option public static ProcessOption getProcessOption(String serviceInfoCode, String govAgencyCode, String dossierTemplateNo, long groupId) throws PortalException { diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/OpenCPSUtils.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/OpenCPSUtils.java index cfbc9e6f43..0352e1cb82 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/OpenCPSUtils.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/OpenCPSUtils.java @@ -1,4 +1,282 @@ package org.opencps.api.controller.util; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.Validator; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import org.opencps.adminconfig.model.ApiManager; +import org.opencps.adminconfig.model.SyncTracking; +import org.opencps.adminconfig.service.ApiManagerLocalServiceUtil; +import org.opencps.adminconfig.service.SyncTrackingLocalServiceUtil; +import org.opencps.api.adminconfig.model.DtoResponse; +import org.opencps.api.adminconfig.model.SyncTrackingQuery; +import org.opencps.api.adminconfig.model.SyncTrackingResponse; + public class OpenCPSUtils { + + private static Log _log = LogFactoryUtil.getLog(OpenCPSUtils.class); + private static final Integer MAX_LIMIT = 1000; + private static final String FORMAT_DATE_FRONT_END = "d/M/yyyy"; + public static final Integer STATE_SUCCESS = 1; + public static final Integer STATE_ERROR = 2; + + public static void addSyncTracking(String apiCode, long userId, long groupId, + String dossierNo, String referenceUid, String serviceCode, + int stateSync, String bodyRequest, String bodyResponse) { + + ApiManager apiManager = ApiManagerLocalServiceUtil.findByApiCode(apiCode); + if (apiManager != null) { + + try { + SyncTracking syncTracking = SyncTrackingLocalServiceUtil.updateSyncTracking( + userId, groupId, 0l, dossierNo, referenceUid, + serviceCode, stateSync, apiManager.getApiCode(), + JSONFactoryUtil.looseSerialize(bodyRequest), + JSONFactoryUtil.looseSerialize(bodyResponse)); + + _log.debug("SyncTracking : " + JSONFactoryUtil.looseSerialize(syncTracking)); + } catch (Exception e) { + _log.error(e.getMessage()); + } + + } + } + + public DtoResponse getLogReports(SyncTrackingQuery syncTrackingQuery, boolean isReport) throws Exception { + try { + DtoResponse response = new DtoResponse(); + if(Validator.isNull(syncTrackingQuery)) { + throw new Exception("No query param was found"); + } + + + if(Validator.isNull(syncTrackingQuery.start)) { + throw new Exception("No start index was found"); + } + + if(Validator.isNull(syncTrackingQuery.end)) { + throw new Exception("No end index was found"); + } + + if(syncTrackingQuery.start >= syncTrackingQuery.end) { + throw new Exception("Start is not smaller than end"); + } + + if(syncTrackingQuery.end >= MAX_LIMIT) { + syncTrackingQuery.end = MAX_LIMIT; + if(syncTrackingQuery.end < syncTrackingQuery.start) { + syncTrackingQuery.start = syncTrackingQuery.end - 10; + } + } + + String fromDateString = Validator.isNotNull(syncTrackingQuery.fromDate) + && !syncTrackingQuery.fromDate.isEmpty() + ? syncTrackingQuery.fromDate : "1/10/2020"; + + String toDateString = Validator.isNotNull(syncTrackingQuery.toDate) + && !syncTrackingQuery.toDate.isEmpty() + ? syncTrackingQuery.toDate : "1/10/2100"; + + Date fromDateParsed = OpenCPSUtils.stringToDate(fromDateString, FORMAT_DATE_FRONT_END); + Date toDateParsed = OpenCPSUtils.stringToDate(toDateString, FORMAT_DATE_FRONT_END); + + boolean hasDossierNo = false; + boolean hasServiceCode = false; + boolean hasApi = false; + + if(Validator.isNotNull(syncTrackingQuery.dossierNo) && !syncTrackingQuery.dossierNo.isEmpty()) { + SyncTracking syncTracking; + syncTracking = SyncTrackingLocalServiceUtil.getByDossierNo(syncTrackingQuery.dossierNo); + + if(Validator.isNull(syncTracking)) { + syncTracking = SyncTrackingLocalServiceUtil.getByReferenceUid(syncTrackingQuery.dossierNo); + } + + if(Validator.isNotNull(syncTracking)) { + syncTrackingQuery.dossierNo = syncTracking.getReferenceUid(); + } + hasDossierNo = true; + } + + if(Validator.isNotNull(syncTrackingQuery.serviceCode) && !syncTrackingQuery.serviceCode.isEmpty()) { + hasServiceCode = true; + } + + if(Validator.isNotNull(syncTrackingQuery.api) && !syncTrackingQuery.api.isEmpty()) { + hasApi = true; + } + + List syncTrackingList; + List syncTrackingPaginate; + + _log.info("33333"); + // 1-1-1| 1-1-0| 1-0-0| 1-0-1| 0-1-1| 0-1-0| 0-0-1| 0-0-0 + _log.info("hasApi :" + hasApi); + _log.info("hasDossierNo :" + hasDossierNo); + _log.info("hasServiceCode :" + hasServiceCode); + _log.info("syncTrackingQuery :" + JSONFactoryUtil.looseSerialize(syncTrackingQuery)); + + if(hasApi && hasDossierNo && hasServiceCode) { + _log.info("1111111"); + syncTrackingList = SyncTrackingLocalServiceUtil.getByApiAndServiceCodeAndDossierNoAndDate( + syncTrackingQuery.api, syncTrackingQuery.dossierNo, syncTrackingQuery.serviceCode, + fromDateParsed, toDateParsed, 0, MAX_LIMIT); + + syncTrackingPaginate = SyncTrackingLocalServiceUtil.getByApiAndServiceCodeAndDossierNoAndDate( + syncTrackingQuery.api, syncTrackingQuery.dossierNo, syncTrackingQuery.serviceCode, + fromDateParsed, toDateParsed, syncTrackingQuery.start, syncTrackingQuery.end); + + } else if (hasApi && hasDossierNo && !hasServiceCode) { + _log.info("2222222"); + syncTrackingList = SyncTrackingLocalServiceUtil.getByApiAndDossierNoAndDate( + syncTrackingQuery.api, syncTrackingQuery.dossierNo, + fromDateParsed, toDateParsed, 0, MAX_LIMIT); + + syncTrackingPaginate = SyncTrackingLocalServiceUtil.getByApiAndDossierNoAndDate( + syncTrackingQuery.api, syncTrackingQuery.dossierNo, + fromDateParsed, toDateParsed, syncTrackingQuery.start, syncTrackingQuery.end); + + } else if (hasApi && !hasDossierNo && !hasServiceCode) { + _log.info("3333333"); + syncTrackingList = SyncTrackingLocalServiceUtil.getByApiAndDate( + syncTrackingQuery.api, fromDateParsed, toDateParsed, 0, MAX_LIMIT); + + syncTrackingPaginate = SyncTrackingLocalServiceUtil.getByApiAndDate(syncTrackingQuery.api, fromDateParsed, toDateParsed, + syncTrackingQuery.start, syncTrackingQuery.end); + + } else if (hasApi && !hasDossierNo && hasServiceCode) { + _log.info("4444444"); + syncTrackingList = SyncTrackingLocalServiceUtil.getByApiAndServiceCodeAndDate( + syncTrackingQuery.api, syncTrackingQuery.serviceCode, + fromDateParsed, toDateParsed, 0, MAX_LIMIT); + + syncTrackingPaginate = SyncTrackingLocalServiceUtil.getByApiAndServiceCodeAndDate( + syncTrackingQuery.api, syncTrackingQuery.serviceCode, + fromDateParsed, toDateParsed, syncTrackingQuery.start, syncTrackingQuery.end); + + } else if (!hasApi && hasDossierNo && hasServiceCode) { + _log.info("5555555"); + syncTrackingList = SyncTrackingLocalServiceUtil.getByDossierNoAndServiceCodeAndDate( + syncTrackingQuery.dossierNo, syncTrackingQuery.serviceCode, + fromDateParsed, toDateParsed, + 0, MAX_LIMIT + ); + syncTrackingPaginate = SyncTrackingLocalServiceUtil.getByDossierNoAndServiceCodeAndDate( + syncTrackingQuery.dossierNo, syncTrackingQuery.serviceCode, + fromDateParsed, toDateParsed, + syncTrackingQuery.start, syncTrackingQuery.end + ); + + } else if (!hasApi && hasDossierNo && !hasServiceCode) { + _log.info("6666666"); + syncTrackingList = SyncTrackingLocalServiceUtil.getByReferenceUidAndDate( + syncTrackingQuery.dossierNo, fromDateParsed, toDateParsed, + 0, MAX_LIMIT + ); + syncTrackingPaginate = SyncTrackingLocalServiceUtil.getByReferenceUidAndDate( + syncTrackingQuery.dossierNo, fromDateParsed, toDateParsed, + syncTrackingQuery.start, syncTrackingQuery.end + ); + + } else if (!hasApi && !hasDossierNo && hasServiceCode) { + _log.info("7777777"); + syncTrackingList = SyncTrackingLocalServiceUtil.getByServiceCodeAndDate( + syncTrackingQuery.serviceCode, fromDateParsed, toDateParsed, + 0, MAX_LIMIT + ); + syncTrackingPaginate = SyncTrackingLocalServiceUtil.getByServiceCodeAndDate( + syncTrackingQuery.serviceCode, fromDateParsed, toDateParsed, + syncTrackingQuery.start, syncTrackingQuery.end + ); + + } else { + _log.info("8888888"); + + syncTrackingList = SyncTrackingLocalServiceUtil.getByDate( + fromDateParsed, toDateParsed,0, MAX_LIMIT + ); + syncTrackingPaginate = SyncTrackingLocalServiceUtil.getByDate( + fromDateParsed, toDateParsed,syncTrackingQuery.start, syncTrackingQuery.end + ); + + } + + if(Validator.isNull(syncTrackingList) || syncTrackingList.size() == 0) { + response.setTotal(0); + response.getData().addAll(new ArrayList<>()); + return response; + } + + List syncTrackingResponse = this.transForm(syncTrackingPaginate,isReport); + response.setTotal(syncTrackingList.size()); + response.getData().addAll(syncTrackingResponse); + return response; + } catch (Exception e) { + e.printStackTrace(); + _log.error(e.getMessage()); + } + return null; + } + + private static Date stringToDate(String dateTime, String formatDate) { + try { + DateFormat inputFormatter = new SimpleDateFormat(formatDate); + return inputFormatter.parse(dateTime); + } catch (Exception e) { + System.out.println("Error when transform string => date"); + return null; + } + } + + private List transForm(List listTracking, boolean isReport) throws Exception{ + try { + List listTrackingTransform = new ArrayList<>(); + SyncTrackingResponse oneTrackingTransform; + for(SyncTracking syncTracking : listTracking) { + oneTrackingTransform = new SyncTrackingResponse(); + ApiManager apiManager = ApiManagerLocalServiceUtil.findByApiCode(syncTracking.getApi()); + if (!isReport) { + if (Validator.isNotNull(apiManager)) { + oneTrackingTransform.api = apiManager.getApiName(); + }else { + oneTrackingTransform.api = syncTracking.getApi(); + } + }else { + oneTrackingTransform.api = syncTracking.getApi(); + } + + oneTrackingTransform.bodyRequest = Validator.isNotNull(syncTracking.getBodyRequest()) + ? syncTracking.getBodyRequest() : ""; + oneTrackingTransform.bodyResponse = Validator.isNotNull(syncTracking.getResponse()) + ? syncTracking.getResponse() : ""; + oneTrackingTransform.createDate = Validator.isNotNull(syncTracking.getCreateDate()) + ? syncTracking.getCreateDate().getTime() : 0; + oneTrackingTransform.dossierNo = Validator.isNotNull(syncTracking.getDossierNo()) + ? syncTracking.getDossierNo(): ""; + oneTrackingTransform.serviceCode = Validator.isNotNull(syncTracking.getServiceCode()) + ? syncTracking.getServiceCode(): ""; + oneTrackingTransform.fromUnit = Validator.isNotNull(syncTracking.getFromUnit()) + ? syncTracking.getFromUnit() : ""; + oneTrackingTransform.toUnit = Validator.isNotNull(syncTracking.getToUnit()) + ? syncTracking.getToUnit() : ""; + oneTrackingTransform.stateSync = Validator.isNotNull(syncTracking.getStateSync()) + ? syncTracking.getStateSync() : OpenCPSUtils.STATE_ERROR; + oneTrackingTransform.trackingId = Validator.isNotNull(syncTracking.getTrackingId()) + ? syncTracking.getTrackingId() : 0; + oneTrackingTransform.groupId = Validator.isNotNull(syncTracking.getGroupId()) + ? syncTracking.getGroupId() : 0; + listTrackingTransform.add(oneTrackingTransform); + } + return listTrackingTransform; + } catch (Exception e) { + throw new Exception(e.getMessage()); + } + } } diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/ProcessUpdateDBUtils.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/ProcessUpdateDBUtils.java index 32c7013c1e..a4caad13d6 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/ProcessUpdateDBUtils.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/ProcessUpdateDBUtils.java @@ -104,6 +104,7 @@ import org.opencps.dossiermgt.action.impl.ServiceInfoActionsImpl; import org.opencps.dossiermgt.action.impl.ServiceProcessActionsImpl; import org.opencps.dossiermgt.action.impl.StepConfigActionsImpl; +import org.opencps.dossiermgt.service.ProcessOptionLocalServiceUtil; import org.opencps.dossiermgt.service.ServiceConfigLocalServiceUtil; import org.opencps.dossiermgt.service.ServiceInfoLocalServiceUtil; import org.opencps.usermgt.action.ApplicantActions; @@ -114,7 +115,6 @@ import org.opencps.usermgt.action.impl.JobposActions; import org.opencps.usermgt.service.JobPosLocalServiceUtil; -import javax.xml.ws.Service; public class ProcessUpdateDBUtils { @@ -868,6 +868,7 @@ public static boolean processUpdateServiceInfo(ServiceInfo service, String folde org.opencps.dossiermgt.model.ServiceInfo serviceInfo = null; ServiceInfoActions actionService = new ServiceInfoActionsImpl(); if (Validator.isNotNull(service.getServiceCode()) && Validator.isNotNull(service.getServiceName())) { + _log.info("Vaoooooo 11111111111"); String serviceCode = service.getServiceCode(); String serviceName = service.getServiceName(); String processText = service.getProcessText(); @@ -901,6 +902,11 @@ public static boolean processUpdateServiceInfo(ServiceInfo service, String folde } else { serviceInfo = ServiceInfoLocalServiceUtil.getByCode(groupId, service.getServiceCode()); } + if(Validator.isNotNull(serviceInfo)){ + _log.info("Id --- : " + serviceInfo.getServiceInfoId()); + _log.info("keyImport --- : " + keyImport); + } + _log.info("groupId : " + groupId); // Add serviceConfig Configs configs = service.getConfigs(); if ((configs != null && serviceInfoId > 0) || Validator.isNotNull(serviceInfo)) { @@ -1109,6 +1115,7 @@ private static boolean processFileTemplate(long userId, long groupId, long servi private static boolean processServiceConfigNoDelAll(long userId, long groupId, long serviceInfoId, Configs configs, ServiceInfoActions actionService, String keyImport, ServiceContext serviceContext) { + _log.debug("serviceInfoId: " + serviceInfoId); boolean flagService = true; try { // Delete all ServiceFileTemplate with serviceInfoId @@ -1132,7 +1139,21 @@ private static boolean processServiceConfigNoDelAll(long userId, long groupId, l boolean postalService = false; boolean registration = false; for (ServiceConfig config : configList) { - org.opencps.dossiermgt.model.ServiceConfig serviceConfigOld = ServiceConfigLocalServiceUtil.fetchByGID_SI_GOV_LEVEL(groupId, serviceInfoId, config.getGovAgencyCode(), config.getServiceLevel()); + + //Delete ServiceConfig No ProcessOption + List lstServiceByServiceInfo = ServiceConfigLocalServiceUtil.fetchByGID_SI_GOV_LEVEL(groupId, serviceInfoId, config.getGovAgencyCode()); + + if(lstServiceByServiceInfo !=null && lstServiceByServiceInfo.size() > 0){ + for(org.opencps.dossiermgt.model.ServiceConfig item : lstServiceByServiceInfo){ + List optionList = ProcessOptionLocalServiceUtil + .getByServiceProcessId(item.getServiceConfigId()); + if(optionList.size() == 0 || optionList.isEmpty()){ + ServiceConfigLocalServiceUtil.deleteServiceConfig(item); + } + } + } + + org.opencps.dossiermgt.model.ServiceConfig serviceConfigOld = ServiceConfigLocalServiceUtil.findByBySIAndGAC(groupId, serviceInfoId, config.getGovAgencyCode()); govAgencyCode = config.getGovAgencyCode(); govAgencyName = config.getGovAgencyName(); @@ -1141,16 +1162,22 @@ private static boolean processServiceConfigNoDelAll(long userId, long groupId, l serviceUrl = config.getServiceUrl(); forCitizen = config.isForCitizen(); forBusiness = config.isForBusiness(); + if (config.isForCitizen()){ + forCitizen = true; + } + if(config.isForBusiness()){ + forBusiness = true; + } postalService = config.isPostalService(); registration = config.isRegistration(); - // ServiceConfigActions actionConfig = new ServiceConfigActionImpl(); org.opencps.dossiermgt.model.ServiceConfig serviceConfigNew = null; if(Validator.isNotNull(serviceConfigOld)){ boolean flagConfig = actionService.deleteAllServiceConfig(userId, groupId, serviceInfoId, serviceConfigOld, serviceContext); _log.debug("FlagConfig: " + flagConfig); + _log.info("serviceConfigOld.getServiceConfigId(): " + serviceConfigOld.getServiceConfigId()); serviceConfigNew = actionConfig.updateServiceConfig(serviceConfigOld.getServiceConfigId(),userId,groupId, - serviceConfigId,govAgencyCode,serviceInstruction, serviceLevel,serviceUrl,forCitizen, + serviceInfoId,govAgencyCode,serviceInstruction, serviceLevel,serviceUrl,forCitizen, forBusiness,postalService,registration,serviceContext); serviceConfigId = serviceConfigNew.getServiceConfigId(); @@ -1160,11 +1187,13 @@ private static boolean processServiceConfigNoDelAll(long userId, long groupId, l serviceInstruction, serviceLevel, serviceUrl, forCitizen, forBusiness, postalService, registration, serviceContext); } // Process ProcessOption + _log.debug("ServiceConfigId : " + serviceConfigId); if (serviceConfigId > 0) { Processes process = config.getProcesses(); if (process != null) { flagService = processProcessOption(userId, groupId, serviceConfigId, process, actionConfig, serviceContext); + _log.debug("flagService : " + flagService); } } @@ -1263,8 +1292,14 @@ private static boolean processProcessOption(long userId, long groupId, long serv processName = option.getProcessName(); registerBookCode = option.getRegisterBookCode(); sampleCount = option.getSampleCount(); - forCitizen = option.isForCitizen(); - forBusiness = option.isForBusiness(); + + if (Validator.isNotNull(option.getForCitizen())) { + forCitizen = option.getForCitizen(); + } + + if(Validator.isNotNull(option.getForBusiness())) { + forBusiness = option.getForBusiness(); + } // actionConfig.updateOptionDB(userId, groupId, optionCode, optionName, serviceConfigId, seqOrder, autoSelect, instructionNote, submissionNote, templateNo, templateName, processNo, processName, diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/ReadXMLFileUtils.java b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/ReadXMLFileUtils.java index 205dd9ac2d..8ae1f75ded 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/ReadXMLFileUtils.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/controller/util/ReadXMLFileUtils.java @@ -283,7 +283,7 @@ private static String listFilesForFolder(File fileEntry, String folderPath, Stri strFile = processListFileDict(fileEntry, groupId, userId, serviceContext); break; case ConstantUtils.SOURCE_SERVICES: - strFile = processListFileService(fileEntry, folderParentPath, groupId, userId, StringPool.BLANK, serviceContext); + strFile = processListFileService(fileEntry, folderParentPath, groupId, userId, subFolder, serviceContext); break; case ConstantUtils.SOURCE_TEMPLATES: strFile =processListFileTemplate(fileEntry, folderParentPath, groupId, userId, serviceContext); diff --git a/modules/backend-api-rest/src/main/java/org/opencps/api/v21/model/Processes.java b/modules/backend-api-rest/src/main/java/org/opencps/api/v21/model/Processes.java index 071fa50264..fd94630d01 100644 --- a/modules/backend-api-rest/src/main/java/org/opencps/api/v21/model/Processes.java +++ b/modules/backend-api-rest/src/main/java/org/opencps/api/v21/model/Processes.java @@ -288,22 +288,22 @@ public static class ProcessOption { protected String processName; @XmlElement(required = true) protected String registerBookCode; - protected boolean forCitizen; - protected boolean forBusiness; + protected Boolean forCitizen; + protected Boolean forBusiness; - public boolean isForCitizen() { + public Boolean getForCitizen() { return forCitizen; } - public void setForCitizen(boolean forCitizen) { + public void setForCitizen(Boolean forCitizen) { this.forCitizen = forCitizen; } - public boolean isForBusiness() { + public Boolean getForBusiness() { return forBusiness; } - public void setForBusiness(boolean forBusiness) { + public void setForBusiness(Boolean forBusiness) { this.forBusiness = forBusiness; } diff --git a/modules/backend-api-rest/src/main/resources/adminconfig_schema.xsd b/modules/backend-api-rest/src/main/resources/adminconfig_schema.xsd new file mode 100644 index 0000000000..1ffc4903df --- /dev/null +++ b/modules/backend-api-rest/src/main/resources/adminconfig_schema.xsd @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/backend-cache-builder/backend-cache-builder-service/src/main/resources/service.properties b/modules/backend-cache-builder/backend-cache-builder-service/src/main/resources/service.properties index a25e00bcb3..be6bc4bab7 100644 --- a/modules/backend-cache-builder/backend-cache-builder-service/src/main/resources/service.properties +++ b/modules/backend-cache-builder/backend-cache-builder-service/src/main/resources/service.properties @@ -14,4 +14,4 @@ build.namespace=cachemgt build.number=111 - build.date=1614053788813 \ No newline at end of file + build.date=1614053788813 diff --git a/modules/backend-communication/backend-communication-api/src/main/java/org/opencps/communication/service/ServerConfigLocalService.java b/modules/backend-communication/backend-communication-api/src/main/java/org/opencps/communication/service/ServerConfigLocalService.java index 79695f9677..1ce97c0c9e 100644 --- a/modules/backend-communication/backend-communication-api/src/main/java/org/opencps/communication/service/ServerConfigLocalService.java +++ b/modules/backend-communication/backend-communication-api/src/main/java/org/opencps/communication/service/ServerConfigLocalService.java @@ -199,6 +199,10 @@ public long dynamicQueryCount(DynamicQuery dynamicQuery, public List getByServerAndProtocol(String serverNo, String protocol); + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ServerConfig getByServerNO_PROTOCOL(String serverNo, + String protocol, long groupId); + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public ServerConfig getByServerNoAndProtocol(long groupId, String serverNo, String protocol); diff --git a/modules/backend-communication/backend-communication-api/src/main/java/org/opencps/communication/service/ServerConfigLocalServiceUtil.java b/modules/backend-communication/backend-communication-api/src/main/java/org/opencps/communication/service/ServerConfigLocalServiceUtil.java index c3be9e6315..24c13f5dcd 100644 --- a/modules/backend-communication/backend-communication-api/src/main/java/org/opencps/communication/service/ServerConfigLocalServiceUtil.java +++ b/modules/backend-communication/backend-communication-api/src/main/java/org/opencps/communication/service/ServerConfigLocalServiceUtil.java @@ -225,6 +225,11 @@ public static java.util.List getBy return getService().getByServerAndProtocol(serverNo, protocol); } + public static org.opencps.communication.model.ServerConfig getByServerNO_PROTOCOL( + String serverNo, String protocol, long groupId) { + return getService().getByServerNO_PROTOCOL(serverNo, protocol, groupId); + } + public static org.opencps.communication.model.ServerConfig getByServerNoAndProtocol( long groupId, String serverNo, String protocol) { return getService().getByServerNoAndProtocol(groupId, serverNo, protocol); diff --git a/modules/backend-communication/backend-communication-api/src/main/java/org/opencps/communication/service/ServerConfigLocalServiceWrapper.java b/modules/backend-communication/backend-communication-api/src/main/java/org/opencps/communication/service/ServerConfigLocalServiceWrapper.java index 851308fd84..994910172b 100644 --- a/modules/backend-communication/backend-communication-api/src/main/java/org/opencps/communication/service/ServerConfigLocalServiceWrapper.java +++ b/modules/backend-communication/backend-communication-api/src/main/java/org/opencps/communication/service/ServerConfigLocalServiceWrapper.java @@ -239,6 +239,13 @@ public java.util.List getByServerA protocol); } + @Override + public org.opencps.communication.model.ServerConfig getByServerNO_PROTOCOL( + String serverNo, String protocol, long groupId) { + return _serverConfigLocalService.getByServerNO_PROTOCOL(serverNo, + protocol, groupId); + } + @Override public org.opencps.communication.model.ServerConfig getByServerNoAndProtocol( long groupId, String serverNo, String protocol) { diff --git a/modules/backend-communication/backend-communication-service/src/main/java/org/opencps/communication/service/impl/ServerConfigLocalServiceImpl.java b/modules/backend-communication/backend-communication-service/src/main/java/org/opencps/communication/service/impl/ServerConfigLocalServiceImpl.java index 3ed738e12b..3990d3b785 100644 --- a/modules/backend-communication/backend-communication-service/src/main/java/org/opencps/communication/service/impl/ServerConfigLocalServiceImpl.java +++ b/modules/backend-communication/backend-communication-service/src/main/java/org/opencps/communication/service/impl/ServerConfigLocalServiceImpl.java @@ -15,6 +15,8 @@ package org.opencps.communication.service.impl; import com.liferay.counter.kernel.service.CounterLocalServiceUtil; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.json.JSONObject; import com.liferay.portal.kernel.log.Log; @@ -381,5 +383,23 @@ public ServerConfig getByServerNoAndProtocol(long groupId, String govAgencyCode, return serverConfig; } + public ServerConfig getByServerNO_PROTOCOL (String serverNo, String protocol, long groupId){ + DynamicQuery dynamicQuery = serverConfigLocalService.dynamicQuery(); + dynamicQuery.add(RestrictionsFactoryUtil.eq("groupId", groupId)); + + if(Validator.isNotNull(serverNo)){ + dynamicQuery.add(RestrictionsFactoryUtil.eq("serverNo", serverNo)); + } + if(Validator.isNotNull(protocol)){ + dynamicQuery.add(RestrictionsFactoryUtil.eq("protocol", protocol)); + } + + List result = serverConfigPersistence.findWithDynamicQuery(dynamicQuery); + if(Validator.isNotNull(result)){ + return result.get(0); + } else { + return null; + } + } } \ No newline at end of file diff --git a/modules/backend-communication/backend-communication-service/src/main/resources/service.properties b/modules/backend-communication/backend-communication-service/src/main/resources/service.properties index 1335e43558..4e72de16e1 100644 --- a/modules/backend-communication/backend-communication-service/src/main/resources/service.properties +++ b/modules/backend-communication/backend-communication-service/src/main/resources/service.properties @@ -13,5 +13,5 @@ ## build.namespace=Communication - build.number=1199 - build.date=1614053794656 \ No newline at end of file + build.number=1202 + build.date=1624507744212 \ No newline at end of file diff --git a/modules/backend-datamgt/backend-datamgt-service/src/main/resources/service.properties b/modules/backend-datamgt/backend-datamgt-service/src/main/resources/service.properties index 191b2bcd06..371418c4b1 100644 --- a/modules/backend-datamgt/backend-datamgt-service/src/main/resources/service.properties +++ b/modules/backend-datamgt/backend-datamgt-service/src/main/resources/service.properties @@ -14,4 +14,4 @@ build.namespace=DataMgt build.number=1136 - build.date=1614053803288 \ No newline at end of file + build.date=1614053803288 diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/DossierActionTerm.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/DossierActionTerm.java index e6ab4450b3..4093cf86d8 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/DossierActionTerm.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/DossierActionTerm.java @@ -52,6 +52,7 @@ public class DossierActionTerm { public static final String OUTSIDE_ACTION_EDIT = "6969"; public static final String ACTION_SPECIAL_WAITING_PAYMENT = "8282"; public static final String ACTION_SPECIAL_CONFIRM_PAYMENT = "8283"; + public static final String ACTION_SPECIAL_CANCEL_PAYMENT = "8284"; public static final String publishImportDossier_fromStepCode = "300"; public static final String publishImportDossier_fromStepName = "Trả kết quả"; diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/DossierTerm.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/DossierTerm.java index fd9af702f5..eda8409a10 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/DossierTerm.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/DossierTerm.java @@ -91,6 +91,24 @@ public class DossierTerm { public static final String ASSIGNED_USER_ID = "assignedUserId"; public static final String ASSIGNED_USER_ID_SEARCH = "assignedUserIdSearch"; public static final String IS_SAME_APPLICANT = "isSameAsApplicant"; + + public static final String ACTION_IS_ONLINE = "actionIsOnline"; + public static final String ACTION_IS_NOT_ONLINE = "actionIsNotOnline"; + public static final String ACTION_CODE = "actionCode"; + public static final String PAYMENT = "payment"; + public static final String URL = "url"; + public static final String URL_DOMAIN = "url_domain"; + public static final String MC_URL = "mcUrl"; + public static final String USERNAME = "userName"; + public static final String PWD = "pwd"; + public static final String DVCQG_THANH_TOAN_THUE = "DVCQG_THANH_TOAN_THUE"; + public static final String API_SYNC_TRACKING = "API_SYNC_TRACKING"; + public static final String ACTION_CODE_CHUNG_TU = "actionCode_BL"; + + public static String buildPathDoAction(String path, String dossierId) { + return path + "/o/rest/v2/dossiers/" + dossierId + "/actions"; + }; + public static final String STATUS = "status"; public static final String SUBSTATUS = "subStatus"; @@ -351,6 +369,7 @@ public class DossierTerm { public static final String CONTAIN_DURATION_COUNT_GREATER_THAN = "durationCount>"; public static final String CONTAIN_MULTIPLE_CHECK = "multipleCheck="; public static final String CONTAIN_SERVER_SYNC ="serversync="; + public static final String CONTAIN_SEQUENCE_QLVB ="sequenceQLVB="; public static final String CONTAIN_GOV_SYNC ="govsync="; public static final String DUE_DATE_NOTIFY = "dueDateNotify"; public static final String DUE_DATE_NOTIFY_TYPE = "type"; diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/FrequencyOfficeConstants.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/FrequencyOfficeConstants.java index 94a1d6553f..ff549c7c01 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/FrequencyOfficeConstants.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/FrequencyOfficeConstants.java @@ -28,6 +28,8 @@ public class FrequencyOfficeConstants { public static final String CONFIG_URL = "adapter_url"; public static final String CONFIG_GET_TOKEN = "getToken"; public static final String CONFIG_SAVE_SYNC_TRACKING = "saveSyncTracking"; + public static final String CONFIG_GET_SYNC_TRACKING = "getSyncTracking"; + public static final String CONFIG_GET_DOSSIER_TAX = "getDetailDossierTax"; public static final String CONFIG_URL_LOCAL = "urlLocal"; public static final String CONFIG_GROUP_ID = "groupId"; public static final String CONFIG_GET_LIST_DOSSIERS = "getListDossier"; diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/QLCDConstants.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/QLCDConstants.java index a577694698..1d1014a20d 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/QLCDConstants.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/constants/QLCDConstants.java @@ -36,15 +36,27 @@ public class QLCDConstants { public static final String CONFIG_PARTNER_CODE_CUS = "partnerCodeCus"; public static final String CONFIG_SERVER = "serverQLCD"; + public static final String UNIT_HG = "HAUGIANG"; + public static final String UNIT_DT = "DONGTHAP"; public static final String KEY_TYPE_API = "type"; public static final String KEY_MaYeuCau = "MaYeuCau"; + public static final String KEY_GovAgencyCode = "GovAgencyCode"; //remove after validate + public static final String KEY_AuthHash = "AuthHash"; //remove after validate + public static final String KEY_StaffEmail = "StaffEmail"; //remove after validate public static final String KEY_MaDVC = "MaDVC"; public static final String KEY_MaTichHop = "MaTichHop"; public static final String KEY_MaCanBo = "MaCanBo"; public static final String KEY_SoDinhDanh = "SoDinhDanh"; + public static final String KEY_SoCMND = "SoCMND"; public static final String KEY_HoVaTen = "HoVaTen"; public static final String KEY_NgayThangNamSinh = "NgayThangNamSinh"; public static final String KEY_NgayThangNam = "NgayThangNam"; public static final String KEY_Paging = "paging"; + + public static final String ERROR_NO_MADVC = "001"; + public static final String ERROR_NO_GOV_AGENCY = "002"; + public static final String ERROR_NO_STAFF_EMAIL = "003"; + public static final String ERROR_MAPPING_DVC = "004"; + public static final String ERROR_MAPPING_STAFF = "005"; } diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/exception/NoSuchCsdlDcServiceInfoException.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/exception/NoSuchCsdlDcServiceInfoException.java new file mode 100644 index 0000000000..c114dfd943 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/exception/NoSuchCsdlDcServiceInfoException.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +package org.opencps.dossiermgt.exception; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.exception.NoSuchModelException; + +/** + * @author huymq + */ +@ProviderType +public class NoSuchCsdlDcServiceInfoException extends NoSuchModelException { + + public NoSuchCsdlDcServiceInfoException() { + } + + public NoSuchCsdlDcServiceInfoException(String msg) { + super(msg); + } + + public NoSuchCsdlDcServiceInfoException(String msg, Throwable cause) { + super(msg, cause); + } + + public NoSuchCsdlDcServiceInfoException(Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/exception/NoSuchCsdlDcUserException.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/exception/NoSuchCsdlDcUserException.java new file mode 100644 index 0000000000..f2d20b1282 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/exception/NoSuchCsdlDcUserException.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +package org.opencps.dossiermgt.exception; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.exception.NoSuchModelException; + +/** + * @author huymq + */ +@ProviderType +public class NoSuchCsdlDcUserException extends NoSuchModelException { + + public NoSuchCsdlDcUserException() { + } + + public NoSuchCsdlDcUserException(String msg) { + super(msg); + } + + public NoSuchCsdlDcUserException(String msg, Throwable cause) { + super(msg, cause); + } + + public NoSuchCsdlDcUserException(Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/input/model/DossierTaxInfo.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/input/model/DossierTaxInfo.java new file mode 100644 index 0000000000..64266ba0a1 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/input/model/DossierTaxInfo.java @@ -0,0 +1,221 @@ +package org.opencps.dossiermgt.input.model; + +public class DossierTaxInfo { + public Long groupId; + public Long dossierId; + public String dossierNo; + public String maSoThue; + public String soQuyetDinh; + public String ngayQuyetDinh; + public String tenTieuMuc; + public Integer soTien; + + public String hoTenNguoiNopTien; + public String soCmtNguoiNopTien; + public String diaChiNguoiNopTien; + public String tinhNguoiNopTien; + public String huyenNguoiNopTien; + public String xaNguoiNopTien; + public String thoiGianThanhToan; + public String soTienNop; + public String noiDungThanhToan; + public Integer trangThaiThanhToan; + public String fileChungTu; + public String ngayThueTraThongBao; + public String ngayTraThongBao; + public String ngayNhanBienLai; + public String statusTBT; + public String statusCTT; + + public String getStatusTBT() { + return statusTBT; + } + + public void setStatusTBT(String statusTBT) { + this.statusTBT = statusTBT; + } + + public String getStatusCTT() { + return statusCTT; + } + + public void setStatusCTT(String statusCTT) { + this.statusCTT = statusCTT; + } + + public String getHoTenNguoiNopTien() { + return hoTenNguoiNopTien; + } + + public void setHoTenNguoiNopTien(String hoTenNguoiNopTien) { + this.hoTenNguoiNopTien = hoTenNguoiNopTien; + } + + public String getSoCmtNguoiNopTien() { + return soCmtNguoiNopTien; + } + + public void setSoCmtNguoiNopTien(String soCmtNguoiNopTien) { + this.soCmtNguoiNopTien = soCmtNguoiNopTien; + } + + public String getDiaChiNguoiNopTien() { + return diaChiNguoiNopTien; + } + + public void setDiaChiNguoiNopTien(String diaChiNguoiNopTien) { + this.diaChiNguoiNopTien = diaChiNguoiNopTien; + } + + public String getTinhNguoiNopTien() { + return tinhNguoiNopTien; + } + + public void setTinhNguoiNopTien(String tinhNguoiNopTien) { + this.tinhNguoiNopTien = tinhNguoiNopTien; + } + + public String getHuyenNguoiNopTien() { + return huyenNguoiNopTien; + } + + public void setHuyenNguoiNopTien(String huyenNguoiNopTien) { + this.huyenNguoiNopTien = huyenNguoiNopTien; + } + + public String getXaNguoiNopTien() { + return xaNguoiNopTien; + } + + public void setXaNguoiNopTien(String xaNguoiNopTien) { + this.xaNguoiNopTien = xaNguoiNopTien; + } + + public String getThoiGianThanhToan() { + return thoiGianThanhToan; + } + + public void setThoiGianThanhToan(String thoiGianThanhToan) { + this.thoiGianThanhToan = thoiGianThanhToan; + } + + public String getSoTienNop() { + return soTienNop; + } + + public void setSoTienNop(String soTienNop) { + this.soTienNop = soTienNop; + } + + public String getNoiDungThanhToan() { + return noiDungThanhToan; + } + + public void setNoiDungThanhToan(String noiDungThanhToan) { + this.noiDungThanhToan = noiDungThanhToan; + } + + public Integer getTrangThaiThanhToan() { + return trangThaiThanhToan; + } + + public void setTrangThaiThanhToan(Integer trangThaiThanhToan) { + this.trangThaiThanhToan = trangThaiThanhToan; + } + + public String getFileChungTu() { + return fileChungTu; + } + + public void setFileChungTu(String fileChungTu) { + this.fileChungTu = fileChungTu; + } + + public String getNgayThueTraThongBao() { + return ngayThueTraThongBao; + } + + public void setNgayThueTraThongBao(String ngayThueTraThongBao) { + this.ngayThueTraThongBao = ngayThueTraThongBao; + } + + public String getNgayTraThongBao() { + return ngayTraThongBao; + } + + public void setNgayTraThongBao(String ngayTraThongBao) { + this.ngayTraThongBao = ngayTraThongBao; + } + + public String getNgayNhanBienLai() { + return ngayNhanBienLai; + } + + public void setNgayNhanBienLai(String ngayNhanBienLai) { + this.ngayNhanBienLai = ngayNhanBienLai; + } + + public Long getGroupId() { + return groupId; + } + + public void setGroupId(Long groupId) { + this.groupId = groupId; + } + + public Long getDossierId() { + return dossierId; + } + + public void setDossierId(Long dossierId) { + this.dossierId = dossierId; + } + + public String getDossierNo() { + return dossierNo; + } + + public void setDossierNo(String dossierNo) { + this.dossierNo = dossierNo; + } + + public String getMaSoThue() { + return maSoThue; + } + + public void setMaSoThue(String maSoThue) { + this.maSoThue = maSoThue; + } + + public String getSoQuyetDinh() { + return soQuyetDinh; + } + + public void setSoQuyetDinh(String soQuyetDinh) { + this.soQuyetDinh = soQuyetDinh; + } + + public String getNgayQuyetDinh() { + return ngayQuyetDinh; + } + + public void setNgayQuyetDinh(String ngayQuyetDinh) { + this.ngayQuyetDinh = ngayQuyetDinh; + } + + public String getTenTieuMuc() { + return tenTieuMuc; + } + + public void setTenTieuMuc(String tenTieuMuc) { + this.tenTieuMuc = tenTieuMuc; + } + + public Integer getSoTien() { + return soTien; + } + + public void setSoTien(Integer soTien) { + this.soTien = soTien; + } +} diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/input/model/ProfileInModel.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/input/model/ProfileInModel.java index 53654b50f5..a305e7eef5 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/input/model/ProfileInModel.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/input/model/ProfileInModel.java @@ -84,6 +84,16 @@ public class ProfileInModel { public String position; + public String statusQLVB; + + public String getStatusQLVB() { + return statusQLVB; + } + + public void setStatusQLVB(String statusQLVB) { + this.statusQLVB = statusQLVB; + } + public String getContent_process() { return content_process; } diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/input/model/SyncTrackingInfo.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/input/model/SyncTrackingInfo.java index 7236afb0e2..59f4d15cd2 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/input/model/SyncTrackingInfo.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/input/model/SyncTrackingInfo.java @@ -10,6 +10,7 @@ public class SyncTrackingInfo { public String referenceUid; public String bodyRequest; public String bodyResponse; + public String serverNo; public String protocol; public String unit; public Integer stateSync; diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcServiceInfo.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcServiceInfo.java new file mode 100644 index 0000000000..542c65fe08 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcServiceInfo.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.annotation.ImplementationClassName; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.util.Accessor; + +/** + * The extended model interface for the CsdlDcServiceInfo service. Represents a row in the "opencps_csdldc_serviceinfo" database table, with each column mapped to a property of this class. + * + * @author huymq + * @see CsdlDcServiceInfoModel + * @see org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoImpl + * @see org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl + * @generated + */ +@ImplementationClassName("org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoImpl") +@ProviderType +public interface CsdlDcServiceInfo extends CsdlDcServiceInfoModel, PersistedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this interface directly. Add methods to {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + public static final Accessor ID_DC_SERVICE_ACCESSOR = + new Accessor() { + @Override + public Long get(CsdlDcServiceInfo csdlDcServiceInfo) { + return csdlDcServiceInfo.getIdDcService(); + } + + @Override + public Class getAttributeClass() { + return Long.class; + } + + @Override + public Class getTypeClass() { + return CsdlDcServiceInfo.class; + } + }; +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcServiceInfoModel.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcServiceInfoModel.java new file mode 100644 index 0000000000..1abeeaa4ae --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcServiceInfoModel.java @@ -0,0 +1,252 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; + +import com.liferay.portal.kernel.bean.AutoEscape; +import com.liferay.portal.kernel.model.BaseModel; +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.model.ShardedModel; +import com.liferay.portal.kernel.service.ServiceContext; + +import java.io.Serializable; + +/** + * The base model interface for the CsdlDcServiceInfo service. Represents a row in the "opencps_csdldc_serviceinfo" database table, with each column mapped to a property of this class. + * + *

+ * This interface and its corresponding implementation {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoImpl}. + *

+ * + * @author huymq + * @see CsdlDcServiceInfo + * @see org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoImpl + * @see org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl + * @generated + */ +@ProviderType +public interface CsdlDcServiceInfoModel extends BaseModel, + ShardedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. All methods that expect a csdl dc service info model instance should use the {@link CsdlDcServiceInfo} interface instead. + */ + + /** + * Returns the primary key of this csdl dc service info. + * + * @return the primary key of this csdl dc service info + */ + public long getPrimaryKey(); + + /** + * Sets the primary key of this csdl dc service info. + * + * @param primaryKey the primary key of this csdl dc service info + */ + public void setPrimaryKey(long primaryKey); + + /** + * Returns the uuid of this csdl dc service info. + * + * @return the uuid of this csdl dc service info + */ + @AutoEscape + public String getUuid(); + + /** + * Sets the uuid of this csdl dc service info. + * + * @param uuid the uuid of this csdl dc service info + */ + public void setUuid(String uuid); + + /** + * Returns the id dc service of this csdl dc service info. + * + * @return the id dc service of this csdl dc service info + */ + public long getIdDcService(); + + /** + * Sets the id dc service of this csdl dc service info. + * + * @param idDcService the id dc service of this csdl dc service info + */ + public void setIdDcService(long idDcService); + + /** + * Returns the group ID of this csdl dc service info. + * + * @return the group ID of this csdl dc service info + */ + public long getGroupId(); + + /** + * Sets the group ID of this csdl dc service info. + * + * @param groupId the group ID of this csdl dc service info + */ + public void setGroupId(long groupId); + + /** + * Returns the company ID of this csdl dc service info. + * + * @return the company ID of this csdl dc service info + */ + @Override + public long getCompanyId(); + + /** + * Sets the company ID of this csdl dc service info. + * + * @param companyId the company ID of this csdl dc service info + */ + @Override + public void setCompanyId(long companyId); + + /** + * Returns the user ID of this csdl dc service info. + * + * @return the user ID of this csdl dc service info + */ + public long getUserId(); + + /** + * Sets the user ID of this csdl dc service info. + * + * @param userId the user ID of this csdl dc service info + */ + public void setUserId(long userId); + + /** + * Returns the user uuid of this csdl dc service info. + * + * @return the user uuid of this csdl dc service info + */ + public String getUserUuid(); + + /** + * Sets the user uuid of this csdl dc service info. + * + * @param userUuid the user uuid of this csdl dc service info + */ + public void setUserUuid(String userUuid); + + /** + * Returns the service code of this csdl dc service info. + * + * @return the service code of this csdl dc service info + */ + @AutoEscape + public String getServiceCode(); + + /** + * Sets the service code of this csdl dc service info. + * + * @param serviceCode the service code of this csdl dc service info + */ + public void setServiceCode(String serviceCode); + + /** + * Returns the service code dvcqg of this csdl dc service info. + * + * @return the service code dvcqg of this csdl dc service info + */ + @AutoEscape + public String getServiceCodeDvcqg(); + + /** + * Sets the service code dvcqg of this csdl dc service info. + * + * @param serviceCodeDvcqg the service code dvcqg of this csdl dc service info + */ + public void setServiceCodeDvcqg(String serviceCodeDvcqg); + + /** + * Returns the status of this csdl dc service info. + * + * @return the status of this csdl dc service info + */ + public int getStatus(); + + /** + * Sets the status of this csdl dc service info. + * + * @param status the status of this csdl dc service info + */ + public void setStatus(int status); + + @Override + public boolean isNew(); + + @Override + public void setNew(boolean n); + + @Override + public boolean isCachedModel(); + + @Override + public void setCachedModel(boolean cachedModel); + + @Override + public boolean isEscapedModel(); + + @Override + public Serializable getPrimaryKeyObj(); + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj); + + @Override + public ExpandoBridge getExpandoBridge(); + + @Override + public void setExpandoBridgeAttributes(BaseModel baseModel); + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge); + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext); + + @Override + public Object clone(); + + @Override + public int compareTo(CsdlDcServiceInfo csdlDcServiceInfo); + + @Override + public int hashCode(); + + @Override + public CacheModel toCacheModel(); + + @Override + public CsdlDcServiceInfo toEscapedModel(); + + @Override + public CsdlDcServiceInfo toUnescapedModel(); + + @Override + public String toString(); + + @Override + public String toXmlString(); +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcServiceInfoSoap.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcServiceInfoSoap.java new file mode 100644 index 0000000000..93f93ea543 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcServiceInfoSoap.java @@ -0,0 +1,170 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model; + +import aQute.bnd.annotation.ProviderType; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.List; + +/** + * This class is used by SOAP remote services. + * + * @author huymq + * @generated + */ +@ProviderType +public class CsdlDcServiceInfoSoap implements Serializable { + public static CsdlDcServiceInfoSoap toSoapModel(CsdlDcServiceInfo model) { + CsdlDcServiceInfoSoap soapModel = new CsdlDcServiceInfoSoap(); + + soapModel.setUuid(model.getUuid()); + soapModel.setIdDcService(model.getIdDcService()); + soapModel.setGroupId(model.getGroupId()); + soapModel.setCompanyId(model.getCompanyId()); + soapModel.setUserId(model.getUserId()); + soapModel.setServiceCode(model.getServiceCode()); + soapModel.setServiceCodeDvcqg(model.getServiceCodeDvcqg()); + soapModel.setStatus(model.getStatus()); + + return soapModel; + } + + public static CsdlDcServiceInfoSoap[] toSoapModels( + CsdlDcServiceInfo[] models) { + CsdlDcServiceInfoSoap[] soapModels = new CsdlDcServiceInfoSoap[models.length]; + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModel(models[i]); + } + + return soapModels; + } + + public static CsdlDcServiceInfoSoap[][] toSoapModels( + CsdlDcServiceInfo[][] models) { + CsdlDcServiceInfoSoap[][] soapModels = null; + + if (models.length > 0) { + soapModels = new CsdlDcServiceInfoSoap[models.length][models[0].length]; + } + else { + soapModels = new CsdlDcServiceInfoSoap[0][0]; + } + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModels(models[i]); + } + + return soapModels; + } + + public static CsdlDcServiceInfoSoap[] toSoapModels( + List models) { + List soapModels = new ArrayList(models.size()); + + for (CsdlDcServiceInfo model : models) { + soapModels.add(toSoapModel(model)); + } + + return soapModels.toArray(new CsdlDcServiceInfoSoap[soapModels.size()]); + } + + public CsdlDcServiceInfoSoap() { + } + + public long getPrimaryKey() { + return _idDcService; + } + + public void setPrimaryKey(long pk) { + setIdDcService(pk); + } + + public String getUuid() { + return _uuid; + } + + public void setUuid(String uuid) { + _uuid = uuid; + } + + public long getIdDcService() { + return _idDcService; + } + + public void setIdDcService(long idDcService) { + _idDcService = idDcService; + } + + public long getGroupId() { + return _groupId; + } + + public void setGroupId(long groupId) { + _groupId = groupId; + } + + public long getCompanyId() { + return _companyId; + } + + public void setCompanyId(long companyId) { + _companyId = companyId; + } + + public long getUserId() { + return _userId; + } + + public void setUserId(long userId) { + _userId = userId; + } + + public String getServiceCode() { + return _serviceCode; + } + + public void setServiceCode(String serviceCode) { + _serviceCode = serviceCode; + } + + public String getServiceCodeDvcqg() { + return _serviceCodeDvcqg; + } + + public void setServiceCodeDvcqg(String serviceCodeDvcqg) { + _serviceCodeDvcqg = serviceCodeDvcqg; + } + + public int getStatus() { + return _status; + } + + public void setStatus(int status) { + _status = status; + } + + private String _uuid; + private long _idDcService; + private long _groupId; + private long _companyId; + private long _userId; + private String _serviceCode; + private String _serviceCodeDvcqg; + private int _status; +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcServiceInfoWrapper.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcServiceInfoWrapper.java new file mode 100644 index 0000000000..ad3e9641c3 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcServiceInfoWrapper.java @@ -0,0 +1,465 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; + +import com.liferay.portal.kernel.model.ModelWrapper; +import com.liferay.portal.kernel.service.ServiceContext; + +import java.io.Serializable; + +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + *

+ * This class is a wrapper for {@link CsdlDcServiceInfo}. + *

+ * + * @author huymq + * @see CsdlDcServiceInfo + * @generated + */ +@ProviderType +public class CsdlDcServiceInfoWrapper implements CsdlDcServiceInfo, + ModelWrapper { + public CsdlDcServiceInfoWrapper(CsdlDcServiceInfo csdlDcServiceInfo) { + _csdlDcServiceInfo = csdlDcServiceInfo; + } + + @Override + public Class getModelClass() { + return CsdlDcServiceInfo.class; + } + + @Override + public String getModelClassName() { + return CsdlDcServiceInfo.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("uuid", getUuid()); + attributes.put("idDcService", getIdDcService()); + attributes.put("groupId", getGroupId()); + attributes.put("companyId", getCompanyId()); + attributes.put("userId", getUserId()); + attributes.put("serviceCode", getServiceCode()); + attributes.put("serviceCodeDvcqg", getServiceCodeDvcqg()); + attributes.put("status", getStatus()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + String uuid = (String)attributes.get("uuid"); + + if (uuid != null) { + setUuid(uuid); + } + + Long idDcService = (Long)attributes.get("idDcService"); + + if (idDcService != null) { + setIdDcService(idDcService); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String serviceCode = (String)attributes.get("serviceCode"); + + if (serviceCode != null) { + setServiceCode(serviceCode); + } + + String serviceCodeDvcqg = (String)attributes.get("serviceCodeDvcqg"); + + if (serviceCodeDvcqg != null) { + setServiceCodeDvcqg(serviceCodeDvcqg); + } + + Integer status = (Integer)attributes.get("status"); + + if (status != null) { + setStatus(status); + } + } + + @Override + public Object clone() { + return new CsdlDcServiceInfoWrapper((CsdlDcServiceInfo)_csdlDcServiceInfo.clone()); + } + + @Override + public int compareTo(CsdlDcServiceInfo csdlDcServiceInfo) { + return _csdlDcServiceInfo.compareTo(csdlDcServiceInfo); + } + + /** + * Returns the company ID of this csdl dc service info. + * + * @return the company ID of this csdl dc service info + */ + @Override + public long getCompanyId() { + return _csdlDcServiceInfo.getCompanyId(); + } + + @Override + public ExpandoBridge getExpandoBridge() { + return _csdlDcServiceInfo.getExpandoBridge(); + } + + /** + * Returns the group ID of this csdl dc service info. + * + * @return the group ID of this csdl dc service info + */ + @Override + public long getGroupId() { + return _csdlDcServiceInfo.getGroupId(); + } + + /** + * Returns the id dc service of this csdl dc service info. + * + * @return the id dc service of this csdl dc service info + */ + @Override + public long getIdDcService() { + return _csdlDcServiceInfo.getIdDcService(); + } + + /** + * Returns the primary key of this csdl dc service info. + * + * @return the primary key of this csdl dc service info + */ + @Override + public long getPrimaryKey() { + return _csdlDcServiceInfo.getPrimaryKey(); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _csdlDcServiceInfo.getPrimaryKeyObj(); + } + + /** + * Returns the service code of this csdl dc service info. + * + * @return the service code of this csdl dc service info + */ + @Override + public String getServiceCode() { + return _csdlDcServiceInfo.getServiceCode(); + } + + /** + * Returns the service code dvcqg of this csdl dc service info. + * + * @return the service code dvcqg of this csdl dc service info + */ + @Override + public String getServiceCodeDvcqg() { + return _csdlDcServiceInfo.getServiceCodeDvcqg(); + } + + /** + * Returns the status of this csdl dc service info. + * + * @return the status of this csdl dc service info + */ + @Override + public int getStatus() { + return _csdlDcServiceInfo.getStatus(); + } + + /** + * Returns the user ID of this csdl dc service info. + * + * @return the user ID of this csdl dc service info + */ + @Override + public long getUserId() { + return _csdlDcServiceInfo.getUserId(); + } + + /** + * Returns the user uuid of this csdl dc service info. + * + * @return the user uuid of this csdl dc service info + */ + @Override + public String getUserUuid() { + return _csdlDcServiceInfo.getUserUuid(); + } + + /** + * Returns the uuid of this csdl dc service info. + * + * @return the uuid of this csdl dc service info + */ + @Override + public String getUuid() { + return _csdlDcServiceInfo.getUuid(); + } + + @Override + public int hashCode() { + return _csdlDcServiceInfo.hashCode(); + } + + @Override + public boolean isCachedModel() { + return _csdlDcServiceInfo.isCachedModel(); + } + + @Override + public boolean isEscapedModel() { + return _csdlDcServiceInfo.isEscapedModel(); + } + + @Override + public boolean isNew() { + return _csdlDcServiceInfo.isNew(); + } + + @Override + public void persist() { + _csdlDcServiceInfo.persist(); + } + + @Override + public void setCachedModel(boolean cachedModel) { + _csdlDcServiceInfo.setCachedModel(cachedModel); + } + + /** + * Sets the company ID of this csdl dc service info. + * + * @param companyId the company ID of this csdl dc service info + */ + @Override + public void setCompanyId(long companyId) { + _csdlDcServiceInfo.setCompanyId(companyId); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.kernel.model.BaseModel baseModel) { + _csdlDcServiceInfo.setExpandoBridgeAttributes(baseModel); + } + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) { + _csdlDcServiceInfo.setExpandoBridgeAttributes(expandoBridge); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + _csdlDcServiceInfo.setExpandoBridgeAttributes(serviceContext); + } + + /** + * Sets the group ID of this csdl dc service info. + * + * @param groupId the group ID of this csdl dc service info + */ + @Override + public void setGroupId(long groupId) { + _csdlDcServiceInfo.setGroupId(groupId); + } + + /** + * Sets the id dc service of this csdl dc service info. + * + * @param idDcService the id dc service of this csdl dc service info + */ + @Override + public void setIdDcService(long idDcService) { + _csdlDcServiceInfo.setIdDcService(idDcService); + } + + @Override + public void setNew(boolean n) { + _csdlDcServiceInfo.setNew(n); + } + + /** + * Sets the primary key of this csdl dc service info. + * + * @param primaryKey the primary key of this csdl dc service info + */ + @Override + public void setPrimaryKey(long primaryKey) { + _csdlDcServiceInfo.setPrimaryKey(primaryKey); + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + _csdlDcServiceInfo.setPrimaryKeyObj(primaryKeyObj); + } + + /** + * Sets the service code of this csdl dc service info. + * + * @param serviceCode the service code of this csdl dc service info + */ + @Override + public void setServiceCode(String serviceCode) { + _csdlDcServiceInfo.setServiceCode(serviceCode); + } + + /** + * Sets the service code dvcqg of this csdl dc service info. + * + * @param serviceCodeDvcqg the service code dvcqg of this csdl dc service info + */ + @Override + public void setServiceCodeDvcqg(String serviceCodeDvcqg) { + _csdlDcServiceInfo.setServiceCodeDvcqg(serviceCodeDvcqg); + } + + /** + * Sets the status of this csdl dc service info. + * + * @param status the status of this csdl dc service info + */ + @Override + public void setStatus(int status) { + _csdlDcServiceInfo.setStatus(status); + } + + /** + * Sets the user ID of this csdl dc service info. + * + * @param userId the user ID of this csdl dc service info + */ + @Override + public void setUserId(long userId) { + _csdlDcServiceInfo.setUserId(userId); + } + + /** + * Sets the user uuid of this csdl dc service info. + * + * @param userUuid the user uuid of this csdl dc service info + */ + @Override + public void setUserUuid(String userUuid) { + _csdlDcServiceInfo.setUserUuid(userUuid); + } + + /** + * Sets the uuid of this csdl dc service info. + * + * @param uuid the uuid of this csdl dc service info + */ + @Override + public void setUuid(String uuid) { + _csdlDcServiceInfo.setUuid(uuid); + } + + @Override + public com.liferay.portal.kernel.model.CacheModel toCacheModel() { + return _csdlDcServiceInfo.toCacheModel(); + } + + @Override + public CsdlDcServiceInfo toEscapedModel() { + return new CsdlDcServiceInfoWrapper(_csdlDcServiceInfo.toEscapedModel()); + } + + @Override + public String toString() { + return _csdlDcServiceInfo.toString(); + } + + @Override + public CsdlDcServiceInfo toUnescapedModel() { + return new CsdlDcServiceInfoWrapper(_csdlDcServiceInfo.toUnescapedModel()); + } + + @Override + public String toXmlString() { + return _csdlDcServiceInfo.toXmlString(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof CsdlDcServiceInfoWrapper)) { + return false; + } + + CsdlDcServiceInfoWrapper csdlDcServiceInfoWrapper = (CsdlDcServiceInfoWrapper)obj; + + if (Objects.equals(_csdlDcServiceInfo, + csdlDcServiceInfoWrapper._csdlDcServiceInfo)) { + return true; + } + + return false; + } + + @Override + public CsdlDcServiceInfo getWrappedModel() { + return _csdlDcServiceInfo; + } + + @Override + public boolean isEntityCacheEnabled() { + return _csdlDcServiceInfo.isEntityCacheEnabled(); + } + + @Override + public boolean isFinderCacheEnabled() { + return _csdlDcServiceInfo.isFinderCacheEnabled(); + } + + @Override + public void resetOriginalValues() { + _csdlDcServiceInfo.resetOriginalValues(); + } + + private final CsdlDcServiceInfo _csdlDcServiceInfo; +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcUser.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcUser.java new file mode 100644 index 0000000000..557d394a71 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcUser.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.annotation.ImplementationClassName; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.util.Accessor; + +/** + * The extended model interface for the CsdlDcUser service. Represents a row in the "opencps_csdldc_user" database table, with each column mapped to a property of this class. + * + * @author huymq + * @see CsdlDcUserModel + * @see org.opencps.dossiermgt.model.impl.CsdlDcUserImpl + * @see org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl + * @generated + */ +@ImplementationClassName("org.opencps.dossiermgt.model.impl.CsdlDcUserImpl") +@ProviderType +public interface CsdlDcUser extends CsdlDcUserModel, PersistedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this interface directly. Add methods to {@link org.opencps.dossiermgt.model.impl.CsdlDcUserImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + public static final Accessor ID_DC_USER_ACCESSOR = new Accessor() { + @Override + public Long get(CsdlDcUser csdlDcUser) { + return csdlDcUser.getIdDcUser(); + } + + @Override + public Class getAttributeClass() { + return Long.class; + } + + @Override + public Class getTypeClass() { + return CsdlDcUser.class; + } + }; +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcUserModel.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcUserModel.java new file mode 100644 index 0000000000..aff9242841 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcUserModel.java @@ -0,0 +1,311 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; + +import com.liferay.portal.kernel.bean.AutoEscape; +import com.liferay.portal.kernel.model.BaseModel; +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.model.ShardedModel; +import com.liferay.portal.kernel.service.ServiceContext; + +import java.io.Serializable; + +/** + * The base model interface for the CsdlDcUser service. Represents a row in the "opencps_csdldc_user" database table, with each column mapped to a property of this class. + * + *

+ * This interface and its corresponding implementation {@link org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link org.opencps.dossiermgt.model.impl.CsdlDcUserImpl}. + *

+ * + * @author huymq + * @see CsdlDcUser + * @see org.opencps.dossiermgt.model.impl.CsdlDcUserImpl + * @see org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl + * @generated + */ +@ProviderType +public interface CsdlDcUserModel extends BaseModel, ShardedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. All methods that expect a csdl dc user model instance should use the {@link CsdlDcUser} interface instead. + */ + + /** + * Returns the primary key of this csdl dc user. + * + * @return the primary key of this csdl dc user + */ + public long getPrimaryKey(); + + /** + * Sets the primary key of this csdl dc user. + * + * @param primaryKey the primary key of this csdl dc user + */ + public void setPrimaryKey(long primaryKey); + + /** + * Returns the uuid of this csdl dc user. + * + * @return the uuid of this csdl dc user + */ + @AutoEscape + public String getUuid(); + + /** + * Sets the uuid of this csdl dc user. + * + * @param uuid the uuid of this csdl dc user + */ + public void setUuid(String uuid); + + /** + * Returns the id dc user of this csdl dc user. + * + * @return the id dc user of this csdl dc user + */ + public long getIdDcUser(); + + /** + * Sets the id dc user of this csdl dc user. + * + * @param idDcUser the id dc user of this csdl dc user + */ + public void setIdDcUser(long idDcUser); + + /** + * Returns the group ID of this csdl dc user. + * + * @return the group ID of this csdl dc user + */ + public long getGroupId(); + + /** + * Sets the group ID of this csdl dc user. + * + * @param groupId the group ID of this csdl dc user + */ + public void setGroupId(long groupId); + + /** + * Returns the company ID of this csdl dc user. + * + * @return the company ID of this csdl dc user + */ + @Override + public long getCompanyId(); + + /** + * Sets the company ID of this csdl dc user. + * + * @param companyId the company ID of this csdl dc user + */ + @Override + public void setCompanyId(long companyId); + + /** + * Returns the user ID of this csdl dc user. + * + * @return the user ID of this csdl dc user + */ + public long getUserId(); + + /** + * Sets the user ID of this csdl dc user. + * + * @param userId the user ID of this csdl dc user + */ + public void setUserId(long userId); + + /** + * Returns the user uuid of this csdl dc user. + * + * @return the user uuid of this csdl dc user + */ + public String getUserUuid(); + + /** + * Sets the user uuid of this csdl dc user. + * + * @param userUuid the user uuid of this csdl dc user + */ + public void setUserUuid(String userUuid); + + /** + * Returns the gov agency code of this csdl dc user. + * + * @return the gov agency code of this csdl dc user + */ + @AutoEscape + public String getGovAgencyCode(); + + /** + * Sets the gov agency code of this csdl dc user. + * + * @param govAgencyCode the gov agency code of this csdl dc user + */ + public void setGovAgencyCode(String govAgencyCode); + + /** + * Returns the gov agency code dvcqg of this csdl dc user. + * + * @return the gov agency code dvcqg of this csdl dc user + */ + @AutoEscape + public String getGovAgencyCodeDvcqg(); + + /** + * Sets the gov agency code dvcqg of this csdl dc user. + * + * @param govAgencyCodeDvcqg the gov agency code dvcqg of this csdl dc user + */ + public void setGovAgencyCodeDvcqg(String govAgencyCodeDvcqg); + + /** + * Returns the key name of this csdl dc user. + * + * @return the key name of this csdl dc user + */ + @AutoEscape + public String getKeyName(); + + /** + * Sets the key name of this csdl dc user. + * + * @param keyName the key name of this csdl dc user + */ + public void setKeyName(String keyName); + + /** + * Returns the key pass of this csdl dc user. + * + * @return the key pass of this csdl dc user + */ + @AutoEscape + public String getKeyPass(); + + /** + * Sets the key pass of this csdl dc user. + * + * @param keyPass the key pass of this csdl dc user + */ + public void setKeyPass(String keyPass); + + /** + * Returns the user name of this csdl dc user. + * + * @return the user name of this csdl dc user + */ + @AutoEscape + public String getUserName(); + + /** + * Sets the user name of this csdl dc user. + * + * @param userName the user name of this csdl dc user + */ + public void setUserName(String userName); + + /** + * Returns the employee email of this csdl dc user. + * + * @return the employee email of this csdl dc user + */ + @AutoEscape + public String getEmployeeEmail(); + + /** + * Sets the employee email of this csdl dc user. + * + * @param employeeEmail the employee email of this csdl dc user + */ + public void setEmployeeEmail(String employeeEmail); + + /** + * Returns the status of this csdl dc user. + * + * @return the status of this csdl dc user + */ + public int getStatus(); + + /** + * Sets the status of this csdl dc user. + * + * @param status the status of this csdl dc user + */ + public void setStatus(int status); + + @Override + public boolean isNew(); + + @Override + public void setNew(boolean n); + + @Override + public boolean isCachedModel(); + + @Override + public void setCachedModel(boolean cachedModel); + + @Override + public boolean isEscapedModel(); + + @Override + public Serializable getPrimaryKeyObj(); + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj); + + @Override + public ExpandoBridge getExpandoBridge(); + + @Override + public void setExpandoBridgeAttributes(BaseModel baseModel); + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge); + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext); + + @Override + public Object clone(); + + @Override + public int compareTo(CsdlDcUser csdlDcUser); + + @Override + public int hashCode(); + + @Override + public CacheModel toCacheModel(); + + @Override + public CsdlDcUser toEscapedModel(); + + @Override + public CsdlDcUser toUnescapedModel(); + + @Override + public String toString(); + + @Override + public String toXmlString(); +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcUserSoap.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcUserSoap.java new file mode 100644 index 0000000000..ff117fa8a9 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcUserSoap.java @@ -0,0 +1,207 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model; + +import aQute.bnd.annotation.ProviderType; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.List; + +/** + * This class is used by SOAP remote services. + * + * @author huymq + * @generated + */ +@ProviderType +public class CsdlDcUserSoap implements Serializable { + public static CsdlDcUserSoap toSoapModel(CsdlDcUser model) { + CsdlDcUserSoap soapModel = new CsdlDcUserSoap(); + + soapModel.setUuid(model.getUuid()); + soapModel.setIdDcUser(model.getIdDcUser()); + soapModel.setGroupId(model.getGroupId()); + soapModel.setCompanyId(model.getCompanyId()); + soapModel.setUserId(model.getUserId()); + soapModel.setGovAgencyCode(model.getGovAgencyCode()); + soapModel.setGovAgencyCodeDvcqg(model.getGovAgencyCodeDvcqg()); + soapModel.setKeyName(model.getKeyName()); + soapModel.setKeyPass(model.getKeyPass()); + soapModel.setUserName(model.getUserName()); + soapModel.setEmployeeEmail(model.getEmployeeEmail()); + soapModel.setStatus(model.getStatus()); + + return soapModel; + } + + public static CsdlDcUserSoap[] toSoapModels(CsdlDcUser[] models) { + CsdlDcUserSoap[] soapModels = new CsdlDcUserSoap[models.length]; + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModel(models[i]); + } + + return soapModels; + } + + public static CsdlDcUserSoap[][] toSoapModels(CsdlDcUser[][] models) { + CsdlDcUserSoap[][] soapModels = null; + + if (models.length > 0) { + soapModels = new CsdlDcUserSoap[models.length][models[0].length]; + } + else { + soapModels = new CsdlDcUserSoap[0][0]; + } + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModels(models[i]); + } + + return soapModels; + } + + public static CsdlDcUserSoap[] toSoapModels(List models) { + List soapModels = new ArrayList(models.size()); + + for (CsdlDcUser model : models) { + soapModels.add(toSoapModel(model)); + } + + return soapModels.toArray(new CsdlDcUserSoap[soapModels.size()]); + } + + public CsdlDcUserSoap() { + } + + public long getPrimaryKey() { + return _idDcUser; + } + + public void setPrimaryKey(long pk) { + setIdDcUser(pk); + } + + public String getUuid() { + return _uuid; + } + + public void setUuid(String uuid) { + _uuid = uuid; + } + + public long getIdDcUser() { + return _idDcUser; + } + + public void setIdDcUser(long idDcUser) { + _idDcUser = idDcUser; + } + + public long getGroupId() { + return _groupId; + } + + public void setGroupId(long groupId) { + _groupId = groupId; + } + + public long getCompanyId() { + return _companyId; + } + + public void setCompanyId(long companyId) { + _companyId = companyId; + } + + public long getUserId() { + return _userId; + } + + public void setUserId(long userId) { + _userId = userId; + } + + public String getGovAgencyCode() { + return _govAgencyCode; + } + + public void setGovAgencyCode(String govAgencyCode) { + _govAgencyCode = govAgencyCode; + } + + public String getGovAgencyCodeDvcqg() { + return _govAgencyCodeDvcqg; + } + + public void setGovAgencyCodeDvcqg(String govAgencyCodeDvcqg) { + _govAgencyCodeDvcqg = govAgencyCodeDvcqg; + } + + public String getKeyName() { + return _keyName; + } + + public void setKeyName(String keyName) { + _keyName = keyName; + } + + public String getKeyPass() { + return _keyPass; + } + + public void setKeyPass(String keyPass) { + _keyPass = keyPass; + } + + public String getUserName() { + return _userName; + } + + public void setUserName(String userName) { + _userName = userName; + } + + public String getEmployeeEmail() { + return _employeeEmail; + } + + public void setEmployeeEmail(String employeeEmail) { + _employeeEmail = employeeEmail; + } + + public int getStatus() { + return _status; + } + + public void setStatus(int status) { + _status = status; + } + + private String _uuid; + private long _idDcUser; + private long _groupId; + private long _companyId; + private long _userId; + private String _govAgencyCode; + private String _govAgencyCodeDvcqg; + private String _keyName; + private String _keyPass; + private String _userName; + private String _employeeEmail; + private int _status; +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcUserWrapper.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcUserWrapper.java new file mode 100644 index 0000000000..f6224dc9f9 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/model/CsdlDcUserWrapper.java @@ -0,0 +1,571 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; + +import com.liferay.portal.kernel.model.ModelWrapper; +import com.liferay.portal.kernel.service.ServiceContext; + +import java.io.Serializable; + +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + *

+ * This class is a wrapper for {@link CsdlDcUser}. + *

+ * + * @author huymq + * @see CsdlDcUser + * @generated + */ +@ProviderType +public class CsdlDcUserWrapper implements CsdlDcUser, ModelWrapper { + public CsdlDcUserWrapper(CsdlDcUser csdlDcUser) { + _csdlDcUser = csdlDcUser; + } + + @Override + public Class getModelClass() { + return CsdlDcUser.class; + } + + @Override + public String getModelClassName() { + return CsdlDcUser.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("uuid", getUuid()); + attributes.put("idDcUser", getIdDcUser()); + attributes.put("groupId", getGroupId()); + attributes.put("companyId", getCompanyId()); + attributes.put("userId", getUserId()); + attributes.put("govAgencyCode", getGovAgencyCode()); + attributes.put("govAgencyCodeDvcqg", getGovAgencyCodeDvcqg()); + attributes.put("keyName", getKeyName()); + attributes.put("keyPass", getKeyPass()); + attributes.put("userName", getUserName()); + attributes.put("employeeEmail", getEmployeeEmail()); + attributes.put("status", getStatus()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + String uuid = (String)attributes.get("uuid"); + + if (uuid != null) { + setUuid(uuid); + } + + Long idDcUser = (Long)attributes.get("idDcUser"); + + if (idDcUser != null) { + setIdDcUser(idDcUser); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String govAgencyCode = (String)attributes.get("govAgencyCode"); + + if (govAgencyCode != null) { + setGovAgencyCode(govAgencyCode); + } + + String govAgencyCodeDvcqg = (String)attributes.get("govAgencyCodeDvcqg"); + + if (govAgencyCodeDvcqg != null) { + setGovAgencyCodeDvcqg(govAgencyCodeDvcqg); + } + + String keyName = (String)attributes.get("keyName"); + + if (keyName != null) { + setKeyName(keyName); + } + + String keyPass = (String)attributes.get("keyPass"); + + if (keyPass != null) { + setKeyPass(keyPass); + } + + String userName = (String)attributes.get("userName"); + + if (userName != null) { + setUserName(userName); + } + + String employeeEmail = (String)attributes.get("employeeEmail"); + + if (employeeEmail != null) { + setEmployeeEmail(employeeEmail); + } + + Integer status = (Integer)attributes.get("status"); + + if (status != null) { + setStatus(status); + } + } + + @Override + public Object clone() { + return new CsdlDcUserWrapper((CsdlDcUser)_csdlDcUser.clone()); + } + + @Override + public int compareTo(CsdlDcUser csdlDcUser) { + return _csdlDcUser.compareTo(csdlDcUser); + } + + /** + * Returns the company ID of this csdl dc user. + * + * @return the company ID of this csdl dc user + */ + @Override + public long getCompanyId() { + return _csdlDcUser.getCompanyId(); + } + + /** + * Returns the employee email of this csdl dc user. + * + * @return the employee email of this csdl dc user + */ + @Override + public String getEmployeeEmail() { + return _csdlDcUser.getEmployeeEmail(); + } + + @Override + public ExpandoBridge getExpandoBridge() { + return _csdlDcUser.getExpandoBridge(); + } + + /** + * Returns the gov agency code of this csdl dc user. + * + * @return the gov agency code of this csdl dc user + */ + @Override + public String getGovAgencyCode() { + return _csdlDcUser.getGovAgencyCode(); + } + + /** + * Returns the gov agency code dvcqg of this csdl dc user. + * + * @return the gov agency code dvcqg of this csdl dc user + */ + @Override + public String getGovAgencyCodeDvcqg() { + return _csdlDcUser.getGovAgencyCodeDvcqg(); + } + + /** + * Returns the group ID of this csdl dc user. + * + * @return the group ID of this csdl dc user + */ + @Override + public long getGroupId() { + return _csdlDcUser.getGroupId(); + } + + /** + * Returns the id dc user of this csdl dc user. + * + * @return the id dc user of this csdl dc user + */ + @Override + public long getIdDcUser() { + return _csdlDcUser.getIdDcUser(); + } + + /** + * Returns the key name of this csdl dc user. + * + * @return the key name of this csdl dc user + */ + @Override + public String getKeyName() { + return _csdlDcUser.getKeyName(); + } + + /** + * Returns the key pass of this csdl dc user. + * + * @return the key pass of this csdl dc user + */ + @Override + public String getKeyPass() { + return _csdlDcUser.getKeyPass(); + } + + /** + * Returns the primary key of this csdl dc user. + * + * @return the primary key of this csdl dc user + */ + @Override + public long getPrimaryKey() { + return _csdlDcUser.getPrimaryKey(); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _csdlDcUser.getPrimaryKeyObj(); + } + + /** + * Returns the status of this csdl dc user. + * + * @return the status of this csdl dc user + */ + @Override + public int getStatus() { + return _csdlDcUser.getStatus(); + } + + /** + * Returns the user ID of this csdl dc user. + * + * @return the user ID of this csdl dc user + */ + @Override + public long getUserId() { + return _csdlDcUser.getUserId(); + } + + /** + * Returns the user name of this csdl dc user. + * + * @return the user name of this csdl dc user + */ + @Override + public String getUserName() { + return _csdlDcUser.getUserName(); + } + + /** + * Returns the user uuid of this csdl dc user. + * + * @return the user uuid of this csdl dc user + */ + @Override + public String getUserUuid() { + return _csdlDcUser.getUserUuid(); + } + + /** + * Returns the uuid of this csdl dc user. + * + * @return the uuid of this csdl dc user + */ + @Override + public String getUuid() { + return _csdlDcUser.getUuid(); + } + + @Override + public int hashCode() { + return _csdlDcUser.hashCode(); + } + + @Override + public boolean isCachedModel() { + return _csdlDcUser.isCachedModel(); + } + + @Override + public boolean isEscapedModel() { + return _csdlDcUser.isEscapedModel(); + } + + @Override + public boolean isNew() { + return _csdlDcUser.isNew(); + } + + @Override + public void persist() { + _csdlDcUser.persist(); + } + + @Override + public void setCachedModel(boolean cachedModel) { + _csdlDcUser.setCachedModel(cachedModel); + } + + /** + * Sets the company ID of this csdl dc user. + * + * @param companyId the company ID of this csdl dc user + */ + @Override + public void setCompanyId(long companyId) { + _csdlDcUser.setCompanyId(companyId); + } + + /** + * Sets the employee email of this csdl dc user. + * + * @param employeeEmail the employee email of this csdl dc user + */ + @Override + public void setEmployeeEmail(String employeeEmail) { + _csdlDcUser.setEmployeeEmail(employeeEmail); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.kernel.model.BaseModel baseModel) { + _csdlDcUser.setExpandoBridgeAttributes(baseModel); + } + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) { + _csdlDcUser.setExpandoBridgeAttributes(expandoBridge); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + _csdlDcUser.setExpandoBridgeAttributes(serviceContext); + } + + /** + * Sets the gov agency code of this csdl dc user. + * + * @param govAgencyCode the gov agency code of this csdl dc user + */ + @Override + public void setGovAgencyCode(String govAgencyCode) { + _csdlDcUser.setGovAgencyCode(govAgencyCode); + } + + /** + * Sets the gov agency code dvcqg of this csdl dc user. + * + * @param govAgencyCodeDvcqg the gov agency code dvcqg of this csdl dc user + */ + @Override + public void setGovAgencyCodeDvcqg(String govAgencyCodeDvcqg) { + _csdlDcUser.setGovAgencyCodeDvcqg(govAgencyCodeDvcqg); + } + + /** + * Sets the group ID of this csdl dc user. + * + * @param groupId the group ID of this csdl dc user + */ + @Override + public void setGroupId(long groupId) { + _csdlDcUser.setGroupId(groupId); + } + + /** + * Sets the id dc user of this csdl dc user. + * + * @param idDcUser the id dc user of this csdl dc user + */ + @Override + public void setIdDcUser(long idDcUser) { + _csdlDcUser.setIdDcUser(idDcUser); + } + + /** + * Sets the key name of this csdl dc user. + * + * @param keyName the key name of this csdl dc user + */ + @Override + public void setKeyName(String keyName) { + _csdlDcUser.setKeyName(keyName); + } + + /** + * Sets the key pass of this csdl dc user. + * + * @param keyPass the key pass of this csdl dc user + */ + @Override + public void setKeyPass(String keyPass) { + _csdlDcUser.setKeyPass(keyPass); + } + + @Override + public void setNew(boolean n) { + _csdlDcUser.setNew(n); + } + + /** + * Sets the primary key of this csdl dc user. + * + * @param primaryKey the primary key of this csdl dc user + */ + @Override + public void setPrimaryKey(long primaryKey) { + _csdlDcUser.setPrimaryKey(primaryKey); + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + _csdlDcUser.setPrimaryKeyObj(primaryKeyObj); + } + + /** + * Sets the status of this csdl dc user. + * + * @param status the status of this csdl dc user + */ + @Override + public void setStatus(int status) { + _csdlDcUser.setStatus(status); + } + + /** + * Sets the user ID of this csdl dc user. + * + * @param userId the user ID of this csdl dc user + */ + @Override + public void setUserId(long userId) { + _csdlDcUser.setUserId(userId); + } + + /** + * Sets the user name of this csdl dc user. + * + * @param userName the user name of this csdl dc user + */ + @Override + public void setUserName(String userName) { + _csdlDcUser.setUserName(userName); + } + + /** + * Sets the user uuid of this csdl dc user. + * + * @param userUuid the user uuid of this csdl dc user + */ + @Override + public void setUserUuid(String userUuid) { + _csdlDcUser.setUserUuid(userUuid); + } + + /** + * Sets the uuid of this csdl dc user. + * + * @param uuid the uuid of this csdl dc user + */ + @Override + public void setUuid(String uuid) { + _csdlDcUser.setUuid(uuid); + } + + @Override + public com.liferay.portal.kernel.model.CacheModel toCacheModel() { + return _csdlDcUser.toCacheModel(); + } + + @Override + public CsdlDcUser toEscapedModel() { + return new CsdlDcUserWrapper(_csdlDcUser.toEscapedModel()); + } + + @Override + public String toString() { + return _csdlDcUser.toString(); + } + + @Override + public CsdlDcUser toUnescapedModel() { + return new CsdlDcUserWrapper(_csdlDcUser.toUnescapedModel()); + } + + @Override + public String toXmlString() { + return _csdlDcUser.toXmlString(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof CsdlDcUserWrapper)) { + return false; + } + + CsdlDcUserWrapper csdlDcUserWrapper = (CsdlDcUserWrapper)obj; + + if (Objects.equals(_csdlDcUser, csdlDcUserWrapper._csdlDcUser)) { + return true; + } + + return false; + } + + @Override + public CsdlDcUser getWrappedModel() { + return _csdlDcUser; + } + + @Override + public boolean isEntityCacheEnabled() { + return _csdlDcUser.isEntityCacheEnabled(); + } + + @Override + public boolean isFinderCacheEnabled() { + return _csdlDcUser.isFinderCacheEnabled(); + } + + @Override + public void resetOriginalValues() { + _csdlDcUser.resetOriginalValues(); + } + + private final CsdlDcUser _csdlDcUser; +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CPSDossierBusinessLocalService.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CPSDossierBusinessLocalService.java index d8056fe2cd..ba3b2a1276 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CPSDossierBusinessLocalService.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CPSDossierBusinessLocalService.java @@ -30,7 +30,6 @@ import org.opencps.auth.api.exception.UnauthenticationException; -import org.opencps.dossiermgt.constants.*; import org.opencps.dossiermgt.input.model.DossierInputModel; import org.opencps.dossiermgt.input.model.DossierMultipleInputModel; import org.opencps.dossiermgt.input.model.FrequencyDoAction; @@ -43,9 +42,7 @@ import org.opencps.dossiermgt.model.ProcessAction; import org.opencps.dossiermgt.model.ProcessOption; -import java.io.*; - -import java.text.*; +import java.io.InputStream; /** * Provides the local service interface for CPSDossierBusiness. Methods of this @@ -89,7 +86,7 @@ public DossierFile addDossierFileByDossierId(long groupId, Company company, SystemException.class, PortalException.class, Exception.class} ) public DossierFile addDossierFileFrequency(long groupId, - ServiceContext serviceContext, java.io.InputStream inputStream, + ServiceContext serviceContext, InputStream inputStream, String referenceUid, Dossier dossier, String displayName, String fileType, String isSync, String formData, String removed, String eForm) throws Exception; diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcServiceInfoLocalService.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcServiceInfoLocalService.java new file mode 100644 index 0000000000..98146e9083 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcServiceInfoLocalService.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.service.BaseLocalService; +import com.liferay.portal.kernel.service.PersistedModelLocalService; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Propagation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.kernel.util.OrderByComparator; + +import org.opencps.dossiermgt.model.CsdlDcServiceInfo; + +import java.io.Serializable; + +import java.util.List; + +/** + * Provides the local service interface for CsdlDcServiceInfo. Methods of this + * service will not have security checks based on the propagated JAAS + * credentials because this service can only be accessed from within the same + * VM. + * + * @author huymq + * @see CsdlDcServiceInfoLocalServiceUtil + * @see org.opencps.dossiermgt.service.base.CsdlDcServiceInfoLocalServiceBaseImpl + * @see org.opencps.dossiermgt.service.impl.CsdlDcServiceInfoLocalServiceImpl + * @generated + */ +@ProviderType +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface CsdlDcServiceInfoLocalService extends BaseLocalService, + PersistedModelLocalService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link CsdlDcServiceInfoLocalServiceUtil} to access the csdl dc service info local service. Add custom service methods to {@link org.opencps.dossiermgt.service.impl.CsdlDcServiceInfoLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Adds the csdl dc service info to the database. Also notifies the appropriate model listeners. + * + * @param csdlDcServiceInfo the csdl dc service info + * @return the csdl dc service info that was added + */ + @Indexable(type = IndexableType.REINDEX) + public CsdlDcServiceInfo addCsdlDcServiceInfo( + CsdlDcServiceInfo csdlDcServiceInfo); + + /** + * Creates a new csdl dc service info with the primary key. Does not add the csdl dc service info to the database. + * + * @param idDcService the primary key for the new csdl dc service info + * @return the new csdl dc service info + */ + @Transactional(enabled = false) + public CsdlDcServiceInfo createCsdlDcServiceInfo(long idDcService); + + /** + * Deletes the csdl dc service info from the database. Also notifies the appropriate model listeners. + * + * @param csdlDcServiceInfo the csdl dc service info + * @return the csdl dc service info that was removed + */ + @Indexable(type = IndexableType.DELETE) + public CsdlDcServiceInfo deleteCsdlDcServiceInfo( + CsdlDcServiceInfo csdlDcServiceInfo); + + /** + * Deletes the csdl dc service info with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info that was removed + * @throws PortalException if a csdl dc service info with the primary key could not be found + */ + @Indexable(type = IndexableType.DELETE) + public CsdlDcServiceInfo deleteCsdlDcServiceInfo(long idDcService) + throws PortalException; + + /** + * @throws PortalException + */ + @Override + public PersistedModel deletePersistedModel(PersistedModel persistedModel) + throws PortalException; + + public DynamicQuery dynamicQuery(); + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery); + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end); + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end, OrderByComparator orderByComparator); + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + public long dynamicQueryCount(DynamicQuery dynamicQuery); + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public CsdlDcServiceInfo fetchCsdlDcServiceInfo(long idDcService); + + /** + * Returns the csdl dc service info matching the UUID and group. + * + * @param uuid the csdl dc service info's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public CsdlDcServiceInfo fetchCsdlDcServiceInfoByUuidAndGroupId( + String uuid, long groupId); + + public CsdlDcServiceInfo findByServiceCodeAndStatus(String serviceCode, + int status); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ActionableDynamicQuery getActionableDynamicQuery(); + + /** + * Returns the csdl dc service info with the primary key. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info + * @throws PortalException if a csdl dc service info with the primary key could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public CsdlDcServiceInfo getCsdlDcServiceInfo(long idDcService) + throws PortalException; + + /** + * Returns the csdl dc service info matching the UUID and group. + * + * @param uuid the csdl dc service info's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc service info + * @throws PortalException if a matching csdl dc service info could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public CsdlDcServiceInfo getCsdlDcServiceInfoByUuidAndGroupId(String uuid, + long groupId) throws PortalException; + + /** + * Returns a range of all the csdl dc service infos. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @return the range of csdl dc service infos + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getCsdlDcServiceInfos(int start, int end); + + /** + * Returns all the csdl dc service infos matching the UUID and company. + * + * @param uuid the UUID of the csdl dc service infos + * @param companyId the primary key of the company + * @return the matching csdl dc service infos, or an empty list if no matches were found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getCsdlDcServiceInfosByUuidAndCompanyId( + String uuid, long companyId); + + /** + * Returns a range of csdl dc service infos matching the UUID and company. + * + * @param uuid the UUID of the csdl dc service infos + * @param companyId the primary key of the company + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching csdl dc service infos, or an empty list if no matches were found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getCsdlDcServiceInfosByUuidAndCompanyId( + String uuid, long companyId, int start, int end, + OrderByComparator orderByComparator); + + /** + * Returns the number of csdl dc service infos. + * + * @return the number of csdl dc service infos + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getCsdlDcServiceInfosCount(); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + public String getOSGiServiceIdentifier(); + + @Override + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException; + + /** + * Updates the csdl dc service info in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param csdlDcServiceInfo the csdl dc service info + * @return the csdl dc service info that was updated + */ + @Indexable(type = IndexableType.REINDEX) + public CsdlDcServiceInfo updateCsdlDcServiceInfo( + CsdlDcServiceInfo csdlDcServiceInfo); +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcServiceInfoLocalServiceUtil.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcServiceInfoLocalServiceUtil.java new file mode 100644 index 0000000000..adeb24a5eb --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcServiceInfoLocalServiceUtil.java @@ -0,0 +1,335 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service; + +import aQute.bnd.annotation.ProviderType; + +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; + +import org.osgi.util.tracker.ServiceTracker; + +/** + * Provides the local service utility for CsdlDcServiceInfo. This utility wraps + * {@link org.opencps.dossiermgt.service.impl.CsdlDcServiceInfoLocalServiceImpl} and is the + * primary access point for service operations in application layer code running + * on the local server. Methods of this service will not have security checks + * based on the propagated JAAS credentials because this service can only be + * accessed from within the same VM. + * + * @author huymq + * @see CsdlDcServiceInfoLocalService + * @see org.opencps.dossiermgt.service.base.CsdlDcServiceInfoLocalServiceBaseImpl + * @see org.opencps.dossiermgt.service.impl.CsdlDcServiceInfoLocalServiceImpl + * @generated + */ +@ProviderType +public class CsdlDcServiceInfoLocalServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link org.opencps.dossiermgt.service.impl.CsdlDcServiceInfoLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Adds the csdl dc service info to the database. Also notifies the appropriate model listeners. + * + * @param csdlDcServiceInfo the csdl dc service info + * @return the csdl dc service info that was added + */ + public static org.opencps.dossiermgt.model.CsdlDcServiceInfo addCsdlDcServiceInfo( + org.opencps.dossiermgt.model.CsdlDcServiceInfo csdlDcServiceInfo) { + return getService().addCsdlDcServiceInfo(csdlDcServiceInfo); + } + + /** + * Creates a new csdl dc service info with the primary key. Does not add the csdl dc service info to the database. + * + * @param idDcService the primary key for the new csdl dc service info + * @return the new csdl dc service info + */ + public static org.opencps.dossiermgt.model.CsdlDcServiceInfo createCsdlDcServiceInfo( + long idDcService) { + return getService().createCsdlDcServiceInfo(idDcService); + } + + /** + * Deletes the csdl dc service info from the database. Also notifies the appropriate model listeners. + * + * @param csdlDcServiceInfo the csdl dc service info + * @return the csdl dc service info that was removed + */ + public static org.opencps.dossiermgt.model.CsdlDcServiceInfo deleteCsdlDcServiceInfo( + org.opencps.dossiermgt.model.CsdlDcServiceInfo csdlDcServiceInfo) { + return getService().deleteCsdlDcServiceInfo(csdlDcServiceInfo); + } + + /** + * Deletes the csdl dc service info with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info that was removed + * @throws PortalException if a csdl dc service info with the primary key could not be found + */ + public static org.opencps.dossiermgt.model.CsdlDcServiceInfo deleteCsdlDcServiceInfo( + long idDcService) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().deleteCsdlDcServiceInfo(idDcService); + } + + /** + * @throws PortalException + */ + public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( + com.liferay.portal.kernel.model.PersistedModel persistedModel) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().deletePersistedModel(persistedModel); + } + + public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return getService().dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return getService().dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) { + return getService().dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return getService() + .dynamicQuery(dynamicQuery, start, end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return getService().dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) { + return getService().dynamicQueryCount(dynamicQuery, projection); + } + + public static org.opencps.dossiermgt.model.CsdlDcServiceInfo fetchCsdlDcServiceInfo( + long idDcService) { + return getService().fetchCsdlDcServiceInfo(idDcService); + } + + /** + * Returns the csdl dc service info matching the UUID and group. + * + * @param uuid the csdl dc service info's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public static org.opencps.dossiermgt.model.CsdlDcServiceInfo fetchCsdlDcServiceInfoByUuidAndGroupId( + String uuid, long groupId) { + return getService().fetchCsdlDcServiceInfoByUuidAndGroupId(uuid, groupId); + } + + public static org.opencps.dossiermgt.model.CsdlDcServiceInfo findByServiceCodeAndStatus( + String serviceCode, int status) { + return getService().findByServiceCodeAndStatus(serviceCode, status); + } + + public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { + return getService().getActionableDynamicQuery(); + } + + /** + * Returns the csdl dc service info with the primary key. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info + * @throws PortalException if a csdl dc service info with the primary key could not be found + */ + public static org.opencps.dossiermgt.model.CsdlDcServiceInfo getCsdlDcServiceInfo( + long idDcService) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getCsdlDcServiceInfo(idDcService); + } + + /** + * Returns the csdl dc service info matching the UUID and group. + * + * @param uuid the csdl dc service info's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc service info + * @throws PortalException if a matching csdl dc service info could not be found + */ + public static org.opencps.dossiermgt.model.CsdlDcServiceInfo getCsdlDcServiceInfoByUuidAndGroupId( + String uuid, long groupId) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getCsdlDcServiceInfoByUuidAndGroupId(uuid, groupId); + } + + /** + * Returns a range of all the csdl dc service infos. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @return the range of csdl dc service infos + */ + public static java.util.List getCsdlDcServiceInfos( + int start, int end) { + return getService().getCsdlDcServiceInfos(start, end); + } + + /** + * Returns all the csdl dc service infos matching the UUID and company. + * + * @param uuid the UUID of the csdl dc service infos + * @param companyId the primary key of the company + * @return the matching csdl dc service infos, or an empty list if no matches were found + */ + public static java.util.List getCsdlDcServiceInfosByUuidAndCompanyId( + String uuid, long companyId) { + return getService() + .getCsdlDcServiceInfosByUuidAndCompanyId(uuid, companyId); + } + + /** + * Returns a range of csdl dc service infos matching the UUID and company. + * + * @param uuid the UUID of the csdl dc service infos + * @param companyId the primary key of the company + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching csdl dc service infos, or an empty list if no matches were found + */ + public static java.util.List getCsdlDcServiceInfosByUuidAndCompanyId( + String uuid, long companyId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return getService() + .getCsdlDcServiceInfosByUuidAndCompanyId(uuid, companyId, + start, end, orderByComparator); + } + + /** + * Returns the number of csdl dc service infos. + * + * @return the number of csdl dc service infos + */ + public static int getCsdlDcServiceInfosCount() { + return getService().getCsdlDcServiceInfosCount(); + } + + public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + return getService().getIndexableActionableDynamicQuery(); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + public static String getOSGiServiceIdentifier() { + return getService().getOSGiServiceIdentifier(); + } + + public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getPersistedModel(primaryKeyObj); + } + + /** + * Updates the csdl dc service info in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param csdlDcServiceInfo the csdl dc service info + * @return the csdl dc service info that was updated + */ + public static org.opencps.dossiermgt.model.CsdlDcServiceInfo updateCsdlDcServiceInfo( + org.opencps.dossiermgt.model.CsdlDcServiceInfo csdlDcServiceInfo) { + return getService().updateCsdlDcServiceInfo(csdlDcServiceInfo); + } + + public static CsdlDcServiceInfoLocalService getService() { + return _serviceTracker.getService(); + } + + private static ServiceTracker _serviceTracker; + + static { + Bundle bundle = FrameworkUtil.getBundle(CsdlDcServiceInfoLocalService.class); + + ServiceTracker serviceTracker = + new ServiceTracker(bundle.getBundleContext(), + CsdlDcServiceInfoLocalService.class, null); + + serviceTracker.open(); + + _serviceTracker = serviceTracker; + } +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcServiceInfoLocalServiceWrapper.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcServiceInfoLocalServiceWrapper.java new file mode 100644 index 0000000000..d4592b6241 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcServiceInfoLocalServiceWrapper.java @@ -0,0 +1,350 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link CsdlDcServiceInfoLocalService}. + * + * @author huymq + * @see CsdlDcServiceInfoLocalService + * @generated + */ +@ProviderType +public class CsdlDcServiceInfoLocalServiceWrapper + implements CsdlDcServiceInfoLocalService, + ServiceWrapper { + public CsdlDcServiceInfoLocalServiceWrapper( + CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + _csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Adds the csdl dc service info to the database. Also notifies the appropriate model listeners. + * + * @param csdlDcServiceInfo the csdl dc service info + * @return the csdl dc service info that was added + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcServiceInfo addCsdlDcServiceInfo( + org.opencps.dossiermgt.model.CsdlDcServiceInfo csdlDcServiceInfo) { + return _csdlDcServiceInfoLocalService.addCsdlDcServiceInfo(csdlDcServiceInfo); + } + + /** + * Creates a new csdl dc service info with the primary key. Does not add the csdl dc service info to the database. + * + * @param idDcService the primary key for the new csdl dc service info + * @return the new csdl dc service info + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcServiceInfo createCsdlDcServiceInfo( + long idDcService) { + return _csdlDcServiceInfoLocalService.createCsdlDcServiceInfo(idDcService); + } + + /** + * Deletes the csdl dc service info from the database. Also notifies the appropriate model listeners. + * + * @param csdlDcServiceInfo the csdl dc service info + * @return the csdl dc service info that was removed + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcServiceInfo deleteCsdlDcServiceInfo( + org.opencps.dossiermgt.model.CsdlDcServiceInfo csdlDcServiceInfo) { + return _csdlDcServiceInfoLocalService.deleteCsdlDcServiceInfo(csdlDcServiceInfo); + } + + /** + * Deletes the csdl dc service info with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info that was removed + * @throws PortalException if a csdl dc service info with the primary key could not be found + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcServiceInfo deleteCsdlDcServiceInfo( + long idDcService) + throws com.liferay.portal.kernel.exception.PortalException { + return _csdlDcServiceInfoLocalService.deleteCsdlDcServiceInfo(idDcService); + } + + /** + * @throws PortalException + */ + @Override + public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( + com.liferay.portal.kernel.model.PersistedModel persistedModel) + throws com.liferay.portal.kernel.exception.PortalException { + return _csdlDcServiceInfoLocalService.deletePersistedModel(persistedModel); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return _csdlDcServiceInfoLocalService.dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return _csdlDcServiceInfoLocalService.dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) { + return _csdlDcServiceInfoLocalService.dynamicQuery(dynamicQuery, start, + end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return _csdlDcServiceInfoLocalService.dynamicQuery(dynamicQuery, start, + end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return _csdlDcServiceInfoLocalService.dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) { + return _csdlDcServiceInfoLocalService.dynamicQueryCount(dynamicQuery, + projection); + } + + @Override + public org.opencps.dossiermgt.model.CsdlDcServiceInfo fetchCsdlDcServiceInfo( + long idDcService) { + return _csdlDcServiceInfoLocalService.fetchCsdlDcServiceInfo(idDcService); + } + + /** + * Returns the csdl dc service info matching the UUID and group. + * + * @param uuid the csdl dc service info's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcServiceInfo fetchCsdlDcServiceInfoByUuidAndGroupId( + String uuid, long groupId) { + return _csdlDcServiceInfoLocalService.fetchCsdlDcServiceInfoByUuidAndGroupId(uuid, + groupId); + } + + @Override + public org.opencps.dossiermgt.model.CsdlDcServiceInfo findByServiceCodeAndStatus( + String serviceCode, int status) { + return _csdlDcServiceInfoLocalService.findByServiceCodeAndStatus(serviceCode, + status); + } + + @Override + public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { + return _csdlDcServiceInfoLocalService.getActionableDynamicQuery(); + } + + /** + * Returns the csdl dc service info with the primary key. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info + * @throws PortalException if a csdl dc service info with the primary key could not be found + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcServiceInfo getCsdlDcServiceInfo( + long idDcService) + throws com.liferay.portal.kernel.exception.PortalException { + return _csdlDcServiceInfoLocalService.getCsdlDcServiceInfo(idDcService); + } + + /** + * Returns the csdl dc service info matching the UUID and group. + * + * @param uuid the csdl dc service info's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc service info + * @throws PortalException if a matching csdl dc service info could not be found + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcServiceInfo getCsdlDcServiceInfoByUuidAndGroupId( + String uuid, long groupId) + throws com.liferay.portal.kernel.exception.PortalException { + return _csdlDcServiceInfoLocalService.getCsdlDcServiceInfoByUuidAndGroupId(uuid, + groupId); + } + + /** + * Returns a range of all the csdl dc service infos. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @return the range of csdl dc service infos + */ + @Override + public java.util.List getCsdlDcServiceInfos( + int start, int end) { + return _csdlDcServiceInfoLocalService.getCsdlDcServiceInfos(start, end); + } + + /** + * Returns all the csdl dc service infos matching the UUID and company. + * + * @param uuid the UUID of the csdl dc service infos + * @param companyId the primary key of the company + * @return the matching csdl dc service infos, or an empty list if no matches were found + */ + @Override + public java.util.List getCsdlDcServiceInfosByUuidAndCompanyId( + String uuid, long companyId) { + return _csdlDcServiceInfoLocalService.getCsdlDcServiceInfosByUuidAndCompanyId(uuid, + companyId); + } + + /** + * Returns a range of csdl dc service infos matching the UUID and company. + * + * @param uuid the UUID of the csdl dc service infos + * @param companyId the primary key of the company + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching csdl dc service infos, or an empty list if no matches were found + */ + @Override + public java.util.List getCsdlDcServiceInfosByUuidAndCompanyId( + String uuid, long companyId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return _csdlDcServiceInfoLocalService.getCsdlDcServiceInfosByUuidAndCompanyId(uuid, + companyId, start, end, orderByComparator); + } + + /** + * Returns the number of csdl dc service infos. + * + * @return the number of csdl dc service infos + */ + @Override + public int getCsdlDcServiceInfosCount() { + return _csdlDcServiceInfoLocalService.getCsdlDcServiceInfosCount(); + } + + @Override + public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + return _csdlDcServiceInfoLocalService.getIndexableActionableDynamicQuery(); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + @Override + public String getOSGiServiceIdentifier() { + return _csdlDcServiceInfoLocalService.getOSGiServiceIdentifier(); + } + + @Override + public com.liferay.portal.kernel.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException { + return _csdlDcServiceInfoLocalService.getPersistedModel(primaryKeyObj); + } + + /** + * Updates the csdl dc service info in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param csdlDcServiceInfo the csdl dc service info + * @return the csdl dc service info that was updated + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcServiceInfo updateCsdlDcServiceInfo( + org.opencps.dossiermgt.model.CsdlDcServiceInfo csdlDcServiceInfo) { + return _csdlDcServiceInfoLocalService.updateCsdlDcServiceInfo(csdlDcServiceInfo); + } + + @Override + public CsdlDcServiceInfoLocalService getWrappedService() { + return _csdlDcServiceInfoLocalService; + } + + @Override + public void setWrappedService( + CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + _csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + private CsdlDcServiceInfoLocalService _csdlDcServiceInfoLocalService; +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcUserLocalService.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcUserLocalService.java new file mode 100644 index 0000000000..ede09bac2f --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcUserLocalService.java @@ -0,0 +1,279 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.service.BaseLocalService; +import com.liferay.portal.kernel.service.PersistedModelLocalService; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Propagation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.kernel.util.OrderByComparator; + +import org.opencps.dossiermgt.model.CsdlDcUser; + +import java.io.Serializable; + +import java.util.List; + +/** + * Provides the local service interface for CsdlDcUser. Methods of this + * service will not have security checks based on the propagated JAAS + * credentials because this service can only be accessed from within the same + * VM. + * + * @author huymq + * @see CsdlDcUserLocalServiceUtil + * @see org.opencps.dossiermgt.service.base.CsdlDcUserLocalServiceBaseImpl + * @see org.opencps.dossiermgt.service.impl.CsdlDcUserLocalServiceImpl + * @generated + */ +@ProviderType +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface CsdlDcUserLocalService extends BaseLocalService, + PersistedModelLocalService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link CsdlDcUserLocalServiceUtil} to access the csdl dc user local service. Add custom service methods to {@link org.opencps.dossiermgt.service.impl.CsdlDcUserLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Adds the csdl dc user to the database. Also notifies the appropriate model listeners. + * + * @param csdlDcUser the csdl dc user + * @return the csdl dc user that was added + */ + @Indexable(type = IndexableType.REINDEX) + public CsdlDcUser addCsdlDcUser(CsdlDcUser csdlDcUser); + + /** + * Creates a new csdl dc user with the primary key. Does not add the csdl dc user to the database. + * + * @param idDcUser the primary key for the new csdl dc user + * @return the new csdl dc user + */ + @Transactional(enabled = false) + public CsdlDcUser createCsdlDcUser(long idDcUser); + + /** + * Deletes the csdl dc user from the database. Also notifies the appropriate model listeners. + * + * @param csdlDcUser the csdl dc user + * @return the csdl dc user that was removed + */ + @Indexable(type = IndexableType.DELETE) + public CsdlDcUser deleteCsdlDcUser(CsdlDcUser csdlDcUser); + + /** + * Deletes the csdl dc user with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user that was removed + * @throws PortalException if a csdl dc user with the primary key could not be found + */ + @Indexable(type = IndexableType.DELETE) + public CsdlDcUser deleteCsdlDcUser(long idDcUser) throws PortalException; + + /** + * @throws PortalException + */ + @Override + public PersistedModel deletePersistedModel(PersistedModel persistedModel) + throws PortalException; + + public DynamicQuery dynamicQuery(); + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery); + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end); + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end, OrderByComparator orderByComparator); + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + public long dynamicQueryCount(DynamicQuery dynamicQuery); + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public CsdlDcUser fetchCsdlDcUser(long idDcUser); + + /** + * Returns the csdl dc user matching the UUID and group. + * + * @param uuid the csdl dc user's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public CsdlDcUser fetchCsdlDcUserByUuidAndGroupId(String uuid, long groupId); + + public CsdlDcUser findByGovAndEmailAndStatus(String govAgencyCode, + String email, int status); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ActionableDynamicQuery getActionableDynamicQuery(); + + /** + * Returns the csdl dc user with the primary key. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user + * @throws PortalException if a csdl dc user with the primary key could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public CsdlDcUser getCsdlDcUser(long idDcUser) throws PortalException; + + /** + * Returns the csdl dc user matching the UUID and group. + * + * @param uuid the csdl dc user's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc user + * @throws PortalException if a matching csdl dc user could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public CsdlDcUser getCsdlDcUserByUuidAndGroupId(String uuid, long groupId) + throws PortalException; + + /** + * Returns a range of all the csdl dc users. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @return the range of csdl dc users + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getCsdlDcUsers(int start, int end); + + /** + * Returns all the csdl dc users matching the UUID and company. + * + * @param uuid the UUID of the csdl dc users + * @param companyId the primary key of the company + * @return the matching csdl dc users, or an empty list if no matches were found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getCsdlDcUsersByUuidAndCompanyId(String uuid, + long companyId); + + /** + * Returns a range of csdl dc users matching the UUID and company. + * + * @param uuid the UUID of the csdl dc users + * @param companyId the primary key of the company + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching csdl dc users, or an empty list if no matches were found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getCsdlDcUsersByUuidAndCompanyId(String uuid, + long companyId, int start, int end, + OrderByComparator orderByComparator); + + /** + * Returns the number of csdl dc users. + * + * @return the number of csdl dc users + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getCsdlDcUsersCount(); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + public String getOSGiServiceIdentifier(); + + @Override + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException; + + /** + * Updates the csdl dc user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param csdlDcUser the csdl dc user + * @return the csdl dc user that was updated + */ + @Indexable(type = IndexableType.REINDEX) + public CsdlDcUser updateCsdlDcUser(CsdlDcUser csdlDcUser); +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcUserLocalServiceUtil.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcUserLocalServiceUtil.java new file mode 100644 index 0000000000..bc70f420fc --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcUserLocalServiceUtil.java @@ -0,0 +1,335 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service; + +import aQute.bnd.annotation.ProviderType; + +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; + +import org.osgi.util.tracker.ServiceTracker; + +/** + * Provides the local service utility for CsdlDcUser. This utility wraps + * {@link org.opencps.dossiermgt.service.impl.CsdlDcUserLocalServiceImpl} and is the + * primary access point for service operations in application layer code running + * on the local server. Methods of this service will not have security checks + * based on the propagated JAAS credentials because this service can only be + * accessed from within the same VM. + * + * @author huymq + * @see CsdlDcUserLocalService + * @see org.opencps.dossiermgt.service.base.CsdlDcUserLocalServiceBaseImpl + * @see org.opencps.dossiermgt.service.impl.CsdlDcUserLocalServiceImpl + * @generated + */ +@ProviderType +public class CsdlDcUserLocalServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link org.opencps.dossiermgt.service.impl.CsdlDcUserLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Adds the csdl dc user to the database. Also notifies the appropriate model listeners. + * + * @param csdlDcUser the csdl dc user + * @return the csdl dc user that was added + */ + public static org.opencps.dossiermgt.model.CsdlDcUser addCsdlDcUser( + org.opencps.dossiermgt.model.CsdlDcUser csdlDcUser) { + return getService().addCsdlDcUser(csdlDcUser); + } + + /** + * Creates a new csdl dc user with the primary key. Does not add the csdl dc user to the database. + * + * @param idDcUser the primary key for the new csdl dc user + * @return the new csdl dc user + */ + public static org.opencps.dossiermgt.model.CsdlDcUser createCsdlDcUser( + long idDcUser) { + return getService().createCsdlDcUser(idDcUser); + } + + /** + * Deletes the csdl dc user from the database. Also notifies the appropriate model listeners. + * + * @param csdlDcUser the csdl dc user + * @return the csdl dc user that was removed + */ + public static org.opencps.dossiermgt.model.CsdlDcUser deleteCsdlDcUser( + org.opencps.dossiermgt.model.CsdlDcUser csdlDcUser) { + return getService().deleteCsdlDcUser(csdlDcUser); + } + + /** + * Deletes the csdl dc user with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user that was removed + * @throws PortalException if a csdl dc user with the primary key could not be found + */ + public static org.opencps.dossiermgt.model.CsdlDcUser deleteCsdlDcUser( + long idDcUser) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().deleteCsdlDcUser(idDcUser); + } + + /** + * @throws PortalException + */ + public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( + com.liferay.portal.kernel.model.PersistedModel persistedModel) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().deletePersistedModel(persistedModel); + } + + public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return getService().dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return getService().dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) { + return getService().dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return getService() + .dynamicQuery(dynamicQuery, start, end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return getService().dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) { + return getService().dynamicQueryCount(dynamicQuery, projection); + } + + public static org.opencps.dossiermgt.model.CsdlDcUser fetchCsdlDcUser( + long idDcUser) { + return getService().fetchCsdlDcUser(idDcUser); + } + + /** + * Returns the csdl dc user matching the UUID and group. + * + * @param uuid the csdl dc user's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public static org.opencps.dossiermgt.model.CsdlDcUser fetchCsdlDcUserByUuidAndGroupId( + String uuid, long groupId) { + return getService().fetchCsdlDcUserByUuidAndGroupId(uuid, groupId); + } + + public static org.opencps.dossiermgt.model.CsdlDcUser findByGovAndEmailAndStatus( + String govAgencyCode, String email, int status) { + return getService() + .findByGovAndEmailAndStatus(govAgencyCode, email, status); + } + + public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { + return getService().getActionableDynamicQuery(); + } + + /** + * Returns the csdl dc user with the primary key. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user + * @throws PortalException if a csdl dc user with the primary key could not be found + */ + public static org.opencps.dossiermgt.model.CsdlDcUser getCsdlDcUser( + long idDcUser) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getCsdlDcUser(idDcUser); + } + + /** + * Returns the csdl dc user matching the UUID and group. + * + * @param uuid the csdl dc user's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc user + * @throws PortalException if a matching csdl dc user could not be found + */ + public static org.opencps.dossiermgt.model.CsdlDcUser getCsdlDcUserByUuidAndGroupId( + String uuid, long groupId) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getCsdlDcUserByUuidAndGroupId(uuid, groupId); + } + + /** + * Returns a range of all the csdl dc users. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @return the range of csdl dc users + */ + public static java.util.List getCsdlDcUsers( + int start, int end) { + return getService().getCsdlDcUsers(start, end); + } + + /** + * Returns all the csdl dc users matching the UUID and company. + * + * @param uuid the UUID of the csdl dc users + * @param companyId the primary key of the company + * @return the matching csdl dc users, or an empty list if no matches were found + */ + public static java.util.List getCsdlDcUsersByUuidAndCompanyId( + String uuid, long companyId) { + return getService().getCsdlDcUsersByUuidAndCompanyId(uuid, companyId); + } + + /** + * Returns a range of csdl dc users matching the UUID and company. + * + * @param uuid the UUID of the csdl dc users + * @param companyId the primary key of the company + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching csdl dc users, or an empty list if no matches were found + */ + public static java.util.List getCsdlDcUsersByUuidAndCompanyId( + String uuid, long companyId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return getService() + .getCsdlDcUsersByUuidAndCompanyId(uuid, companyId, start, + end, orderByComparator); + } + + /** + * Returns the number of csdl dc users. + * + * @return the number of csdl dc users + */ + public static int getCsdlDcUsersCount() { + return getService().getCsdlDcUsersCount(); + } + + public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + return getService().getIndexableActionableDynamicQuery(); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + public static String getOSGiServiceIdentifier() { + return getService().getOSGiServiceIdentifier(); + } + + public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getPersistedModel(primaryKeyObj); + } + + /** + * Updates the csdl dc user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param csdlDcUser the csdl dc user + * @return the csdl dc user that was updated + */ + public static org.opencps.dossiermgt.model.CsdlDcUser updateCsdlDcUser( + org.opencps.dossiermgt.model.CsdlDcUser csdlDcUser) { + return getService().updateCsdlDcUser(csdlDcUser); + } + + public static CsdlDcUserLocalService getService() { + return _serviceTracker.getService(); + } + + private static ServiceTracker _serviceTracker; + + static { + Bundle bundle = FrameworkUtil.getBundle(CsdlDcUserLocalService.class); + + ServiceTracker serviceTracker = + new ServiceTracker(bundle.getBundleContext(), + CsdlDcUserLocalService.class, null); + + serviceTracker.open(); + + _serviceTracker = serviceTracker; + } +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcUserLocalServiceWrapper.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcUserLocalServiceWrapper.java new file mode 100644 index 0000000000..c0d1fcf132 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/CsdlDcUserLocalServiceWrapper.java @@ -0,0 +1,346 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link CsdlDcUserLocalService}. + * + * @author huymq + * @see CsdlDcUserLocalService + * @generated + */ +@ProviderType +public class CsdlDcUserLocalServiceWrapper implements CsdlDcUserLocalService, + ServiceWrapper { + public CsdlDcUserLocalServiceWrapper( + CsdlDcUserLocalService csdlDcUserLocalService) { + _csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Adds the csdl dc user to the database. Also notifies the appropriate model listeners. + * + * @param csdlDcUser the csdl dc user + * @return the csdl dc user that was added + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcUser addCsdlDcUser( + org.opencps.dossiermgt.model.CsdlDcUser csdlDcUser) { + return _csdlDcUserLocalService.addCsdlDcUser(csdlDcUser); + } + + /** + * Creates a new csdl dc user with the primary key. Does not add the csdl dc user to the database. + * + * @param idDcUser the primary key for the new csdl dc user + * @return the new csdl dc user + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcUser createCsdlDcUser( + long idDcUser) { + return _csdlDcUserLocalService.createCsdlDcUser(idDcUser); + } + + /** + * Deletes the csdl dc user from the database. Also notifies the appropriate model listeners. + * + * @param csdlDcUser the csdl dc user + * @return the csdl dc user that was removed + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcUser deleteCsdlDcUser( + org.opencps.dossiermgt.model.CsdlDcUser csdlDcUser) { + return _csdlDcUserLocalService.deleteCsdlDcUser(csdlDcUser); + } + + /** + * Deletes the csdl dc user with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user that was removed + * @throws PortalException if a csdl dc user with the primary key could not be found + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcUser deleteCsdlDcUser( + long idDcUser) + throws com.liferay.portal.kernel.exception.PortalException { + return _csdlDcUserLocalService.deleteCsdlDcUser(idDcUser); + } + + /** + * @throws PortalException + */ + @Override + public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( + com.liferay.portal.kernel.model.PersistedModel persistedModel) + throws com.liferay.portal.kernel.exception.PortalException { + return _csdlDcUserLocalService.deletePersistedModel(persistedModel); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return _csdlDcUserLocalService.dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return _csdlDcUserLocalService.dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) { + return _csdlDcUserLocalService.dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return _csdlDcUserLocalService.dynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return _csdlDcUserLocalService.dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) { + return _csdlDcUserLocalService.dynamicQueryCount(dynamicQuery, + projection); + } + + @Override + public org.opencps.dossiermgt.model.CsdlDcUser fetchCsdlDcUser( + long idDcUser) { + return _csdlDcUserLocalService.fetchCsdlDcUser(idDcUser); + } + + /** + * Returns the csdl dc user matching the UUID and group. + * + * @param uuid the csdl dc user's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcUser fetchCsdlDcUserByUuidAndGroupId( + String uuid, long groupId) { + return _csdlDcUserLocalService.fetchCsdlDcUserByUuidAndGroupId(uuid, + groupId); + } + + @Override + public org.opencps.dossiermgt.model.CsdlDcUser findByGovAndEmailAndStatus( + String govAgencyCode, String email, int status) { + return _csdlDcUserLocalService.findByGovAndEmailAndStatus(govAgencyCode, + email, status); + } + + @Override + public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { + return _csdlDcUserLocalService.getActionableDynamicQuery(); + } + + /** + * Returns the csdl dc user with the primary key. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user + * @throws PortalException if a csdl dc user with the primary key could not be found + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcUser getCsdlDcUser(long idDcUser) + throws com.liferay.portal.kernel.exception.PortalException { + return _csdlDcUserLocalService.getCsdlDcUser(idDcUser); + } + + /** + * Returns the csdl dc user matching the UUID and group. + * + * @param uuid the csdl dc user's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc user + * @throws PortalException if a matching csdl dc user could not be found + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcUser getCsdlDcUserByUuidAndGroupId( + String uuid, long groupId) + throws com.liferay.portal.kernel.exception.PortalException { + return _csdlDcUserLocalService.getCsdlDcUserByUuidAndGroupId(uuid, + groupId); + } + + /** + * Returns a range of all the csdl dc users. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @return the range of csdl dc users + */ + @Override + public java.util.List getCsdlDcUsers( + int start, int end) { + return _csdlDcUserLocalService.getCsdlDcUsers(start, end); + } + + /** + * Returns all the csdl dc users matching the UUID and company. + * + * @param uuid the UUID of the csdl dc users + * @param companyId the primary key of the company + * @return the matching csdl dc users, or an empty list if no matches were found + */ + @Override + public java.util.List getCsdlDcUsersByUuidAndCompanyId( + String uuid, long companyId) { + return _csdlDcUserLocalService.getCsdlDcUsersByUuidAndCompanyId(uuid, + companyId); + } + + /** + * Returns a range of csdl dc users matching the UUID and company. + * + * @param uuid the UUID of the csdl dc users + * @param companyId the primary key of the company + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching csdl dc users, or an empty list if no matches were found + */ + @Override + public java.util.List getCsdlDcUsersByUuidAndCompanyId( + String uuid, long companyId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return _csdlDcUserLocalService.getCsdlDcUsersByUuidAndCompanyId(uuid, + companyId, start, end, orderByComparator); + } + + /** + * Returns the number of csdl dc users. + * + * @return the number of csdl dc users + */ + @Override + public int getCsdlDcUsersCount() { + return _csdlDcUserLocalService.getCsdlDcUsersCount(); + } + + @Override + public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + return _csdlDcUserLocalService.getIndexableActionableDynamicQuery(); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + @Override + public String getOSGiServiceIdentifier() { + return _csdlDcUserLocalService.getOSGiServiceIdentifier(); + } + + @Override + public com.liferay.portal.kernel.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException { + return _csdlDcUserLocalService.getPersistedModel(primaryKeyObj); + } + + /** + * Updates the csdl dc user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param csdlDcUser the csdl dc user + * @return the csdl dc user that was updated + */ + @Override + public org.opencps.dossiermgt.model.CsdlDcUser updateCsdlDcUser( + org.opencps.dossiermgt.model.CsdlDcUser csdlDcUser) { + return _csdlDcUserLocalService.updateCsdlDcUser(csdlDcUser); + } + + @Override + public CsdlDcUserLocalService getWrappedService() { + return _csdlDcUserLocalService; + } + + @Override + public void setWrappedService(CsdlDcUserLocalService csdlDcUserLocalService) { + _csdlDcUserLocalService = csdlDcUserLocalService; + } + + private CsdlDcUserLocalService _csdlDcUserLocalService; +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierLocalService.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierLocalService.java index c07cbf2fa3..ee2532c887 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierLocalService.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierLocalService.java @@ -44,8 +44,12 @@ import com.liferay.portal.kernel.util.OrderByComparator; import org.opencps.dossiermgt.exception.NoSuchDossierException; -import org.opencps.dossiermgt.model.*; import org.opencps.dossiermgt.model.Dossier; +import org.opencps.dossiermgt.model.DossierAction; +import org.opencps.dossiermgt.model.DossierDocument; +import org.opencps.dossiermgt.model.ProcessOption; +import org.opencps.dossiermgt.model.ServiceInfo; +import org.opencps.dossiermgt.model.ServiceProcess; import java.io.Serializable; @@ -333,9 +337,14 @@ public List findByNOT_ST_GT_MD(String[] statuses, Date d, public List findDossierByGroup(long groupId); - public org.opencps.dossiermgt.model.DossierDocument findDossierDocumentByDossierId( + public Dossier findDossierById(long dossierId); + + public DossierDocument findDossierDocumentByDossierId( long dossierDocumentId); + public List findDossierTransferByORIGIN_NO_ORIGIN_ID_ORIGINALITY( + String originDossierNo, Long originDossierId, Integer originality); + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public ActionableDynamicQuery getActionableDynamicQuery(); diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierLocalServiceUtil.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierLocalServiceUtil.java index 2680f1bc90..2bd1c3903b 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierLocalServiceUtil.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierLocalServiceUtil.java @@ -14,17 +14,12 @@ package org.opencps.dossiermgt.service; -import com.liferay.portal.kernel.exception.PortalException; +import aQute.bnd.annotation.ProviderType; -import org.opencps.dossiermgt.model.DossierAction; -import org.opencps.dossiermgt.model.ProcessOption; -import org.opencps.dossiermgt.model.ServiceInfo; -import org.opencps.dossiermgt.model.ServiceProcess; import org.osgi.framework.Bundle; import org.osgi.framework.FrameworkUtil; -import org.osgi.util.tracker.ServiceTracker; -import aQute.bnd.annotation.ProviderType; +import org.osgi.util.tracker.ServiceTracker; /** * Provides the local service utility for Dossier. This utility wraps @@ -430,8 +425,8 @@ public static java.util.List findByGID( return getService().findByGID(groupId, start, end); } - public static java.util.List findByGID_PUB_SID(long groupId, - boolean public_, long[] serviceInfoArr) { + public static java.util.List findByGID_PUB_SID( + long groupId, boolean public_, long[] serviceInfoArr) { return getService().findByGID_PUB_SID(groupId, public_, serviceInfoArr); } @@ -470,11 +465,23 @@ public static java.util.List findDossierBy return getService().findDossierByGroup(groupId); } + public static org.opencps.dossiermgt.model.Dossier findDossierById( + long dossierId) { + return getService().findDossierById(dossierId); + } + public static org.opencps.dossiermgt.model.DossierDocument findDossierDocumentByDossierId( long dossierDocumentId) { return getService().findDossierDocumentByDossierId(dossierDocumentId); } + public static java.util.List findDossierTransferByORIGIN_NO_ORIGIN_ID_ORIGINALITY( + String originDossierNo, Long originDossierId, Integer originality) { + return getService() + .findDossierTransferByORIGIN_NO_ORIGIN_ID_ORIGINALITY(originDossierNo, + originDossierId, originality); + } + public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { return getService().getActionableDynamicQuery(); } @@ -714,8 +721,10 @@ public static org.opencps.dossiermgt.model.Dossier initDossier( String postalAddress, String postalCityCode, String postalCityName, String postalDistrictCode, String postalDistrictName, String postalTelNo, boolean online, boolean notification, - String applicantNote, int originality, ServiceInfo service, - ServiceProcess serviceProcess, ProcessOption processOption, + String applicantNote, int originality, + org.opencps.dossiermgt.model.ServiceInfo service, + org.opencps.dossiermgt.model.ServiceProcess serviceProcess, + org.opencps.dossiermgt.model.ProcessOption processOption, com.liferay.portal.kernel.service.ServiceContext context) throws com.liferay.portal.kernel.exception.PortalException { return getService() @@ -776,8 +785,9 @@ public static org.opencps.dossiermgt.model.Dossier initFullDossier( String delegateDistrictCode, String delegateDistrictName, String delegateWardCode, String delegateWardName, String registerBookCode, String registerBookName, int sampleCount, - String dossierName, ServiceInfo service, ServiceProcess process, - ProcessOption option, + String dossierName, org.opencps.dossiermgt.model.ServiceInfo service, + org.opencps.dossiermgt.model.ServiceProcess process, + org.opencps.dossiermgt.model.ProcessOption option, com.liferay.portal.kernel.service.ServiceContext context) throws com.liferay.portal.kernel.exception.PortalException { return getService() @@ -814,8 +824,10 @@ public static org.opencps.dossiermgt.model.Dossier initMultipleDossier( String delegateDistrictCode, String delegateDistrictName, String delegateWardCode, String delegateWardName, String registerBookCode, String registerBookName, int sampleCount, - String dossierName, int durationCount, ServiceInfo service, - ServiceProcess process, ProcessOption option, + String dossierName, int durationCount, + org.opencps.dossiermgt.model.ServiceInfo service, + org.opencps.dossiermgt.model.ServiceProcess process, + org.opencps.dossiermgt.model.ProcessOption option, com.liferay.portal.kernel.service.ServiceContext context) throws com.liferay.portal.kernel.exception.PortalException { return getService() @@ -1123,7 +1135,7 @@ public static org.opencps.dossiermgt.model.Dossier reset(long groupId, public static org.opencps.dossiermgt.model.Dossier rollback( org.opencps.dossiermgt.model.Dossier dossier, - DossierAction dossierAction) { + org.opencps.dossiermgt.model.DossierAction dossierAction) { return getService().rollback(dossier, dossierAction); } diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierLocalServiceWrapper.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierLocalServiceWrapper.java index 28ec5ebf54..1f89c0045d 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierLocalServiceWrapper.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierLocalServiceWrapper.java @@ -14,14 +14,6 @@ package org.opencps.dossiermgt.service; -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.service.ServiceWrapper; - -import org.opencps.dossiermgt.model.DossierAction; -import org.opencps.dossiermgt.model.ProcessOption; -import org.opencps.dossiermgt.model.ServiceInfo; -import org.opencps.dossiermgt.model.ServiceProcess; - import aQute.bnd.annotation.ProviderType; import com.liferay.portal.kernel.service.ServiceWrapper; @@ -455,8 +447,8 @@ public java.util.List findByGID( } @Override - public java.util.List findByGID_PUB_SID(long groupId, - boolean public_, long[] serviceInfoArr) { + public java.util.List findByGID_PUB_SID( + long groupId, boolean public_, long[] serviceInfoArr) { return _dossierLocalService.findByGID_PUB_SID(groupId, public_, serviceInfoArr); } @@ -503,12 +495,24 @@ public java.util.List findDossierByGroup( return _dossierLocalService.findDossierByGroup(groupId); } + @Override + public org.opencps.dossiermgt.model.Dossier findDossierById(long dossierId) { + return _dossierLocalService.findDossierById(dossierId); + } + @Override public org.opencps.dossiermgt.model.DossierDocument findDossierDocumentByDossierId( long dossierDocumentId) { return _dossierLocalService.findDossierDocumentByDossierId(dossierDocumentId); } + @Override + public java.util.List findDossierTransferByORIGIN_NO_ORIGIN_ID_ORIGINALITY( + String originDossierNo, Long originDossierId, Integer originality) { + return _dossierLocalService.findDossierTransferByORIGIN_NO_ORIGIN_ID_ORIGINALITY(originDossierNo, + originDossierId, originality); + } + @Override public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { return _dossierLocalService.getActionableDynamicQuery(); @@ -774,8 +778,10 @@ public org.opencps.dossiermgt.model.Dossier initDossier(long groupId, String postalCityCode, String postalCityName, String postalDistrictCode, String postalDistrictName, String postalTelNo, boolean online, boolean notification, - String applicantNote, int originality, ServiceInfo service, - ServiceProcess serviceProcess, ProcessOption processOption, + String applicantNote, int originality, + org.opencps.dossiermgt.model.ServiceInfo service, + org.opencps.dossiermgt.model.ServiceProcess serviceProcess, + org.opencps.dossiermgt.model.ProcessOption processOption, com.liferay.portal.kernel.service.ServiceContext context) throws com.liferay.portal.kernel.exception.PortalException { return _dossierLocalService.initDossier(groupId, dossierId, @@ -836,7 +842,9 @@ public org.opencps.dossiermgt.model.Dossier initFullDossier(long groupId, String delegateDistrictName, String delegateWardCode, String delegateWardName, String registerBookCode, String registerBookName, int sampleCount, String dossierName, - ServiceInfo service, ServiceProcess process, ProcessOption option, + org.opencps.dossiermgt.model.ServiceInfo service, + org.opencps.dossiermgt.model.ServiceProcess process, + org.opencps.dossiermgt.model.ProcessOption option, com.liferay.portal.kernel.service.ServiceContext context) throws com.liferay.portal.kernel.exception.PortalException { return _dossierLocalService.initFullDossier(groupId, dossierId, @@ -873,8 +881,10 @@ public org.opencps.dossiermgt.model.Dossier initMultipleDossier( String delegateDistrictCode, String delegateDistrictName, String delegateWardCode, String delegateWardName, String registerBookCode, String registerBookName, int sampleCount, - String dossierName, int durationCount, ServiceInfo service, - ServiceProcess process, ProcessOption option, + String dossierName, int durationCount, + org.opencps.dossiermgt.model.ServiceInfo service, + org.opencps.dossiermgt.model.ServiceProcess process, + org.opencps.dossiermgt.model.ProcessOption option, com.liferay.portal.kernel.service.ServiceContext context) throws com.liferay.portal.kernel.exception.PortalException { return _dossierLocalService.initMultipleDossier(groupId, dossierId, @@ -1188,7 +1198,7 @@ public org.opencps.dossiermgt.model.Dossier reset(long groupId, long id, @Override public org.opencps.dossiermgt.model.Dossier rollback( org.opencps.dossiermgt.model.Dossier dossier, - DossierAction dossierAction) { + org.opencps.dossiermgt.model.DossierAction dossierAction) { return _dossierLocalService.rollback(dossier, dossierAction); } diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierMarkLocalService.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierMarkLocalService.java index 2598b91783..d1aacc645a 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierMarkLocalService.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierMarkLocalService.java @@ -200,6 +200,9 @@ public long dynamicQueryCount(DynamicQuery dynamicQuery, public DossierMark fetchDossierMarkByUuidAndGroupId(String uuid, long groupId); + public List findDossierMarkByDossierId(long groupId, + long dossierId); + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public ActionableDynamicQuery getActionableDynamicQuery(); diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierMarkLocalServiceUtil.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierMarkLocalServiceUtil.java index 9057ec986a..8bb148ef3e 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierMarkLocalServiceUtil.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierMarkLocalServiceUtil.java @@ -223,6 +223,11 @@ public static org.opencps.dossiermgt.model.DossierMark fetchDossierMarkByUuidAnd return getService().fetchDossierMarkByUuidAndGroupId(uuid, groupId); } + public static java.util.List findDossierMarkByDossierId( + long groupId, long dossierId) { + return getService().findDossierMarkByDossierId(groupId, dossierId); + } + public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { return getService().getActionableDynamicQuery(); } diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierMarkLocalServiceWrapper.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierMarkLocalServiceWrapper.java index e227bb1071..e0f81bc294 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierMarkLocalServiceWrapper.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/DossierMarkLocalServiceWrapper.java @@ -232,6 +232,13 @@ public org.opencps.dossiermgt.model.DossierMark fetchDossierMarkByUuidAndGroupId groupId); } + @Override + public java.util.List findDossierMarkByDossierId( + long groupId, long dossierId) { + return _dossierMarkLocalService.findDossierMarkByDossierId(groupId, + dossierId); + } + @Override public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { return _dossierMarkLocalService.getActionableDynamicQuery(); diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/ServiceConfigLocalService.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/ServiceConfigLocalService.java index 0077afb421..fce0eaa66f 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/ServiceConfigLocalService.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/ServiceConfigLocalService.java @@ -193,8 +193,8 @@ public long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection); @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public ServiceConfig fetchByGID_SI_GOV_LEVEL(long groupId, - long serviceInfo, String govAgencyCode, int serviceLevel); + public List fetchByGID_SI_GOV_LEVEL(long groupId, + long serviceInfo, String govAgencyCode); @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public ServiceConfig fetchServiceConfig(long serviceConfigId); diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/ServiceConfigLocalServiceUtil.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/ServiceConfigLocalServiceUtil.java index a582893992..0467667afa 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/ServiceConfigLocalServiceUtil.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/ServiceConfigLocalServiceUtil.java @@ -206,11 +206,10 @@ public static long dynamicQueryCount( return getService().dynamicQueryCount(dynamicQuery, projection); } - public static org.opencps.dossiermgt.model.ServiceConfig fetchByGID_SI_GOV_LEVEL( - long groupId, long serviceInfo, String govAgencyCode, int serviceLevel) { + public static java.util.List fetchByGID_SI_GOV_LEVEL( + long groupId, long serviceInfo, String govAgencyCode) { return getService() - .fetchByGID_SI_GOV_LEVEL(groupId, serviceInfo, - govAgencyCode, serviceLevel); + .fetchByGID_SI_GOV_LEVEL(groupId, serviceInfo, govAgencyCode); } public static org.opencps.dossiermgt.model.ServiceConfig fetchServiceConfig( diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/ServiceConfigLocalServiceWrapper.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/ServiceConfigLocalServiceWrapper.java index 31ec236d66..321ac3e03b 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/ServiceConfigLocalServiceWrapper.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/ServiceConfigLocalServiceWrapper.java @@ -215,10 +215,10 @@ public long dynamicQueryCount( } @Override - public org.opencps.dossiermgt.model.ServiceConfig fetchByGID_SI_GOV_LEVEL( - long groupId, long serviceInfo, String govAgencyCode, int serviceLevel) { + public java.util.List fetchByGID_SI_GOV_LEVEL( + long groupId, long serviceInfo, String govAgencyCode) { return _serviceConfigLocalService.fetchByGID_SI_GOV_LEVEL(groupId, - serviceInfo, govAgencyCode, serviceLevel); + serviceInfo, govAgencyCode); } @Override diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/CsdlDcServiceInfoPersistence.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/CsdlDcServiceInfoPersistence.java new file mode 100644 index 0000000000..7acb2e3f8b --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/CsdlDcServiceInfoPersistence.java @@ -0,0 +1,544 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.service.persistence.BasePersistence; + +import org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException; +import org.opencps.dossiermgt.model.CsdlDcServiceInfo; + +/** + * The persistence interface for the csdl dc service info service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author huymq + * @see org.opencps.dossiermgt.service.persistence.impl.CsdlDcServiceInfoPersistenceImpl + * @see CsdlDcServiceInfoUtil + * @generated + */ +@ProviderType +public interface CsdlDcServiceInfoPersistence extends BasePersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link CsdlDcServiceInfoUtil} to access the csdl dc service info persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. + */ + + /** + * Returns all the csdl dc service infos where uuid = ?. + * + * @param uuid the uuid + * @return the matching csdl dc service infos + */ + public java.util.List findByUuid(String uuid); + + /** + * Returns a range of all the csdl dc service infos where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @return the range of matching csdl dc service infos + */ + public java.util.List findByUuid(String uuid, int start, + int end); + + /** + * Returns an ordered range of all the csdl dc service infos where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching csdl dc service infos + */ + public java.util.List findByUuid(String uuid, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the csdl dc service infos where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching csdl dc service infos + */ + public java.util.List findByUuid(String uuid, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first csdl dc service info in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + public CsdlDcServiceInfo findByUuid_First(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchCsdlDcServiceInfoException; + + /** + * Returns the first csdl dc service info in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public CsdlDcServiceInfo fetchByUuid_First(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last csdl dc service info in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + public CsdlDcServiceInfo findByUuid_Last(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchCsdlDcServiceInfoException; + + /** + * Returns the last csdl dc service info in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public CsdlDcServiceInfo fetchByUuid_Last(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the csdl dc service infos before and after the current csdl dc service info in the ordered set where uuid = ?. + * + * @param idDcService the primary key of the current csdl dc service info + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a csdl dc service info with the primary key could not be found + */ + public CsdlDcServiceInfo[] findByUuid_PrevAndNext(long idDcService, + String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchCsdlDcServiceInfoException; + + /** + * Removes all the csdl dc service infos where uuid = ? from the database. + * + * @param uuid the uuid + */ + public void removeByUuid(String uuid); + + /** + * Returns the number of csdl dc service infos where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching csdl dc service infos + */ + public int countByUuid(String uuid); + + /** + * Returns the csdl dc service info where uuid = ? and groupId = ? or throws a {@link NoSuchCsdlDcServiceInfoException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + public CsdlDcServiceInfo findByUUID_G(String uuid, long groupId) + throws NoSuchCsdlDcServiceInfoException; + + /** + * Returns the csdl dc service info where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public CsdlDcServiceInfo fetchByUUID_G(String uuid, long groupId); + + /** + * Returns the csdl dc service info where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public CsdlDcServiceInfo fetchByUUID_G(String uuid, long groupId, + boolean retrieveFromCache); + + /** + * Removes the csdl dc service info where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the csdl dc service info that was removed + */ + public CsdlDcServiceInfo removeByUUID_G(String uuid, long groupId) + throws NoSuchCsdlDcServiceInfoException; + + /** + * Returns the number of csdl dc service infos where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching csdl dc service infos + */ + public int countByUUID_G(String uuid, long groupId); + + /** + * Returns all the csdl dc service infos where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the matching csdl dc service infos + */ + public java.util.List findByUuid_C(String uuid, + long companyId); + + /** + * Returns a range of all the csdl dc service infos where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @return the range of matching csdl dc service infos + */ + public java.util.List findByUuid_C(String uuid, + long companyId, int start, int end); + + /** + * Returns an ordered range of all the csdl dc service infos where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching csdl dc service infos + */ + public java.util.List findByUuid_C(String uuid, + long companyId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the csdl dc service infos where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching csdl dc service infos + */ + public java.util.List findByUuid_C(String uuid, + long companyId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + public CsdlDcServiceInfo findByUuid_C_First(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchCsdlDcServiceInfoException; + + /** + * Returns the first csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public CsdlDcServiceInfo fetchByUuid_C_First(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + public CsdlDcServiceInfo findByUuid_C_Last(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchCsdlDcServiceInfoException; + + /** + * Returns the last csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public CsdlDcServiceInfo fetchByUuid_C_Last(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the csdl dc service infos before and after the current csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param idDcService the primary key of the current csdl dc service info + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a csdl dc service info with the primary key could not be found + */ + public CsdlDcServiceInfo[] findByUuid_C_PrevAndNext(long idDcService, + String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchCsdlDcServiceInfoException; + + /** + * Removes all the csdl dc service infos where uuid = ? and companyId = ? from the database. + * + * @param uuid the uuid + * @param companyId the company ID + */ + public void removeByUuid_C(String uuid, long companyId); + + /** + * Returns the number of csdl dc service infos where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the number of matching csdl dc service infos + */ + public int countByUuid_C(String uuid, long companyId); + + /** + * Returns the csdl dc service info where serviceCode = ? and status = ? or throws a {@link NoSuchCsdlDcServiceInfoException} if it could not be found. + * + * @param serviceCode the service code + * @param status the status + * @return the matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + public CsdlDcServiceInfo findByF_SERVICECODE_STATUS(String serviceCode, + int status) throws NoSuchCsdlDcServiceInfoException; + + /** + * Returns the csdl dc service info where serviceCode = ? and status = ? or returns null if it could not be found. Uses the finder cache. + * + * @param serviceCode the service code + * @param status the status + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public CsdlDcServiceInfo fetchByF_SERVICECODE_STATUS(String serviceCode, + int status); + + /** + * Returns the csdl dc service info where serviceCode = ? and status = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param serviceCode the service code + * @param status the status + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public CsdlDcServiceInfo fetchByF_SERVICECODE_STATUS(String serviceCode, + int status, boolean retrieveFromCache); + + /** + * Removes the csdl dc service info where serviceCode = ? and status = ? from the database. + * + * @param serviceCode the service code + * @param status the status + * @return the csdl dc service info that was removed + */ + public CsdlDcServiceInfo removeByF_SERVICECODE_STATUS(String serviceCode, + int status) throws NoSuchCsdlDcServiceInfoException; + + /** + * Returns the number of csdl dc service infos where serviceCode = ? and status = ?. + * + * @param serviceCode the service code + * @param status the status + * @return the number of matching csdl dc service infos + */ + public int countByF_SERVICECODE_STATUS(String serviceCode, int status); + + /** + * Caches the csdl dc service info in the entity cache if it is enabled. + * + * @param csdlDcServiceInfo the csdl dc service info + */ + public void cacheResult(CsdlDcServiceInfo csdlDcServiceInfo); + + /** + * Caches the csdl dc service infos in the entity cache if it is enabled. + * + * @param csdlDcServiceInfos the csdl dc service infos + */ + public void cacheResult( + java.util.List csdlDcServiceInfos); + + /** + * Creates a new csdl dc service info with the primary key. Does not add the csdl dc service info to the database. + * + * @param idDcService the primary key for the new csdl dc service info + * @return the new csdl dc service info + */ + public CsdlDcServiceInfo create(long idDcService); + + /** + * Removes the csdl dc service info with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info that was removed + * @throws NoSuchCsdlDcServiceInfoException if a csdl dc service info with the primary key could not be found + */ + public CsdlDcServiceInfo remove(long idDcService) + throws NoSuchCsdlDcServiceInfoException; + + public CsdlDcServiceInfo updateImpl(CsdlDcServiceInfo csdlDcServiceInfo); + + /** + * Returns the csdl dc service info with the primary key or throws a {@link NoSuchCsdlDcServiceInfoException} if it could not be found. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a csdl dc service info with the primary key could not be found + */ + public CsdlDcServiceInfo findByPrimaryKey(long idDcService) + throws NoSuchCsdlDcServiceInfoException; + + /** + * Returns the csdl dc service info with the primary key or returns null if it could not be found. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info, or null if a csdl dc service info with the primary key could not be found + */ + public CsdlDcServiceInfo fetchByPrimaryKey(long idDcService); + + @Override + public java.util.Map fetchByPrimaryKeys( + java.util.Set primaryKeys); + + /** + * Returns all the csdl dc service infos. + * + * @return the csdl dc service infos + */ + public java.util.List findAll(); + + /** + * Returns a range of all the csdl dc service infos. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @return the range of csdl dc service infos + */ + public java.util.List findAll(int start, int end); + + /** + * Returns an ordered range of all the csdl dc service infos. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of csdl dc service infos + */ + public java.util.List findAll(int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the csdl dc service infos. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of csdl dc service infos + */ + public java.util.List findAll(int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Removes all the csdl dc service infos from the database. + */ + public void removeAll(); + + /** + * Returns the number of csdl dc service infos. + * + * @return the number of csdl dc service infos + */ + public int countAll(); + + @Override + public java.util.Set getBadColumnNames(); +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/CsdlDcServiceInfoUtil.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/CsdlDcServiceInfoUtil.java new file mode 100644 index 0000000000..3bc5887a28 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/CsdlDcServiceInfoUtil.java @@ -0,0 +1,739 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.util.OrderByComparator; + +import org.opencps.dossiermgt.model.CsdlDcServiceInfo; + +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; + +import org.osgi.util.tracker.ServiceTracker; + +import java.util.List; + +/** + * The persistence utility for the csdl dc service info service. This utility wraps {@link org.opencps.dossiermgt.service.persistence.impl.CsdlDcServiceInfoPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author huymq + * @see CsdlDcServiceInfoPersistence + * @see org.opencps.dossiermgt.service.persistence.impl.CsdlDcServiceInfoPersistenceImpl + * @generated + */ +@ProviderType +public class CsdlDcServiceInfoUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache() + */ + public static void clearCache() { + getPersistence().clearCache(); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache(com.liferay.portal.kernel.model.BaseModel) + */ + public static void clearCache(CsdlDcServiceInfo csdlDcServiceInfo) { + getPersistence().clearCache(csdlDcServiceInfo); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) + */ + public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { + return getPersistence().countWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery) { + return getPersistence().findWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end) { + return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findWithDynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel) + */ + public static CsdlDcServiceInfo update(CsdlDcServiceInfo csdlDcServiceInfo) { + return getPersistence().update(csdlDcServiceInfo); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel, ServiceContext) + */ + public static CsdlDcServiceInfo update( + CsdlDcServiceInfo csdlDcServiceInfo, ServiceContext serviceContext) { + return getPersistence().update(csdlDcServiceInfo, serviceContext); + } + + /** + * Returns all the csdl dc service infos where uuid = ?. + * + * @param uuid the uuid + * @return the matching csdl dc service infos + */ + public static List findByUuid(String uuid) { + return getPersistence().findByUuid(uuid); + } + + /** + * Returns a range of all the csdl dc service infos where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @return the range of matching csdl dc service infos + */ + public static List findByUuid(String uuid, int start, + int end) { + return getPersistence().findByUuid(uuid, start, end); + } + + /** + * Returns an ordered range of all the csdl dc service infos where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching csdl dc service infos + */ + public static List findByUuid(String uuid, int start, + int end, OrderByComparator orderByComparator) { + return getPersistence().findByUuid(uuid, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the csdl dc service infos where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching csdl dc service infos + */ + public static List findByUuid(String uuid, int start, + int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByUuid(uuid, start, end, orderByComparator, + retrieveFromCache); + } + + /** + * Returns the first csdl dc service info in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + public static CsdlDcServiceInfo findByUuid_First(String uuid, + OrderByComparator orderByComparator) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException { + return getPersistence().findByUuid_First(uuid, orderByComparator); + } + + /** + * Returns the first csdl dc service info in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public static CsdlDcServiceInfo fetchByUuid_First(String uuid, + OrderByComparator orderByComparator) { + return getPersistence().fetchByUuid_First(uuid, orderByComparator); + } + + /** + * Returns the last csdl dc service info in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + public static CsdlDcServiceInfo findByUuid_Last(String uuid, + OrderByComparator orderByComparator) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException { + return getPersistence().findByUuid_Last(uuid, orderByComparator); + } + + /** + * Returns the last csdl dc service info in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public static CsdlDcServiceInfo fetchByUuid_Last(String uuid, + OrderByComparator orderByComparator) { + return getPersistence().fetchByUuid_Last(uuid, orderByComparator); + } + + /** + * Returns the csdl dc service infos before and after the current csdl dc service info in the ordered set where uuid = ?. + * + * @param idDcService the primary key of the current csdl dc service info + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a csdl dc service info with the primary key could not be found + */ + public static CsdlDcServiceInfo[] findByUuid_PrevAndNext(long idDcService, + String uuid, OrderByComparator orderByComparator) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException { + return getPersistence() + .findByUuid_PrevAndNext(idDcService, uuid, orderByComparator); + } + + /** + * Removes all the csdl dc service infos where uuid = ? from the database. + * + * @param uuid the uuid + */ + public static void removeByUuid(String uuid) { + getPersistence().removeByUuid(uuid); + } + + /** + * Returns the number of csdl dc service infos where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching csdl dc service infos + */ + public static int countByUuid(String uuid) { + return getPersistence().countByUuid(uuid); + } + + /** + * Returns the csdl dc service info where uuid = ? and groupId = ? or throws a {@link NoSuchCsdlDcServiceInfoException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + public static CsdlDcServiceInfo findByUUID_G(String uuid, long groupId) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException { + return getPersistence().findByUUID_G(uuid, groupId); + } + + /** + * Returns the csdl dc service info where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public static CsdlDcServiceInfo fetchByUUID_G(String uuid, long groupId) { + return getPersistence().fetchByUUID_G(uuid, groupId); + } + + /** + * Returns the csdl dc service info where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public static CsdlDcServiceInfo fetchByUUID_G(String uuid, long groupId, + boolean retrieveFromCache) { + return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); + } + + /** + * Removes the csdl dc service info where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the csdl dc service info that was removed + */ + public static CsdlDcServiceInfo removeByUUID_G(String uuid, long groupId) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException { + return getPersistence().removeByUUID_G(uuid, groupId); + } + + /** + * Returns the number of csdl dc service infos where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching csdl dc service infos + */ + public static int countByUUID_G(String uuid, long groupId) { + return getPersistence().countByUUID_G(uuid, groupId); + } + + /** + * Returns all the csdl dc service infos where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the matching csdl dc service infos + */ + public static List findByUuid_C(String uuid, + long companyId) { + return getPersistence().findByUuid_C(uuid, companyId); + } + + /** + * Returns a range of all the csdl dc service infos where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @return the range of matching csdl dc service infos + */ + public static List findByUuid_C(String uuid, + long companyId, int start, int end) { + return getPersistence().findByUuid_C(uuid, companyId, start, end); + } + + /** + * Returns an ordered range of all the csdl dc service infos where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching csdl dc service infos + */ + public static List findByUuid_C(String uuid, + long companyId, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByUuid_C(uuid, companyId, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the csdl dc service infos where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching csdl dc service infos + */ + public static List findByUuid_C(String uuid, + long companyId, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByUuid_C(uuid, companyId, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + public static CsdlDcServiceInfo findByUuid_C_First(String uuid, + long companyId, OrderByComparator orderByComparator) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException { + return getPersistence() + .findByUuid_C_First(uuid, companyId, orderByComparator); + } + + /** + * Returns the first csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public static CsdlDcServiceInfo fetchByUuid_C_First(String uuid, + long companyId, OrderByComparator orderByComparator) { + return getPersistence() + .fetchByUuid_C_First(uuid, companyId, orderByComparator); + } + + /** + * Returns the last csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + public static CsdlDcServiceInfo findByUuid_C_Last(String uuid, + long companyId, OrderByComparator orderByComparator) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException { + return getPersistence() + .findByUuid_C_Last(uuid, companyId, orderByComparator); + } + + /** + * Returns the last csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public static CsdlDcServiceInfo fetchByUuid_C_Last(String uuid, + long companyId, OrderByComparator orderByComparator) { + return getPersistence() + .fetchByUuid_C_Last(uuid, companyId, orderByComparator); + } + + /** + * Returns the csdl dc service infos before and after the current csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param idDcService the primary key of the current csdl dc service info + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a csdl dc service info with the primary key could not be found + */ + public static CsdlDcServiceInfo[] findByUuid_C_PrevAndNext( + long idDcService, String uuid, long companyId, + OrderByComparator orderByComparator) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException { + return getPersistence() + .findByUuid_C_PrevAndNext(idDcService, uuid, companyId, + orderByComparator); + } + + /** + * Removes all the csdl dc service infos where uuid = ? and companyId = ? from the database. + * + * @param uuid the uuid + * @param companyId the company ID + */ + public static void removeByUuid_C(String uuid, long companyId) { + getPersistence().removeByUuid_C(uuid, companyId); + } + + /** + * Returns the number of csdl dc service infos where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the number of matching csdl dc service infos + */ + public static int countByUuid_C(String uuid, long companyId) { + return getPersistence().countByUuid_C(uuid, companyId); + } + + /** + * Returns the csdl dc service info where serviceCode = ? and status = ? or throws a {@link NoSuchCsdlDcServiceInfoException} if it could not be found. + * + * @param serviceCode the service code + * @param status the status + * @return the matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + public static CsdlDcServiceInfo findByF_SERVICECODE_STATUS( + String serviceCode, int status) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException { + return getPersistence().findByF_SERVICECODE_STATUS(serviceCode, status); + } + + /** + * Returns the csdl dc service info where serviceCode = ? and status = ? or returns null if it could not be found. Uses the finder cache. + * + * @param serviceCode the service code + * @param status the status + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public static CsdlDcServiceInfo fetchByF_SERVICECODE_STATUS( + String serviceCode, int status) { + return getPersistence().fetchByF_SERVICECODE_STATUS(serviceCode, status); + } + + /** + * Returns the csdl dc service info where serviceCode = ? and status = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param serviceCode the service code + * @param status the status + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + public static CsdlDcServiceInfo fetchByF_SERVICECODE_STATUS( + String serviceCode, int status, boolean retrieveFromCache) { + return getPersistence() + .fetchByF_SERVICECODE_STATUS(serviceCode, status, + retrieveFromCache); + } + + /** + * Removes the csdl dc service info where serviceCode = ? and status = ? from the database. + * + * @param serviceCode the service code + * @param status the status + * @return the csdl dc service info that was removed + */ + public static CsdlDcServiceInfo removeByF_SERVICECODE_STATUS( + String serviceCode, int status) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException { + return getPersistence().removeByF_SERVICECODE_STATUS(serviceCode, status); + } + + /** + * Returns the number of csdl dc service infos where serviceCode = ? and status = ?. + * + * @param serviceCode the service code + * @param status the status + * @return the number of matching csdl dc service infos + */ + public static int countByF_SERVICECODE_STATUS(String serviceCode, int status) { + return getPersistence().countByF_SERVICECODE_STATUS(serviceCode, status); + } + + /** + * Caches the csdl dc service info in the entity cache if it is enabled. + * + * @param csdlDcServiceInfo the csdl dc service info + */ + public static void cacheResult(CsdlDcServiceInfo csdlDcServiceInfo) { + getPersistence().cacheResult(csdlDcServiceInfo); + } + + /** + * Caches the csdl dc service infos in the entity cache if it is enabled. + * + * @param csdlDcServiceInfos the csdl dc service infos + */ + public static void cacheResult(List csdlDcServiceInfos) { + getPersistence().cacheResult(csdlDcServiceInfos); + } + + /** + * Creates a new csdl dc service info with the primary key. Does not add the csdl dc service info to the database. + * + * @param idDcService the primary key for the new csdl dc service info + * @return the new csdl dc service info + */ + public static CsdlDcServiceInfo create(long idDcService) { + return getPersistence().create(idDcService); + } + + /** + * Removes the csdl dc service info with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info that was removed + * @throws NoSuchCsdlDcServiceInfoException if a csdl dc service info with the primary key could not be found + */ + public static CsdlDcServiceInfo remove(long idDcService) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException { + return getPersistence().remove(idDcService); + } + + public static CsdlDcServiceInfo updateImpl( + CsdlDcServiceInfo csdlDcServiceInfo) { + return getPersistence().updateImpl(csdlDcServiceInfo); + } + + /** + * Returns the csdl dc service info with the primary key or throws a {@link NoSuchCsdlDcServiceInfoException} if it could not be found. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a csdl dc service info with the primary key could not be found + */ + public static CsdlDcServiceInfo findByPrimaryKey(long idDcService) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException { + return getPersistence().findByPrimaryKey(idDcService); + } + + /** + * Returns the csdl dc service info with the primary key or returns null if it could not be found. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info, or null if a csdl dc service info with the primary key could not be found + */ + public static CsdlDcServiceInfo fetchByPrimaryKey(long idDcService) { + return getPersistence().fetchByPrimaryKey(idDcService); + } + + public static java.util.Map fetchByPrimaryKeys( + java.util.Set primaryKeys) { + return getPersistence().fetchByPrimaryKeys(primaryKeys); + } + + /** + * Returns all the csdl dc service infos. + * + * @return the csdl dc service infos + */ + public static List findAll() { + return getPersistence().findAll(); + } + + /** + * Returns a range of all the csdl dc service infos. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @return the range of csdl dc service infos + */ + public static List findAll(int start, int end) { + return getPersistence().findAll(start, end); + } + + /** + * Returns an ordered range of all the csdl dc service infos. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of csdl dc service infos + */ + public static List findAll(int start, int end, + OrderByComparator orderByComparator) { + return getPersistence().findAll(start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the csdl dc service infos. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of csdl dc service infos + */ + public static List findAll(int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findAll(start, end, orderByComparator, retrieveFromCache); + } + + /** + * Removes all the csdl dc service infos from the database. + */ + public static void removeAll() { + getPersistence().removeAll(); + } + + /** + * Returns the number of csdl dc service infos. + * + * @return the number of csdl dc service infos + */ + public static int countAll() { + return getPersistence().countAll(); + } + + public static java.util.Set getBadColumnNames() { + return getPersistence().getBadColumnNames(); + } + + public static CsdlDcServiceInfoPersistence getPersistence() { + return _serviceTracker.getService(); + } + + private static ServiceTracker _serviceTracker; + + static { + Bundle bundle = FrameworkUtil.getBundle(CsdlDcServiceInfoPersistence.class); + + ServiceTracker serviceTracker = + new ServiceTracker(bundle.getBundleContext(), + CsdlDcServiceInfoPersistence.class, null); + + serviceTracker.open(); + + _serviceTracker = serviceTracker; + } +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/CsdlDcUserPersistence.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/CsdlDcUserPersistence.java new file mode 100644 index 0000000000..b4e87c1ddb --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/CsdlDcUserPersistence.java @@ -0,0 +1,545 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.service.persistence.BasePersistence; + +import org.opencps.dossiermgt.exception.NoSuchCsdlDcUserException; +import org.opencps.dossiermgt.model.CsdlDcUser; + +/** + * The persistence interface for the csdl dc user service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author huymq + * @see org.opencps.dossiermgt.service.persistence.impl.CsdlDcUserPersistenceImpl + * @see CsdlDcUserUtil + * @generated + */ +@ProviderType +public interface CsdlDcUserPersistence extends BasePersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link CsdlDcUserUtil} to access the csdl dc user persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. + */ + + /** + * Returns all the csdl dc users where uuid = ?. + * + * @param uuid the uuid + * @return the matching csdl dc users + */ + public java.util.List findByUuid(String uuid); + + /** + * Returns a range of all the csdl dc users where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @return the range of matching csdl dc users + */ + public java.util.List findByUuid(String uuid, int start, int end); + + /** + * Returns an ordered range of all the csdl dc users where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching csdl dc users + */ + public java.util.List findByUuid(String uuid, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the csdl dc users where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching csdl dc users + */ + public java.util.List findByUuid(String uuid, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first csdl dc user in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + public CsdlDcUser findByUuid_First(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchCsdlDcUserException; + + /** + * Returns the first csdl dc user in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public CsdlDcUser fetchByUuid_First(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last csdl dc user in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + public CsdlDcUser findByUuid_Last(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchCsdlDcUserException; + + /** + * Returns the last csdl dc user in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public CsdlDcUser fetchByUuid_Last(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the csdl dc users before and after the current csdl dc user in the ordered set where uuid = ?. + * + * @param idDcUser the primary key of the current csdl dc user + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next csdl dc user + * @throws NoSuchCsdlDcUserException if a csdl dc user with the primary key could not be found + */ + public CsdlDcUser[] findByUuid_PrevAndNext(long idDcUser, String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchCsdlDcUserException; + + /** + * Removes all the csdl dc users where uuid = ? from the database. + * + * @param uuid the uuid + */ + public void removeByUuid(String uuid); + + /** + * Returns the number of csdl dc users where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching csdl dc users + */ + public int countByUuid(String uuid); + + /** + * Returns the csdl dc user where uuid = ? and groupId = ? or throws a {@link NoSuchCsdlDcUserException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + public CsdlDcUser findByUUID_G(String uuid, long groupId) + throws NoSuchCsdlDcUserException; + + /** + * Returns the csdl dc user where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public CsdlDcUser fetchByUUID_G(String uuid, long groupId); + + /** + * Returns the csdl dc user where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public CsdlDcUser fetchByUUID_G(String uuid, long groupId, + boolean retrieveFromCache); + + /** + * Removes the csdl dc user where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the csdl dc user that was removed + */ + public CsdlDcUser removeByUUID_G(String uuid, long groupId) + throws NoSuchCsdlDcUserException; + + /** + * Returns the number of csdl dc users where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching csdl dc users + */ + public int countByUUID_G(String uuid, long groupId); + + /** + * Returns all the csdl dc users where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the matching csdl dc users + */ + public java.util.List findByUuid_C(String uuid, long companyId); + + /** + * Returns a range of all the csdl dc users where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @return the range of matching csdl dc users + */ + public java.util.List findByUuid_C(String uuid, long companyId, + int start, int end); + + /** + * Returns an ordered range of all the csdl dc users where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching csdl dc users + */ + public java.util.List findByUuid_C(String uuid, long companyId, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the csdl dc users where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching csdl dc users + */ + public java.util.List findByUuid_C(String uuid, long companyId, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + public CsdlDcUser findByUuid_C_First(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchCsdlDcUserException; + + /** + * Returns the first csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public CsdlDcUser fetchByUuid_C_First(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + public CsdlDcUser findByUuid_C_Last(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchCsdlDcUserException; + + /** + * Returns the last csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public CsdlDcUser fetchByUuid_C_Last(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the csdl dc users before and after the current csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param idDcUser the primary key of the current csdl dc user + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next csdl dc user + * @throws NoSuchCsdlDcUserException if a csdl dc user with the primary key could not be found + */ + public CsdlDcUser[] findByUuid_C_PrevAndNext(long idDcUser, String uuid, + long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchCsdlDcUserException; + + /** + * Removes all the csdl dc users where uuid = ? and companyId = ? from the database. + * + * @param uuid the uuid + * @param companyId the company ID + */ + public void removeByUuid_C(String uuid, long companyId); + + /** + * Returns the number of csdl dc users where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the number of matching csdl dc users + */ + public int countByUuid_C(String uuid, long companyId); + + /** + * Returns the csdl dc user where govAgencyCode = ? and employeeEmail = ? and status = ? or throws a {@link NoSuchCsdlDcUserException} if it could not be found. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @return the matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + public CsdlDcUser findByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status) throws NoSuchCsdlDcUserException; + + /** + * Returns the csdl dc user where govAgencyCode = ? and employeeEmail = ? and status = ? or returns null if it could not be found. Uses the finder cache. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public CsdlDcUser fetchByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status); + + /** + * Returns the csdl dc user where govAgencyCode = ? and employeeEmail = ? and status = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public CsdlDcUser fetchByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status, boolean retrieveFromCache); + + /** + * Removes the csdl dc user where govAgencyCode = ? and employeeEmail = ? and status = ? from the database. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @return the csdl dc user that was removed + */ + public CsdlDcUser removeByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status) throws NoSuchCsdlDcUserException; + + /** + * Returns the number of csdl dc users where govAgencyCode = ? and employeeEmail = ? and status = ?. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @return the number of matching csdl dc users + */ + public int countByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status); + + /** + * Caches the csdl dc user in the entity cache if it is enabled. + * + * @param csdlDcUser the csdl dc user + */ + public void cacheResult(CsdlDcUser csdlDcUser); + + /** + * Caches the csdl dc users in the entity cache if it is enabled. + * + * @param csdlDcUsers the csdl dc users + */ + public void cacheResult(java.util.List csdlDcUsers); + + /** + * Creates a new csdl dc user with the primary key. Does not add the csdl dc user to the database. + * + * @param idDcUser the primary key for the new csdl dc user + * @return the new csdl dc user + */ + public CsdlDcUser create(long idDcUser); + + /** + * Removes the csdl dc user with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user that was removed + * @throws NoSuchCsdlDcUserException if a csdl dc user with the primary key could not be found + */ + public CsdlDcUser remove(long idDcUser) throws NoSuchCsdlDcUserException; + + public CsdlDcUser updateImpl(CsdlDcUser csdlDcUser); + + /** + * Returns the csdl dc user with the primary key or throws a {@link NoSuchCsdlDcUserException} if it could not be found. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user + * @throws NoSuchCsdlDcUserException if a csdl dc user with the primary key could not be found + */ + public CsdlDcUser findByPrimaryKey(long idDcUser) + throws NoSuchCsdlDcUserException; + + /** + * Returns the csdl dc user with the primary key or returns null if it could not be found. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user, or null if a csdl dc user with the primary key could not be found + */ + public CsdlDcUser fetchByPrimaryKey(long idDcUser); + + @Override + public java.util.Map fetchByPrimaryKeys( + java.util.Set primaryKeys); + + /** + * Returns all the csdl dc users. + * + * @return the csdl dc users + */ + public java.util.List findAll(); + + /** + * Returns a range of all the csdl dc users. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @return the range of csdl dc users + */ + public java.util.List findAll(int start, int end); + + /** + * Returns an ordered range of all the csdl dc users. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of csdl dc users + */ + public java.util.List findAll(int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the csdl dc users. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of csdl dc users + */ + public java.util.List findAll(int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Removes all the csdl dc users from the database. + */ + public void removeAll(); + + /** + * Returns the number of csdl dc users. + * + * @return the number of csdl dc users + */ + public int countAll(); + + @Override + public java.util.Set getBadColumnNames(); +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/CsdlDcUserUtil.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/CsdlDcUserUtil.java new file mode 100644 index 0000000000..bf1db8e00f --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/CsdlDcUserUtil.java @@ -0,0 +1,748 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.util.OrderByComparator; + +import org.opencps.dossiermgt.model.CsdlDcUser; + +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; + +import org.osgi.util.tracker.ServiceTracker; + +import java.util.List; + +/** + * The persistence utility for the csdl dc user service. This utility wraps {@link org.opencps.dossiermgt.service.persistence.impl.CsdlDcUserPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author huymq + * @see CsdlDcUserPersistence + * @see org.opencps.dossiermgt.service.persistence.impl.CsdlDcUserPersistenceImpl + * @generated + */ +@ProviderType +public class CsdlDcUserUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache() + */ + public static void clearCache() { + getPersistence().clearCache(); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache(com.liferay.portal.kernel.model.BaseModel) + */ + public static void clearCache(CsdlDcUser csdlDcUser) { + getPersistence().clearCache(csdlDcUser); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) + */ + public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { + return getPersistence().countWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery) { + return getPersistence().findWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end) { + return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findWithDynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel) + */ + public static CsdlDcUser update(CsdlDcUser csdlDcUser) { + return getPersistence().update(csdlDcUser); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel, ServiceContext) + */ + public static CsdlDcUser update(CsdlDcUser csdlDcUser, + ServiceContext serviceContext) { + return getPersistence().update(csdlDcUser, serviceContext); + } + + /** + * Returns all the csdl dc users where uuid = ?. + * + * @param uuid the uuid + * @return the matching csdl dc users + */ + public static List findByUuid(String uuid) { + return getPersistence().findByUuid(uuid); + } + + /** + * Returns a range of all the csdl dc users where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @return the range of matching csdl dc users + */ + public static List findByUuid(String uuid, int start, int end) { + return getPersistence().findByUuid(uuid, start, end); + } + + /** + * Returns an ordered range of all the csdl dc users where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching csdl dc users + */ + public static List findByUuid(String uuid, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence().findByUuid(uuid, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the csdl dc users where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching csdl dc users + */ + public static List findByUuid(String uuid, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByUuid(uuid, start, end, orderByComparator, + retrieveFromCache); + } + + /** + * Returns the first csdl dc user in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + public static CsdlDcUser findByUuid_First(String uuid, + OrderByComparator orderByComparator) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcUserException { + return getPersistence().findByUuid_First(uuid, orderByComparator); + } + + /** + * Returns the first csdl dc user in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public static CsdlDcUser fetchByUuid_First(String uuid, + OrderByComparator orderByComparator) { + return getPersistence().fetchByUuid_First(uuid, orderByComparator); + } + + /** + * Returns the last csdl dc user in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + public static CsdlDcUser findByUuid_Last(String uuid, + OrderByComparator orderByComparator) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcUserException { + return getPersistence().findByUuid_Last(uuid, orderByComparator); + } + + /** + * Returns the last csdl dc user in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public static CsdlDcUser fetchByUuid_Last(String uuid, + OrderByComparator orderByComparator) { + return getPersistence().fetchByUuid_Last(uuid, orderByComparator); + } + + /** + * Returns the csdl dc users before and after the current csdl dc user in the ordered set where uuid = ?. + * + * @param idDcUser the primary key of the current csdl dc user + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next csdl dc user + * @throws NoSuchCsdlDcUserException if a csdl dc user with the primary key could not be found + */ + public static CsdlDcUser[] findByUuid_PrevAndNext(long idDcUser, + String uuid, OrderByComparator orderByComparator) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcUserException { + return getPersistence() + .findByUuid_PrevAndNext(idDcUser, uuid, orderByComparator); + } + + /** + * Removes all the csdl dc users where uuid = ? from the database. + * + * @param uuid the uuid + */ + public static void removeByUuid(String uuid) { + getPersistence().removeByUuid(uuid); + } + + /** + * Returns the number of csdl dc users where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching csdl dc users + */ + public static int countByUuid(String uuid) { + return getPersistence().countByUuid(uuid); + } + + /** + * Returns the csdl dc user where uuid = ? and groupId = ? or throws a {@link NoSuchCsdlDcUserException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + public static CsdlDcUser findByUUID_G(String uuid, long groupId) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcUserException { + return getPersistence().findByUUID_G(uuid, groupId); + } + + /** + * Returns the csdl dc user where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public static CsdlDcUser fetchByUUID_G(String uuid, long groupId) { + return getPersistence().fetchByUUID_G(uuid, groupId); + } + + /** + * Returns the csdl dc user where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public static CsdlDcUser fetchByUUID_G(String uuid, long groupId, + boolean retrieveFromCache) { + return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); + } + + /** + * Removes the csdl dc user where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the csdl dc user that was removed + */ + public static CsdlDcUser removeByUUID_G(String uuid, long groupId) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcUserException { + return getPersistence().removeByUUID_G(uuid, groupId); + } + + /** + * Returns the number of csdl dc users where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching csdl dc users + */ + public static int countByUUID_G(String uuid, long groupId) { + return getPersistence().countByUUID_G(uuid, groupId); + } + + /** + * Returns all the csdl dc users where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the matching csdl dc users + */ + public static List findByUuid_C(String uuid, long companyId) { + return getPersistence().findByUuid_C(uuid, companyId); + } + + /** + * Returns a range of all the csdl dc users where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @return the range of matching csdl dc users + */ + public static List findByUuid_C(String uuid, long companyId, + int start, int end) { + return getPersistence().findByUuid_C(uuid, companyId, start, end); + } + + /** + * Returns an ordered range of all the csdl dc users where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching csdl dc users + */ + public static List findByUuid_C(String uuid, long companyId, + int start, int end, OrderByComparator orderByComparator) { + return getPersistence() + .findByUuid_C(uuid, companyId, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the csdl dc users where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching csdl dc users + */ + public static List findByUuid_C(String uuid, long companyId, + int start, int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByUuid_C(uuid, companyId, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + public static CsdlDcUser findByUuid_C_First(String uuid, long companyId, + OrderByComparator orderByComparator) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcUserException { + return getPersistence() + .findByUuid_C_First(uuid, companyId, orderByComparator); + } + + /** + * Returns the first csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public static CsdlDcUser fetchByUuid_C_First(String uuid, long companyId, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByUuid_C_First(uuid, companyId, orderByComparator); + } + + /** + * Returns the last csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + public static CsdlDcUser findByUuid_C_Last(String uuid, long companyId, + OrderByComparator orderByComparator) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcUserException { + return getPersistence() + .findByUuid_C_Last(uuid, companyId, orderByComparator); + } + + /** + * Returns the last csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public static CsdlDcUser fetchByUuid_C_Last(String uuid, long companyId, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByUuid_C_Last(uuid, companyId, orderByComparator); + } + + /** + * Returns the csdl dc users before and after the current csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param idDcUser the primary key of the current csdl dc user + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next csdl dc user + * @throws NoSuchCsdlDcUserException if a csdl dc user with the primary key could not be found + */ + public static CsdlDcUser[] findByUuid_C_PrevAndNext(long idDcUser, + String uuid, long companyId, + OrderByComparator orderByComparator) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcUserException { + return getPersistence() + .findByUuid_C_PrevAndNext(idDcUser, uuid, companyId, + orderByComparator); + } + + /** + * Removes all the csdl dc users where uuid = ? and companyId = ? from the database. + * + * @param uuid the uuid + * @param companyId the company ID + */ + public static void removeByUuid_C(String uuid, long companyId) { + getPersistence().removeByUuid_C(uuid, companyId); + } + + /** + * Returns the number of csdl dc users where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the number of matching csdl dc users + */ + public static int countByUuid_C(String uuid, long companyId) { + return getPersistence().countByUuid_C(uuid, companyId); + } + + /** + * Returns the csdl dc user where govAgencyCode = ? and employeeEmail = ? and status = ? or throws a {@link NoSuchCsdlDcUserException} if it could not be found. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @return the matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + public static CsdlDcUser findByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcUserException { + return getPersistence() + .findByF_GOV_EMAIL_STATUS(govAgencyCode, employeeEmail, + status); + } + + /** + * Returns the csdl dc user where govAgencyCode = ? and employeeEmail = ? and status = ? or returns null if it could not be found. Uses the finder cache. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public static CsdlDcUser fetchByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status) { + return getPersistence() + .fetchByF_GOV_EMAIL_STATUS(govAgencyCode, employeeEmail, + status); + } + + /** + * Returns the csdl dc user where govAgencyCode = ? and employeeEmail = ? and status = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + public static CsdlDcUser fetchByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status, boolean retrieveFromCache) { + return getPersistence() + .fetchByF_GOV_EMAIL_STATUS(govAgencyCode, employeeEmail, + status, retrieveFromCache); + } + + /** + * Removes the csdl dc user where govAgencyCode = ? and employeeEmail = ? and status = ? from the database. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @return the csdl dc user that was removed + */ + public static CsdlDcUser removeByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcUserException { + return getPersistence() + .removeByF_GOV_EMAIL_STATUS(govAgencyCode, employeeEmail, + status); + } + + /** + * Returns the number of csdl dc users where govAgencyCode = ? and employeeEmail = ? and status = ?. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @return the number of matching csdl dc users + */ + public static int countByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status) { + return getPersistence() + .countByF_GOV_EMAIL_STATUS(govAgencyCode, employeeEmail, + status); + } + + /** + * Caches the csdl dc user in the entity cache if it is enabled. + * + * @param csdlDcUser the csdl dc user + */ + public static void cacheResult(CsdlDcUser csdlDcUser) { + getPersistence().cacheResult(csdlDcUser); + } + + /** + * Caches the csdl dc users in the entity cache if it is enabled. + * + * @param csdlDcUsers the csdl dc users + */ + public static void cacheResult(List csdlDcUsers) { + getPersistence().cacheResult(csdlDcUsers); + } + + /** + * Creates a new csdl dc user with the primary key. Does not add the csdl dc user to the database. + * + * @param idDcUser the primary key for the new csdl dc user + * @return the new csdl dc user + */ + public static CsdlDcUser create(long idDcUser) { + return getPersistence().create(idDcUser); + } + + /** + * Removes the csdl dc user with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user that was removed + * @throws NoSuchCsdlDcUserException if a csdl dc user with the primary key could not be found + */ + public static CsdlDcUser remove(long idDcUser) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcUserException { + return getPersistence().remove(idDcUser); + } + + public static CsdlDcUser updateImpl(CsdlDcUser csdlDcUser) { + return getPersistence().updateImpl(csdlDcUser); + } + + /** + * Returns the csdl dc user with the primary key or throws a {@link NoSuchCsdlDcUserException} if it could not be found. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user + * @throws NoSuchCsdlDcUserException if a csdl dc user with the primary key could not be found + */ + public static CsdlDcUser findByPrimaryKey(long idDcUser) + throws org.opencps.dossiermgt.exception.NoSuchCsdlDcUserException { + return getPersistence().findByPrimaryKey(idDcUser); + } + + /** + * Returns the csdl dc user with the primary key or returns null if it could not be found. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user, or null if a csdl dc user with the primary key could not be found + */ + public static CsdlDcUser fetchByPrimaryKey(long idDcUser) { + return getPersistence().fetchByPrimaryKey(idDcUser); + } + + public static java.util.Map fetchByPrimaryKeys( + java.util.Set primaryKeys) { + return getPersistence().fetchByPrimaryKeys(primaryKeys); + } + + /** + * Returns all the csdl dc users. + * + * @return the csdl dc users + */ + public static List findAll() { + return getPersistence().findAll(); + } + + /** + * Returns a range of all the csdl dc users. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @return the range of csdl dc users + */ + public static List findAll(int start, int end) { + return getPersistence().findAll(start, end); + } + + /** + * Returns an ordered range of all the csdl dc users. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of csdl dc users + */ + public static List findAll(int start, int end, + OrderByComparator orderByComparator) { + return getPersistence().findAll(start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the csdl dc users. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of csdl dc users + */ + public static List findAll(int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findAll(start, end, orderByComparator, retrieveFromCache); + } + + /** + * Removes all the csdl dc users from the database. + */ + public static void removeAll() { + getPersistence().removeAll(); + } + + /** + * Returns the number of csdl dc users. + * + * @return the number of csdl dc users + */ + public static int countAll() { + return getPersistence().countAll(); + } + + public static java.util.Set getBadColumnNames() { + return getPersistence().getBadColumnNames(); + } + + public static CsdlDcUserPersistence getPersistence() { + return _serviceTracker.getService(); + } + + private static ServiceTracker _serviceTracker; + + static { + Bundle bundle = FrameworkUtil.getBundle(CsdlDcUserPersistence.class); + + ServiceTracker serviceTracker = + new ServiceTracker(bundle.getBundleContext(), + CsdlDcUserPersistence.class, null); + + serviceTracker.open(); + + _serviceTracker = serviceTracker; + } +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/DossierFinder.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/DossierFinder.java index 99f5350fbe..2d0dc35d04 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/DossierFinder.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/DossierFinder.java @@ -33,4 +33,6 @@ public org.opencps.dossiermgt.model.Dossier findDossierByDeclarationCode( public org.opencps.dossiermgt.model.DossierDocument findDossierDocumentByDossierId( long dossierDocumentId); + + public org.opencps.dossiermgt.model.Dossier findDossierById(long dossierId); } \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/DossierMarkFinder.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/DossierMarkFinder.java new file mode 100644 index 0000000000..d5556f8b20 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/DossierMarkFinder.java @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +/** + * @author huymq + * @generated + */ +@ProviderType +public interface DossierMarkFinder { + public java.util.List findDossierMarkByDossierId( + long groupId, long dossierId); +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/ServiceConfigPersistence.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/ServiceConfigPersistence.java index 0de4dbeef8..4df0a284bf 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/ServiceConfigPersistence.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/ServiceConfigPersistence.java @@ -1128,69 +1128,166 @@ public ServiceConfig[] findByGID_LEVEL_PrevAndNext(long serviceConfigId, public int countByGID_LEVEL(long groupId, int serviceLevel); /** - * Returns the service config where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ? or throws a {@link NoSuchServiceConfigException} if it could not be found. + * Returns all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. * * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level - * @return the matching service config - * @throws NoSuchServiceConfigException if a matching service config could not be found + * @return the matching service configs */ - public ServiceConfig findByGID_SI_GOV_LEVEL(long groupId, - long serviceInfoId, String govAgencyCode, int serviceLevel) - throws NoSuchServiceConfigException; + public java.util.List findByGID_SI_GOV_LEVEL(long groupId, + long serviceInfoId, String govAgencyCode); /** - * Returns the service config where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ? or returns null if it could not be found. Uses the finder cache. + * Returns a range of all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ServiceConfigModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

* * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level - * @return the matching service config, or null if a matching service config could not be found + * @param start the lower bound of the range of service configs + * @param end the upper bound of the range of service configs (not inclusive) + * @return the range of matching service configs */ - public ServiceConfig fetchByGID_SI_GOV_LEVEL(long groupId, - long serviceInfoId, String govAgencyCode, int serviceLevel); + public java.util.List findByGID_SI_GOV_LEVEL(long groupId, + long serviceInfoId, String govAgencyCode, int start, int end); /** - * Returns the service config where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ? or returns null if it could not be found, optionally using the finder cache. + * Returns an ordered range of all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ServiceConfigModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

* * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level + * @param start the lower bound of the range of service configs + * @param end the upper bound of the range of service configs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching service configs + */ + public java.util.List findByGID_SI_GOV_LEVEL(long groupId, + long serviceInfoId, String govAgencyCode, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ServiceConfigModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param start the lower bound of the range of service configs + * @param end the upper bound of the range of service configs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) * @param retrieveFromCache whether to retrieve from the finder cache - * @return the matching service config, or null if a matching service config could not be found + * @return the ordered range of matching service configs */ - public ServiceConfig fetchByGID_SI_GOV_LEVEL(long groupId, - long serviceInfoId, String govAgencyCode, int serviceLevel, + public java.util.List findByGID_SI_GOV_LEVEL(long groupId, + long serviceInfoId, String govAgencyCode, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, boolean retrieveFromCache); /** - * Removes the service config where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ? from the database. + * Returns the first service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. * * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level - * @return the service config that was removed + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching service config + * @throws NoSuchServiceConfigException if a matching service config could not be found */ - public ServiceConfig removeByGID_SI_GOV_LEVEL(long groupId, - long serviceInfoId, String govAgencyCode, int serviceLevel) + public ServiceConfig findByGID_SI_GOV_LEVEL_First(long groupId, + long serviceInfoId, String govAgencyCode, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws NoSuchServiceConfigException; /** - * Returns the number of service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ?. + * Returns the first service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching service config, or null if a matching service config could not be found + */ + public ServiceConfig fetchByGID_SI_GOV_LEVEL_First(long groupId, + long serviceInfoId, String govAgencyCode, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching service config + * @throws NoSuchServiceConfigException if a matching service config could not be found + */ + public ServiceConfig findByGID_SI_GOV_LEVEL_Last(long groupId, + long serviceInfoId, String govAgencyCode, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchServiceConfigException; + + /** + * Returns the last service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching service config, or null if a matching service config could not be found + */ + public ServiceConfig fetchByGID_SI_GOV_LEVEL_Last(long groupId, + long serviceInfoId, String govAgencyCode, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the service configs before and after the current service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + * @param serviceConfigId the primary key of the current service config + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next service config + * @throws NoSuchServiceConfigException if a service config with the primary key could not be found + */ + public ServiceConfig[] findByGID_SI_GOV_LEVEL_PrevAndNext( + long serviceConfigId, long groupId, long serviceInfoId, + String govAgencyCode, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchServiceConfigException; + + /** + * Removes all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ? from the database. + * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + */ + public void removeByGID_SI_GOV_LEVEL(long groupId, long serviceInfoId, + String govAgencyCode); + + /** + * Returns the number of service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. * * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level * @return the number of matching service configs */ public int countByGID_SI_GOV_LEVEL(long groupId, long serviceInfoId, - String govAgencyCode, int serviceLevel); + String govAgencyCode); /** * Caches the service config in the entity cache if it is enabled. diff --git a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/ServiceConfigUtil.java b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/ServiceConfigUtil.java index 2deb86887c..48b84a7521 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/ServiceConfigUtil.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-api/src/main/java/org/opencps/dossiermgt/service/persistence/ServiceConfigUtil.java @@ -1432,88 +1432,206 @@ public static int countByGID_LEVEL(long groupId, int serviceLevel) { } /** - * Returns the service config where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ? or throws a {@link NoSuchServiceConfigException} if it could not be found. + * Returns all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. * * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level - * @return the matching service config - * @throws NoSuchServiceConfigException if a matching service config could not be found + * @return the matching service configs */ - public static ServiceConfig findByGID_SI_GOV_LEVEL(long groupId, - long serviceInfoId, String govAgencyCode, int serviceLevel) - throws org.opencps.dossiermgt.exception.NoSuchServiceConfigException { + public static List findByGID_SI_GOV_LEVEL(long groupId, + long serviceInfoId, String govAgencyCode) { + return getPersistence() + .findByGID_SI_GOV_LEVEL(groupId, serviceInfoId, govAgencyCode); + } + + /** + * Returns a range of all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ServiceConfigModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param start the lower bound of the range of service configs + * @param end the upper bound of the range of service configs (not inclusive) + * @return the range of matching service configs + */ + public static List findByGID_SI_GOV_LEVEL(long groupId, + long serviceInfoId, String govAgencyCode, int start, int end) { return getPersistence() .findByGID_SI_GOV_LEVEL(groupId, serviceInfoId, - govAgencyCode, serviceLevel); + govAgencyCode, start, end); } /** - * Returns the service config where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ? or returns null if it could not be found. Uses the finder cache. + * Returns an ordered range of all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ServiceConfigModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

* * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level - * @return the matching service config, or null if a matching service config could not be found + * @param start the lower bound of the range of service configs + * @param end the upper bound of the range of service configs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching service configs */ - public static ServiceConfig fetchByGID_SI_GOV_LEVEL(long groupId, - long serviceInfoId, String govAgencyCode, int serviceLevel) { + public static List findByGID_SI_GOV_LEVEL(long groupId, + long serviceInfoId, String govAgencyCode, int start, int end, + OrderByComparator orderByComparator) { return getPersistence() - .fetchByGID_SI_GOV_LEVEL(groupId, serviceInfoId, - govAgencyCode, serviceLevel); + .findByGID_SI_GOV_LEVEL(groupId, serviceInfoId, + govAgencyCode, start, end, orderByComparator); } /** - * Returns the service config where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ? or returns null if it could not be found, optionally using the finder cache. + * Returns an ordered range of all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ServiceConfigModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

* * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level + * @param start the lower bound of the range of service configs + * @param end the upper bound of the range of service configs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) * @param retrieveFromCache whether to retrieve from the finder cache - * @return the matching service config, or null if a matching service config could not be found + * @return the ordered range of matching service configs */ - public static ServiceConfig fetchByGID_SI_GOV_LEVEL(long groupId, - long serviceInfoId, String govAgencyCode, int serviceLevel, + public static List findByGID_SI_GOV_LEVEL(long groupId, + long serviceInfoId, String govAgencyCode, int start, int end, + OrderByComparator orderByComparator, boolean retrieveFromCache) { return getPersistence() - .fetchByGID_SI_GOV_LEVEL(groupId, serviceInfoId, - govAgencyCode, serviceLevel, retrieveFromCache); + .findByGID_SI_GOV_LEVEL(groupId, serviceInfoId, + govAgencyCode, start, end, orderByComparator, retrieveFromCache); } /** - * Removes the service config where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ? from the database. + * Returns the first service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. * * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level - * @return the service config that was removed + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching service config + * @throws NoSuchServiceConfigException if a matching service config could not be found */ - public static ServiceConfig removeByGID_SI_GOV_LEVEL(long groupId, - long serviceInfoId, String govAgencyCode, int serviceLevel) + public static ServiceConfig findByGID_SI_GOV_LEVEL_First(long groupId, + long serviceInfoId, String govAgencyCode, + OrderByComparator orderByComparator) throws org.opencps.dossiermgt.exception.NoSuchServiceConfigException { return getPersistence() - .removeByGID_SI_GOV_LEVEL(groupId, serviceInfoId, - govAgencyCode, serviceLevel); + .findByGID_SI_GOV_LEVEL_First(groupId, serviceInfoId, + govAgencyCode, orderByComparator); } /** - * Returns the number of service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ?. + * Returns the first service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching service config, or null if a matching service config could not be found + */ + public static ServiceConfig fetchByGID_SI_GOV_LEVEL_First(long groupId, + long serviceInfoId, String govAgencyCode, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByGID_SI_GOV_LEVEL_First(groupId, serviceInfoId, + govAgencyCode, orderByComparator); + } + + /** + * Returns the last service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching service config + * @throws NoSuchServiceConfigException if a matching service config could not be found + */ + public static ServiceConfig findByGID_SI_GOV_LEVEL_Last(long groupId, + long serviceInfoId, String govAgencyCode, + OrderByComparator orderByComparator) + throws org.opencps.dossiermgt.exception.NoSuchServiceConfigException { + return getPersistence() + .findByGID_SI_GOV_LEVEL_Last(groupId, serviceInfoId, + govAgencyCode, orderByComparator); + } + + /** + * Returns the last service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching service config, or null if a matching service config could not be found + */ + public static ServiceConfig fetchByGID_SI_GOV_LEVEL_Last(long groupId, + long serviceInfoId, String govAgencyCode, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByGID_SI_GOV_LEVEL_Last(groupId, serviceInfoId, + govAgencyCode, orderByComparator); + } + + /** + * Returns the service configs before and after the current service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + * @param serviceConfigId the primary key of the current service config + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next service config + * @throws NoSuchServiceConfigException if a service config with the primary key could not be found + */ + public static ServiceConfig[] findByGID_SI_GOV_LEVEL_PrevAndNext( + long serviceConfigId, long groupId, long serviceInfoId, + String govAgencyCode, OrderByComparator orderByComparator) + throws org.opencps.dossiermgt.exception.NoSuchServiceConfigException { + return getPersistence() + .findByGID_SI_GOV_LEVEL_PrevAndNext(serviceConfigId, + groupId, serviceInfoId, govAgencyCode, orderByComparator); + } + + /** + * Removes all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ? from the database. + * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + */ + public static void removeByGID_SI_GOV_LEVEL(long groupId, + long serviceInfoId, String govAgencyCode) { + getPersistence() + .removeByGID_SI_GOV_LEVEL(groupId, serviceInfoId, govAgencyCode); + } + + /** + * Returns the number of service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. * * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level * @return the number of matching service configs */ public static int countByGID_SI_GOV_LEVEL(long groupId, long serviceInfoId, - String govAgencyCode, int serviceLevel) { + String govAgencyCode) { return getPersistence() .countByGID_SI_GOV_LEVEL(groupId, serviceInfoId, - govAgencyCode, serviceLevel); + govAgencyCode); } /** diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/build.gradle b/modules/backend-dossiermgt/backend-dossiermgt-service/build.gradle index 1a09f41c0a..9cf99c67e3 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/build.gradle +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/build.gradle @@ -34,9 +34,6 @@ dependencies { compileOnly project(":modules:backend-admin-config:backend-admin-config-api") compileOnly project(":modules:backend-admin-config:backend-admin-config-service") - compileOnly project(":modules:backend-synctracking:backend-synctracking-api") - compileOnly project(":modules:backend-synctracking:backend-synctracking-service") - // https://mvnrepository.com/artifact/org.apache.commons/commons-text compileOnly group: 'org.apache.commons', name: 'commons-text', version: '1.8' diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/service.xml b/modules/backend-dossiermgt/backend-dossiermgt-service/service.xml index b882b35038..26e80d52da 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/service.xml +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/service.xml @@ -6,6 +6,68 @@ > huymq dossiermgt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -424,11 +486,10 @@ - + - diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/backend/dossiermgt/serviceapi/ApiThirdPartyServiceImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/backend/dossiermgt/serviceapi/ApiThirdPartyServiceImpl.java index 91c35f7059..1e25af526d 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/backend/dossiermgt/serviceapi/ApiThirdPartyServiceImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/backend/dossiermgt/serviceapi/ApiThirdPartyServiceImpl.java @@ -458,8 +458,9 @@ public JSONObject callApiAndTracking(String url, SyncTrackingInfo syncTrackingIn @Override public JSONObject callApiEncode(String url, HttpHeaders headers , MultiValueMap body, boolean isHTTPS, String lgspAccessToken) throws Exception{ - HttpsURLConnection conn = null; JSONObject result = JSONFactoryUtil.createJSONObject(); + HttpsURLConnection connHttps = null; + HttpURLConnection conn = null; try { _log.info("Calling api: " + url); if(!isHTTPS) { @@ -470,8 +471,54 @@ public JSONObject callApiEncode(String url, HttpHeaders headers return JSONFactoryUtil.createJSONObject(response.getBody()); } + if(!url.contains("https")) { + isHTTPS = false; + } + _log.info("isHttps:" + isHTTPS); + if(isHTTPS) { + URL urlNew = new URL(url); + connHttps = (HttpsURLConnection ) urlNew.openConnection(); + connHttps.setRequestMethod("POST"); + connHttps.setDoOutput(true); + connHttps.setRequestProperty("Accept", "application/json"); + connHttps.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + connHttps.setRequestProperty("Charset", "utf-8"); + connHttps.setRequestProperty("lgspaccesstoken", lgspAccessToken); + connHttps.setInstanceFollowRedirects(true); + connHttps.setReadTimeout(10 * 1000); + StringBuilder bodyRequest = new StringBuilder(); + bodyRequest.append("grant_type").append(StringPool.EQUAL).append("client_credentials"); + + byte[] postData = bodyRequest.toString().getBytes("UTF-8"); + int postDataLength = postData.length; + connHttps.setRequestProperty("Content-Length", + Integer.toString(postDataLength)); + TrustManager myTrustManager = new TrustManager(); + connHttps = myTrustManager.disableSSL(connHttps); + + try (DataOutputStream wr = new DataOutputStream(connHttps.getOutputStream())) { + wr.write(postData); + } + + BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(connHttps.getInputStream())); + String output = StringPool.BLANK; + + StringBuilder sb = new StringBuilder(); + + while ((output = bufferedReader.readLine()) != null) { + sb.append(output); + } + if(Validator.isNotNull(sb.toString())){ + result = JSONFactoryUtil.createJSONObject(sb.toString()); + } + _log.info("+++++token return:"+ result); + + return result; + } + _log.info("Calling http..."); + //url has http:// URL urlNew = new URL(url); - conn = (HttpsURLConnection ) urlNew.openConnection(); + conn = (HttpURLConnection ) urlNew.openConnection(); conn.setRequestMethod("POST"); conn.setDoOutput(true); conn.setRequestProperty("Accept", "application/json"); @@ -487,8 +534,6 @@ public JSONObject callApiEncode(String url, HttpHeaders headers int postDataLength = postData.length; conn.setRequestProperty("Content-Length", Integer.toString(postDataLength)); - TrustManager myTrustManager = new TrustManager(); - conn = myTrustManager.disableSSL(conn); try (DataOutputStream wr = new DataOutputStream(conn.getOutputStream())) { wr.write(postData); @@ -508,13 +553,16 @@ public JSONObject callApiEncode(String url, HttpHeaders headers _log.info("+++++token return:"+ result); return result; - } catch (Exception e) { throw new Exception(e); } finally { if (conn != null) { conn.disconnect(); } + + if (connHttps != null) { + connHttps.disconnect(); + } } } @@ -538,18 +586,60 @@ public JSONArray callApiWithResponseArray(String url, HttpHeaders headers, Map findDossierMarkByDossierId(long groupId, long dossierId); + } diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/KeyPayV3Action.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/KeyPayV3Action.java new file mode 100644 index 0000000000..15256c2b26 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/KeyPayV3Action.java @@ -0,0 +1,24 @@ +/** + * + */ +package org.opencps.dossiermgt.action; + +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.model.User; +import com.liferay.portal.kernel.service.ServiceContext; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.File; + +/** + * @author moon + * + */ +public interface KeyPayV3Action { + + public JSONObject createPaylater(User user, long dossierId, ServiceContext serviceContext, HttpServletRequest request); + public File getQrCode(User user, long dossierId, ServiceContext serviceContext, HttpServletRequest request, HttpServletResponse response, String imageStr); + + public JSONObject paylaterCallback(User user, ServiceContext serviceContext, String body); +} diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/QLCDIntegrationAction.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/QLCDIntegrationAction.java index a55cc17436..d7e5420a0e 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/QLCDIntegrationAction.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/QLCDIntegrationAction.java @@ -4,7 +4,7 @@ public interface QLCDIntegrationAction { //QLCD - public String getToken() throws Exception; - public String sendData(String token, JSONObject body) throws Exception; + public String getToken(String unit) throws Exception; + public String sendData(String token, JSONObject body, String unit) throws Exception; public String createRequestSoap(JSONObject body) throws Exception; } diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/QLVBIntegrationAction.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/QLVBIntegrationAction.java index 8cc776e379..30fbbd2d60 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/QLVBIntegrationAction.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/QLVBIntegrationAction.java @@ -1,6 +1,7 @@ package org.opencps.dossiermgt.action; import com.liferay.portal.kernel.service.ServiceContext; +import org.opencps.dossiermgt.input.model.ProfileInModel; import org.opencps.dossiermgt.model.Dossier; public interface QLVBIntegrationAction { @@ -15,5 +16,6 @@ public interface QLVBIntegrationAction { public boolean sendDocEOfficeTTTT() throws Exception; //Do action QLVB - public void doAction(long groupId, ServiceContext serviceContext, Dossier dossier, String actionCode); + public void doAction(long groupId, ServiceContext serviceContext, Dossier dossier, String actionCode + , ProfileInModel input); } diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/DVCQGIntegrationActionImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/DVCQGIntegrationActionImpl.java index c1835dcc3f..c89e9f0e9c 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/DVCQGIntegrationActionImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/DVCQGIntegrationActionImpl.java @@ -7,22 +7,29 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.StringReader; +import java.io.OutputStream; import java.net.HttpURLConnection; +import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.nio.charset.Charset; import java.text.DateFormat; import java.text.DecimalFormat; import java.util.*; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.ThreadPoolExecutor; import java.util.stream.Collectors; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.HttpMethod; +import javax.ws.rs.core.MediaType; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import com.liferay.portal.kernel.json.*; +import com.liferay.portal.kernel.search.Field; import org.apache.commons.text.similarity.CosineSimilarity; import org.opencps.auth.utils.APIDateTimeUtils; import org.opencps.communication.model.ServerConfig; @@ -37,21 +44,20 @@ import org.opencps.dossiermgt.action.DVCQGIntegrationAction; import org.opencps.dossiermgt.action.DossierActions; import org.opencps.dossiermgt.action.ServiceInfoActions; +import org.opencps.dossiermgt.action.util.ConstantUtils; import org.opencps.dossiermgt.action.util.DossierActionUtils; import org.opencps.dossiermgt.action.util.DossierFileUtils; import org.opencps.dossiermgt.action.util.OpenCPSConfigUtil; -import org.opencps.dossiermgt.constants.FrequencyOfficeConstants; -import org.opencps.dossiermgt.constants.PublishQueueTerm; -import org.opencps.dossiermgt.constants.ServerConfigTerm; +import org.opencps.dossiermgt.constants.*; import org.opencps.dossiermgt.input.model.DossierInputModel; +import org.opencps.dossiermgt.input.model.DossierTaxInfo; import org.opencps.dossiermgt.input.model.SyncTrackingInfo; import org.opencps.dossiermgt.model.*; import org.opencps.dossiermgt.model.impl.ServiceInfoImpl; +import org.opencps.dossiermgt.rest.utils.SyncServerTerm; import org.opencps.dossiermgt.service.*; import org.opencps.statistic.model.OpencpsVotingStatistic; import org.opencps.statistic.service.OpencpsVotingStatisticLocalServiceUtil; -import org.opencps.synctracking.model.SyncTrackingQuery; -import org.opencps.synctracking.service.SyncTrackingLocalServiceUtil; import org.opencps.usermgt.model.Answer; import org.opencps.usermgt.model.Applicant; import org.opencps.usermgt.model.Question; @@ -90,8 +96,8 @@ import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.http.converter.StringHttpMessageConverter; -import org.springframework.web.client.RestTemplate; import org.w3c.dom.Document; +import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; @@ -101,6 +107,19 @@ * */ public class DVCQGIntegrationActionImpl implements DVCQGIntegrationAction { + static class Counter { + private volatile static int count = 0; + public static int getCount(){ + return count; + } + public static synchronized void decreaseCount(){ + count--; + } + + public static synchronized void setCount(int countNew){ + count += countNew; + } + } private static HashMap> _serviceInfoMapChars = new HashMap>();; @@ -111,21 +130,22 @@ public class DVCQGIntegrationActionImpl implements DVCQGIntegrationAction { private static HashMap _dictItemMapItems = new HashMap(); private static JSONArray _serviceInfoDVCQG = JSONFactoryUtil.createJSONArray(); - private RestTemplate restTemplate; + private static volatile ThreadPoolExecutor threadPoolExecutor; + private int corePoolSize = 5; + private int maximumPoolSize = 10; + private int queueCapacity = 6; + private int keepAliveTime = 10; private Log _log = LogFactoryUtil.getLog(DVCQGIntegrationActionImpl.class); private static final String LUCENE_DATE_FORMAT = "yyyyMMddHHmmss"; private static final String HCM_TIMEZONE = "Asia/Ho_Chi_Minh"; private static final String DVCQG_INTEGRATION = "DVCQG_INTEGRATION"; + private static final String DVCQG_THONG_BAO_THUE_DAT = "DVCQG_THONG_BAO_THUE_DAT"; + private static final String DVCQG_NHAN_CHUNG_TU_THUE = "DVCQG_NHAN_CHUNG_TU_THUE"; private static final Integer timeout = 10000 ; private static final Integer TIMEOUT_DVCQG = 6; - public DVCQGIntegrationActionImpl(){ - this.restTemplate = new RestTemplate(setConfigRestTemplate(timeout)); - this.restTemplate.getMessageConverters().add(0, new StringHttpMessageConverter(Charset.forName("UTF-8"))); - } - private String convertDate2String(Date date) { DateFormat dateFormat = DateFormatFactoryUtil.getSimpleDateFormat(LUCENE_DATE_FORMAT); @@ -4172,17 +4192,19 @@ public JSONObject doSyncServiceConfig(User user, long groupId, String requestBod } } + public static final String MA_SO_THUE = "MA_SO_THUE"; + public static final String SO_QUYET_DINH = "SO_QUYET_DINH"; + public static final String NGAY_QUYET_DINH = "NGAY_QUYET_DINH"; + public static final String SO_TIEN = "SO_TIEN"; + public static final String TEN_TIEU_MUC = "TEN_TIEU_MUC"; @Override - public JSONObject doCreateUpdateDossierFromDVCQG(Company company, User user, long groupId, ServiceContext serviceContext, JSONObject data, boolean isUpdating, boolean isSync) { + public JSONObject doCreateUpdateDossierFromDVCQG(Company company, User user, long groupId, ServiceContext serviceContext, JSONObject data, boolean isUpdating) { JSONObject result = JSONFactoryUtil.createJSONObject(); - HttpHeaders headers = new HttpHeaders(); - headers.set("Accept", "*"); - JSONObject configJson = getServerConfigByServerNo(); - String urlCall = configJson.getString(FrequencyOfficeConstants.CONFIG_URL_LOCAL) - + configJson.getString(FrequencyOfficeConstants.CONFIG_SAVE_SYNC_TRACKING); - _log.info("Url: " + urlCall); try { + // Lưu log + // DoAction thành công hay không khi lưu thuế phải lưu trạng thái Chứng từ thuế dựa vào doAction + // Tạo bản ghi thuế mới với trường hợp hồ sơ có trên hệ thống và không có trên thuế. Nếu có trên thuế thực hiện cập nhật if (data == null) { _log.error("HSKMBS result: " + "Data empty"); return createResponseMessage(result, -1, "Data empty"); @@ -4202,6 +4224,40 @@ public JSONObject doCreateUpdateDossierFromDVCQG(Company company, User user, lon return createResponseMessage(result, -1, "HoTenNguoiNopTien empty"); } + String soCMTNguoiNopTien = data.getString("SoCMTNguoiNopTien"); + if (Validator.isNull(soCMTNguoiNopTien)) { + _log.info("HSCTTD data: " + data.toJSONString()); + _log.info("HSCTTD result: " + "SoCMTNguoiNopTien empty"); + return createResponseMessage(result, -1, "SoCMTNguoiNopTien empty"); + } + + String diaChiNguoiNopTien = data.getString("DiaChiNguoiNopTien"); + if (Validator.isNull(diaChiNguoiNopTien)) { + _log.info("HSCTTD data: " + data.toJSONString()); + _log.info("HSCTTD result: " + "DiaChiNguoiNopTien empty"); + return createResponseMessage(result, -1, "DiaChiNguoiNopTien empty"); + } + + String tinhNguoiNopTien = data.getString("TinhNguoiNopTien"); + if (Validator.isNull(diaChiNguoiNopTien)) { + _log.info("HSCTTD data: " + data.toJSONString()); + _log.info("HSCTTD result: " + "TinhNguoiNopTien empty"); + return createResponseMessage(result, -1, "TinhNguoiNopTien empty"); + } + + String huyenNguoiNopTien = data.getString("HuyenNguoiNopTien"); + if (Validator.isNull(huyenNguoiNopTien)) { + _log.info("HSCTTD data: " + data.toJSONString()); + _log.info("HSCTTD result: " + "HuyenNguoiNopTien empty"); + return createResponseMessage(result, -1, "HuyenNguoiNopTien empty"); + } + + String xaNguoiNopTien = data.getString("XaNguoiNopTien"); + if (Validator.isNull(xaNguoiNopTien)) { + _log.info("HSCTTD data: " + data.toJSONString()); + _log.info("HSCTTD result: " + "XaNguoiNopTien empty"); + return createResponseMessage(result, -1, "XaNguoiNopTien empty"); + } String MaSoThue = data.getString("MaSoThue"); if (Validator.isNull(MaSoThue)) { @@ -4210,12 +4266,6 @@ public JSONObject doCreateUpdateDossierFromDVCQG(Company company, User user, lon return createResponseMessage(result, -1, "MaSoThue empty"); } - String ThongTinThanhToan = data.getString("ThongTinThanhToan"); - if (Validator.isNull(ThongTinThanhToan)) { - _log.info("HSCTTD data: " + data.toJSONString()); - _log.info("HSCTTD result: " + "ThongTinThanhToan empty"); - return createResponseMessage(result, -1, "ThongTinThanhToan empty"); - } String UrlFileChungTu = data.getString("UrlFileChungTu"); if (Validator.isNull(UrlFileChungTu)) { @@ -4265,31 +4315,30 @@ public JSONObject doCreateUpdateDossierFromDVCQG(Company company, User user, lon _log.info("HSCTTD result: " + "TrangThaiThanhToan empty"); return createResponseMessage(result, -1, "TrangThaiThanhToan empty"); } + + // Ghi log SyncTracking + callPostAPISyncTracking(groupId, "", data.toString(), "", DVCQG_NHAN_CHUNG_TU_THUE); Dossier dossier = DossierLocalServiceUtil.fetchByDO_NO(MaHoSo); if(Validator.isNotNull(dossier)) { - if(isSync) { - SyncTrackingInfo body = new SyncTrackingInfo(); - body.groupId = groupId; - body.bodyRequest = data.toString(); - body.dossierNo = MaHoSo; - body.referenceUid = dossier.getReferenceUid(); - headers.add("groupId", String.valueOf(body.groupId)); - HttpEntity entity = new HttpEntity<>(body, headers); - ResponseEntity response = restTemplate.postForEntity(urlCall, entity, String.class); - _log.info("Response api saving tracking: " + response); - _log.info("Saved tracking!!!"); - }else { - SyncTrackingQuery query = new SyncTrackingQuery(); - query.dossierNo = MaHoSo; - query.groupId = groupId; - query.bodyRequest = data.toString(); - SyncTrackingLocalServiceUtil.createSyncTrackingManual(query); - _log.info("Saved tracking!!!"); + String dossierTax = getDetailDossierTax(groupId,MaHoSo, MaSoThue, MaThongBaoThue); + _log.info("dossierTax: " + dossierTax); + if(Validator.isNotNull(dossierTax)) { + + //Cập nhật thông tin thuế + callUpdateAPIDossierTax(MaHoSo, HoTenNguoiNopTien, MaSoThue, UrlFileChungTu, MaThongBaoThue, ThoiGianThanhToan, SoTien, NoiDungThanhToan, TrangThaiThanhToan, + dossier.getGroupId(), soCMTNguoiNopTien, diaChiNguoiNopTien, tinhNguoiNopTien, huyenNguoiNopTien, xaNguoiNopTien, null, "1" ); + + _log.info("Cập nhật thông tin thành công: " + MaHoSo); + return createResponseMessage(result, 0, "Gửi dữ liệu thành công : " + MaHoSo); + }else{ + //Lưu thông tin thuế + callPostAPIDossierTax(groupId, null, dossier, "3","1" , data, TtttChitiet); + return createResponseMessage(result, 0, "Gửi dữ liệu thành công : " + MaHoSo); } }else{ - return createResponseMessage(result, 0, MaHoSo+"| không tồn tại trên hệ thống"); + _log.info(MaHoSo + " không tồn tại trên hệ thống"); + return createResponseMessage(result, -1, MaHoSo + " không tồn tại trên hệ thống"); } - return createResponseMessage(result, 0, MaHoSo + "| create dossier success"); } catch (Exception e) { e.getMessage(); _log.error(e); @@ -4297,65 +4346,351 @@ public JSONObject doCreateUpdateDossierFromDVCQG(Company company, User user, lon return result; } - @Override public JSONObject doCrUpDossierThongBaoThueDatDVCQG(Company company, User user, long groupId, ServiceContext serviceContext, JSONObject data, boolean isUpdating) { - JSONObject result = JSONFactoryUtil.createJSONObject(); -// HttpHeaders headers = new HttpHeaders(); -// headers.set("Accept", "*"); -// -// JSONObject configJson = getServerConfigByServerNo(); -// String urlCall = configJson.getString(FrequencyOfficeConstants.CONFIG_URL_LOCAL) -// + configJson.getString(FrequencyOfficeConstants.CONFIG_SAVE_SYNC_TRACKING); - String msHS = StringPool.BLANK; + // DVCQG gửi về 1 lần lưu 1 lần log + // Thuế được bóc tách dữ liệu. Dù doAction không thành công cũng phải lưu thuế ( có trạng thái doAction) + // HS được gửi về có thuế rồi thì k lưu nữa. + // Trả message gửi dữ liệu thành công + JSONObject validateResult = JSONFactoryUtil.createJSONObject(); + + String FileThongBaoThue = data.getString("FileThongBaoThue"); + byte[] decodedBytes = Base64.getDecoder().decode(FileThongBaoThue); + String xmlFileThongBaoThue = new String(decodedBytes); + // Ghi log SyncTracking + _log.debug("GroupId: "+ groupId); + callPostAPISyncTracking(groupId, "", xmlFileThongBaoThue, "", DVCQG_THONG_BAO_THUE_DAT); try { + _log.debug("Constructor doCrUpDossierThongBaoThueDatDVCQG"); if (data == null) { _log.error("HSKMBS result: " + "Data empty"); - return createResponseMessage(result, -1, "Data empty"); + return createResponseMessage(validateResult, -1, "Data empty"); } - _log.info("------------ Hồ Sơ nhận thông báo Thuế Đất -------------"); - String FileThongBaoThue = data.getString("FileThongBaoThue"); + + _log.info("------------ Hồ Sơ Nhận Thông Báo Thuế Đất -------------"); + if (Validator.isNull(FileThongBaoThue)) { _log.info("HSCTTD data: " + data.toJSONString()); _log.info("HSCTTD result: " + "FileThongBaoThue empty"); - return createResponseMessage(result, -1, "FileThongBaoThue empty"); - }else{ - byte[] decodedBytes = Base64.getDecoder().decode(FileThongBaoThue); - String xmlFileThongBaoThue = new String(decodedBytes); + return createResponseMessage(validateResult, -1, "FileThongBaoThue empty"); + } else { + Document xml = convertStringToXMLDocument(xmlFileThongBaoThue); - NodeList childs = xml.getElementsByTagName("MA_HSO"); + NodeList docs = xml.getElementsByTagName("ROW_LIST"); Node child; - for (int i = 0; i < childs.getLength(); i++) { - child = childs.item(i); - child.getFirstChild(); - _log.info("MA_HS: " + child.getTextContent()); - Dossier dossier = DossierLocalServiceUtil.fetchByDO_NO(child.getTextContent()); - msHS += child.getTextContent() + ","; - if(Validator.isNotNull(dossier)) { -// org.opencps.reportland.service.ReportLandTaxLocalServiceUtil.addReportLandTax(groupId, child.getTextContent(), xmlFileThongBaoThue, "", serviceContext); - SyncTrackingQuery query = new SyncTrackingQuery(); - query.dossierNo = child.getTextContent(); - query.groupId = groupId; - query.bodyRequest = xmlFileThongBaoThue; - SyncTrackingLocalServiceUtil.createSyncTrackingManual(query); - _log.info("Saved tracking!!!"); - }else{ - createResponseMessage(result, 0, msHS+"| không tồn tại trên hệ thống"); + for (int i = 0; i < docs.getLength(); i++) { + JSONArray dossierTaxArr = JSONFactoryUtil.createJSONArray(); + child = docs.item(i); + Element eElement = (Element) child; + NodeList subList = eElement.getElementsByTagName("LIST"); + String dossierNo = eElement.getElementsByTagName("MA_HSO").item(0).getTextContent(); + + + for (int j = 0; j < subList.getLength(); j++) { + JSONObject subObject = JSONFactoryUtil.createJSONObject(); + subObject.put("MA_HSO", dossierNo); + Node subChild = subList.item(j); + Element subElement = (Element) subChild; + String maSoThue = StringPool.BLANK; + String soQD = StringPool.BLANK; + if (Validator.isNotNull(subElement.getElementsByTagName(MA_SO_THUE).item(0).getTextContent())) { + maSoThue = subElement.getElementsByTagName(MA_SO_THUE).item(0).getTextContent(); + subObject.put(MA_SO_THUE, maSoThue); + } + if (Validator.isNotNull(subElement.getElementsByTagName("SO_QUYET_DINH").item(0).getTextContent())) { + soQD = subElement.getElementsByTagName("SO_QUYET_DINH").item(0).getTextContent(); + subObject.put("SO_QUYET_DINH", soQD); + } + if (Validator.isNotNull(subElement.getElementsByTagName("NGAY_QUYET_DINH").item(0).getTextContent())) { + String ngayQD = subElement.getElementsByTagName("NGAY_QUYET_DINH").item(0).getTextContent(); + subObject.put("NGAY_QUYET_DINH", ngayQD); + } + if (Validator.isNotNull(subElement.getElementsByTagName("SO_TIEN").item(0))) { + String soTien = subElement.getElementsByTagName("SO_TIEN").item(0).getTextContent(); + subObject.put("SO_TIEN", soTien); + } + if (Validator.isNotNull(subElement.getElementsByTagName(TEN_TIEU_MUC).item(0))) { + String tenTieuMuc = subElement.getElementsByTagName(TEN_TIEU_MUC).item(0).getTextContent(); + subObject.put(TEN_TIEU_MUC, tenTieuMuc); + } + _log.debug("MA_HS: " + dossierNo); + _log.debug("dossierTaxArr: " + dossierTaxArr); + _log.debug("subObject: " + subObject); + + Dossier dossier = DossierLocalServiceUtil.fetchByDO_NO(dossierNo); + String dossierTax = getDetailDossierTax(groupId, dossierNo, maSoThue, soQD); + if (Validator.isNotNull(dossier)) { + if (Validator.isNull(dossierTax)) { + //Lưu thông tin thuế + callPostAPIDossierTax(groupId, subObject, dossier,"1" , null, null, null); + } + }else{ + _log.info("Hồ sơ không có trên hệ thống : " + dossierNo); + } } } + return createResponseMessage(validateResult, 0, "gửi dữ liệu thành công"); + } + } catch (Exception e) { + e.getMessage(); + _log.error(e); + } + return validateResult; + } + + private String getDetailDossierTax(long groupId, String dossierNo, String maSoThue, String soQuyetDinh) { + try { + JSONObject configJson = getServerConfigByServerNo(DossierTerm.API_SYNC_TRACKING,""); + String urlCall = configJson.getString("urlLocal") + configJson.getString(FrequencyOfficeConstants.CONFIG_GET_DOSSIER_TAX); + _log.debug("url: " + urlCall); + StringBuilder sb = new StringBuilder(); + URL urlVoid = new URL(urlCall); + + JSONObject jsonBody = JSONFactoryUtil.createJSONObject(); + jsonBody.put("dossierNo",dossierNo); + jsonBody.put("maSoThue",maSoThue); + jsonBody.put("soQuyetDinh",soQuyetDinh); + + _log.debug("POST DATA: " + jsonBody.toString()); + java.net.HttpURLConnection conn = (java.net.HttpURLConnection) urlVoid.openConnection(); + + conn.setRequestMethod(HttpMethod.POST); + conn.setRequestProperty(Field.GROUP_ID, String.valueOf(groupId)); + conn.setRequestProperty(javax.ws.rs.core.HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON); + conn.setRequestProperty(javax.ws.rs.core.HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON); + conn.setRequestProperty("Content-Length",StringPool.BLANK + Integer.toString(jsonBody.toString().getBytes().length)); + conn.setUseCaches(false); + conn.setDoInput(true); + conn.setDoOutput(true); + OutputStream osLogin = conn.getOutputStream(); + osLogin.write(jsonBody.toString().getBytes()); + osLogin.close(); + + BufferedReader brf = new BufferedReader(new InputStreamReader(conn.getInputStream())); + int cp; + while ((cp = brf.read()) != -1) { + sb.append((char) cp); } - return createResponseMessage(result, 0, msHS+"| create dossier success"); + return sb.toString(); }catch (Exception e){ e.getMessage(); _log.error(e); } + return null; + } - return result; + private String callPostAPISyncTracking(long groupId, String MaHoSo, String data, String reponse, String protocol){ + StringBuilder sb = new StringBuilder(); + try { + JSONObject configJson = getServerConfigByServerNo(DossierTerm.API_SYNC_TRACKING,""); + String urlCall = configJson.getString(FrequencyOfficeConstants.CONFIG_URL_LOCAL) + + configJson.getString(FrequencyOfficeConstants.CONFIG_SAVE_SYNC_TRACKING); + + URL urlVoid = new URL(urlCall); + + JSONObject jsonBody = JSONFactoryUtil.createJSONObject(); + jsonBody.put("groupId",groupId); + jsonBody.put("bodyRequest",data); + jsonBody.put("dossierNo",MaHoSo); + jsonBody.put("bodyResponse",reponse); + jsonBody.put("api",protocol); + + _log.debug("POST DATA: " + jsonBody.toString()); + java.net.HttpURLConnection conn = (java.net.HttpURLConnection) urlVoid.openConnection(); + + conn.setRequestMethod(HttpMethod.POST); + conn.setRequestProperty(Field.GROUP_ID, String.valueOf(groupId)); + conn.setRequestProperty(javax.ws.rs.core.HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON); + conn.setRequestProperty(javax.ws.rs.core.HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON); + conn.setRequestProperty("Content-Length",StringPool.BLANK + Integer.toString(jsonBody.toString().getBytes().length)); + conn.setUseCaches(false); + conn.setDoInput(true); + conn.setDoOutput(true); + _log.debug("POST DATA: " + jsonBody.toString()); + OutputStream osLogin = conn.getOutputStream(); + osLogin.write(jsonBody.toString().getBytes()); + osLogin.close(); + + BufferedReader brf = new BufferedReader(new InputStreamReader(conn.getInputStream())); + int cp; + while ((cp = brf.read()) != -1) { + sb.append((char) cp); + } + _log.info("Response api saving tracking: " + sb.toString()); + _log.info("Saved tracking!!!"); + return sb.toString(); + }catch (Exception e){ + e.getMessage(); + _log.error(e); + } + return null; } + private boolean callUpdateAPIDossierTax (String MaHoSo, String HoTenNguoiNopTien, String MaSoThue, String urlFileChungTu, String maThongBaoThue, String thoiGianThanhToan, + String soTien, String noiDungThanhToan,int trangThaiThanhToan, long groupId,String soCMTNguoiNopTien, + String diaChiNguoiNopTien,String tinhNguoiNopTien,String huyenNguoiNopTien,String xaNguoiNopTien, String statusTBT, String statusCTT) { + StringBuilder sb = new StringBuilder(); + JSONObject configJson = getServerConfigByServerNo(DossierTerm.API_SYNC_TRACKING, ""); + String urlCall = configJson.getString("urlMC") + configJson.getString("updateDossierTax"); + try { + URL urlVoid = new URL(urlCall); + + JSONObject jsonBody = JSONFactoryUtil.createJSONObject(); + jsonBody.put("groupId",groupId); + jsonBody.put("dossierNo",MaHoSo); + jsonBody.put("hoTenNguoiNopTien",HoTenNguoiNopTien); + jsonBody.put("maSoThue",MaSoThue); + jsonBody.put("fileChungTu",urlFileChungTu); + jsonBody.put("soQuyetDinh",maThongBaoThue); + jsonBody.put("thoiGianThanhToan",thoiGianThanhToan); + jsonBody.put("soTienNop",soTien); + jsonBody.put("noiDungThanhToan",noiDungThanhToan); + jsonBody.put("trangThaiThanhToan",trangThaiThanhToan); + jsonBody.put("soCmtNguoiNopTien",soCMTNguoiNopTien); + jsonBody.put("diaChiNguoiNopTien",diaChiNguoiNopTien); + jsonBody.put("tinhNguoiNopTien",tinhNguoiNopTien); + jsonBody.put("huyenNguoiNopTien",huyenNguoiNopTien); + jsonBody.put("xaNguoiNopTien",xaNguoiNopTien); + jsonBody.put("huyenNguoiNopTien",noiDungThanhToan); + jsonBody.put("huyenNguoiNopTien",noiDungThanhToan); + if (Validator.isNotNull(statusTBT)) { + jsonBody.put("statusTBT",statusTBT); + } + if (Validator.isNotNull(statusCTT)) { + jsonBody.put("statusCTT",statusCTT); + } + + _log.info("POST DATA: " + jsonBody.toString()); + java.net.HttpURLConnection conn = (java.net.HttpURLConnection) urlVoid.openConnection(); + + conn.setRequestMethod(HttpMethod.POST); + conn.setRequestProperty(Field.GROUP_ID, String.valueOf(groupId)); + conn.setRequestProperty(javax.ws.rs.core.HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON); + conn.setRequestProperty(javax.ws.rs.core.HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON); + conn.setRequestProperty("Content-Length",StringPool.BLANK + Integer.toString(jsonBody.toString().getBytes().length)); + conn.setUseCaches(false); + conn.setDoInput(true); + conn.setDoOutput(true); + _log.debug("POST DATA: " + jsonBody.toString()); + OutputStream osLogin = conn.getOutputStream(); + osLogin.write(jsonBody.toString().getBytes()); + osLogin.close(); + + BufferedReader brf = new BufferedReader(new InputStreamReader(conn.getInputStream())); + int cp; + while ((cp = brf.read()) != -1) { + sb.append((char) cp); + } + _log.info("Response api saving dossierTax: " + sb.toString()); + _log.info("Saved dossierTax!!!"); + return true; + }catch (Exception e){ + e.getMessage(); + } + return false; + } + + private boolean callPostAPIDossierTax(long groupId, JSONObject subObject, Dossier dossier, String statusTBT, String statusCTT, JSONObject data, JSONObject TtttChitiet) { + try { + StringBuilder sb = new StringBuilder(); + JSONObject configJson = getServerConfigByServerNo(DossierTerm.API_SYNC_TRACKING, ""); + String urlCall = configJson.getString("urlLocal") + configJson.getString("saveDossierTax"); + URL urlVoid = new URL(urlCall); + + JSONObject jsonBody = JSONFactoryUtil.createJSONObject(); + jsonBody.put("groupId", dossier.getGroupId()); + jsonBody.put("dossierNo",dossier.getDossierNo()); + + if (subObject != null) { + jsonBody.put("maSoThue",subObject.getString(MA_SO_THUE)); + jsonBody.put("soQuyetDinh",subObject.getString(SO_QUYET_DINH)); + jsonBody.put("ngayQuyetDinh",subObject.getString(NGAY_QUYET_DINH)); + jsonBody.put("tenTieuMuc",subObject.getString(TEN_TIEU_MUC)); + jsonBody.put("soTien",subObject.getString(SO_TIEN)); + } else { + jsonBody.put("hoTenNguoiNopTien",data.getString("HoTenNguoiNopTien")); + jsonBody.put("maSoThue",data.getString("MaSoThue")); + jsonBody.put("fileChungTu",data.getString("UrlFileChungTu")); + jsonBody.put("soQuyetDinh",TtttChitiet.getString("MaThongBaoThue")); + + if (Validator.isNotNull(TtttChitiet.getString("ThoiGianThanhToan"))) { + jsonBody.put("thoiGianThanhToan",TtttChitiet.getString("ThoiGianThanhToan")); + } + if (Validator.isNotNull(TtttChitiet.getString("SoTien"))) { + jsonBody.put("soTienNop",TtttChitiet.getString("SoTien")); + } + + if (Validator.isNotNull(TtttChitiet.getString("NoiDungThanhToan"))) { + jsonBody.put("noiDungThanhToan",TtttChitiet.getString("NoiDungThanhToan")); + } + + if (Validator.isNotNull(TtttChitiet.getString("TrangThaiThanhToan"))) { + jsonBody.put("trangThaiThanhToan",TtttChitiet.getInt("TrangThaiThanhToan")); + } + + if (Validator.isNotNull(data.getString("SoCMTNguoiNopTien"))) { + jsonBody.put("soCmtNguoiNopTien",data.getString("SoCMTNguoiNopTien")); + } + + if (Validator.isNotNull(data.getString("DiaChiNguoiNopTien"))) { + jsonBody.put("diaChiNguoiNopTien",data.getString("DiaChiNguoiNopTien")); + } + + if (Validator.isNotNull(data.getString("TinhNguoiNopTien"))) { + jsonBody.put("tinhNguoiNopTien",data.getString("TinhNguoiNopTien")); + } + + if (Validator.isNotNull(data.getString("HuyenNguoiNopTien"))) { + jsonBody.put("huyenNguoiNopTien",data.getString("HuyenNguoiNopTien")); + } + + if (Validator.isNotNull(data.getString("XaNguoiNopTien"))) { + jsonBody.put("xaNguoiNopTien",data.getString("XaNguoiNopTien")); + } + } + if (Validator.isNotNull(statusTBT)) { + jsonBody.put("statusTBT",statusTBT); + } + if (Validator.isNotNull(statusCTT)) { + jsonBody.put("statusCTT",statusCTT); + } + _log.debug("POST DATA: " + jsonBody.toString()); + + java.net.HttpURLConnection conn = (java.net.HttpURLConnection) urlVoid.openConnection(); + + conn.setRequestMethod(HttpMethod.POST); + conn.setRequestProperty(Field.GROUP_ID, String.valueOf(groupId)); + conn.setRequestProperty(javax.ws.rs.core.HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON); + conn.setRequestProperty(javax.ws.rs.core.HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON); + conn.setRequestProperty("Content-Length",StringPool.BLANK + Integer.toString(jsonBody.toString().getBytes().length)); + conn.setUseCaches(false); + conn.setDoInput(true); + conn.setDoOutput(true); + _log.debug("POST DATA: " + jsonBody.toString()); + OutputStream osLogin = conn.getOutputStream(); + osLogin.write(jsonBody.toString().getBytes()); + osLogin.close(); + + BufferedReader brf = new BufferedReader(new InputStreamReader(conn.getInputStream())); + int cp; + while ((cp = brf.read()) != -1) { + sb.append((char) cp); + } + + _log.debug("Response api saving dossierTax: " + sb.toString()); + _log.info("Saved dossierTax!!!"); + } catch (Exception e) { + e.getMessage(); + } + return true; + + } + + + private JSONObject createResponseMessage(JSONObject object, int status, String message, String desc) { object.put("status", status); object.put("message", message); @@ -4386,18 +4721,18 @@ private static Document convertStringToXMLDocument(String xmlString) throws Pars } return null; } - private ClientHttpRequestFactory setConfigRestTemplate(Integer timeout) { - HttpComponentsClientHttpRequestFactory clientHttpRequestFactory - = new HttpComponentsClientHttpRequestFactory(); - clientHttpRequestFactory.setConnectTimeout(timeout); - return clientHttpRequestFactory; - } private static final String SERVER_CONFIG_NULL = "There is no server config frequency"; private static final String PARSE_CONFIG_JSON_FAIL= "Create object json from config error"; - public JSONObject getServerConfigByServerNo() { + + public JSONObject getServerConfigByServerNo(String protocol, String serverNo) { // Get ServerConfig - List listConfig = ServerConfigLocalServiceUtil.getByProtocol("API_SYNC_TRACKING"); + List listConfig = new ArrayList<>(); + if(Validator.isNotNull(protocol)) { + listConfig = ServerConfigLocalServiceUtil.getByProtocol(protocol); + }else if(Validator.isNotNull(serverNo)){ + listConfig = ServerConfigLocalServiceUtil.getByServerAndProtocol(serverNo, "API_SYNC"); + } JSONObject configJson = JSONFactoryUtil.createJSONObject(); try { ServerConfig serverConfig = listConfig.get(0); @@ -4415,6 +4750,70 @@ public JSONObject getServerConfigByServerNo() { } return configJson; } + public String uploadDossierFile(String UrlFileChungTu){ + if(Validator.isNotNull(UrlFileChungTu)){ + HttpURLConnection conn = null; + + try { + JSONObject config = getServerConfigByServerNo(DossierTerm.DVCQG_THANH_TOAN_THUE,""); + _log.debug("config: " + config.toJSONString()); + + String endpoint = UrlFileChungTu; + + URL url = new URL(endpoint); + + conn = (HttpURLConnection) url.openConnection(); + conn.setRequestMethod("POST"); + conn.setDoInput(true); + conn.setDoOutput(true); + + conn.setRequestProperty("Accept", "application/json"); + conn.setRequestProperty("Content-Type", "application/json"); + conn.setRequestProperty("Charset", "utf-8"); + + conn.setInstanceFollowRedirects(true); + HttpURLConnection.setFollowRedirects(true); + conn.setReadTimeout(TIMEOUT_DVCQG * 1000); + +// byte[] postData = body.toJSONString().getBytes("UTF-8"); +// int postDataLength = postData.length; +// conn.setRequestProperty("Content-Length", Integer.toString(postDataLength)); +// try (DataOutputStream wr = new DataOutputStream(conn.getOutputStream())) { +// wr.write(postData); +// } + + conn.connect(); + + try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader((conn.getInputStream())))) { + + String output = StringPool.BLANK; + + StringBuilder sb = new StringBuilder(); + + while ((output = bufferedReader.readLine()) != null) { + sb.append(output); + } + + System.out.println("response: " + sb.toString()); + + JSONObject result = JSONFactoryUtil.createJSONObject(sb.toString()); + + // ------------------ + return StringPool.BLANK; + + } + + } catch (Exception e) { + _log.error(e); + return StringPool.BLANK; + } finally { + if (conn != null) { + conn.disconnect(); + } + } + } + return null; + } private String _DEFAULT_CLASS_NAME = "dvcqg"; } \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/DossierMarkActionsImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/DossierMarkActionsImpl.java index e2072194c4..e70f00f68e 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/DossierMarkActionsImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/DossierMarkActionsImpl.java @@ -35,4 +35,8 @@ public DossierMark getDossierMarkbyDossierId(long groupId, long dossierId, Strin return DossierMarkLocalServiceUtil.getDossierMarkbyDossierId(groupId, dossierId, dossierPartNo); } + @Override + public List findDossierMarkByDossierId(long groupId, long dossierId) { + return DossierMarkLocalServiceUtil.findDossierMarkByDossierId(groupId, dossierId); + } } diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/QLCDIntegrationActionImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/QLCDIntegrationActionImpl.java index 34c4b70fa8..a0634c720c 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/QLCDIntegrationActionImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/QLCDIntegrationActionImpl.java @@ -8,23 +8,23 @@ import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.Validator; +import org.apache.commons.lang3.StringUtils; import org.opencps.backend.dossiermgt.serviceapi.ApiThirdPartyService; import org.opencps.backend.dossiermgt.serviceapi.ApiThirdPartyServiceImpl; import org.opencps.communication.model.ServerConfig; import org.opencps.dossiermgt.action.QLCDIntegrationAction; import org.opencps.dossiermgt.constants.QLCDConstants; -import org.opencps.dossiermgt.input.model.FileVBModel; -import org.opencps.dossiermgt.input.model.QLVBModel; -import org.opencps.dossiermgt.model.Dossier; -import org.opencps.dossiermgt.service.DossierLocalServiceUtil; +import org.opencps.dossiermgt.model.CsdlDcServiceInfo; +import org.opencps.dossiermgt.model.CsdlDcUser; +import org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalServiceUtil; +import org.opencps.dossiermgt.service.CsdlDcUserLocalServiceUtil; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; import java.util.Base64; +import java.util.HashMap; import java.util.Iterator; -import java.util.List; +import java.util.Map; public class QLCDIntegrationActionImpl implements QLCDIntegrationAction { private JSONObject configJson; @@ -32,8 +32,8 @@ public class QLCDIntegrationActionImpl implements QLCDIntegrationAction { private Log _log = LogFactoryUtil.getLog(QLCDIntegrationActionImpl.class); private static final String SERVER_CONFIG_NULL = "There is no server config frequency"; private static final String PARSE_CONFIG_JSON_FAIL= "Create object json from config error"; - private ObjectMapper objectMapper; private ServerConfig serverConfig; + private static final Integer STATUS_ACTIVE = 1; private String base64LgspToken; public QLCDIntegrationActionImpl(ServerConfig serverConfig) throws Exception{ @@ -63,20 +63,27 @@ public QLCDIntegrationActionImpl(ServerConfig serverConfig) throws Exception{ } @Override - public String getToken() throws Exception { + public String getToken(String unit) throws Exception { + String urlGetToken = this.configJson.getString(QLCDConstants.CONFIG_URL) + + this.configJson.getString(QLCDConstants.CONFIG_GET_TOKEN); try { - String urlGetToken = this.configJson.getString(QLCDConstants.CONFIG_URL) - + this.configJson.getString(QLCDConstants.CONFIG_GET_TOKEN); + if(unit.equals(QLCDConstants.UNIT_HG)) { + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); + _log.info("lgspaccesstoken: " + headers.get("lgspaccesstoken")); + JSONObject result = this.apiService.callApiEncode(urlGetToken, headers, null, + true, this.base64LgspToken); - _log.info("lgspaccesstoken: " + headers.get("lgspaccesstoken")); - JSONObject result = this.apiService.callApiEncode(urlGetToken, headers, null, - true, this.base64LgspToken); - - if(Validator.isNotNull(result) && result.has("access_token")) { - return result.getString("access_token"); + if(Validator.isNotNull(result) && result.has("access_token")) { + return result.getString("access_token"); + } + } else if (unit.equals(QLCDConstants.UNIT_DT)) { + JSONObject checkUnitGetToken = JSONFactoryUtil.createJSONObject(); + checkUnitGetToken.put("partnerCode", "PAYGOV-DONGTHAP"); + return this.apiService.getTokenLGSP(checkUnitGetToken); + } else { + //other unit } throw new Exception("No token found"); @@ -87,25 +94,100 @@ public String getToken() throws Exception { } @Override - public String sendData(String token, JSONObject body) throws Exception { + public String sendData(String token, JSONObject body, String unit) throws Exception { try { String url = this.configJson.getString(QLCDConstants.CONFIG_URL) + this.configJson.getString(body.getString("type")); - JSONObject bodyRequest = JSONFactoryUtil.createJSONObject(); - bodyRequest.put("accessToken", "Bearer " + token); - bodyRequest.put("lgspAccessToken", this.base64LgspToken); - bodyRequest.put("data", createRequestSoap(body)); + if(unit.equals(QLCDConstants.UNIT_HG)) { + JSONObject bodyValid = validateBodyJson(body); + JSONObject bodyRequest = JSONFactoryUtil.createJSONObject(); + + bodyRequest.put("accessToken", "Bearer " + token); + bodyRequest.put("lgspAccessToken", this.base64LgspToken); + bodyRequest.put("AuthHash", bodyValid.getString(QLCDConstants.KEY_AuthHash)); + + //remove unnecessary key to forward to LGSP + bodyValid.remove(QLCDConstants.KEY_AuthHash); + bodyValid.remove(QLCDConstants.KEY_StaffEmail); + bodyValid.remove(QLCDConstants.KEY_GovAgencyCode); + + bodyRequest.put("data", createRequestSoap(bodyValid)); + + //Call api DLDC + String soapResponse = this.apiService.callApiWithRawBody(url, bodyRequest); + + //Parse xml result to json + XmlMapper xmlMapper = new XmlMapper(); + JsonNode node = xmlMapper.readTree(soapResponse); + ObjectMapper jsonMapper = new ObjectMapper(); + + return jsonMapper.writeValueAsString(node); + } else if (unit.equals(QLCDConstants.UNIT_DT)) { + HttpHeaders headers = new HttpHeaders(); + headers.add("Authorization", "Bearer " + token); + + Map bodyDC = new HashMap<>(); + bodyDC.put("maYeuCau", body.getString(QLCDConstants.KEY_MaYeuCau)); + bodyDC.put("maDVC", body.getString(QLCDConstants.KEY_MaDVC)); + bodyDC.put("maCanBo", body.getString(QLCDConstants.KEY_MaCanBo)); + bodyDC.put("soDinhDanh", body.has(QLCDConstants.KEY_SoDinhDanh) ? body.getString(QLCDConstants.KEY_SoDinhDanh) : ""); + bodyDC.put("soCMND", body.has(QLCDConstants.KEY_SoCMND) ? body.getString(QLCDConstants.KEY_SoCMND) : ""); + bodyDC.put("hoVaTen", body.getString(QLCDConstants.KEY_HoVaTen)); + bodyDC.put("ngayThangNam", body.getString(QLCDConstants.KEY_NgayThangNamSinh)); + bodyDC.put("userNameService", "STTTT_DONGTHAP"); + JSONObject result = this.apiService.callApi(url, headers, bodyDC); + return result.toJSONString(); + } else { + //other unit + } + throw new Exception("No unit found"); + } catch (Exception e) { + throw new Exception(e.getMessage()); + } + } + + private JSONObject validateBodyJson(JSONObject body) throws Exception { + try { + if(!body.has(QLCDConstants.KEY_MaDVC) || Validator.isNull(body.getString(QLCDConstants.KEY_MaDVC))) { + throw new Exception(QLCDConstants.ERROR_NO_MADVC); + } + + if(!body.has(QLCDConstants.KEY_GovAgencyCode) || Validator.isNull(body.getString(QLCDConstants.KEY_GovAgencyCode))) { + throw new Exception(QLCDConstants.ERROR_NO_GOV_AGENCY); + } + + if(!body.has(QLCDConstants.KEY_StaffEmail) || Validator.isNull(body.getString(QLCDConstants.KEY_StaffEmail))) { + throw new Exception(QLCDConstants.ERROR_NO_STAFF_EMAIL); + } + + CsdlDcServiceInfo serviceInfoMapping = CsdlDcServiceInfoLocalServiceUtil.findByServiceCodeAndStatus( + body.getString(QLCDConstants.KEY_MaDVC), STATUS_ACTIVE); + + if(Validator.isNull(serviceInfoMapping)) { + throw new Exception(QLCDConstants.ERROR_MAPPING_DVC); + } + + body.put(QLCDConstants.KEY_MaDVC, serviceInfoMapping.getServiceCodeDvcqg()); - //Call api DLDC - String soapResponse = this.apiService.callApiWithRawBody(url, bodyRequest); + CsdlDcUser staffInfoMapping = CsdlDcUserLocalServiceUtil.findByGovAndEmailAndStatus( + body.getString(QLCDConstants.KEY_GovAgencyCode), body.getString(QLCDConstants.KEY_StaffEmail), STATUS_ACTIVE + ); - //Parse xml result to json - XmlMapper xmlMapper = new XmlMapper(); - JsonNode node = xmlMapper.readTree(soapResponse); - ObjectMapper jsonMapper = new ObjectMapper(); + if(Validator.isNull(staffInfoMapping)) { + throw new Exception(QLCDConstants.ERROR_MAPPING_STAFF); + } + String keyStringAuthHash = ""; + try { + keyStringAuthHash = staffInfoMapping.getKeyName() + ":" + staffInfoMapping.getKeyPass(); + } catch (Exception e) { + e.printStackTrace(); + } + + body.put(QLCDConstants.KEY_AuthHash, Base64.getEncoder().encodeToString(keyStringAuthHash.getBytes())); + body.put(QLCDConstants.KEY_MaCanBo, staffInfoMapping.getUserName()); - return jsonMapper.writeValueAsString(node); + return body; } catch (Exception e) { throw new Exception(e.getMessage()); } @@ -119,14 +201,52 @@ public String createRequestSoap(JSONObject body) throws Exception { soapRequestData.append(""); soapRequestData.append(""); - soapRequestData.append(""); + String type = body.getString(QLCDConstants.KEY_TYPE_API); + body.remove(QLCDConstants.KEY_TYPE_API); + soapRequestData.append(""); + + //Some key must order by this + if(body.has(QLCDConstants.KEY_MaYeuCau)) { + soapRequestData.append(""); + soapRequestData.append(body.getString(QLCDConstants.KEY_MaYeuCau)); + soapRequestData.append(""); + body.remove(QLCDConstants.KEY_MaYeuCau); + } + + if(body.has(QLCDConstants.KEY_MaDVC)) { + soapRequestData.append(""); + soapRequestData.append(body.getString(QLCDConstants.KEY_MaDVC)); + soapRequestData.append(""); + body.remove(QLCDConstants.KEY_MaDVC); + } + + if(body.has(QLCDConstants.KEY_MaTichHop)) { + soapRequestData.append(""); + soapRequestData.append(body.getString(QLCDConstants.KEY_MaTichHop)); + soapRequestData.append(""); + body.remove(QLCDConstants.KEY_MaTichHop); + } + + if(body.has(QLCDConstants.KEY_MaCanBo)) { + soapRequestData.append(""); + soapRequestData.append(body.getString(QLCDConstants.KEY_MaCanBo)); + soapRequestData.append(""); + body.remove(QLCDConstants.KEY_MaCanBo); + } + + if(body.has(QLCDConstants.KEY_SoDinhDanh)) { + soapRequestData.append(""); + soapRequestData.append(body.getString(QLCDConstants.KEY_SoDinhDanh)); + soapRequestData.append(""); + body.remove(QLCDConstants.KEY_SoDinhDanh); + } Iterator keys = body.keys(); String key; - while(keys.hasNext()) { key = keys.next(); + soapRequestData.append(""); if(key.equals(QLCDConstants.KEY_NgayThangNamSinh)) { @@ -152,7 +272,7 @@ public String createRequestSoap(JSONObject body) throws Exception { soapRequestData.append(""); } - soapRequestData.append(""); + soapRequestData.append(""); soapRequestData.append(""); soapRequestData.append(""); return soapRequestData.toString(); diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/QLVBIntegrationActionImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/QLVBIntegrationActionImpl.java index 700092e6fb..67ddfe078b 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/QLVBIntegrationActionImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/impl/QLVBIntegrationActionImpl.java @@ -32,6 +32,7 @@ import org.opencps.dossiermgt.constants.QLVBConstants; import org.opencps.dossiermgt.input.model.FileVBModel; import org.opencps.dossiermgt.input.model.FrequencyDoAction; +import org.opencps.dossiermgt.input.model.ProfileInModel; import org.opencps.dossiermgt.input.model.QLVBModel; import org.opencps.dossiermgt.model.Dossier; import org.opencps.dossiermgt.model.DossierFile; @@ -355,7 +356,7 @@ public void getDocEOfficeTTTT() throws Exception { } this.doAction(serverConfig.getGroupId(), serviceContext, - dossier, this.configJson.getString(QLVBConstants.CONFIG_ACTION_CODE)); + dossier, this.configJson.getString(QLVBConstants.CONFIG_ACTION_CODE), null); GetChangeStatusResult result; @@ -431,11 +432,12 @@ public boolean sendDocEOfficeTTTT() throws Exception { } @Override - public void doAction(long groupId, ServiceContext serviceContext, Dossier dossier, String actionCode){ + public void doAction(long groupId, ServiceContext serviceContext, Dossier dossier, String actionCode + , ProfileInModel input){ try { FrequencyDoAction frequencyDoAction = CPSDossierBusinessLocalServiceUtil.updateDossierFrequencyAction( groupId, serviceContext, dossier, - null, actionCode); + input, actionCode); if(Validator.isNotNull(frequencyDoAction.getProcessAction())) { _log.info("Doing postAction with action code: " + actionCode); diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/ConfigCounterNumberGenerator.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/ConfigCounterNumberGenerator.java index 8c12caa0f6..11162e1e03 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/ConfigCounterNumberGenerator.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/ConfigCounterNumberGenerator.java @@ -455,7 +455,7 @@ else if (r.toString().equals(dynamicVariablePattern)) { private static final String PERCENT_ZERO = "%0"; private static final String NUMBER_FORMAT = "d"; - private static String countByNumber(String pattern, String tmp, ConfigCounter configCounter) { + private synchronized static String countByNumber(String pattern, String tmp, ConfigCounter configCounter) { //long counter = CounterLocalServiceUtil.increment(pattern); int lengthPatern = Validator.isNotNull(tmp) ? tmp.length() : 0; @@ -466,9 +466,11 @@ private static String countByNumber(String pattern, String tmp, ConfigCounter co //Counter counterDetail = null; _log.info("pattern" + pattern); if (configCounter.getStartCounter() == 0) { + _log.info("case Start Counter: " + configCounter.getStartCounter()); Counter counterDetail = CounterLocalServiceUtil.fetchCounter(pattern); if (Validator.isNotNull(counterDetail)) { + _log.info("case update pattern: " + pattern); // create counter config _counterNumber = counterDetail.getCurrentId() + 1; while (counter == null) { @@ -509,6 +511,7 @@ private static String countByNumber(String pattern, String tmp, ConfigCounter co _counterNumber = configCounter.getStartCounter() + 1; while (counter == null) { if (counterDetail != null) { + _log.info("case update pattern: " + pattern); counterDetail.setCurrentId(_counterNumber); try { counter = CounterLocalServiceUtil.updateCounter(counterDetail); diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/DossierMgtUtils.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/DossierMgtUtils.java index 060cf2d3dc..72a9a48daa 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/DossierMgtUtils.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/DossierMgtUtils.java @@ -1196,10 +1196,17 @@ private static boolean checkSendInvoiceVNPT(Dossier dossier) { boolean result = false; PaymentFileActions actions = new PaymentFileActionsImpl(); PaymentFile paymentFile = actions.getPaymentFiles(dossier.getGroupId(), dossier.getDossierId()); - if (paymentFile != null && Validator.isNull(paymentFile.getInvoicePayload())) { - paymentFile.setInvoicePayload("VNPT"); - PaymentFileLocalServiceUtil.updatePaymentFile(paymentFile); - result = true; + if (paymentFile != null) { + if (Validator.isNull(paymentFile.getInvoicePayload())) { + paymentFile.setInvoicePayload("VNPT"); + PaymentFileLocalServiceUtil.updatePaymentFile(paymentFile); + result = true; + }else if(paymentFile.getInvoicePayload().contentEquals("VNPT")){ + result = true; + }else { + result = false; + } + } return result; } diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/DossierNumberGenerator.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/DossierNumberGenerator.java index 40f9f839cf..e3762deb74 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/DossierNumberGenerator.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/DossierNumberGenerator.java @@ -630,7 +630,7 @@ public static String generatePassword(String pattern, int length) { return password; } - public static long countByRegiterBookCode(long groupId, String registerBookCode, String govAgencyCode) { + public synchronized static long countByRegiterBookCode(long groupId, String registerBookCode, String govAgencyCode) { long _counterNumber = 0; diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/KeyPayV3Term.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/KeyPayV3Term.java new file mode 100644 index 0000000000..1e760a06fd --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/KeyPayV3Term.java @@ -0,0 +1,125 @@ +/** + * + */ +package org.opencps.dossiermgt.action.util; + +/** + * @author moon + * + */ +public class KeyPayV3Term { + + public static final String KEYPAY_LATE_CREATE_TRANSACTION_ENDPOINT = "keypay_late_create_transaction_endpoint"; + public static final String KEYPAY_LATE_DETAIL_TRANSACTION_ENDPOINT = "keypay_late_detail_transaction_endpoint"; + public static final String KEYPAY_LATE_REFUND_TRANSACTION_ENDPOINT = "keypay_late_refund_transaction_endpoint"; + + public static final String CLIENT_ID = "client_id"; + public static final String TRANSACTION_ID = "transaction_id"; + public static final String COMMAND = "command"; + public static final String COMMAND_PAYLATER_DETAIL = "command_paylater_detail"; + public static final String COMMAND_PAYLATER_REFUND = "command_paylater_refund"; + public static final String COMMAND_PAYLATER = "command_paylater"; + + public static final String CHECK_SUM = "check_sum"; + + public static final String ERROR = "error"; + public static final String ERROR_0 = "0"; + public static final String MSG = "msg"; + public static final String DATA = "data"; + public static final String TRANSACTION_CODE = "transaction_code"; + public static final String TRANS_AMOUNT = "trans_amount"; + public static final String DESCRIPTION = "description"; + public static final String CREATED_AT = "created_at"; + public static final String EXPIRED_IN = "expired_in"; + public static final String QRCODE_LINK = "qrcode_link"; + public static final String QRCODE_STATIC = "qrcode_static"; + public static final String QRCODE_PAY = "qrcode_pay"; + public static final String URL_PAY = "url_pay"; + public static final String STATUS = "status"; + public static final String STATUS_DONE = "status_done"; + public static final String STATUS_PENDING = "status_pending"; + public static final String ADDITION_FEE = "addition_fee"; + public static final String TOTAL_AMOUNT = "total_amount"; + public static final String BILL_ID = "bill_id"; + + public static final String AMOUNT = "amount"; + public static final String REASON = "reason"; + public static final String TRANSACTION_REFUND_CODE = "transaction_refund_code"; + public static final String AMOUNT_REFUND = "amount_refund"; + public static final String UPDATE_AT = "update_at"; + public static final String QRCODE_REFUND = "qrcode_refund"; + + public static final String TRANSACTION_REFUND_ID = "transaction_refund_id"; + + public static final String LOCALE = "locale"; + public static final String COUNTRY_CODE = "country_code"; + public static final String CURRENCY_CODE = "currency_code"; + public static final String ENVIRONMENT = "environment"; + public static final String BILL_INFO = "bill_info"; + public static final String RETURN_URL = "return_url"; + public static final String RETURN_CODE = "return_code"; + public static final String RETURN_CODE_SUCCESS = "0"; + public static final String RETURN_CODE_ERROR = "-1"; + public static final String RETURN_MSG = "return_msg"; + + public static final String VERSION = "version"; + public static final String CLIENT_KEY_2 = "CLIENT_KEY_2"; + public static final String CLIENT_KEY_1 = "CLIENT_KEY_1"; + public static final String MADICHVU = "MaDichVu"; + public static final String BANKINFO = "BankInfo"; + public static final String DEFAULT = "default"; + public static final String TKTHUHUONG = "TKThuHuong"; + public static final String MANHTHUHUONG = "MaNHThuHuong"; + public static final String TENTKTHUHUONG = "TenTKThuHuong"; + public static final String LOAIPHILEPHI = "LoaiPhiLePhi"; + public static final String LOAIPHILEPHI_PHI = "1"; + public static final String LOAIPHILEPHI_LEPHI = "2"; + public static final String MAPHILEPHI = "MaPhiLePhi"; + public static final String TENPHILEPHI = "TenPhiLePhi"; + public static final String TENPHILEPHI_PHI = "TenPhiLePhiPhi"; + public static final String TENPHILEPHI_LEPHI = "TenPhiLePhiLePhi"; + public static final String SOTIEN = "SoTien"; + public static final String PHILEPHI = "PhiLePhi"; + public static final String MADONVI = "MaDonVi"; + public static final String TENDONVI = "TenDonVi"; + public static final String MAHOSO = "MaHoSo"; + public static final String MATTHC = "MaTTHC"; + public static final String TENTTHC = "TenTTHC"; + public static final String NOIDUNGTHANHTOAN = "NoiDungThanhToan"; + public static final String MALOAIHINHTHUPHAT = "MaLoaiHinhThuPhat"; + public static final String MADVCAPPEND = "MADVCAppend"; + public static final String MADVC = "MaDVC"; + public static final String TENDVC = "TenDVC"; + public static final String HOTENNGUOINOP = "HoTenNguoiNop"; + public static final String SOCMNDNGUOINOP = "SoCMNDNguoiNop"; + public static final String DIACHINGUOINOP = "DiaChiNguoiNop"; + public static final String HUYENNGUOINOP = "HuyenNguoiNop"; + public static final String TINHNGUOINOP = "TinhNguoiNop"; + public static final String MACOQUANQD = "MaCoQuanQD"; + public static final String TENCOQUANQD = "TenCoQuanQD"; + public static final String KHOBAC = "KhoBac"; + public static final String NGAYQD = "NgayQD"; + public static final String SOQD = "SoQD"; + public static final String THOIGIANVIPHAM = "ThoiGianViPham"; + public static final String DIADIEMVIPHAM = "DiaDiemViPham"; + public static final String TENNGUOIVIPHAM = "TenNguoiViPham"; + public static final String TAIKHOANTHUNSNN = "TaiKhoanThuNSNN"; + public static final String DSKHOANNOP = "DSKhoanNop"; + public static final String NOIDUNG = "NoiDung"; + + public static final String ACTION_IS_ONLINE = "actionIsOnline"; + public static final String ACTION_IS_NOT_ONLINE = "actionIsNotOnline"; + public static final String ACTION_CODE = "actionCode"; + public static final String PAYMENT = "payment"; + public static final String URL = "url"; + public static final String URL_DOMAIN = "url_domain"; + public static final String MC_URL = "mcUrl"; + public static final String USERNAME = "userName"; + public static final String PWD = "pwd"; + public static final String ACTION_ENPOINT = "actions"; + public static final String CHUA_THANH_TOAN = "1"; + public static final String DA_THANH_TOAN = "0"; + public static final String KEY_PAY_SUCCESS = "keypay_success"; + public static final String KEY_PAY_FAIL = "keypay_fail"; + public static final String THUPHI = "Thu phí, lệ phí hồ sơ: "; +} diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/KeyPayV3Utils.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/KeyPayV3Utils.java new file mode 100644 index 0000000000..99d739c47c --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/KeyPayV3Utils.java @@ -0,0 +1,170 @@ +/** + * + */ +package org.opencps.dossiermgt.action.util; + +import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import javax.ws.rs.HttpMethod; +import javax.ws.rs.core.HttpHeaders; +import javax.ws.rs.core.MediaType; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Formatter; + +/** + * @author moon + * + */ +public class KeyPayV3Utils { + + private static Log _log = LogFactoryUtil.getLog(KeyPayV3Utils.class.getName()); + + public static JSONObject postAPI(String endpoint, JSONObject data) { + + HttpURLConnection conn = null; + JSONObject result = JSONFactoryUtil.createJSONObject(); + try { + URL url = new URL(endpoint); + + conn = (HttpURLConnection) url.openConnection(); + conn.setRequestMethod(HttpMethod.POST); + conn.setDoInput(true); + conn.setDoOutput(true); + + conn.setRequestProperty(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON); + conn.setRequestProperty(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON); + + conn.setInstanceFollowRedirects(true); + HttpURLConnection.setFollowRedirects(true); + conn.setReadTimeout(60 * 1000); + + byte[] postData = data.toJSONString().getBytes("UTF-8"); + int postDataLength = postData.length; + conn.setRequestProperty(HttpHeaders.CONTENT_LENGTH, Integer.toString(postDataLength)); + try (DataOutputStream wr = new DataOutputStream(conn.getOutputStream())) { + wr.write(postData); + } + + conn.connect(); + + try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader((conn.getInputStream())))) { + + String output = StringPool.BLANK; + + StringBuilder sb = new StringBuilder(); + + while ((output = bufferedReader.readLine()) != null) { + sb.append(output); + } + + result = JSONFactoryUtil.createJSONObject(sb.toString()); +// _log.info("result " + result); + + } + } catch (Exception e) { + _log.error(e); + } finally { + if (conn != null) { + conn.disconnect(); + } + } + return result; + } + + public static String toHexString(byte[] bytes) { + Formatter formatter = new Formatter(); + String result = StringPool.BLANK; + try { + for (byte b : bytes) { + formatter.format(PayGateTerm.HEX_FORMAT, b); + } + + result = formatter.toString(); + + } catch (Exception e) { + e.printStackTrace(); + } finally { + formatter.close(); + } + + return result; + } + + public static String encodeTransactionId(long dossierId) { + + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + return sdf.format(new Date()) + StringPool.DASH + dossierId; + } + public static String decodeTransactionId(String transactionId) { + + return transactionId.split(StringPool.DASH)[1]; + } + public static String createChecksum(String message, String secret) { + try { + Mac sha256HMAC = Mac.getInstance("HmacSHA256"); + SecretKeySpec secretKey = new SecretKeySpec(secret.getBytes(), "HmacSHA256"); + sha256HMAC.init(secretKey); + byte[] hash = sha256HMAC.doFinal(message.getBytes()); + return toHexString(hash); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + public static String genCreateChecksum(String client_id, String command, String transaction_id, + String CLIENT_KEY_1) { + String chuoi_du_lieu = client_id + "|" + command + "|" + transaction_id; + return createChecksum(chuoi_du_lieu, CLIENT_KEY_1); + } + + public static String genCreateChecksumReceived(String client_id, String command, String transaction_id, + String CLIENT_KEY_2) { + String chuoi_du_lieu = client_id + "|" + command + "|" + transaction_id; + return createChecksum(chuoi_du_lieu, CLIENT_KEY_2); + } + + public static String genRefundChecksum(String amount, String client_id, String command, String reason, + String transaction_id, String CLIENT_KEY_1) { + String chuoi_du_lieu = amount + "|" + client_id + "|" + command + "|" + reason + "|" + transaction_id; + return createChecksum(chuoi_du_lieu, CLIENT_KEY_1); + } + + public static String genRefundChecksumReceived(String amount, String client_id, String command, String reason, + String transaction_id, String CLIENT_KEY_2) { + String chuoi_du_lieu = amount + "|" + client_id + "|" + command + "|" + reason + "|" + transaction_id; + return createChecksum(chuoi_du_lieu, CLIENT_KEY_2); + } + + public static String genDetailRefundChecksum(String client_id, String command, String transaction_refund_code, + String CLIENT_KEY_1) { + String chuoi_du_lieu = client_id + "|" + command + "|" + transaction_refund_code; + return createChecksum(chuoi_du_lieu, CLIENT_KEY_1); + } + + public static String genDetailRefundChecksumReceived(String client_id, String command, + String transaction_refund_code, String CLIENT_KEY_2) { + String chuoi_du_lieu = client_id + "|" + command + "|" + transaction_refund_code; + return createChecksum(chuoi_du_lieu, CLIENT_KEY_2); + } + + public static String genCallbackChecksumReceived(String addition_fee, String client_id, String command, + String trans_amount, String transaction_id, String version, String CLIENT_KEY_1) { + String chuoi_du_lieu = addition_fee + "|" + client_id + "|" + command + "|" + trans_amount + "|" + + transaction_id + "|" + version; + _log.info("Chuoi du liệu " + chuoi_du_lieu); + return createChecksum(chuoi_du_lieu, CLIENT_KEY_1); + } +} diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/POSVCBUtils.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/POSVCBUtils.java index 7c72f06a21..69b3dd7626 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/POSVCBUtils.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/POSVCBUtils.java @@ -1,16 +1,20 @@ package org.opencps.dossiermgt.action.util; import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.json.JSONArray; import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONObject; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.search.Field; -import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.service.ServiceContext; import com.liferay.portal.kernel.util.Validator; import org.opencps.communication.model.ServerConfig; import org.opencps.communication.service.ServerConfigLocalServiceUtil; +import org.opencps.dossiermgt.model.PaymentConfig; +import org.opencps.dossiermgt.model.PaymentFile; import org.opencps.dossiermgt.rest.utils.SyncServerTerm; +import org.opencps.dossiermgt.service.PaymentConfigLocalServiceUtil; +import org.opencps.dossiermgt.service.PaymentFileLocalServiceUtil; import javax.crypto.Cipher; import javax.crypto.SecretKey; @@ -25,50 +29,178 @@ import java.util.Base64; public class POSVCBUtils { - public static String saleRequestDataPOSVCB( Long groupId, String serverCode, String refId, String serialNumber, - String terminalId, String amount, String currencyCode, String staffId, - String addPrint, String addData, String orderId) { - + public static JSONObject getRequestConnectionPOSVCB(long groupId,JSONObject defaultJSON ){ try { - String serverCodeFind = Validator.isNotNull(serverCode) ? serverCode : "POS_VCB"; - - ServerConfig sc = ServerConfigLocalServiceUtil.getByCode(groupId, serverCodeFind); StringBuilder sb = new StringBuilder(); - _log.debug("SERVER PROXY: " + sc.getConfigs()); - if (sc != null) { - String serverUrl; + if (Validator.isNotNull(defaultJSON)) { + String serverUrl = StringPool.BLANK; + String merchantOutletId = StringPool.BLANK; + String merchantId = StringPool.BLANK; + String clientId = StringPool.BLANK; + + JSONObject configObj = defaultJSON; - JSONObject configObj = JSONFactoryUtil.createJSONObject(sc.getConfigs()); serverUrl = configObj.getString(SyncServerTerm.SERVER_URL); - URL urlSale = new URL(serverUrl); + merchantOutletId = configObj.getString(SyncServerTerm.MERCHANT_OUTLET_ID_CONFIG); + merchantId = configObj.getString(SyncServerTerm.MERCHANT_ID_CONFIG); + clientId = configObj.getString(SyncServerTerm.CLIENT_ID_CONFIG); + URL urlSale = new URL(serverUrl); JSONObject jsonBody = JSONFactoryUtil.createJSONObject(); - jsonBody.put("EVENT",SyncServerTerm.EVENT_SALE); - jsonBody.put("REF_ID",refId); - jsonBody.put("SERIAL_NUMBER",serialNumber); - jsonBody.put("TERMINAL_ID",terminalId); - jsonBody.put("AMOUNT",amount); - jsonBody.put("CURRENCY_CODE",currencyCode); - jsonBody.put("STAFF_ID",staffId); - jsonBody.put("ADD_PRINT",addPrint); - jsonBody.put("ADD_DATA",addData); - jsonBody.put("ORDER_ID",orderId); - jsonBody.put("APP",SyncServerTerm.APP); - jsonBody.put("MERCHANT_OUTLET_ID",configObj.getString(SyncServerTerm.MERCHANT_OUTLET_ID)); - jsonBody.put("MERCHANT_ID",configObj.getString(SyncServerTerm.MERCHANT_ID)); - jsonBody.put("CLIENT_ID",configObj.getString(SyncServerTerm.CLIENT_ID)); + jsonBody.put("EVENT", SyncServerTerm.CONN); + jsonBody.put("MERCHANT_OUTLET_ID", merchantOutletId); + jsonBody.put("MERCHANT_ID", merchantId); + jsonBody.put("CLIENT_ID", clientId); String data = jsonBody.toString(); - byte[] keyData = configObj.getString(SyncServerTerm.THIRD_PARTY_KEY).getBytes(); - +// String thirdPartyKey = SyncServerTerm.THIRD_PARTY_KEY; +// byte[] keyData = thirdPartyKey.getBytes(); + System.out.println("thirdPartyKey: " + configObj.getString(SyncServerTerm.THIRD_PARTY_KEY)); JSONObject jsonBodyEncrypt = JSONFactoryUtil.createJSONObject(); jsonBodyEncrypt.put("KEY", configObj.getString(SyncServerTerm.THIRD_PARTY_ID)); - jsonBodyEncrypt.put("VALUE",encrypt3DES1(keyData,data)); - String body = "="+ jsonBodyEncrypt.toString(); + jsonBodyEncrypt.put("VALUE", encrypt3DES1(keyData, data)); + String body = "=" + jsonBodyEncrypt.toString(); + java.net.HttpURLConnection conSale = (java.net.HttpURLConnection) urlSale.openConnection(); + + conSale.setRequestMethod(HttpMethod.POST); + conSale.setRequestProperty(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON); + conSale.setRequestProperty(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); + + conSale.setRequestProperty("Content-Length", StringPool.BLANK + Integer.toString(body.getBytes().length)); + conSale.setUseCaches(false); + conSale.setDoInput(true); + conSale.setDoOutput(true); + OutputStream osLogin = conSale.getOutputStream(); + + osLogin.write(body.getBytes()); + osLogin.close(); + + BufferedReader brf = new BufferedReader(new InputStreamReader(conSale.getInputStream())); + int cp; + while ((cp = brf.read()) != -1) { + sb.append((char) cp); + } + try { + String dataSub = sb.toString().replaceAll("\"",""); + String decrypt = decrypt3DES1(keyData, dataSub); + JSONObject response = JSONFactoryUtil.createJSONObject(decrypt); + int total = response.getInt("TOTAL"); + if (total > 0) { + JSONArray reponseArr = response.getJSONArray(SyncServerTerm.CONN); + JSONObject reponseJSON = reponseArr.getJSONObject(0); + if (Validator.isNotNull(reponseJSON)) { + _log.debug("Máy Online : " + total); + return reponseJSON; + } else { + _log.debug("Không tìm được máy Online"); + return null; + } + } + }catch (Exception e){ + _log.info("Exception"); + e.getMessage(); + return null; + } + } + }catch (Exception e){ + e.getMessage(); + } + return null; + } + public static JSONObject getPaymentConfig(long groupId, String govAgencyCode, String serviceCode){ + try { + PaymentConfig payConfig = PaymentConfigLocalServiceUtil.getPaymentConfigByGovAgencyCode(groupId, govAgencyCode); + if (payConfig != null && Validator.isNotNull(payConfig.getEpaymentConfig())) { + JSONObject config = JSONFactoryUtil.createJSONObject(payConfig.getEpaymentConfig()); + if(Validator.isNotNull(config.getString("POS_VCB"))) { + JSONObject configPOS = JSONFactoryUtil.createJSONObject(config.getString("POS_VCB")); + JSONObject defaultJSON = JSONFactoryUtil.createJSONObject(); + if (Validator.isNotNull(configPOS) && Validator.isNotNull(serviceCode) && configPOS.has(serviceCode)) { + defaultJSON = JSONFactoryUtil.createJSONObject(configPOS.getString(serviceCode)); + return defaultJSON; + } + else if (Validator.isNotNull(configPOS) && Validator.isNotNull(configPOS.getString("default"))) { + defaultJSON = JSONFactoryUtil.createJSONObject(configPOS.getString("default")); + return defaultJSON; + }else{ + _log.debug("Không có cấu hình "); + } + }else{ + _log.debug("Không có cấu hình "); + return null; + } + }else{ + _log.debug("Không có cấu hình PaymentConfig "); + } + }catch (Exception e){ + _log.debug("Exception "); + e.getMessage(); + return null; + } + return null; + } + + public static String saleRequestDataPOSVCB(long groupId, String govAgencyCode, + long amount, String currencyCode, String staffId, + String addPrint, String addData, String orderId, String serviceCode) { + + try { + JSONObject defaultJSON = getPaymentConfig(groupId, govAgencyCode,serviceCode); + JSONObject reponseJSON = getRequestConnectionPOSVCB(groupId, defaultJSON); + + StringBuilder sb = new StringBuilder(); + if (Validator.isNotNull(defaultJSON) && Validator.isNotNull(reponseJSON)) { + _log.debug("SERVER PROXY: " + reponseJSON.toString()); + String serverUrl = StringPool.BLANK; + String serialNumber = StringPool.BLANK; + String refId = StringPool.BLANK; + String merchantOutletId = StringPool.BLANK; + String merchantId = StringPool.BLANK; + String clientId = StringPool.BLANK; + + serialNumber = reponseJSON.getString(SyncServerTerm.SERIAL_NUMBER); + refId = reponseJSON.getString(SyncServerTerm.REF_ID); + merchantOutletId = reponseJSON.getString(SyncServerTerm.MERCHANT_OUTLET_ID); + merchantId = reponseJSON.getString(SyncServerTerm.MERCHANT_ID); + clientId = reponseJSON.getString(SyncServerTerm.CLIENT_ID); + + serverUrl = defaultJSON.getString(SyncServerTerm.SERVER_URL); + + URL urlSale = new URL(serverUrl); + JSONObject jsonBody = JSONFactoryUtil.createJSONObject(); + + jsonBody.put("EVENT", SyncServerTerm.EVENT_SALE); + jsonBody.put("REF_ID", refId); + jsonBody.put("SERIAL_NUMBER", serialNumber); + jsonBody.put("TERMINAL_ID", refId); + String paymentAmount = paresAmount(amount); + jsonBody.put("AMOUNT", paymentAmount); + jsonBody.put("CURRENCY_CODE", currencyCode); + jsonBody.put("STAFF_ID", staffId); + jsonBody.put("ADD_PRINT", addPrint); + jsonBody.put("ADD_DATA", addData); + jsonBody.put("ORDER_ID", orderId); + jsonBody.put("APP", SyncServerTerm.APP); + jsonBody.put("MERCHANT_OUTLET_ID", merchantOutletId); + jsonBody.put("MERCHANT_ID", merchantId); + jsonBody.put("CLIENT_ID", clientId); + + String data = jsonBody.toString(); + System.out.println("Data: " + data); + byte[] keyData = reponseJSON.getString(SyncServerTerm.THIRD_PARTY_KEY).getBytes(); +// String thirdPartyKey = SyncServerTerm.THIRD_PARTY_KEY; +// byte[] keyData = thirdPartyKey.getBytes(); + _log.info("thirdPartyKey: " + reponseJSON.getString(SyncServerTerm.THIRD_PARTY_KEY)); + + JSONObject jsonBodyEncrypt = JSONFactoryUtil.createJSONObject(); + + jsonBodyEncrypt.put("KEY", defaultJSON.getString(SyncServerTerm.THIRD_PARTY_ID)); + jsonBodyEncrypt.put("VALUE", encrypt3DES1(keyData, data)); + String body = "=" + jsonBodyEncrypt.toString(); _log.debug("POST DATA: " + body); @@ -76,12 +208,11 @@ public static String saleRequestDataPOSVCB( Long groupId, String serverCode, Str conSale.setRequestMethod(HttpMethod.POST); conSale.setRequestProperty(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON); - conSale.setRequestProperty(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON); - conSale.setRequestProperty("Content-Length",StringPool.BLANK + Integer.toString(body.getBytes().length)); + conSale.setRequestProperty(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); + conSale.setRequestProperty("Content-Length", StringPool.BLANK + Integer.toString(body.getBytes().length)); conSale.setUseCaches(false); conSale.setDoInput(true); conSale.setDoOutput(true); - _log.debug("POST DATA: " + body); OutputStream osLogin = conSale.getOutputStream(); osLogin.write(body.getBytes()); osLogin.close(); @@ -91,63 +222,80 @@ public static String saleRequestDataPOSVCB( Long groupId, String serverCode, Str while ((cp = brf.read()) != -1) { sb.append((char) cp); } - return decrypt3DES1(keyData,sb.toString()); + String dataSub = sb.toString().replaceAll("\"", ""); + String decrypt3D = decrypt3DES1(keyData, dataSub); + + return decrypt3D; + } else { + return "Không có máy POS Online"; } - return null; } catch (Exception e) { _log.debug(e); return null; } - } - public static String voidPOSVCB( Long groupId, String serverCode, String refId, String serialNumber, - String terminalId, String amount, String currencyCode, String staffId, - String invoice, String amountConfirm, - String addPrint, String addData, String orderId) { + public static String voidPOSVCB( long groupId, String govAgencyCode, String currencyCode, String staffId, + String orderId, JSONObject resultJSON, String addPrint, String serviceCode) { try { - String serverCodeFind = Validator.isNotNull(serverCode) ? serverCode : "POS_VCB"; - - ServerConfig sc = ServerConfigLocalServiceUtil.getByCode(groupId, serverCodeFind); + JSONObject defaultJSON = getPaymentConfig(groupId, govAgencyCode, serviceCode); + JSONObject reponseJSON = getRequestConnectionPOSVCB(groupId, defaultJSON); StringBuilder sb = new StringBuilder(); - _log.debug("SERVER PROXY: " + sc.getConfigs()); - if (sc != null) { - String serverUrl; - - JSONObject configObj = JSONFactoryUtil.createJSONObject(sc.getConfigs()); - serverUrl = configObj.getString(SyncServerTerm.SERVER_URL); + if (Validator.isNotNull(defaultJSON) && Validator.isNotNull(reponseJSON) || Validator.isNotNull(resultJSON.getString(SyncServerTerm.INVOICE))) { + String serverUrl = StringPool.BLANK; + String serialNumber = StringPool.BLANK; + String refId = StringPool.BLANK; + String merchantOutletId = StringPool.BLANK; + String merchantId = StringPool.BLANK; + String clientId = StringPool.BLANK; + String invoice = StringPool.BLANK; + String addData = StringPool.BLANK; + String amount = StringPool.BLANK; + + serialNumber = reponseJSON.getString(SyncServerTerm.SERIAL_NUMBER); + refId = resultJSON.getString(SyncServerTerm.REF_ID); + merchantOutletId = reponseJSON.getString(SyncServerTerm.MERCHANT_OUTLET_ID); + merchantId = reponseJSON.getString(SyncServerTerm.MERCHANT_ID); + clientId = reponseJSON.getString(SyncServerTerm.CLIENT_ID); + invoice = resultJSON.getString(SyncServerTerm.INVOICE); + addData = resultJSON.getString(SyncServerTerm.ADD_DATA); + amount = resultJSON.getString(SyncServerTerm.AMOUNT); + + serverUrl = defaultJSON.getString(SyncServerTerm.SERVER_URL); URL urlVoid = new URL(serverUrl); JSONObject jsonBody = JSONFactoryUtil.createJSONObject(); - jsonBody.put("EVENT",SyncServerTerm.EVENT_VOID); - jsonBody.put("REF_ID",refId); - jsonBody.put("SERIAL_NUMBER",serialNumber); - jsonBody.put("TERMINAL_ID",terminalId); - jsonBody.put("AMOUNT",amount); - jsonBody.put("CURRENCY_CODE",currencyCode); - jsonBody.put("STAFF_ID",staffId); - jsonBody.put("ADD_PRINT",addPrint); - jsonBody.put("INVOICE",invoice); - jsonBody.put("AMOUNT_CONFIRM",Validator.isNotNull(amountConfirm) ? amountConfirm : "Y"); - jsonBody.put("ADD_DATA",addData); - jsonBody.put("ORDER_ID",orderId); - jsonBody.put("APP",SyncServerTerm.APP); - jsonBody.put("MERCHANT_OUTLET_ID",configObj.getString(SyncServerTerm.MERCHANT_OUTLET_ID)); - jsonBody.put("MERCHANT_ID",configObj.getString(SyncServerTerm.MERCHANT_ID)); - jsonBody.put("CLIENT_ID",configObj.getString(SyncServerTerm.CLIENT_ID)); + jsonBody.put("EVENT", SyncServerTerm.EVENT_VOID); + jsonBody.put("REF_ID", refId); + jsonBody.put("SERIAL_NUMBER", serialNumber); + jsonBody.put("TERMINAL_ID", refId); + jsonBody.put("AMOUNT", amount); + jsonBody.put("CURRENCY_CODE", currencyCode); + jsonBody.put("STAFF_ID", staffId); + jsonBody.put("ADD_PRINT", addPrint); + jsonBody.put("INVOICE", invoice); + jsonBody.put("AMOUNT_CONFIRM", "Y"); + jsonBody.put("ADD_DATA", addData); + jsonBody.put("ORDER_ID", orderId); + jsonBody.put("APP", SyncServerTerm.APP); + jsonBody.put("MERCHANT_OUTLET_ID", merchantOutletId); + jsonBody.put("MERCHANT_ID", merchantId); + jsonBody.put("CLIENT_ID", clientId); String data = jsonBody.toString(); - byte[] keyData = configObj.getString(SyncServerTerm.THIRD_PARTY_KEY).getBytes(); +// String thirdPartyKey =reponseJSON.getString(SyncServerTerm.THIRD_PARTY_KEY); +// byte[] keyData = thirdPartyKey.getBytes(); + byte[] keyData = reponseJSON.getString(SyncServerTerm.THIRD_PARTY_KEY).getBytes(); + _log.info("ThirdParty: " + reponseJSON.getString(SyncServerTerm.THIRD_PARTY_KEY)); JSONObject jsonBodyEncrypt = JSONFactoryUtil.createJSONObject(); - jsonBodyEncrypt.put("KEY", configObj.getString(SyncServerTerm.THIRD_PARTY_ID)); - jsonBodyEncrypt.put("VALUE",encrypt3DES1(keyData,data)); - - String body = "="+ jsonBodyEncrypt.toString(); + jsonBodyEncrypt.put("KEY", defaultJSON.getString(SyncServerTerm.THIRD_PARTY_ID)); + jsonBodyEncrypt.put("VALUE", encrypt3DES1(keyData, data)); + String body = "=" + jsonBodyEncrypt.toString(); _log.debug("POST DATA: " + body); @@ -155,8 +303,8 @@ public static String voidPOSVCB( Long groupId, String serverCode, String refId, conVoid.setRequestMethod(HttpMethod.POST); conVoid.setRequestProperty(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON); - conVoid.setRequestProperty(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON); - conVoid.setRequestProperty("Content-Length",StringPool.BLANK + Integer.toString(body.getBytes().length)); + conVoid.setRequestProperty(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); + conVoid.setRequestProperty("Content-Length", StringPool.BLANK + Integer.toString(body.getBytes().length)); conVoid.setUseCaches(false); conVoid.setDoInput(true); conVoid.setDoOutput(true); @@ -170,7 +318,8 @@ public static String voidPOSVCB( Long groupId, String serverCode, String refId, while ((cp = brf.read()) != -1) { sb.append((char) cp); } - return decrypt3DES1(keyData,sb.toString()); + return decrypt3DES1(keyData, sb.toString().replaceAll("\"", "")); + } return null; } catch (Exception e) { @@ -218,6 +367,9 @@ public static String settlementPOSVCB(Long groupId, String serverCode, String re byte[] keyData = configObj.getString(SyncServerTerm.THIRD_PARTY_KEY).getBytes(); +// String thirdPartyKey = SyncServerTerm.THIRD_PARTY_KEY; +// byte[] keyData = thirdPartyKey.getBytes(); + JSONObject jsonBodyEncrypt = JSONFactoryUtil.createJSONObject(); jsonBodyEncrypt.put("KEY", configObj.getString(SyncServerTerm.THIRD_PARTY_ID)); @@ -231,7 +383,7 @@ public static String settlementPOSVCB(Long groupId, String serverCode, String re conSettlement.setRequestMethod(HttpMethod.POST); conSettlement.setRequestProperty(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON); - conSettlement.setRequestProperty(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON); + conSettlement.setRequestProperty(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); conSettlement.setRequestProperty("Content-Length",StringPool.BLANK + Integer.toString(body.getBytes().length)); conSettlement.setUseCaches(false); conSettlement.setDoInput(true); @@ -256,40 +408,44 @@ public static String settlementPOSVCB(Long groupId, String serverCode, String re } - private static String checkResultPOSVCB(Long groupId, String serverCode, String key){ - + public static String checkResultPOSVCB(long groupId, String govAgencyCode, String key, String serviceCode){ try { - String serverCodeFind = Validator.isNotNull(serverCode) ? serverCode : "POS_VCB"; + String result = StringPool.BLANK; + JSONObject defaultJSON = getPaymentConfig(groupId, govAgencyCode, serviceCode); - ServerConfig sc = ServerConfigLocalServiceUtil.getByCode(groupId, serverCodeFind); StringBuilder sb = new StringBuilder(); - _log.debug("SERVER PROXY: " + sc.getConfigs()); - if (sc != null) { - String serverUrl; + _log.debug("SERVER PROXY: " + defaultJSON.toString()); + if (Validator.isNotNull(defaultJSON) && Validator.isNotNull(key)) { + String serverUrl = StringPool.BLANK; - JSONObject configObj = JSONFactoryUtil.createJSONObject(sc.getConfigs()); + JSONObject configObj = defaultJSON; serverUrl = configObj.getString(SyncServerTerm.SERVER_URL); URL urlSettlement = new URL(serverUrl); + JSONObject jsonBody = JSONFactoryUtil.createJSONObject(); + jsonBody.put("EVENT",SyncServerTerm.CHECK_RESULT); + jsonBody.put("KEY",key); + String data = jsonBody.toString(); byte[] keyData = configObj.getString(SyncServerTerm.THIRD_PARTY_KEY).getBytes(); +// String thirdPartyKey = SyncServerTerm.THIRD_PARTY_KEY; +// byte[] keyData = thirdPartyKey.getBytes(); JSONObject jsonBodyEncrypt = JSONFactoryUtil.createJSONObject(); - - jsonBodyEncrypt.put("KEY", "CHECK_RESULT"); - jsonBodyEncrypt.put("VALUE",encrypt3DES1(keyData,key)); + jsonBodyEncrypt.put("KEY", configObj.getString(SyncServerTerm.THIRD_PARTY_ID)); + jsonBodyEncrypt.put("VALUE",encrypt3DES1(keyData,data)); String body = "="+ jsonBodyEncrypt.toString(); - + _log.debug("POST DATA: " + body); java.net.HttpURLConnection conSettlement = (java.net.HttpURLConnection) urlSettlement.openConnection(); conSettlement.setRequestMethod(HttpMethod.POST); conSettlement.setRequestProperty(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON); - conSettlement.setRequestProperty(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON); + conSettlement.setRequestProperty(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED); conSettlement.setRequestProperty("Content-Length",StringPool.BLANK + Integer.toString(body.getBytes().length)); conSettlement.setUseCaches(false); conSettlement.setDoInput(true); conSettlement.setDoOutput(true); - _log.debug("POST DATA: " + body); + OutputStream osLogin = conSettlement.getOutputStream(); osLogin.write(body.getBytes()); osLogin.close(); @@ -299,9 +455,14 @@ private static String checkResultPOSVCB(Long groupId, String serverCode, String while ((cp = brf.read()) != -1) { sb.append((char) cp); } - return decrypt3DES1(keyData,sb.toString()); + _log.info("Data: " + sb.toString()); + String dataSub = sb.toString().replaceAll("\"", ""); + + result = decrypt3DES1(keyData,dataSub); + }else{ + return "Chưa có key giao dịch thanh toán"; } - return null; + return result; }catch (Exception e){ _log.debug(e); return null; @@ -309,7 +470,7 @@ private static String checkResultPOSVCB(Long groupId, String serverCode, String } - private static Log _log = LogFactoryUtil.getLog(DossierActionUtils.class.getName()); + private static Log _log = LogFactoryUtil.getLog(POSVCBUtils.class.getName()); private static String encrypt3DES1(byte[] keyData, String data) throws Exception { if (data == null || data.trim().equals("")) @@ -328,21 +489,40 @@ private static String encrypt3DES1(byte[] keyData, String data) throws Exception return cipher_msg; } - private static String decrypt3DES1 ( byte [] keyData , String data ) throws Exception { - if ( data == null || data . trim (). equals ("")) - return ""; - data = data . toUpperCase (); - SecretKey key = new SecretKeySpec ( keyData , "DESede"); - Cipher cipher = Cipher . getInstance ("DESede/CBC/PKCS5Padding "); - IvParameterSpec ivSpec = new IvParameterSpec ( new byte [8]) ; - cipher . init ( Cipher . DECRYPT_MODE , key , ivSpec ); - String _data = new String ( DatatypeConverter . parseHexBinary ( - data ), "UTF8"); - byte [] raw = Base64.getDecoder().decode(_data); - byte [] stringBytes = cipher . doFinal ( raw ); - String plain_msg = new String ( stringBytes , "UTF8"); - // Return plain_msg - return plain_msg ; + public static String decrypt3DES1(byte[] keyData, String data) throws Exception { + try { + if (data == null || data.trim().equals("")) + return ""; + data = data.toUpperCase(); + SecretKey key = new SecretKeySpec(keyData, "DESede"); + Cipher cipher = Cipher.getInstance("DESede/CBC/PKCS5Padding"); + IvParameterSpec ivSpec = new IvParameterSpec(new byte[8]); + cipher.init(Cipher.DECRYPT_MODE, key, ivSpec); + String _data = new String(DatatypeConverter.parseHexBinary(data), "UTF8"); + byte[] raw = Base64.getDecoder().decode(_data); + byte[] stringBytes = cipher.doFinal(raw); + String plain_msg = new String(stringBytes, "UTF8"); + _log.info("plain_msg: " + plain_msg); + return plain_msg; + }catch (Exception e) { + e.printStackTrace(); + } + return ""; + } + public static String paresAmount(long amount){ + String paymentAmount = String.valueOf(amount); + if (paymentAmount.length() == 4L) { + paymentAmount = "000000" + paymentAmount + "00"; + } else if (paymentAmount.length() == 5) { + paymentAmount = "00000" + paymentAmount + "00"; + } else if (paymentAmount.length() == 6) { + paymentAmount = "0000" + paymentAmount + "00"; + } else if (paymentAmount.length() == 7) { + paymentAmount = "000" + paymentAmount + "00"; + } else if (paymentAmount.length() == 8) { + paymentAmount = "00" + paymentAmount + "00"; + } + return paymentAmount; } } diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/PayGateTerm.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/PayGateTerm.java new file mode 100644 index 0000000000..53eb34ae1f --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/action/util/PayGateTerm.java @@ -0,0 +1,237 @@ +package org.opencps.dossiermgt.action.util; + +import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import org.opencps.communication.model.ServerConfig; +import org.opencps.communication.service.ServerConfigLocalServiceUtil; + +import java.math.BigInteger; +import java.nio.charset.StandardCharsets; +import java.security.MessageDigest; + +public class PayGateTerm { + + private static Log _log = LogFactoryUtil.getLog(PayGateTerm.class.getName()); + public static final String ATTACHMENT_FILENAME_FORMAT = "attachment; filename=\"%s\""; + public static final String PNG_TYPE = "image/png"; + public static final String KEYPAY_DVCQG_PROTOCOL = "KEYPAY_DVCQG_PROTOCOL"; + public static final String KEYPAY_DVCQG_CREATE_TRANSACTION_ENDPOINT = "keypay_dvcqg_create_transaction_endpoint"; + public static final String KEYPAY_DVCQG_DETAIL_TRANSACTION_ENDPOINT = "keypay_dvcqg_detail_transaction_endpoint"; + public static final String VTP_PROTOCOL = "VTP_QRCODE"; + public static final String PRIORITY = "priority"; + public static final String KEY = "key"; + public static final String VALUE = "value"; + public static final String VERSION = "version"; + public static final String HASH_KEY_1 = "hash_key_1"; + public static final String HASH_KEY_2 = "hash_key_2"; + public static final String TYPE = "type"; + public static final String BILLCODE = "billcode"; + public static final String ORDER_ID = "order_id"; + public static final String AMOUNT = "amount"; + public static final String MERCHANT_CODE = "merchant_code"; + public static final String DOT_PNG = ".png"; + public static final String PNG_UPPER = "PNG"; + public static final String ERROR_CODE_03 = "03"; + public static final String ERROR_CODE_01 = "01"; + public static final String ERROR_CODE_02 = "02"; + public static final String ERROR_CODE_00 = "00"; + public static final String ACCESS_CODE = "access_code"; + public static final String HASH_KEY = "hash_key"; + public static final String HMAC_SHA1 = "HmacSHA1"; + public static final String CHECK_SUM = "check_sum"; + public static final String TRANS_AMOUNT = "trans_amount"; + public static final String PAYMENT_FEE = "payment_fee"; + public static final String ERROR_CODE = "error_code"; + public static final String HEX_FORMAT = "%02x"; + public static final String RETURN_URL = "return_url"; + public static final String RETURN_BILL_CODE = "return_bill_code"; + public static final String RETURN_OTHER_INFO = "return_other_info"; + + public static final String URL_SEARCH = "url_search"; + public static final String CMD_SEARCH = "cmd_search"; + public static final String VERSION_SEARCH = "version_search"; + public static final String ENCODING_CHECKSUM = "version_search"; + + public static final String CUST_MSISDN = "cust_msisdn"; + public static final String VT_TRANSACTION_ID = "vt_transaction_id"; + public static final String PAYMENT_STATUS = "payment_status"; + + public static final String ENDPOINT_CONFIRM = "o/pgi/vtp/mcpaymentconfirm"; + public static final String ENDPOINT_RECEIVER = "o/pgi/vtp/mcreceiveresult"; + public static final String ENDPOINT_SEARCH = "o/pgi/vtp/mcsearch"; + public static final String ENDPOINT_DVCRECEIVER = "o/pgi/vtp/dvcreceiveresult"; + + public static final String ACTION_IS_ONLINE = "actionIsOnline"; + public static final String ACTION_IS_NOT_ONLINE = "actionIsNotOnline"; + public static final String ACTION_CODE = "actionCode"; + public static final String PAYMENT = "payment"; + public static final String URL = "url"; + public static final String URL_DOMAIN = "url_domain"; + public static final String MC_URL = "mcUrl"; + public static final String USERNAME = "userName"; + public static final String PWD = "pwd"; + public static final String ACTION_ENPOINT = "actions"; + + //add by TrungNT + public static final String CLIENT_ID = "client_id"; + public static final String TRANSACTION_ID = "transaction_id"; + public static final String TRANSACTION_CODE = "transaction_code"; + public static final String COMMAND = "command"; + public static final String DESCRIPTION = "description"; + public static final String LOCALE = "locale"; + public static final String COUNTRY_CODE = "country_code"; + public static final String CURRENCY_CODE = "currency_code"; + public static final String ENVIRONMENT = "environment"; + public static final String STATUS = "status"; + public static final String BILL_INFO = "bill_info"; + public static final String MADICHVU = "MaDichVu"; + + public static final String BANKINFO = "BankInfo"; + public static final String SERVICE_CODE = "ServiceCode"; + public static final String TKTHUHUONG = "TKThuHuong"; + public static final String MANHTHUHUONG = "MaNHThuHuong"; + public static final String TENTKTHUHUONG = "TenTKThuHuong"; + public static final String DEFAULT = "default"; + + public static final String PHILEPHI = "PhiLePhi"; + public static final String LOAIPHILEPHI = "LoaiPhiLePhi"; + public static final String LOAIPHILEPHI_PHI = "1"; + public static final String LOAIPHILEPHI_LEPHI = "2"; + + public static final String MAPHILEPHI = "MaPhiLePhi"; + public static final String TENPHILEPHI = "TenPhiLePhi"; + public static final String TENPHILEPHI_PHI = "TenPhiLePhiPhi"; + public static final String TENPHILEPHI_LEPHI = "TenPhiLePhiLePhi"; + public static final String SOTIEN = "SoTien"; + public static final String MADONVI = "MaDonVi"; + public static final String TENDONVI = "TenDonVi"; + public static final String MAHOSO = "MaHoSo"; + public static final String MADVC = "MaDVC"; + public static final String MADVCAPPEND = "MADVCAppend"; + public static final String TENDVC = "TenDVC"; + public static final String MATTHC = "MaTTHC"; + public static final String TENTTHC = "TenTTHC"; + public static final String NOIDUNGTHANHTOAN = "NoiDungThanhToan"; + public static final String MALOAIHINHTHUPHAT = "MaLoaiHinhThuPhat"; + + public static final String TENLOAIHINHTHUPHAT = "TenLoaiHinhThuPhat"; + public static final String HOTENNGUOINOP = "HoTenNguoiNop"; + public static final String SOCMNDNGUOINOP = "SoCMNDNguoiNop"; + public static final String DIACHINGUOINOP = "DiaChiNguoiNop"; + public static final String HUYENNGUOINOP = "HuyenNguoiNop"; + public static final String TINHNGUOINOP = "TinhNguoiNop"; + public static final String MACOQUANQD = "MaCoQuanQD"; + public static final String TENCOQUANQD = "TenCoQuanQD"; + public static final String KHOBAC = "KhoBac"; + public static final String NGAYQD = "NgayQD"; + public static final String SOQD = "SoQD"; + public static final String THOIGIANVIPHAM = "ThoiGianViPham"; + public static final String DIADIEMVIPHAM = "DiaDiemViPham"; + public static final String TENNGUOIVIPHAM = "TenNguoiViPham"; + public static final String TAIKHOANTHUNSNN = "TaiKhoanThuNSNN"; + public static final String DSKHOANNOP = "DSKhoanNop"; + public static final String NOIDUNG = "NoiDung"; + public static final String ADDITION_FEE = "addition_fee"; + + public static final String ERROR_RES_SUCCESS = "0"; + public static final String ERROR_RES_KEY = "error"; + public static final String MSG_RES_KEY = "msg"; + public static final String PAYMENT_URL_RES_KEY = "payment_url"; + + // add by PhucHN + public static final String LOAIBANTIN = "LoaiBanTin"; + public static final String LOAIBANTIN_INIT = "LoaiBanTinInit"; + public static final String LOAIBANTIN_GET_BILL = "LoaiBanTinGetBill"; + public static final String LOAIBANTIN_CONFIRM = "LoaiBanTinConfirm"; + public static final String PHIENBAN = "PhienBan"; + public static final String MADOITAC = "MaDoiTac"; + public static final String MATHAMCHIEU = "MaThamChieu"; + public static final String LOAIHINHTHANHTOAN = "LoaiHinhThanhToan"; + public static final String MAKENHTHANHTOAN = "MaKenhThanhToan"; + public static final String MATHIETBI = "MaThietBi"; + public static final String NGONNGU = "NgonNgu"; + public static final String MATIENTE = "MaTienTe"; + public static final String MANGANHANG = "MaNganHang"; + public static final String THONGTINGIAODICH = "ThongTinGiaoDich"; + public static final String THOIGIANGD = "ThoiGianGD"; + public static final String IP = "Ip"; + public static final String THONGTINBIENLAI = "ThongTinBienLai"; + public static final String MAXACTHUC = "MaXacThuc"; + + public static final String MALOI_KEY = "MaLoi"; + public static final String MALOI_SUCCESS = "00"; + public static final String PAYMENTPLATFORM_DVCQG_INIT_TRANSACTION_ENDPOINT = "paymentplatform_dvcqg_init_transaction_endpoint"; + public static final String MAGIAODICH = "MaGiaoDich"; + public static final String PAYMENTPLATFORM_DVCQG_GET_RECEIPT_ENDPOINT = "paymentplatform_dvcgq_get_receipt_endpoint"; + public static final String PAYMENTPLATFORM_DVCQG_GET_BILL_ENDPOINT = "paymentplatform_dvcqg_get_bill_endpoint"; + + public static final String SUCCESSFUL = "SUCCESSFUL"; + public static final String FAILED = "FAILED"; + public static final String SIGNATURE_WRONG = "SIGNATURE_WRONG"; + //config paygov + public static final String PAYGOV_AMOUNT = "amount"; + public static final String PAYGOV_ORDER_ID = "orderId"; + public static final String PAYGOV_ORDER_INFO = "orderInfo"; + public static final String PAYGOV_REQUEST_CODE = "requestCode"; + public static final String PAYGOV_TRANSACTION_NO = "transactionNo"; + public static final String PAYGOV_PAY_DATE = "payDate"; + public static final String PAYGOV_PAY_GATE = "paygate"; + public static final String PAYGOV_ERROR_CODE = "errorCode"; + public static final String PAYGOV_TYPE = "type"; + public static final String PAYGOV_TRANSACTION_CODE = "transactionCode"; + public static final String PAYGOV_CHECKSUM = "checksum"; + public static final String PAYGOV_ACTIVE_CHECK_SUM = "activeCheckSum"; + + + public static String buildPathDoAction(String path, String dossierId) { + + return path + "/o/rest/v2/dossiers/" + dossierId + "/actions"; + }; + + public static final String getMcUrlByBillCode (String billcode) { + try { + String govAgencyCode = billcode.split("___")[0]; + ServerConfig serverConfig = ServerConfigLocalServiceUtil.getByCode("SERVER_" + govAgencyCode); + JSONObject config = JSONFactoryUtil.createJSONObject(serverConfig.getConfigs()); + return config.getString(MC_URL); + } catch (Exception e) { + _log.debug(e); + } + return StringPool.BLANK; + } + + public static String genChecksum(JSONObject paygovConfig, String orderId, long amount, String requestCode) throws Exception{ + try { + String secretKey = paygovConfig.getString("secretKey"); + String accessKey = paygovConfig.getString("accessKey"); + String partnerCode = paygovConfig.getString("partnerCode"); + String stringBeforeHash = secretKey + accessKey + partnerCode + orderId + requestCode + amount; + System.out.println("String before hash: " + stringBeforeHash); + MessageDigest digest = MessageDigest.getInstance("SHA-256"); + digest.update(stringBeforeHash.getBytes(StandardCharsets.UTF_8)); + byte[] digest1 = digest.digest(); + String hex = String.format("%064x", new BigInteger(1, digest1)); + System.out.println("String after hash: " + hex); + return hex; + } catch (Exception e) { + throw new Exception("Error when gen checksum for orderId " + orderId + ": " + e.getMessage()); + } + } + + public enum ListPaygovUnit { + DONGTHAP("PAYGOV-DONGTHAP"), + HAUGIANG("PAYGOV-HAUGIANG"); + + private final String value; + + ListPaygovUnit(String value) { + this.value = value; + } + public String getValue() { + return this.value; + } + } +} diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcServiceInfoBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcServiceInfoBaseImpl.java new file mode 100644 index 0000000000..9fc68b494b --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcServiceInfoBaseImpl.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import org.opencps.dossiermgt.model.CsdlDcServiceInfo; +import org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalServiceUtil; + +/** + * The extended model base implementation for the CsdlDcServiceInfo service. Represents a row in the "opencps_csdldc_serviceinfo" database table, with each column mapped to a property of this class. + * + *

+ * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link CsdlDcServiceInfoImpl}. + *

+ * + * @author huymq + * @see CsdlDcServiceInfoImpl + * @see CsdlDcServiceInfo + * @generated + */ +@ProviderType +public abstract class CsdlDcServiceInfoBaseImpl + extends CsdlDcServiceInfoModelImpl implements CsdlDcServiceInfo { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a csdl dc service info model instance should use the {@link CsdlDcServiceInfo} interface instead. + */ + @Override + public void persist() { + if (this.isNew()) { + CsdlDcServiceInfoLocalServiceUtil.addCsdlDcServiceInfo(this); + } + else { + CsdlDcServiceInfoLocalServiceUtil.updateCsdlDcServiceInfo(this); + } + } +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcServiceInfoCacheModel.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcServiceInfoCacheModel.java new file mode 100644 index 0000000000..a398223d48 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcServiceInfoCacheModel.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.util.HashUtil; +import com.liferay.portal.kernel.util.StringBundler; + +import org.opencps.dossiermgt.model.CsdlDcServiceInfo; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +/** + * The cache model class for representing CsdlDcServiceInfo in entity cache. + * + * @author huymq + * @see CsdlDcServiceInfo + * @generated + */ +@ProviderType +public class CsdlDcServiceInfoCacheModel implements CacheModel, + Externalizable { + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof CsdlDcServiceInfoCacheModel)) { + return false; + } + + CsdlDcServiceInfoCacheModel csdlDcServiceInfoCacheModel = (CsdlDcServiceInfoCacheModel)obj; + + if (idDcService == csdlDcServiceInfoCacheModel.idDcService) { + return true; + } + + return false; + } + + @Override + public int hashCode() { + return HashUtil.hash(0, idDcService); + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(17); + + sb.append("{uuid="); + sb.append(uuid); + sb.append(", idDcService="); + sb.append(idDcService); + sb.append(", groupId="); + sb.append(groupId); + sb.append(", companyId="); + sb.append(companyId); + sb.append(", userId="); + sb.append(userId); + sb.append(", serviceCode="); + sb.append(serviceCode); + sb.append(", serviceCodeDvcqg="); + sb.append(serviceCodeDvcqg); + sb.append(", status="); + sb.append(status); + sb.append("}"); + + return sb.toString(); + } + + @Override + public CsdlDcServiceInfo toEntityModel() { + CsdlDcServiceInfoImpl csdlDcServiceInfoImpl = new CsdlDcServiceInfoImpl(); + + if (uuid == null) { + csdlDcServiceInfoImpl.setUuid(""); + } + else { + csdlDcServiceInfoImpl.setUuid(uuid); + } + + csdlDcServiceInfoImpl.setIdDcService(idDcService); + csdlDcServiceInfoImpl.setGroupId(groupId); + csdlDcServiceInfoImpl.setCompanyId(companyId); + csdlDcServiceInfoImpl.setUserId(userId); + + if (serviceCode == null) { + csdlDcServiceInfoImpl.setServiceCode(""); + } + else { + csdlDcServiceInfoImpl.setServiceCode(serviceCode); + } + + if (serviceCodeDvcqg == null) { + csdlDcServiceInfoImpl.setServiceCodeDvcqg(""); + } + else { + csdlDcServiceInfoImpl.setServiceCodeDvcqg(serviceCodeDvcqg); + } + + csdlDcServiceInfoImpl.setStatus(status); + + csdlDcServiceInfoImpl.resetOriginalValues(); + + return csdlDcServiceInfoImpl; + } + + @Override + public void readExternal(ObjectInput objectInput) throws IOException { + uuid = objectInput.readUTF(); + + idDcService = objectInput.readLong(); + + groupId = objectInput.readLong(); + + companyId = objectInput.readLong(); + + userId = objectInput.readLong(); + serviceCode = objectInput.readUTF(); + serviceCodeDvcqg = objectInput.readUTF(); + + status = objectInput.readInt(); + } + + @Override + public void writeExternal(ObjectOutput objectOutput) + throws IOException { + if (uuid == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(uuid); + } + + objectOutput.writeLong(idDcService); + + objectOutput.writeLong(groupId); + + objectOutput.writeLong(companyId); + + objectOutput.writeLong(userId); + + if (serviceCode == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(serviceCode); + } + + if (serviceCodeDvcqg == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(serviceCodeDvcqg); + } + + objectOutput.writeInt(status); + } + + public String uuid; + public long idDcService; + public long groupId; + public long companyId; + public long userId; + public String serviceCode; + public String serviceCodeDvcqg; + public int status; +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcServiceInfoImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcServiceInfoImpl.java new file mode 100644 index 0000000000..0818d78599 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcServiceInfoImpl.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model.impl; + +import aQute.bnd.annotation.ProviderType; + +/** + * The extended model implementation for the CsdlDcServiceInfo service. Represents a row in the "opencps_csdldc_serviceinfo" database table, with each column mapped to a property of this class. + * + *

+ * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.dossiermgt.model.CsdlDcServiceInfo} interface. + *

+ * + * @author huymq + */ +@ProviderType +public class CsdlDcServiceInfoImpl extends CsdlDcServiceInfoBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a csdl dc service info model instance should use the {@link org.opencps.dossiermgt.model.CsdlDcServiceInfo} interface instead. + */ + public CsdlDcServiceInfoImpl() { + } +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcServiceInfoModelImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcServiceInfoModelImpl.java new file mode 100644 index 0000000000..43e121f260 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcServiceInfoModelImpl.java @@ -0,0 +1,636 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; +import com.liferay.expando.kernel.util.ExpandoBridgeFactoryUtil; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.model.ModelWrapper; +import com.liferay.portal.kernel.model.User; +import com.liferay.portal.kernel.model.impl.BaseModelImpl; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.service.UserLocalServiceUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; + +import org.opencps.dossiermgt.model.CsdlDcServiceInfo; +import org.opencps.dossiermgt.model.CsdlDcServiceInfoModel; + +import java.io.Serializable; + +import java.sql.Types; + +import java.util.HashMap; +import java.util.Map; + +/** + * The base model implementation for the CsdlDcServiceInfo service. Represents a row in the "opencps_csdldc_serviceinfo" database table, with each column mapped to a property of this class. + * + *

+ * This implementation and its corresponding interface {@link CsdlDcServiceInfoModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link CsdlDcServiceInfoImpl}. + *

+ * + * @author huymq + * @see CsdlDcServiceInfoImpl + * @see CsdlDcServiceInfo + * @see CsdlDcServiceInfoModel + * @generated + */ +@ProviderType +public class CsdlDcServiceInfoModelImpl extends BaseModelImpl + implements CsdlDcServiceInfoModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a csdl dc service info model instance should use the {@link CsdlDcServiceInfo} interface instead. + */ + public static final String TABLE_NAME = "opencps_csdldc_serviceinfo"; + public static final Object[][] TABLE_COLUMNS = { + { "uuid_", Types.VARCHAR }, + { "idDcService", Types.BIGINT }, + { "groupId", Types.BIGINT }, + { "companyId", Types.BIGINT }, + { "userId", Types.BIGINT }, + { "serviceCode", Types.VARCHAR }, + { "serviceCodeDvcqg", Types.VARCHAR }, + { "status", Types.INTEGER } + }; + public static final Map TABLE_COLUMNS_MAP = new HashMap(); + + static { + TABLE_COLUMNS_MAP.put("uuid_", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("idDcService", Types.BIGINT); + TABLE_COLUMNS_MAP.put("groupId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("companyId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("userId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("serviceCode", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("serviceCodeDvcqg", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("status", Types.INTEGER); + } + + public static final String TABLE_SQL_CREATE = "create table opencps_csdldc_serviceinfo (uuid_ VARCHAR(75) null,idDcService LONG not null primary key,groupId LONG,companyId LONG,userId LONG,serviceCode VARCHAR(75) null,serviceCodeDvcqg VARCHAR(75) null,status INTEGER)"; + public static final String TABLE_SQL_DROP = "drop table opencps_csdldc_serviceinfo"; + public static final String ORDER_BY_JPQL = " ORDER BY csdlDcServiceInfo.idDcService ASC"; + public static final String ORDER_BY_SQL = " ORDER BY opencps_csdldc_serviceinfo.idDcService ASC"; + public static final String DATA_SOURCE = "liferayDataSource"; + public static final String SESSION_FACTORY = "liferaySessionFactory"; + public static final String TX_MANAGER = "liferayTransactionManager"; + public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(org.opencps.backend.dossiermgt.service.util.ServiceProps.get( + "value.object.entity.cache.enabled.org.opencps.dossiermgt.model.CsdlDcServiceInfo"), + true); + public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(org.opencps.backend.dossiermgt.service.util.ServiceProps.get( + "value.object.finder.cache.enabled.org.opencps.dossiermgt.model.CsdlDcServiceInfo"), + true); + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(org.opencps.backend.dossiermgt.service.util.ServiceProps.get( + "value.object.column.bitmask.enabled.org.opencps.dossiermgt.model.CsdlDcServiceInfo"), + true); + public static final long COMPANYID_COLUMN_BITMASK = 1L; + public static final long GROUPID_COLUMN_BITMASK = 2L; + public static final long SERVICECODE_COLUMN_BITMASK = 4L; + public static final long STATUS_COLUMN_BITMASK = 8L; + public static final long UUID_COLUMN_BITMASK = 16L; + public static final long IDDCSERVICE_COLUMN_BITMASK = 32L; + public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(org.opencps.backend.dossiermgt.service.util.ServiceProps.get( + "lock.expiration.time.org.opencps.dossiermgt.model.CsdlDcServiceInfo")); + + public CsdlDcServiceInfoModelImpl() { + } + + @Override + public long getPrimaryKey() { + return _idDcService; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setIdDcService(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _idDcService; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Class getModelClass() { + return CsdlDcServiceInfo.class; + } + + @Override + public String getModelClassName() { + return CsdlDcServiceInfo.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("uuid", getUuid()); + attributes.put("idDcService", getIdDcService()); + attributes.put("groupId", getGroupId()); + attributes.put("companyId", getCompanyId()); + attributes.put("userId", getUserId()); + attributes.put("serviceCode", getServiceCode()); + attributes.put("serviceCodeDvcqg", getServiceCodeDvcqg()); + attributes.put("status", getStatus()); + + attributes.put("entityCacheEnabled", isEntityCacheEnabled()); + attributes.put("finderCacheEnabled", isFinderCacheEnabled()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + String uuid = (String)attributes.get("uuid"); + + if (uuid != null) { + setUuid(uuid); + } + + Long idDcService = (Long)attributes.get("idDcService"); + + if (idDcService != null) { + setIdDcService(idDcService); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String serviceCode = (String)attributes.get("serviceCode"); + + if (serviceCode != null) { + setServiceCode(serviceCode); + } + + String serviceCodeDvcqg = (String)attributes.get("serviceCodeDvcqg"); + + if (serviceCodeDvcqg != null) { + setServiceCodeDvcqg(serviceCodeDvcqg); + } + + Integer status = (Integer)attributes.get("status"); + + if (status != null) { + setStatus(status); + } + } + + @Override + public String getUuid() { + if (_uuid == null) { + return ""; + } + else { + return _uuid; + } + } + + @Override + public void setUuid(String uuid) { + if (_originalUuid == null) { + _originalUuid = _uuid; + } + + _uuid = uuid; + } + + public String getOriginalUuid() { + return GetterUtil.getString(_originalUuid); + } + + @Override + public long getIdDcService() { + return _idDcService; + } + + @Override + public void setIdDcService(long idDcService) { + _idDcService = idDcService; + } + + @Override + public long getGroupId() { + return _groupId; + } + + @Override + public void setGroupId(long groupId) { + _columnBitmask |= GROUPID_COLUMN_BITMASK; + + if (!_setOriginalGroupId) { + _setOriginalGroupId = true; + + _originalGroupId = _groupId; + } + + _groupId = groupId; + } + + public long getOriginalGroupId() { + return _originalGroupId; + } + + @Override + public long getCompanyId() { + return _companyId; + } + + @Override + public void setCompanyId(long companyId) { + _columnBitmask |= COMPANYID_COLUMN_BITMASK; + + if (!_setOriginalCompanyId) { + _setOriginalCompanyId = true; + + _originalCompanyId = _companyId; + } + + _companyId = companyId; + } + + public long getOriginalCompanyId() { + return _originalCompanyId; + } + + @Override + public long getUserId() { + return _userId; + } + + @Override + public void setUserId(long userId) { + _userId = userId; + } + + @Override + public String getUserUuid() { + try { + User user = UserLocalServiceUtil.getUserById(getUserId()); + + return user.getUuid(); + } + catch (PortalException pe) { + return ""; + } + } + + @Override + public void setUserUuid(String userUuid) { + } + + @Override + public String getServiceCode() { + if (_serviceCode == null) { + return ""; + } + else { + return _serviceCode; + } + } + + @Override + public void setServiceCode(String serviceCode) { + _columnBitmask |= SERVICECODE_COLUMN_BITMASK; + + if (_originalServiceCode == null) { + _originalServiceCode = _serviceCode; + } + + _serviceCode = serviceCode; + } + + public String getOriginalServiceCode() { + return GetterUtil.getString(_originalServiceCode); + } + + @Override + public String getServiceCodeDvcqg() { + if (_serviceCodeDvcqg == null) { + return ""; + } + else { + return _serviceCodeDvcqg; + } + } + + @Override + public void setServiceCodeDvcqg(String serviceCodeDvcqg) { + _serviceCodeDvcqg = serviceCodeDvcqg; + } + + @Override + public int getStatus() { + return _status; + } + + @Override + public void setStatus(int status) { + _columnBitmask |= STATUS_COLUMN_BITMASK; + + if (!_setOriginalStatus) { + _setOriginalStatus = true; + + _originalStatus = _status; + } + + _status = status; + } + + public int getOriginalStatus() { + return _originalStatus; + } + + public long getColumnBitmask() { + return _columnBitmask; + } + + @Override + public ExpandoBridge getExpandoBridge() { + return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), + CsdlDcServiceInfo.class.getName(), getPrimaryKey()); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + ExpandoBridge expandoBridge = getExpandoBridge(); + + expandoBridge.setAttributes(serviceContext); + } + + @Override + public CsdlDcServiceInfo toEscapedModel() { + if (_escapedModel == null) { + _escapedModel = (CsdlDcServiceInfo)ProxyUtil.newProxyInstance(_classLoader, + _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); + } + + return _escapedModel; + } + + @Override + public Object clone() { + CsdlDcServiceInfoImpl csdlDcServiceInfoImpl = new CsdlDcServiceInfoImpl(); + + csdlDcServiceInfoImpl.setUuid(getUuid()); + csdlDcServiceInfoImpl.setIdDcService(getIdDcService()); + csdlDcServiceInfoImpl.setGroupId(getGroupId()); + csdlDcServiceInfoImpl.setCompanyId(getCompanyId()); + csdlDcServiceInfoImpl.setUserId(getUserId()); + csdlDcServiceInfoImpl.setServiceCode(getServiceCode()); + csdlDcServiceInfoImpl.setServiceCodeDvcqg(getServiceCodeDvcqg()); + csdlDcServiceInfoImpl.setStatus(getStatus()); + + csdlDcServiceInfoImpl.resetOriginalValues(); + + return csdlDcServiceInfoImpl; + } + + @Override + public int compareTo(CsdlDcServiceInfo csdlDcServiceInfo) { + long primaryKey = csdlDcServiceInfo.getPrimaryKey(); + + if (getPrimaryKey() < primaryKey) { + return -1; + } + else if (getPrimaryKey() > primaryKey) { + return 1; + } + else { + return 0; + } + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof CsdlDcServiceInfo)) { + return false; + } + + CsdlDcServiceInfo csdlDcServiceInfo = (CsdlDcServiceInfo)obj; + + long primaryKey = csdlDcServiceInfo.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public boolean isEntityCacheEnabled() { + return ENTITY_CACHE_ENABLED; + } + + @Override + public boolean isFinderCacheEnabled() { + return FINDER_CACHE_ENABLED; + } + + @Override + public void resetOriginalValues() { + CsdlDcServiceInfoModelImpl csdlDcServiceInfoModelImpl = this; + + csdlDcServiceInfoModelImpl._originalUuid = csdlDcServiceInfoModelImpl._uuid; + + csdlDcServiceInfoModelImpl._originalGroupId = csdlDcServiceInfoModelImpl._groupId; + + csdlDcServiceInfoModelImpl._setOriginalGroupId = false; + + csdlDcServiceInfoModelImpl._originalCompanyId = csdlDcServiceInfoModelImpl._companyId; + + csdlDcServiceInfoModelImpl._setOriginalCompanyId = false; + + csdlDcServiceInfoModelImpl._originalServiceCode = csdlDcServiceInfoModelImpl._serviceCode; + + csdlDcServiceInfoModelImpl._originalStatus = csdlDcServiceInfoModelImpl._status; + + csdlDcServiceInfoModelImpl._setOriginalStatus = false; + + csdlDcServiceInfoModelImpl._columnBitmask = 0; + } + + @Override + public CacheModel toCacheModel() { + CsdlDcServiceInfoCacheModel csdlDcServiceInfoCacheModel = new CsdlDcServiceInfoCacheModel(); + + csdlDcServiceInfoCacheModel.uuid = getUuid(); + + String uuid = csdlDcServiceInfoCacheModel.uuid; + + if ((uuid != null) && (uuid.length() == 0)) { + csdlDcServiceInfoCacheModel.uuid = null; + } + + csdlDcServiceInfoCacheModel.idDcService = getIdDcService(); + + csdlDcServiceInfoCacheModel.groupId = getGroupId(); + + csdlDcServiceInfoCacheModel.companyId = getCompanyId(); + + csdlDcServiceInfoCacheModel.userId = getUserId(); + + csdlDcServiceInfoCacheModel.serviceCode = getServiceCode(); + + String serviceCode = csdlDcServiceInfoCacheModel.serviceCode; + + if ((serviceCode != null) && (serviceCode.length() == 0)) { + csdlDcServiceInfoCacheModel.serviceCode = null; + } + + csdlDcServiceInfoCacheModel.serviceCodeDvcqg = getServiceCodeDvcqg(); + + String serviceCodeDvcqg = csdlDcServiceInfoCacheModel.serviceCodeDvcqg; + + if ((serviceCodeDvcqg != null) && (serviceCodeDvcqg.length() == 0)) { + csdlDcServiceInfoCacheModel.serviceCodeDvcqg = null; + } + + csdlDcServiceInfoCacheModel.status = getStatus(); + + return csdlDcServiceInfoCacheModel; + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(17); + + sb.append("{uuid="); + sb.append(getUuid()); + sb.append(", idDcService="); + sb.append(getIdDcService()); + sb.append(", groupId="); + sb.append(getGroupId()); + sb.append(", companyId="); + sb.append(getCompanyId()); + sb.append(", userId="); + sb.append(getUserId()); + sb.append(", serviceCode="); + sb.append(getServiceCode()); + sb.append(", serviceCodeDvcqg="); + sb.append(getServiceCodeDvcqg()); + sb.append(", status="); + sb.append(getStatus()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(28); + + sb.append(""); + sb.append("org.opencps.dossiermgt.model.CsdlDcServiceInfo"); + sb.append(""); + + sb.append( + "uuid"); + sb.append( + "idDcService"); + sb.append( + "groupId"); + sb.append( + "companyId"); + sb.append( + "userId"); + sb.append( + "serviceCode"); + sb.append( + "serviceCodeDvcqg"); + sb.append( + "status"); + + sb.append(""); + + return sb.toString(); + } + + private static final ClassLoader _classLoader = CsdlDcServiceInfo.class.getClassLoader(); + private static final Class[] _escapedModelInterfaces = new Class[] { + CsdlDcServiceInfo.class, ModelWrapper.class + }; + private String _uuid; + private String _originalUuid; + private long _idDcService; + private long _groupId; + private long _originalGroupId; + private boolean _setOriginalGroupId; + private long _companyId; + private long _originalCompanyId; + private boolean _setOriginalCompanyId; + private long _userId; + private String _serviceCode; + private String _originalServiceCode; + private String _serviceCodeDvcqg; + private int _status; + private int _originalStatus; + private boolean _setOriginalStatus; + private long _columnBitmask; + private CsdlDcServiceInfo _escapedModel; +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcUserBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcUserBaseImpl.java new file mode 100644 index 0000000000..daeefcb181 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcUserBaseImpl.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import org.opencps.dossiermgt.model.CsdlDcUser; +import org.opencps.dossiermgt.service.CsdlDcUserLocalServiceUtil; + +/** + * The extended model base implementation for the CsdlDcUser service. Represents a row in the "opencps_csdldc_user" database table, with each column mapped to a property of this class. + * + *

+ * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link CsdlDcUserImpl}. + *

+ * + * @author huymq + * @see CsdlDcUserImpl + * @see CsdlDcUser + * @generated + */ +@ProviderType +public abstract class CsdlDcUserBaseImpl extends CsdlDcUserModelImpl + implements CsdlDcUser { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a csdl dc user model instance should use the {@link CsdlDcUser} interface instead. + */ + @Override + public void persist() { + if (this.isNew()) { + CsdlDcUserLocalServiceUtil.addCsdlDcUser(this); + } + else { + CsdlDcUserLocalServiceUtil.updateCsdlDcUser(this); + } + } +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcUserCacheModel.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcUserCacheModel.java new file mode 100644 index 0000000000..303e506301 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcUserCacheModel.java @@ -0,0 +1,258 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.util.HashUtil; +import com.liferay.portal.kernel.util.StringBundler; + +import org.opencps.dossiermgt.model.CsdlDcUser; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +/** + * The cache model class for representing CsdlDcUser in entity cache. + * + * @author huymq + * @see CsdlDcUser + * @generated + */ +@ProviderType +public class CsdlDcUserCacheModel implements CacheModel, + Externalizable { + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof CsdlDcUserCacheModel)) { + return false; + } + + CsdlDcUserCacheModel csdlDcUserCacheModel = (CsdlDcUserCacheModel)obj; + + if (idDcUser == csdlDcUserCacheModel.idDcUser) { + return true; + } + + return false; + } + + @Override + public int hashCode() { + return HashUtil.hash(0, idDcUser); + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(25); + + sb.append("{uuid="); + sb.append(uuid); + sb.append(", idDcUser="); + sb.append(idDcUser); + sb.append(", groupId="); + sb.append(groupId); + sb.append(", companyId="); + sb.append(companyId); + sb.append(", userId="); + sb.append(userId); + sb.append(", govAgencyCode="); + sb.append(govAgencyCode); + sb.append(", govAgencyCodeDvcqg="); + sb.append(govAgencyCodeDvcqg); + sb.append(", keyName="); + sb.append(keyName); + sb.append(", keyPass="); + sb.append(keyPass); + sb.append(", userName="); + sb.append(userName); + sb.append(", employeeEmail="); + sb.append(employeeEmail); + sb.append(", status="); + sb.append(status); + sb.append("}"); + + return sb.toString(); + } + + @Override + public CsdlDcUser toEntityModel() { + CsdlDcUserImpl csdlDcUserImpl = new CsdlDcUserImpl(); + + if (uuid == null) { + csdlDcUserImpl.setUuid(""); + } + else { + csdlDcUserImpl.setUuid(uuid); + } + + csdlDcUserImpl.setIdDcUser(idDcUser); + csdlDcUserImpl.setGroupId(groupId); + csdlDcUserImpl.setCompanyId(companyId); + csdlDcUserImpl.setUserId(userId); + + if (govAgencyCode == null) { + csdlDcUserImpl.setGovAgencyCode(""); + } + else { + csdlDcUserImpl.setGovAgencyCode(govAgencyCode); + } + + if (govAgencyCodeDvcqg == null) { + csdlDcUserImpl.setGovAgencyCodeDvcqg(""); + } + else { + csdlDcUserImpl.setGovAgencyCodeDvcqg(govAgencyCodeDvcqg); + } + + if (keyName == null) { + csdlDcUserImpl.setKeyName(""); + } + else { + csdlDcUserImpl.setKeyName(keyName); + } + + if (keyPass == null) { + csdlDcUserImpl.setKeyPass(""); + } + else { + csdlDcUserImpl.setKeyPass(keyPass); + } + + if (userName == null) { + csdlDcUserImpl.setUserName(""); + } + else { + csdlDcUserImpl.setUserName(userName); + } + + if (employeeEmail == null) { + csdlDcUserImpl.setEmployeeEmail(""); + } + else { + csdlDcUserImpl.setEmployeeEmail(employeeEmail); + } + + csdlDcUserImpl.setStatus(status); + + csdlDcUserImpl.resetOriginalValues(); + + return csdlDcUserImpl; + } + + @Override + public void readExternal(ObjectInput objectInput) throws IOException { + uuid = objectInput.readUTF(); + + idDcUser = objectInput.readLong(); + + groupId = objectInput.readLong(); + + companyId = objectInput.readLong(); + + userId = objectInput.readLong(); + govAgencyCode = objectInput.readUTF(); + govAgencyCodeDvcqg = objectInput.readUTF(); + keyName = objectInput.readUTF(); + keyPass = objectInput.readUTF(); + userName = objectInput.readUTF(); + employeeEmail = objectInput.readUTF(); + + status = objectInput.readInt(); + } + + @Override + public void writeExternal(ObjectOutput objectOutput) + throws IOException { + if (uuid == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(uuid); + } + + objectOutput.writeLong(idDcUser); + + objectOutput.writeLong(groupId); + + objectOutput.writeLong(companyId); + + objectOutput.writeLong(userId); + + if (govAgencyCode == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(govAgencyCode); + } + + if (govAgencyCodeDvcqg == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(govAgencyCodeDvcqg); + } + + if (keyName == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(keyName); + } + + if (keyPass == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(keyPass); + } + + if (userName == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(userName); + } + + if (employeeEmail == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(employeeEmail); + } + + objectOutput.writeInt(status); + } + + public String uuid; + public long idDcUser; + public long groupId; + public long companyId; + public long userId; + public String govAgencyCode; + public String govAgencyCodeDvcqg; + public String keyName; + public String keyPass; + public String userName; + public String employeeEmail; + public int status; +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcUserImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcUserImpl.java new file mode 100644 index 0000000000..2165a1a3fb --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcUserImpl.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model.impl; + +import aQute.bnd.annotation.ProviderType; + +/** + * The extended model implementation for the CsdlDcUser service. Represents a row in the "opencps_csdldc_user" database table, with each column mapped to a property of this class. + * + *

+ * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.dossiermgt.model.CsdlDcUser} interface. + *

+ * + * @author huymq + */ +@ProviderType +public class CsdlDcUserImpl extends CsdlDcUserBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a csdl dc user model instance should use the {@link org.opencps.dossiermgt.model.CsdlDcUser} interface instead. + */ + public CsdlDcUserImpl() { + } +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcUserModelImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcUserModelImpl.java new file mode 100644 index 0000000000..cf702f2239 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/model/impl/CsdlDcUserModelImpl.java @@ -0,0 +1,810 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; +import com.liferay.expando.kernel.util.ExpandoBridgeFactoryUtil; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.model.ModelWrapper; +import com.liferay.portal.kernel.model.User; +import com.liferay.portal.kernel.model.impl.BaseModelImpl; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.service.UserLocalServiceUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; + +import org.opencps.dossiermgt.model.CsdlDcUser; +import org.opencps.dossiermgt.model.CsdlDcUserModel; + +import java.io.Serializable; + +import java.sql.Types; + +import java.util.HashMap; +import java.util.Map; + +/** + * The base model implementation for the CsdlDcUser service. Represents a row in the "opencps_csdldc_user" database table, with each column mapped to a property of this class. + * + *

+ * This implementation and its corresponding interface {@link CsdlDcUserModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link CsdlDcUserImpl}. + *

+ * + * @author huymq + * @see CsdlDcUserImpl + * @see CsdlDcUser + * @see CsdlDcUserModel + * @generated + */ +@ProviderType +public class CsdlDcUserModelImpl extends BaseModelImpl + implements CsdlDcUserModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a csdl dc user model instance should use the {@link CsdlDcUser} interface instead. + */ + public static final String TABLE_NAME = "opencps_csdldc_user"; + public static final Object[][] TABLE_COLUMNS = { + { "uuid_", Types.VARCHAR }, + { "idDcUser", Types.BIGINT }, + { "groupId", Types.BIGINT }, + { "companyId", Types.BIGINT }, + { "userId", Types.BIGINT }, + { "govAgencyCode", Types.VARCHAR }, + { "govAgencyCodeDvcqg", Types.VARCHAR }, + { "keyName", Types.VARCHAR }, + { "keyPass", Types.VARCHAR }, + { "userName", Types.VARCHAR }, + { "employeeEmail", Types.VARCHAR }, + { "status", Types.INTEGER } + }; + public static final Map TABLE_COLUMNS_MAP = new HashMap(); + + static { + TABLE_COLUMNS_MAP.put("uuid_", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("idDcUser", Types.BIGINT); + TABLE_COLUMNS_MAP.put("groupId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("companyId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("userId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("govAgencyCode", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("govAgencyCodeDvcqg", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("keyName", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("keyPass", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("userName", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("employeeEmail", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("status", Types.INTEGER); + } + + public static final String TABLE_SQL_CREATE = "create table opencps_csdldc_user (uuid_ VARCHAR(75) null,idDcUser LONG not null primary key,groupId LONG,companyId LONG,userId LONG,govAgencyCode VARCHAR(75) null,govAgencyCodeDvcqg VARCHAR(75) null,keyName VARCHAR(75) null,keyPass VARCHAR(75) null,userName VARCHAR(75) null,employeeEmail VARCHAR(75) null,status INTEGER)"; + public static final String TABLE_SQL_DROP = "drop table opencps_csdldc_user"; + public static final String ORDER_BY_JPQL = " ORDER BY csdlDcUser.idDcUser ASC"; + public static final String ORDER_BY_SQL = " ORDER BY opencps_csdldc_user.idDcUser ASC"; + public static final String DATA_SOURCE = "liferayDataSource"; + public static final String SESSION_FACTORY = "liferaySessionFactory"; + public static final String TX_MANAGER = "liferayTransactionManager"; + public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(org.opencps.backend.dossiermgt.service.util.ServiceProps.get( + "value.object.entity.cache.enabled.org.opencps.dossiermgt.model.CsdlDcUser"), + true); + public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(org.opencps.backend.dossiermgt.service.util.ServiceProps.get( + "value.object.finder.cache.enabled.org.opencps.dossiermgt.model.CsdlDcUser"), + true); + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(org.opencps.backend.dossiermgt.service.util.ServiceProps.get( + "value.object.column.bitmask.enabled.org.opencps.dossiermgt.model.CsdlDcUser"), + true); + public static final long COMPANYID_COLUMN_BITMASK = 1L; + public static final long EMPLOYEEEMAIL_COLUMN_BITMASK = 2L; + public static final long GOVAGENCYCODE_COLUMN_BITMASK = 4L; + public static final long GROUPID_COLUMN_BITMASK = 8L; + public static final long STATUS_COLUMN_BITMASK = 16L; + public static final long UUID_COLUMN_BITMASK = 32L; + public static final long IDDCUSER_COLUMN_BITMASK = 64L; + public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(org.opencps.backend.dossiermgt.service.util.ServiceProps.get( + "lock.expiration.time.org.opencps.dossiermgt.model.CsdlDcUser")); + + public CsdlDcUserModelImpl() { + } + + @Override + public long getPrimaryKey() { + return _idDcUser; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setIdDcUser(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _idDcUser; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Class getModelClass() { + return CsdlDcUser.class; + } + + @Override + public String getModelClassName() { + return CsdlDcUser.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("uuid", getUuid()); + attributes.put("idDcUser", getIdDcUser()); + attributes.put("groupId", getGroupId()); + attributes.put("companyId", getCompanyId()); + attributes.put("userId", getUserId()); + attributes.put("govAgencyCode", getGovAgencyCode()); + attributes.put("govAgencyCodeDvcqg", getGovAgencyCodeDvcqg()); + attributes.put("keyName", getKeyName()); + attributes.put("keyPass", getKeyPass()); + attributes.put("userName", getUserName()); + attributes.put("employeeEmail", getEmployeeEmail()); + attributes.put("status", getStatus()); + + attributes.put("entityCacheEnabled", isEntityCacheEnabled()); + attributes.put("finderCacheEnabled", isFinderCacheEnabled()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + String uuid = (String)attributes.get("uuid"); + + if (uuid != null) { + setUuid(uuid); + } + + Long idDcUser = (Long)attributes.get("idDcUser"); + + if (idDcUser != null) { + setIdDcUser(idDcUser); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String govAgencyCode = (String)attributes.get("govAgencyCode"); + + if (govAgencyCode != null) { + setGovAgencyCode(govAgencyCode); + } + + String govAgencyCodeDvcqg = (String)attributes.get("govAgencyCodeDvcqg"); + + if (govAgencyCodeDvcqg != null) { + setGovAgencyCodeDvcqg(govAgencyCodeDvcqg); + } + + String keyName = (String)attributes.get("keyName"); + + if (keyName != null) { + setKeyName(keyName); + } + + String keyPass = (String)attributes.get("keyPass"); + + if (keyPass != null) { + setKeyPass(keyPass); + } + + String userName = (String)attributes.get("userName"); + + if (userName != null) { + setUserName(userName); + } + + String employeeEmail = (String)attributes.get("employeeEmail"); + + if (employeeEmail != null) { + setEmployeeEmail(employeeEmail); + } + + Integer status = (Integer)attributes.get("status"); + + if (status != null) { + setStatus(status); + } + } + + @Override + public String getUuid() { + if (_uuid == null) { + return ""; + } + else { + return _uuid; + } + } + + @Override + public void setUuid(String uuid) { + if (_originalUuid == null) { + _originalUuid = _uuid; + } + + _uuid = uuid; + } + + public String getOriginalUuid() { + return GetterUtil.getString(_originalUuid); + } + + @Override + public long getIdDcUser() { + return _idDcUser; + } + + @Override + public void setIdDcUser(long idDcUser) { + _idDcUser = idDcUser; + } + + @Override + public long getGroupId() { + return _groupId; + } + + @Override + public void setGroupId(long groupId) { + _columnBitmask |= GROUPID_COLUMN_BITMASK; + + if (!_setOriginalGroupId) { + _setOriginalGroupId = true; + + _originalGroupId = _groupId; + } + + _groupId = groupId; + } + + public long getOriginalGroupId() { + return _originalGroupId; + } + + @Override + public long getCompanyId() { + return _companyId; + } + + @Override + public void setCompanyId(long companyId) { + _columnBitmask |= COMPANYID_COLUMN_BITMASK; + + if (!_setOriginalCompanyId) { + _setOriginalCompanyId = true; + + _originalCompanyId = _companyId; + } + + _companyId = companyId; + } + + public long getOriginalCompanyId() { + return _originalCompanyId; + } + + @Override + public long getUserId() { + return _userId; + } + + @Override + public void setUserId(long userId) { + _userId = userId; + } + + @Override + public String getUserUuid() { + try { + User user = UserLocalServiceUtil.getUserById(getUserId()); + + return user.getUuid(); + } + catch (PortalException pe) { + return ""; + } + } + + @Override + public void setUserUuid(String userUuid) { + } + + @Override + public String getGovAgencyCode() { + if (_govAgencyCode == null) { + return ""; + } + else { + return _govAgencyCode; + } + } + + @Override + public void setGovAgencyCode(String govAgencyCode) { + _columnBitmask |= GOVAGENCYCODE_COLUMN_BITMASK; + + if (_originalGovAgencyCode == null) { + _originalGovAgencyCode = _govAgencyCode; + } + + _govAgencyCode = govAgencyCode; + } + + public String getOriginalGovAgencyCode() { + return GetterUtil.getString(_originalGovAgencyCode); + } + + @Override + public String getGovAgencyCodeDvcqg() { + if (_govAgencyCodeDvcqg == null) { + return ""; + } + else { + return _govAgencyCodeDvcqg; + } + } + + @Override + public void setGovAgencyCodeDvcqg(String govAgencyCodeDvcqg) { + _govAgencyCodeDvcqg = govAgencyCodeDvcqg; + } + + @Override + public String getKeyName() { + if (_keyName == null) { + return ""; + } + else { + return _keyName; + } + } + + @Override + public void setKeyName(String keyName) { + _keyName = keyName; + } + + @Override + public String getKeyPass() { + if (_keyPass == null) { + return ""; + } + else { + return _keyPass; + } + } + + @Override + public void setKeyPass(String keyPass) { + _keyPass = keyPass; + } + + @Override + public String getUserName() { + if (_userName == null) { + return ""; + } + else { + return _userName; + } + } + + @Override + public void setUserName(String userName) { + _userName = userName; + } + + @Override + public String getEmployeeEmail() { + if (_employeeEmail == null) { + return ""; + } + else { + return _employeeEmail; + } + } + + @Override + public void setEmployeeEmail(String employeeEmail) { + _columnBitmask |= EMPLOYEEEMAIL_COLUMN_BITMASK; + + if (_originalEmployeeEmail == null) { + _originalEmployeeEmail = _employeeEmail; + } + + _employeeEmail = employeeEmail; + } + + public String getOriginalEmployeeEmail() { + return GetterUtil.getString(_originalEmployeeEmail); + } + + @Override + public int getStatus() { + return _status; + } + + @Override + public void setStatus(int status) { + _columnBitmask |= STATUS_COLUMN_BITMASK; + + if (!_setOriginalStatus) { + _setOriginalStatus = true; + + _originalStatus = _status; + } + + _status = status; + } + + public int getOriginalStatus() { + return _originalStatus; + } + + public long getColumnBitmask() { + return _columnBitmask; + } + + @Override + public ExpandoBridge getExpandoBridge() { + return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), + CsdlDcUser.class.getName(), getPrimaryKey()); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + ExpandoBridge expandoBridge = getExpandoBridge(); + + expandoBridge.setAttributes(serviceContext); + } + + @Override + public CsdlDcUser toEscapedModel() { + if (_escapedModel == null) { + _escapedModel = (CsdlDcUser)ProxyUtil.newProxyInstance(_classLoader, + _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); + } + + return _escapedModel; + } + + @Override + public Object clone() { + CsdlDcUserImpl csdlDcUserImpl = new CsdlDcUserImpl(); + + csdlDcUserImpl.setUuid(getUuid()); + csdlDcUserImpl.setIdDcUser(getIdDcUser()); + csdlDcUserImpl.setGroupId(getGroupId()); + csdlDcUserImpl.setCompanyId(getCompanyId()); + csdlDcUserImpl.setUserId(getUserId()); + csdlDcUserImpl.setGovAgencyCode(getGovAgencyCode()); + csdlDcUserImpl.setGovAgencyCodeDvcqg(getGovAgencyCodeDvcqg()); + csdlDcUserImpl.setKeyName(getKeyName()); + csdlDcUserImpl.setKeyPass(getKeyPass()); + csdlDcUserImpl.setUserName(getUserName()); + csdlDcUserImpl.setEmployeeEmail(getEmployeeEmail()); + csdlDcUserImpl.setStatus(getStatus()); + + csdlDcUserImpl.resetOriginalValues(); + + return csdlDcUserImpl; + } + + @Override + public int compareTo(CsdlDcUser csdlDcUser) { + long primaryKey = csdlDcUser.getPrimaryKey(); + + if (getPrimaryKey() < primaryKey) { + return -1; + } + else if (getPrimaryKey() > primaryKey) { + return 1; + } + else { + return 0; + } + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof CsdlDcUser)) { + return false; + } + + CsdlDcUser csdlDcUser = (CsdlDcUser)obj; + + long primaryKey = csdlDcUser.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public boolean isEntityCacheEnabled() { + return ENTITY_CACHE_ENABLED; + } + + @Override + public boolean isFinderCacheEnabled() { + return FINDER_CACHE_ENABLED; + } + + @Override + public void resetOriginalValues() { + CsdlDcUserModelImpl csdlDcUserModelImpl = this; + + csdlDcUserModelImpl._originalUuid = csdlDcUserModelImpl._uuid; + + csdlDcUserModelImpl._originalGroupId = csdlDcUserModelImpl._groupId; + + csdlDcUserModelImpl._setOriginalGroupId = false; + + csdlDcUserModelImpl._originalCompanyId = csdlDcUserModelImpl._companyId; + + csdlDcUserModelImpl._setOriginalCompanyId = false; + + csdlDcUserModelImpl._originalGovAgencyCode = csdlDcUserModelImpl._govAgencyCode; + + csdlDcUserModelImpl._originalEmployeeEmail = csdlDcUserModelImpl._employeeEmail; + + csdlDcUserModelImpl._originalStatus = csdlDcUserModelImpl._status; + + csdlDcUserModelImpl._setOriginalStatus = false; + + csdlDcUserModelImpl._columnBitmask = 0; + } + + @Override + public CacheModel toCacheModel() { + CsdlDcUserCacheModel csdlDcUserCacheModel = new CsdlDcUserCacheModel(); + + csdlDcUserCacheModel.uuid = getUuid(); + + String uuid = csdlDcUserCacheModel.uuid; + + if ((uuid != null) && (uuid.length() == 0)) { + csdlDcUserCacheModel.uuid = null; + } + + csdlDcUserCacheModel.idDcUser = getIdDcUser(); + + csdlDcUserCacheModel.groupId = getGroupId(); + + csdlDcUserCacheModel.companyId = getCompanyId(); + + csdlDcUserCacheModel.userId = getUserId(); + + csdlDcUserCacheModel.govAgencyCode = getGovAgencyCode(); + + String govAgencyCode = csdlDcUserCacheModel.govAgencyCode; + + if ((govAgencyCode != null) && (govAgencyCode.length() == 0)) { + csdlDcUserCacheModel.govAgencyCode = null; + } + + csdlDcUserCacheModel.govAgencyCodeDvcqg = getGovAgencyCodeDvcqg(); + + String govAgencyCodeDvcqg = csdlDcUserCacheModel.govAgencyCodeDvcqg; + + if ((govAgencyCodeDvcqg != null) && (govAgencyCodeDvcqg.length() == 0)) { + csdlDcUserCacheModel.govAgencyCodeDvcqg = null; + } + + csdlDcUserCacheModel.keyName = getKeyName(); + + String keyName = csdlDcUserCacheModel.keyName; + + if ((keyName != null) && (keyName.length() == 0)) { + csdlDcUserCacheModel.keyName = null; + } + + csdlDcUserCacheModel.keyPass = getKeyPass(); + + String keyPass = csdlDcUserCacheModel.keyPass; + + if ((keyPass != null) && (keyPass.length() == 0)) { + csdlDcUserCacheModel.keyPass = null; + } + + csdlDcUserCacheModel.userName = getUserName(); + + String userName = csdlDcUserCacheModel.userName; + + if ((userName != null) && (userName.length() == 0)) { + csdlDcUserCacheModel.userName = null; + } + + csdlDcUserCacheModel.employeeEmail = getEmployeeEmail(); + + String employeeEmail = csdlDcUserCacheModel.employeeEmail; + + if ((employeeEmail != null) && (employeeEmail.length() == 0)) { + csdlDcUserCacheModel.employeeEmail = null; + } + + csdlDcUserCacheModel.status = getStatus(); + + return csdlDcUserCacheModel; + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(25); + + sb.append("{uuid="); + sb.append(getUuid()); + sb.append(", idDcUser="); + sb.append(getIdDcUser()); + sb.append(", groupId="); + sb.append(getGroupId()); + sb.append(", companyId="); + sb.append(getCompanyId()); + sb.append(", userId="); + sb.append(getUserId()); + sb.append(", govAgencyCode="); + sb.append(getGovAgencyCode()); + sb.append(", govAgencyCodeDvcqg="); + sb.append(getGovAgencyCodeDvcqg()); + sb.append(", keyName="); + sb.append(getKeyName()); + sb.append(", keyPass="); + sb.append(getKeyPass()); + sb.append(", userName="); + sb.append(getUserName()); + sb.append(", employeeEmail="); + sb.append(getEmployeeEmail()); + sb.append(", status="); + sb.append(getStatus()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(40); + + sb.append(""); + sb.append("org.opencps.dossiermgt.model.CsdlDcUser"); + sb.append(""); + + sb.append( + "uuid"); + sb.append( + "idDcUser"); + sb.append( + "groupId"); + sb.append( + "companyId"); + sb.append( + "userId"); + sb.append( + "govAgencyCode"); + sb.append( + "govAgencyCodeDvcqg"); + sb.append( + "keyName"); + sb.append( + "keyPass"); + sb.append( + "userName"); + sb.append( + "employeeEmail"); + sb.append( + "status"); + + sb.append(""); + + return sb.toString(); + } + + private static final ClassLoader _classLoader = CsdlDcUser.class.getClassLoader(); + private static final Class[] _escapedModelInterfaces = new Class[] { + CsdlDcUser.class, ModelWrapper.class + }; + private String _uuid; + private String _originalUuid; + private long _idDcUser; + private long _groupId; + private long _originalGroupId; + private boolean _setOriginalGroupId; + private long _companyId; + private long _originalCompanyId; + private boolean _setOriginalCompanyId; + private long _userId; + private String _govAgencyCode; + private String _originalGovAgencyCode; + private String _govAgencyCodeDvcqg; + private String _keyName; + private String _keyPass; + private String _userName; + private String _employeeEmail; + private String _originalEmployeeEmail; + private int _status; + private int _originalStatus; + private boolean _setOriginalStatus; + private long _columnBitmask; + private CsdlDcUser _escapedModel; +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/processor/APIMessageProcessor.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/processor/APIMessageProcessor.java index 76f375c42f..f3a238c864 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/processor/APIMessageProcessor.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/processor/APIMessageProcessor.java @@ -93,8 +93,11 @@ public void processRequest() { dossierSync.setState(DossierSyncTerm.STATE_RECEIVED_ACK); DossierSyncLocalServiceUtil.updateDossierSync(dossierSync); DossierAction dossierAction = DossierActionLocalServiceUtil.fetchDossierAction(dossierSync.getDossierActionId()); - dossierAction.setPending(false); - DossierActionLocalServiceUtil.updateDossierAction(dossierAction); + if(Validator.isNotNull(dossierAction)){ + _log.info("DossierActionId : " + dossierAction.getDossierActionId() + " _ " + dossierAction.getDossierId()); + dossierAction.setPending(false); + DossierActionLocalServiceUtil.updateDossierAction(dossierAction); + } } else { int retry = dossierSync.getRetry(); @@ -120,8 +123,12 @@ public void processInform() { dossierSync.setState(DossierSyncTerm.STATE_RECEIVED_ACK); DossierSyncLocalServiceUtil.updateDossierSync(dossierSync); DossierAction dossierAction = DossierActionLocalServiceUtil.fetchDossierAction(dossierSync.getDossierActionId()); - dossierAction.setPending(false); - DossierActionLocalServiceUtil.updateDossierAction(dossierAction); + if(Validator.isNotNull(dossierAction)){ + _log.info("DossierActionId : " + dossierAction.getDossierActionId() + " _ " + dossierAction.getDossierId()); + dossierAction.setPending(false); + DossierActionLocalServiceUtil.updateDossierAction(dossierAction); + } + } else { int retry = dossierSync.getRetry(); @@ -146,8 +153,11 @@ public void processInformDossier() { dossierSync.setState(DossierSyncTerm.STATE_RECEIVED_ACK); DossierSyncLocalServiceUtil.updateDossierSync(dossierSync); DossierAction dossierAction = DossierActionLocalServiceUtil.fetchDossierAction(dossierSync.getDossierActionId()); - dossierAction.setPending(false); - DossierActionLocalServiceUtil.updateDossierAction(dossierAction); + if(Validator.isNotNull(dossierAction)){ + _log.info("DossierActionId : " + dossierAction.getDossierActionId() + " _ " + dossierAction.getDossierId()); + dossierAction.setPending(false); + DossierActionLocalServiceUtil.updateDossierAction(dossierAction); + } } else { int retry = dossierSync.getRetry(); @@ -515,7 +525,7 @@ private boolean syncInform() { pfiModel.setReferenceUid(newRef); } } - + pfiModel.setFeeAmount(paymentFile.getFeeAmount()); pfiModel.setInvoiceTemplateNo(paymentFile.getInvoiceTemplateNo()); pfiModel.setPaymentStatus(paymentFile.getPaymentStatus()); diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/rest/utils/SyncServerTerm.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/rest/utils/SyncServerTerm.java index 2af981c2b6..7439271e6d 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/rest/utils/SyncServerTerm.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/rest/utils/SyncServerTerm.java @@ -1,5 +1,6 @@ package org.opencps.dossiermgt.rest.utils; + public class SyncServerTerm { public static final String SERVER_USERNAME = "username"; public static final String SERVER_SECRET = "password"; @@ -12,14 +13,29 @@ public class SyncServerTerm { public static final String WRITE_LOG = "writeLog"; - public static final String APP = "payment_std"; - public static final String MERCHANT_OUTLET_ID = "000000000000000071000"; - public static final String MERCHANT_ID = "000000000070000"; - public static final String CLIENT_ID = "1111"; - public static final String EVENT_VOID = "void"; - public static final String EVENT_SETTLEMENT = "settle"; - public static final String EVENT_SALE = "sale"; + public static final String APP = "PAYMENT_STD"; + public static final String MERCHANT_OUTLET_ID = "MERCHANT_OUTLET_ID"; + public static final String MERCHANT_ID = "MERCHANT_ID"; + public static final String CLIENT_ID = "CLIENT_ID"; + public static final String INVOICE = "INVOICE"; + public static final String ADD_PRINT = "ADD_PRINT"; + public static final String ADD_DATA = "ADD_DATA"; + public static final String AMOUNT = "AMOUNT"; + public static final String EVENT_VOID = "VOID"; + public static final String EVENT_SETTLEMENT = "SETTLE"; + public static final String EVENT_SALE = "SALE"; + public static final String CHECK_RESULT = "CHECK_RESULT"; + public static final String CONN = "CONN"; + public static final String SERIAL_NUMBER = "SERIAL"; + public static final String REF_ID = "REF_ID"; + public static final String TERMINAL_ID = "terminalId"; public static final String ADD_PRINT_SETTLEMENT = "None"; public static final String THIRD_PARTY_KEY = "4SSDDQS30TVGGBCYXXZ5YHDF"; - public static final String THIRD_PARTY_ID = "73371689"; + public static final String THIRD_PARTY_ID = "thirdPartyId"; + public static final String POS_VCB = "post_vcb"; + public static final String CURRENCY_CODE = "704"; + public static final String KEY_SALE = "keySale"; + public static final String MERCHANT_OUTLET_ID_CONFIG = "MerchantOutletId"; + public static final String MERCHANT_ID_CONFIG = "MerchantId"; + public static final String CLIENT_ID_CONFIG = "clientId"; } diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/DossierSyncProcessingScheduler.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/DossierSyncProcessingScheduler.java index f058d455bb..8665edfc3f 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/DossierSyncProcessingScheduler.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/DossierSyncProcessingScheduler.java @@ -51,6 +51,16 @@ public static synchronized void setCount(int countNew){ count = countNew; } } + + public static int getCount(){ + return DossierSyncProcessingScheduler.CounterSync.getCount(); + } + + public static int resetCount(){ + DossierSyncProcessingScheduler.CounterSync.count = 0; + return getCount(); + } + private static final String startLine1 = "=========="; private static final String startLine2 = "=================="; private volatile boolean isRunning = false; diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/GarbageDossierPublishQueueScheduler.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/GarbageDossierPublishQueueScheduler.java index 4d5b701a42..08fef183ba 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/GarbageDossierPublishQueueScheduler.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/GarbageDossierPublishQueueScheduler.java @@ -202,7 +202,7 @@ protected void doReceive(Message message) throws Exception { _log.error(e); } - isRunning = false; + isRunning = false; _log.info("OpenCPS REMOVE SCHEDULER HAS BEEN DONE : " + APIDateTimeUtils.convertDateToString(new Date())); diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/PublishEventHSKMScheduler.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/PublishEventHSKMScheduler.java index 07b9806b1e..33881fe7df 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/PublishEventHSKMScheduler.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/PublishEventHSKMScheduler.java @@ -48,6 +48,15 @@ public static synchronized void setCount(int countNew){ } } + public static int getCount(){ + return PublishEventHSKMScheduler.Counter.getCount(); + } + + public static int resetCount(){ + PublishEventHSKMScheduler.Counter.count = 0; + return getCount(); + } + private volatile boolean isRunning = false; private static final Boolean ENABLE_JOB = Validator.isNotNull(PropsUtil.get("org.opencps.synchskm.enable")) ? Boolean.valueOf(PropsUtil.get("org.opencps.synchskm.enable")) : false; diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/PublishEventScheduler.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/PublishEventScheduler.java index f4ced1b350..9f658e0e96 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/PublishEventScheduler.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/scheduler/PublishEventScheduler.java @@ -89,7 +89,15 @@ public static synchronized void setCount(int countNew){ count = countNew; } } - + + public static int getCount(){ + return PublishEventScheduler.CounterPublishEvent.getCount(); + } + + public static int resetCount(){ + PublishEventScheduler.CounterPublishEvent.count = 0; + return getCount(); + } public PublishEventScheduler () { _log.debug("Constructor PublishEventScheduler"); diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/AccessTokenLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/AccessTokenLocalServiceBaseImpl.java index cd833fe923..78645598af 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/AccessTokenLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/AccessTokenLocalServiceBaseImpl.java @@ -50,6 +50,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -64,6 +66,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -603,6 +606,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1150,6 +1229,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2777,6 +2874,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2835,6 +2940,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ActionConfigLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ActionConfigLocalServiceBaseImpl.java index d363745c25..5d1ac668d0 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ActionConfigLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ActionConfigLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ApplicableInfoLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ApplicableInfoLocalServiceBaseImpl.java index c000192ae1..082a08ce51 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ApplicableInfoLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ApplicableInfoLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/BookingLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/BookingLocalServiceBaseImpl.java index fd469f309d..847a55a528 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/BookingLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/BookingLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -711,6 +714,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1258,6 +1337,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2885,6 +2982,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2943,6 +3048,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/CPSDossierBusinessLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/CPSDossierBusinessLocalServiceBaseImpl.java index 644accdd3b..3607e4d4e1 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/CPSDossierBusinessLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/CPSDossierBusinessLocalServiceBaseImpl.java @@ -37,6 +37,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -51,6 +53,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -344,6 +347,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -891,6 +970,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2506,6 +2603,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = CPSDossierBusinessLocalService.class) protected CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2564,6 +2669,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ConfigCounterLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ConfigCounterLocalServiceBaseImpl.java index 4f85a1cf86..6b0ce0cff7 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ConfigCounterLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ConfigCounterLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/CsdlDcServiceInfoLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/CsdlDcServiceInfoLocalServiceBaseImpl.java new file mode 100644 index 0000000000..8ccf6c45cd --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/CsdlDcServiceInfoLocalServiceBaseImpl.java @@ -0,0 +1,3171 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service.base; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.dao.db.DB; +import com.liferay.portal.kernel.dao.db.DBManagerUtil; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; +import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.service.BaseLocalServiceImpl; +import com.liferay.portal.kernel.service.PersistedModelLocalServiceRegistry; +import com.liferay.portal.kernel.service.persistence.ClassNamePersistence; +import com.liferay.portal.kernel.service.persistence.UserPersistence; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.PortalUtil; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import org.opencps.dossiermgt.model.CsdlDcServiceInfo; +import org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService; +import org.opencps.dossiermgt.service.persistence.AccessTokenPersistence; +import org.opencps.dossiermgt.service.persistence.ActionConfigPersistence; +import org.opencps.dossiermgt.service.persistence.ApplicableInfoPersistence; +import org.opencps.dossiermgt.service.persistence.BookingFinder; +import org.opencps.dossiermgt.service.persistence.BookingPersistence; +import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; +import org.opencps.dossiermgt.service.persistence.DeliverableFinder; +import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; +import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; +import org.opencps.dossiermgt.service.persistence.DeliverableTypePersistence; +import org.opencps.dossiermgt.service.persistence.DeliverableTypeRolePersistence; +import org.opencps.dossiermgt.service.persistence.DocumentTypePersistence; +import org.opencps.dossiermgt.service.persistence.DossierActionFinder; +import org.opencps.dossiermgt.service.persistence.DossierActionPersistence; +import org.opencps.dossiermgt.service.persistence.DossierActionSyncPersistence; +import org.opencps.dossiermgt.service.persistence.DossierActionUserPersistence; +import org.opencps.dossiermgt.service.persistence.DossierDocumentPersistence; +import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; +import org.opencps.dossiermgt.service.persistence.DossierFinder; +import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; +import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; +import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; +import org.opencps.dossiermgt.service.persistence.DossierPersistence; +import org.opencps.dossiermgt.service.persistence.DossierRequestUDPersistence; +import org.opencps.dossiermgt.service.persistence.DossierStatisticPersistence; +import org.opencps.dossiermgt.service.persistence.DossierStatusMappingPersistence; +import org.opencps.dossiermgt.service.persistence.DossierSyncFinder; +import org.opencps.dossiermgt.service.persistence.DossierSyncPersistence; +import org.opencps.dossiermgt.service.persistence.DossierTemplatePersistence; +import org.opencps.dossiermgt.service.persistence.DossierUserPersistence; +import org.opencps.dossiermgt.service.persistence.EFormPersistence; +import org.opencps.dossiermgt.service.persistence.MenuConfigPersistence; +import org.opencps.dossiermgt.service.persistence.MenuRolePersistence; +import org.opencps.dossiermgt.service.persistence.NewsBoardPersistence; +import org.opencps.dossiermgt.service.persistence.NotarizationFinder; +import org.opencps.dossiermgt.service.persistence.NotarizationPersistence; +import org.opencps.dossiermgt.service.persistence.PaymentConfigPersistence; +import org.opencps.dossiermgt.service.persistence.PaymentFeeInfoPersistence; +import org.opencps.dossiermgt.service.persistence.PaymentFileFinder; +import org.opencps.dossiermgt.service.persistence.PaymentFilePersistence; +import org.opencps.dossiermgt.service.persistence.PostConnectPersistence; +import org.opencps.dossiermgt.service.persistence.ProcessActionPersistence; +import org.opencps.dossiermgt.service.persistence.ProcessOptionPersistence; +import org.opencps.dossiermgt.service.persistence.ProcessPluginPersistence; +import org.opencps.dossiermgt.service.persistence.ProcessSequencePersistence; +import org.opencps.dossiermgt.service.persistence.ProcessStepPersistence; +import org.opencps.dossiermgt.service.persistence.ProcessStepRolePersistence; +import org.opencps.dossiermgt.service.persistence.PublishQueuePersistence; +import org.opencps.dossiermgt.service.persistence.RegistrationFormPersistence; +import org.opencps.dossiermgt.service.persistence.RegistrationLogPersistence; +import org.opencps.dossiermgt.service.persistence.RegistrationPersistence; +import org.opencps.dossiermgt.service.persistence.RegistrationTemplatesPersistence; +import org.opencps.dossiermgt.service.persistence.ServiceConfigMappingPersistence; +import org.opencps.dossiermgt.service.persistence.ServiceConfigPersistence; +import org.opencps.dossiermgt.service.persistence.ServiceFileTemplatePersistence; +import org.opencps.dossiermgt.service.persistence.ServiceInfoMappingPersistence; +import org.opencps.dossiermgt.service.persistence.ServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.ServiceProcessPersistence; +import org.opencps.dossiermgt.service.persistence.ServiceProcessRolePersistence; +import org.opencps.dossiermgt.service.persistence.StepConfigFinder; +import org.opencps.dossiermgt.service.persistence.StepConfigPersistence; +import org.opencps.dossiermgt.service.persistence.UserInfoLogPersistence; + +import java.io.Serializable; + +import java.util.List; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the csdl dc service info local service. + * + *

+ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.opencps.dossiermgt.service.impl.CsdlDcServiceInfoLocalServiceImpl}. + *

+ * + * @author huymq + * @see org.opencps.dossiermgt.service.impl.CsdlDcServiceInfoLocalServiceImpl + * @see org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalServiceUtil + * @generated + */ +@ProviderType +public abstract class CsdlDcServiceInfoLocalServiceBaseImpl + extends BaseLocalServiceImpl implements CsdlDcServiceInfoLocalService, + IdentifiableOSGiService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalServiceUtil} to access the csdl dc service info local service. + */ + + /** + * Adds the csdl dc service info to the database. Also notifies the appropriate model listeners. + * + * @param csdlDcServiceInfo the csdl dc service info + * @return the csdl dc service info that was added + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public CsdlDcServiceInfo addCsdlDcServiceInfo( + CsdlDcServiceInfo csdlDcServiceInfo) { + csdlDcServiceInfo.setNew(true); + + return csdlDcServiceInfoPersistence.update(csdlDcServiceInfo); + } + + /** + * Creates a new csdl dc service info with the primary key. Does not add the csdl dc service info to the database. + * + * @param idDcService the primary key for the new csdl dc service info + * @return the new csdl dc service info + */ + @Override + @Transactional(enabled = false) + public CsdlDcServiceInfo createCsdlDcServiceInfo(long idDcService) { + return csdlDcServiceInfoPersistence.create(idDcService); + } + + /** + * Deletes the csdl dc service info with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info that was removed + * @throws PortalException if a csdl dc service info with the primary key could not be found + */ + @Indexable(type = IndexableType.DELETE) + @Override + public CsdlDcServiceInfo deleteCsdlDcServiceInfo(long idDcService) + throws PortalException { + return csdlDcServiceInfoPersistence.remove(idDcService); + } + + /** + * Deletes the csdl dc service info from the database. Also notifies the appropriate model listeners. + * + * @param csdlDcServiceInfo the csdl dc service info + * @return the csdl dc service info that was removed + */ + @Indexable(type = IndexableType.DELETE) + @Override + public CsdlDcServiceInfo deleteCsdlDcServiceInfo( + CsdlDcServiceInfo csdlDcServiceInfo) { + return csdlDcServiceInfoPersistence.remove(csdlDcServiceInfo); + } + + @Override + public DynamicQuery dynamicQuery() { + Class clazz = getClass(); + + return DynamicQueryFactoryUtil.forClass(CsdlDcServiceInfo.class, + clazz.getClassLoader()); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery) { + return csdlDcServiceInfoPersistence.findWithDynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end) { + return csdlDcServiceInfoPersistence.findWithDynamicQuery(dynamicQuery, + start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end, OrderByComparator orderByComparator) { + return csdlDcServiceInfoPersistence.findWithDynamicQuery(dynamicQuery, + start, end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery) { + return csdlDcServiceInfoPersistence.countWithDynamicQuery(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection) { + return csdlDcServiceInfoPersistence.countWithDynamicQuery(dynamicQuery, + projection); + } + + @Override + public CsdlDcServiceInfo fetchCsdlDcServiceInfo(long idDcService) { + return csdlDcServiceInfoPersistence.fetchByPrimaryKey(idDcService); + } + + /** + * Returns the csdl dc service info matching the UUID and group. + * + * @param uuid the csdl dc service info's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo fetchCsdlDcServiceInfoByUuidAndGroupId( + String uuid, long groupId) { + return csdlDcServiceInfoPersistence.fetchByUUID_G(uuid, groupId); + } + + /** + * Returns the csdl dc service info with the primary key. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info + * @throws PortalException if a csdl dc service info with the primary key could not be found + */ + @Override + public CsdlDcServiceInfo getCsdlDcServiceInfo(long idDcService) + throws PortalException { + return csdlDcServiceInfoPersistence.findByPrimaryKey(idDcService); + } + + @Override + public ActionableDynamicQuery getActionableDynamicQuery() { + ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery(); + + actionableDynamicQuery.setBaseLocalService(csdlDcServiceInfoLocalService); + actionableDynamicQuery.setClassLoader(getClassLoader()); + actionableDynamicQuery.setModelClass(CsdlDcServiceInfo.class); + + actionableDynamicQuery.setPrimaryKeyPropertyName("idDcService"); + + return actionableDynamicQuery; + } + + @Override + public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery(); + + indexableActionableDynamicQuery.setBaseLocalService(csdlDcServiceInfoLocalService); + indexableActionableDynamicQuery.setClassLoader(getClassLoader()); + indexableActionableDynamicQuery.setModelClass(CsdlDcServiceInfo.class); + + indexableActionableDynamicQuery.setPrimaryKeyPropertyName("idDcService"); + + return indexableActionableDynamicQuery; + } + + protected void initActionableDynamicQuery( + ActionableDynamicQuery actionableDynamicQuery) { + actionableDynamicQuery.setBaseLocalService(csdlDcServiceInfoLocalService); + actionableDynamicQuery.setClassLoader(getClassLoader()); + actionableDynamicQuery.setModelClass(CsdlDcServiceInfo.class); + + actionableDynamicQuery.setPrimaryKeyPropertyName("idDcService"); + } + + /** + * @throws PortalException + */ + @Override + public PersistedModel deletePersistedModel(PersistedModel persistedModel) + throws PortalException { + return csdlDcServiceInfoLocalService.deleteCsdlDcServiceInfo((CsdlDcServiceInfo)persistedModel); + } + + @Override + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException { + return csdlDcServiceInfoPersistence.findByPrimaryKey(primaryKeyObj); + } + + /** + * Returns all the csdl dc service infos matching the UUID and company. + * + * @param uuid the UUID of the csdl dc service infos + * @param companyId the primary key of the company + * @return the matching csdl dc service infos, or an empty list if no matches were found + */ + @Override + public List getCsdlDcServiceInfosByUuidAndCompanyId( + String uuid, long companyId) { + return csdlDcServiceInfoPersistence.findByUuid_C(uuid, companyId); + } + + /** + * Returns a range of csdl dc service infos matching the UUID and company. + * + * @param uuid the UUID of the csdl dc service infos + * @param companyId the primary key of the company + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching csdl dc service infos, or an empty list if no matches were found + */ + @Override + public List getCsdlDcServiceInfosByUuidAndCompanyId( + String uuid, long companyId, int start, int end, + OrderByComparator orderByComparator) { + return csdlDcServiceInfoPersistence.findByUuid_C(uuid, companyId, + start, end, orderByComparator); + } + + /** + * Returns the csdl dc service info matching the UUID and group. + * + * @param uuid the csdl dc service info's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc service info + * @throws PortalException if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo getCsdlDcServiceInfoByUuidAndGroupId(String uuid, + long groupId) throws PortalException { + return csdlDcServiceInfoPersistence.findByUUID_G(uuid, groupId); + } + + /** + * Returns a range of all the csdl dc service infos. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @return the range of csdl dc service infos + */ + @Override + public List getCsdlDcServiceInfos(int start, int end) { + return csdlDcServiceInfoPersistence.findAll(start, end); + } + + /** + * Returns the number of csdl dc service infos. + * + * @return the number of csdl dc service infos + */ + @Override + public int getCsdlDcServiceInfosCount() { + return csdlDcServiceInfoPersistence.countAll(); + } + + /** + * Updates the csdl dc service info in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param csdlDcServiceInfo the csdl dc service info + * @return the csdl dc service info that was updated + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public CsdlDcServiceInfo updateCsdlDcServiceInfo( + CsdlDcServiceInfo csdlDcServiceInfo) { + return csdlDcServiceInfoPersistence.update(csdlDcServiceInfo); + } + + /** + * Returns the access token local service. + * + * @return the access token local service + */ + public org.opencps.dossiermgt.service.AccessTokenLocalService getAccessTokenLocalService() { + return accessTokenLocalService; + } + + /** + * Sets the access token local service. + * + * @param accessTokenLocalService the access token local service + */ + public void setAccessTokenLocalService( + org.opencps.dossiermgt.service.AccessTokenLocalService accessTokenLocalService) { + this.accessTokenLocalService = accessTokenLocalService; + } + + /** + * Returns the access token persistence. + * + * @return the access token persistence + */ + public AccessTokenPersistence getAccessTokenPersistence() { + return accessTokenPersistence; + } + + /** + * Sets the access token persistence. + * + * @param accessTokenPersistence the access token persistence + */ + public void setAccessTokenPersistence( + AccessTokenPersistence accessTokenPersistence) { + this.accessTokenPersistence = accessTokenPersistence; + } + + /** + * Returns the action config local service. + * + * @return the action config local service + */ + public org.opencps.dossiermgt.service.ActionConfigLocalService getActionConfigLocalService() { + return actionConfigLocalService; + } + + /** + * Sets the action config local service. + * + * @param actionConfigLocalService the action config local service + */ + public void setActionConfigLocalService( + org.opencps.dossiermgt.service.ActionConfigLocalService actionConfigLocalService) { + this.actionConfigLocalService = actionConfigLocalService; + } + + /** + * Returns the action config persistence. + * + * @return the action config persistence + */ + public ActionConfigPersistence getActionConfigPersistence() { + return actionConfigPersistence; + } + + /** + * Sets the action config persistence. + * + * @param actionConfigPersistence the action config persistence + */ + public void setActionConfigPersistence( + ActionConfigPersistence actionConfigPersistence) { + this.actionConfigPersistence = actionConfigPersistence; + } + + /** + * Returns the applicable info local service. + * + * @return the applicable info local service + */ + public org.opencps.dossiermgt.service.ApplicableInfoLocalService getApplicableInfoLocalService() { + return applicableInfoLocalService; + } + + /** + * Sets the applicable info local service. + * + * @param applicableInfoLocalService the applicable info local service + */ + public void setApplicableInfoLocalService( + org.opencps.dossiermgt.service.ApplicableInfoLocalService applicableInfoLocalService) { + this.applicableInfoLocalService = applicableInfoLocalService; + } + + /** + * Returns the applicable info persistence. + * + * @return the applicable info persistence + */ + public ApplicableInfoPersistence getApplicableInfoPersistence() { + return applicableInfoPersistence; + } + + /** + * Sets the applicable info persistence. + * + * @param applicableInfoPersistence the applicable info persistence + */ + public void setApplicableInfoPersistence( + ApplicableInfoPersistence applicableInfoPersistence) { + this.applicableInfoPersistence = applicableInfoPersistence; + } + + /** + * Returns the booking local service. + * + * @return the booking local service + */ + public org.opencps.dossiermgt.service.BookingLocalService getBookingLocalService() { + return bookingLocalService; + } + + /** + * Sets the booking local service. + * + * @param bookingLocalService the booking local service + */ + public void setBookingLocalService( + org.opencps.dossiermgt.service.BookingLocalService bookingLocalService) { + this.bookingLocalService = bookingLocalService; + } + + /** + * Returns the booking persistence. + * + * @return the booking persistence + */ + public BookingPersistence getBookingPersistence() { + return bookingPersistence; + } + + /** + * Sets the booking persistence. + * + * @param bookingPersistence the booking persistence + */ + public void setBookingPersistence(BookingPersistence bookingPersistence) { + this.bookingPersistence = bookingPersistence; + } + + /** + * Returns the booking finder. + * + * @return the booking finder + */ + public BookingFinder getBookingFinder() { + return bookingFinder; + } + + /** + * Sets the booking finder. + * + * @param bookingFinder the booking finder + */ + public void setBookingFinder(BookingFinder bookingFinder) { + this.bookingFinder = bookingFinder; + } + + /** + * Returns the config counter local service. + * + * @return the config counter local service + */ + public org.opencps.dossiermgt.service.ConfigCounterLocalService getConfigCounterLocalService() { + return configCounterLocalService; + } + + /** + * Sets the config counter local service. + * + * @param configCounterLocalService the config counter local service + */ + public void setConfigCounterLocalService( + org.opencps.dossiermgt.service.ConfigCounterLocalService configCounterLocalService) { + this.configCounterLocalService = configCounterLocalService; + } + + /** + * Returns the config counter persistence. + * + * @return the config counter persistence + */ + public ConfigCounterPersistence getConfigCounterPersistence() { + return configCounterPersistence; + } + + /** + * Sets the config counter persistence. + * + * @param configCounterPersistence the config counter persistence + */ + public void setConfigCounterPersistence( + ConfigCounterPersistence configCounterPersistence) { + this.configCounterPersistence = configCounterPersistence; + } + + /** + * Returns the cps dossier business local service. + * + * @return the cps dossier business local service + */ + public org.opencps.dossiermgt.service.CPSDossierBusinessLocalService getCPSDossierBusinessLocalService() { + return cpsDossierBusinessLocalService; + } + + /** + * Sets the cps dossier business local service. + * + * @param cpsDossierBusinessLocalService the cps dossier business local service + */ + public void setCPSDossierBusinessLocalService( + org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService) { + this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; + } + + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + + /** + * Returns the deliverable local service. + * + * @return the deliverable local service + */ + public org.opencps.dossiermgt.service.DeliverableLocalService getDeliverableLocalService() { + return deliverableLocalService; + } + + /** + * Sets the deliverable local service. + * + * @param deliverableLocalService the deliverable local service + */ + public void setDeliverableLocalService( + org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService) { + this.deliverableLocalService = deliverableLocalService; + } + + /** + * Returns the deliverable persistence. + * + * @return the deliverable persistence + */ + public DeliverablePersistence getDeliverablePersistence() { + return deliverablePersistence; + } + + /** + * Sets the deliverable persistence. + * + * @param deliverablePersistence the deliverable persistence + */ + public void setDeliverablePersistence( + DeliverablePersistence deliverablePersistence) { + this.deliverablePersistence = deliverablePersistence; + } + + /** + * Returns the deliverable finder. + * + * @return the deliverable finder + */ + public DeliverableFinder getDeliverableFinder() { + return deliverableFinder; + } + + /** + * Sets the deliverable finder. + * + * @param deliverableFinder the deliverable finder + */ + public void setDeliverableFinder(DeliverableFinder deliverableFinder) { + this.deliverableFinder = deliverableFinder; + } + + /** + * Returns the deliverable log local service. + * + * @return the deliverable log local service + */ + public org.opencps.dossiermgt.service.DeliverableLogLocalService getDeliverableLogLocalService() { + return deliverableLogLocalService; + } + + /** + * Sets the deliverable log local service. + * + * @param deliverableLogLocalService the deliverable log local service + */ + public void setDeliverableLogLocalService( + org.opencps.dossiermgt.service.DeliverableLogLocalService deliverableLogLocalService) { + this.deliverableLogLocalService = deliverableLogLocalService; + } + + /** + * Returns the deliverable log persistence. + * + * @return the deliverable log persistence + */ + public DeliverableLogPersistence getDeliverableLogPersistence() { + return deliverableLogPersistence; + } + + /** + * Sets the deliverable log persistence. + * + * @param deliverableLogPersistence the deliverable log persistence + */ + public void setDeliverableLogPersistence( + DeliverableLogPersistence deliverableLogPersistence) { + this.deliverableLogPersistence = deliverableLogPersistence; + } + + /** + * Returns the deliverable type local service. + * + * @return the deliverable type local service + */ + public org.opencps.dossiermgt.service.DeliverableTypeLocalService getDeliverableTypeLocalService() { + return deliverableTypeLocalService; + } + + /** + * Sets the deliverable type local service. + * + * @param deliverableTypeLocalService the deliverable type local service + */ + public void setDeliverableTypeLocalService( + org.opencps.dossiermgt.service.DeliverableTypeLocalService deliverableTypeLocalService) { + this.deliverableTypeLocalService = deliverableTypeLocalService; + } + + /** + * Returns the deliverable type persistence. + * + * @return the deliverable type persistence + */ + public DeliverableTypePersistence getDeliverableTypePersistence() { + return deliverableTypePersistence; + } + + /** + * Sets the deliverable type persistence. + * + * @param deliverableTypePersistence the deliverable type persistence + */ + public void setDeliverableTypePersistence( + DeliverableTypePersistence deliverableTypePersistence) { + this.deliverableTypePersistence = deliverableTypePersistence; + } + + /** + * Returns the deliverable type role local service. + * + * @return the deliverable type role local service + */ + public org.opencps.dossiermgt.service.DeliverableTypeRoleLocalService getDeliverableTypeRoleLocalService() { + return deliverableTypeRoleLocalService; + } + + /** + * Sets the deliverable type role local service. + * + * @param deliverableTypeRoleLocalService the deliverable type role local service + */ + public void setDeliverableTypeRoleLocalService( + org.opencps.dossiermgt.service.DeliverableTypeRoleLocalService deliverableTypeRoleLocalService) { + this.deliverableTypeRoleLocalService = deliverableTypeRoleLocalService; + } + + /** + * Returns the deliverable type role persistence. + * + * @return the deliverable type role persistence + */ + public DeliverableTypeRolePersistence getDeliverableTypeRolePersistence() { + return deliverableTypeRolePersistence; + } + + /** + * Sets the deliverable type role persistence. + * + * @param deliverableTypeRolePersistence the deliverable type role persistence + */ + public void setDeliverableTypeRolePersistence( + DeliverableTypeRolePersistence deliverableTypeRolePersistence) { + this.deliverableTypeRolePersistence = deliverableTypeRolePersistence; + } + + /** + * Returns the document type local service. + * + * @return the document type local service + */ + public org.opencps.dossiermgt.service.DocumentTypeLocalService getDocumentTypeLocalService() { + return documentTypeLocalService; + } + + /** + * Sets the document type local service. + * + * @param documentTypeLocalService the document type local service + */ + public void setDocumentTypeLocalService( + org.opencps.dossiermgt.service.DocumentTypeLocalService documentTypeLocalService) { + this.documentTypeLocalService = documentTypeLocalService; + } + + /** + * Returns the document type persistence. + * + * @return the document type persistence + */ + public DocumentTypePersistence getDocumentTypePersistence() { + return documentTypePersistence; + } + + /** + * Sets the document type persistence. + * + * @param documentTypePersistence the document type persistence + */ + public void setDocumentTypePersistence( + DocumentTypePersistence documentTypePersistence) { + this.documentTypePersistence = documentTypePersistence; + } + + /** + * Returns the dossier local service. + * + * @return the dossier local service + */ + public org.opencps.dossiermgt.service.DossierLocalService getDossierLocalService() { + return dossierLocalService; + } + + /** + * Sets the dossier local service. + * + * @param dossierLocalService the dossier local service + */ + public void setDossierLocalService( + org.opencps.dossiermgt.service.DossierLocalService dossierLocalService) { + this.dossierLocalService = dossierLocalService; + } + + /** + * Returns the dossier persistence. + * + * @return the dossier persistence + */ + public DossierPersistence getDossierPersistence() { + return dossierPersistence; + } + + /** + * Sets the dossier persistence. + * + * @param dossierPersistence the dossier persistence + */ + public void setDossierPersistence(DossierPersistence dossierPersistence) { + this.dossierPersistence = dossierPersistence; + } + + /** + * Returns the dossier finder. + * + * @return the dossier finder + */ + public DossierFinder getDossierFinder() { + return dossierFinder; + } + + /** + * Sets the dossier finder. + * + * @param dossierFinder the dossier finder + */ + public void setDossierFinder(DossierFinder dossierFinder) { + this.dossierFinder = dossierFinder; + } + + /** + * Returns the dossier action local service. + * + * @return the dossier action local service + */ + public org.opencps.dossiermgt.service.DossierActionLocalService getDossierActionLocalService() { + return dossierActionLocalService; + } + + /** + * Sets the dossier action local service. + * + * @param dossierActionLocalService the dossier action local service + */ + public void setDossierActionLocalService( + org.opencps.dossiermgt.service.DossierActionLocalService dossierActionLocalService) { + this.dossierActionLocalService = dossierActionLocalService; + } + + /** + * Returns the dossier action persistence. + * + * @return the dossier action persistence + */ + public DossierActionPersistence getDossierActionPersistence() { + return dossierActionPersistence; + } + + /** + * Sets the dossier action persistence. + * + * @param dossierActionPersistence the dossier action persistence + */ + public void setDossierActionPersistence( + DossierActionPersistence dossierActionPersistence) { + this.dossierActionPersistence = dossierActionPersistence; + } + + /** + * Returns the dossier action finder. + * + * @return the dossier action finder + */ + public DossierActionFinder getDossierActionFinder() { + return dossierActionFinder; + } + + /** + * Sets the dossier action finder. + * + * @param dossierActionFinder the dossier action finder + */ + public void setDossierActionFinder(DossierActionFinder dossierActionFinder) { + this.dossierActionFinder = dossierActionFinder; + } + + /** + * Returns the dossier action sync local service. + * + * @return the dossier action sync local service + */ + public org.opencps.dossiermgt.service.DossierActionSyncLocalService getDossierActionSyncLocalService() { + return dossierActionSyncLocalService; + } + + /** + * Sets the dossier action sync local service. + * + * @param dossierActionSyncLocalService the dossier action sync local service + */ + public void setDossierActionSyncLocalService( + org.opencps.dossiermgt.service.DossierActionSyncLocalService dossierActionSyncLocalService) { + this.dossierActionSyncLocalService = dossierActionSyncLocalService; + } + + /** + * Returns the dossier action sync persistence. + * + * @return the dossier action sync persistence + */ + public DossierActionSyncPersistence getDossierActionSyncPersistence() { + return dossierActionSyncPersistence; + } + + /** + * Sets the dossier action sync persistence. + * + * @param dossierActionSyncPersistence the dossier action sync persistence + */ + public void setDossierActionSyncPersistence( + DossierActionSyncPersistence dossierActionSyncPersistence) { + this.dossierActionSyncPersistence = dossierActionSyncPersistence; + } + + /** + * Returns the dossier action user local service. + * + * @return the dossier action user local service + */ + public org.opencps.dossiermgt.service.DossierActionUserLocalService getDossierActionUserLocalService() { + return dossierActionUserLocalService; + } + + /** + * Sets the dossier action user local service. + * + * @param dossierActionUserLocalService the dossier action user local service + */ + public void setDossierActionUserLocalService( + org.opencps.dossiermgt.service.DossierActionUserLocalService dossierActionUserLocalService) { + this.dossierActionUserLocalService = dossierActionUserLocalService; + } + + /** + * Returns the dossier action user persistence. + * + * @return the dossier action user persistence + */ + public DossierActionUserPersistence getDossierActionUserPersistence() { + return dossierActionUserPersistence; + } + + /** + * Sets the dossier action user persistence. + * + * @param dossierActionUserPersistence the dossier action user persistence + */ + public void setDossierActionUserPersistence( + DossierActionUserPersistence dossierActionUserPersistence) { + this.dossierActionUserPersistence = dossierActionUserPersistence; + } + + /** + * Returns the dossier document local service. + * + * @return the dossier document local service + */ + public org.opencps.dossiermgt.service.DossierDocumentLocalService getDossierDocumentLocalService() { + return dossierDocumentLocalService; + } + + /** + * Sets the dossier document local service. + * + * @param dossierDocumentLocalService the dossier document local service + */ + public void setDossierDocumentLocalService( + org.opencps.dossiermgt.service.DossierDocumentLocalService dossierDocumentLocalService) { + this.dossierDocumentLocalService = dossierDocumentLocalService; + } + + /** + * Returns the dossier document persistence. + * + * @return the dossier document persistence + */ + public DossierDocumentPersistence getDossierDocumentPersistence() { + return dossierDocumentPersistence; + } + + /** + * Sets the dossier document persistence. + * + * @param dossierDocumentPersistence the dossier document persistence + */ + public void setDossierDocumentPersistence( + DossierDocumentPersistence dossierDocumentPersistence) { + this.dossierDocumentPersistence = dossierDocumentPersistence; + } + + /** + * Returns the dossier file local service. + * + * @return the dossier file local service + */ + public org.opencps.dossiermgt.service.DossierFileLocalService getDossierFileLocalService() { + return dossierFileLocalService; + } + + /** + * Sets the dossier file local service. + * + * @param dossierFileLocalService the dossier file local service + */ + public void setDossierFileLocalService( + org.opencps.dossiermgt.service.DossierFileLocalService dossierFileLocalService) { + this.dossierFileLocalService = dossierFileLocalService; + } + + /** + * Returns the dossier file persistence. + * + * @return the dossier file persistence + */ + public DossierFilePersistence getDossierFilePersistence() { + return dossierFilePersistence; + } + + /** + * Sets the dossier file persistence. + * + * @param dossierFilePersistence the dossier file persistence + */ + public void setDossierFilePersistence( + DossierFilePersistence dossierFilePersistence) { + this.dossierFilePersistence = dossierFilePersistence; + } + + /** + * Returns the dossier log local service. + * + * @return the dossier log local service + */ + public org.opencps.dossiermgt.service.DossierLogLocalService getDossierLogLocalService() { + return dossierLogLocalService; + } + + /** + * Sets the dossier log local service. + * + * @param dossierLogLocalService the dossier log local service + */ + public void setDossierLogLocalService( + org.opencps.dossiermgt.service.DossierLogLocalService dossierLogLocalService) { + this.dossierLogLocalService = dossierLogLocalService; + } + + /** + * Returns the dossier log persistence. + * + * @return the dossier log persistence + */ + public DossierLogPersistence getDossierLogPersistence() { + return dossierLogPersistence; + } + + /** + * Sets the dossier log persistence. + * + * @param dossierLogPersistence the dossier log persistence + */ + public void setDossierLogPersistence( + DossierLogPersistence dossierLogPersistence) { + this.dossierLogPersistence = dossierLogPersistence; + } + + /** + * Returns the dossier mark local service. + * + * @return the dossier mark local service + */ + public org.opencps.dossiermgt.service.DossierMarkLocalService getDossierMarkLocalService() { + return dossierMarkLocalService; + } + + /** + * Sets the dossier mark local service. + * + * @param dossierMarkLocalService the dossier mark local service + */ + public void setDossierMarkLocalService( + org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService) { + this.dossierMarkLocalService = dossierMarkLocalService; + } + + /** + * Returns the dossier mark persistence. + * + * @return the dossier mark persistence + */ + public DossierMarkPersistence getDossierMarkPersistence() { + return dossierMarkPersistence; + } + + /** + * Sets the dossier mark persistence. + * + * @param dossierMarkPersistence the dossier mark persistence + */ + public void setDossierMarkPersistence( + DossierMarkPersistence dossierMarkPersistence) { + this.dossierMarkPersistence = dossierMarkPersistence; + } + + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + + /** + * Returns the dossier part local service. + * + * @return the dossier part local service + */ + public org.opencps.dossiermgt.service.DossierPartLocalService getDossierPartLocalService() { + return dossierPartLocalService; + } + + /** + * Sets the dossier part local service. + * + * @param dossierPartLocalService the dossier part local service + */ + public void setDossierPartLocalService( + org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService) { + this.dossierPartLocalService = dossierPartLocalService; + } + + /** + * Returns the dossier part persistence. + * + * @return the dossier part persistence + */ + public DossierPartPersistence getDossierPartPersistence() { + return dossierPartPersistence; + } + + /** + * Sets the dossier part persistence. + * + * @param dossierPartPersistence the dossier part persistence + */ + public void setDossierPartPersistence( + DossierPartPersistence dossierPartPersistence) { + this.dossierPartPersistence = dossierPartPersistence; + } + + /** + * Returns the dossier request ud local service. + * + * @return the dossier request ud local service + */ + public org.opencps.dossiermgt.service.DossierRequestUDLocalService getDossierRequestUDLocalService() { + return dossierRequestUDLocalService; + } + + /** + * Sets the dossier request ud local service. + * + * @param dossierRequestUDLocalService the dossier request ud local service + */ + public void setDossierRequestUDLocalService( + org.opencps.dossiermgt.service.DossierRequestUDLocalService dossierRequestUDLocalService) { + this.dossierRequestUDLocalService = dossierRequestUDLocalService; + } + + /** + * Returns the dossier request ud persistence. + * + * @return the dossier request ud persistence + */ + public DossierRequestUDPersistence getDossierRequestUDPersistence() { + return dossierRequestUDPersistence; + } + + /** + * Sets the dossier request ud persistence. + * + * @param dossierRequestUDPersistence the dossier request ud persistence + */ + public void setDossierRequestUDPersistence( + DossierRequestUDPersistence dossierRequestUDPersistence) { + this.dossierRequestUDPersistence = dossierRequestUDPersistence; + } + + /** + * Returns the dossier statistic local service. + * + * @return the dossier statistic local service + */ + public org.opencps.dossiermgt.service.DossierStatisticLocalService getDossierStatisticLocalService() { + return dossierStatisticLocalService; + } + + /** + * Sets the dossier statistic local service. + * + * @param dossierStatisticLocalService the dossier statistic local service + */ + public void setDossierStatisticLocalService( + org.opencps.dossiermgt.service.DossierStatisticLocalService dossierStatisticLocalService) { + this.dossierStatisticLocalService = dossierStatisticLocalService; + } + + /** + * Returns the dossier statistic persistence. + * + * @return the dossier statistic persistence + */ + public DossierStatisticPersistence getDossierStatisticPersistence() { + return dossierStatisticPersistence; + } + + /** + * Sets the dossier statistic persistence. + * + * @param dossierStatisticPersistence the dossier statistic persistence + */ + public void setDossierStatisticPersistence( + DossierStatisticPersistence dossierStatisticPersistence) { + this.dossierStatisticPersistence = dossierStatisticPersistence; + } + + /** + * Returns the dossier status mapping local service. + * + * @return the dossier status mapping local service + */ + public org.opencps.dossiermgt.service.DossierStatusMappingLocalService getDossierStatusMappingLocalService() { + return dossierStatusMappingLocalService; + } + + /** + * Sets the dossier status mapping local service. + * + * @param dossierStatusMappingLocalService the dossier status mapping local service + */ + public void setDossierStatusMappingLocalService( + org.opencps.dossiermgt.service.DossierStatusMappingLocalService dossierStatusMappingLocalService) { + this.dossierStatusMappingLocalService = dossierStatusMappingLocalService; + } + + /** + * Returns the dossier status mapping persistence. + * + * @return the dossier status mapping persistence + */ + public DossierStatusMappingPersistence getDossierStatusMappingPersistence() { + return dossierStatusMappingPersistence; + } + + /** + * Sets the dossier status mapping persistence. + * + * @param dossierStatusMappingPersistence the dossier status mapping persistence + */ + public void setDossierStatusMappingPersistence( + DossierStatusMappingPersistence dossierStatusMappingPersistence) { + this.dossierStatusMappingPersistence = dossierStatusMappingPersistence; + } + + /** + * Returns the dossier sync local service. + * + * @return the dossier sync local service + */ + public org.opencps.dossiermgt.service.DossierSyncLocalService getDossierSyncLocalService() { + return dossierSyncLocalService; + } + + /** + * Sets the dossier sync local service. + * + * @param dossierSyncLocalService the dossier sync local service + */ + public void setDossierSyncLocalService( + org.opencps.dossiermgt.service.DossierSyncLocalService dossierSyncLocalService) { + this.dossierSyncLocalService = dossierSyncLocalService; + } + + /** + * Returns the dossier sync persistence. + * + * @return the dossier sync persistence + */ + public DossierSyncPersistence getDossierSyncPersistence() { + return dossierSyncPersistence; + } + + /** + * Sets the dossier sync persistence. + * + * @param dossierSyncPersistence the dossier sync persistence + */ + public void setDossierSyncPersistence( + DossierSyncPersistence dossierSyncPersistence) { + this.dossierSyncPersistence = dossierSyncPersistence; + } + + /** + * Returns the dossier sync finder. + * + * @return the dossier sync finder + */ + public DossierSyncFinder getDossierSyncFinder() { + return dossierSyncFinder; + } + + /** + * Sets the dossier sync finder. + * + * @param dossierSyncFinder the dossier sync finder + */ + public void setDossierSyncFinder(DossierSyncFinder dossierSyncFinder) { + this.dossierSyncFinder = dossierSyncFinder; + } + + /** + * Returns the dossier template local service. + * + * @return the dossier template local service + */ + public org.opencps.dossiermgt.service.DossierTemplateLocalService getDossierTemplateLocalService() { + return dossierTemplateLocalService; + } + + /** + * Sets the dossier template local service. + * + * @param dossierTemplateLocalService the dossier template local service + */ + public void setDossierTemplateLocalService( + org.opencps.dossiermgt.service.DossierTemplateLocalService dossierTemplateLocalService) { + this.dossierTemplateLocalService = dossierTemplateLocalService; + } + + /** + * Returns the dossier template persistence. + * + * @return the dossier template persistence + */ + public DossierTemplatePersistence getDossierTemplatePersistence() { + return dossierTemplatePersistence; + } + + /** + * Sets the dossier template persistence. + * + * @param dossierTemplatePersistence the dossier template persistence + */ + public void setDossierTemplatePersistence( + DossierTemplatePersistence dossierTemplatePersistence) { + this.dossierTemplatePersistence = dossierTemplatePersistence; + } + + /** + * Returns the dossier user local service. + * + * @return the dossier user local service + */ + public org.opencps.dossiermgt.service.DossierUserLocalService getDossierUserLocalService() { + return dossierUserLocalService; + } + + /** + * Sets the dossier user local service. + * + * @param dossierUserLocalService the dossier user local service + */ + public void setDossierUserLocalService( + org.opencps.dossiermgt.service.DossierUserLocalService dossierUserLocalService) { + this.dossierUserLocalService = dossierUserLocalService; + } + + /** + * Returns the dossier user persistence. + * + * @return the dossier user persistence + */ + public DossierUserPersistence getDossierUserPersistence() { + return dossierUserPersistence; + } + + /** + * Sets the dossier user persistence. + * + * @param dossierUserPersistence the dossier user persistence + */ + public void setDossierUserPersistence( + DossierUserPersistence dossierUserPersistence) { + this.dossierUserPersistence = dossierUserPersistence; + } + + /** + * Returns the e form local service. + * + * @return the e form local service + */ + public org.opencps.dossiermgt.service.EFormLocalService getEFormLocalService() { + return eFormLocalService; + } + + /** + * Sets the e form local service. + * + * @param eFormLocalService the e form local service + */ + public void setEFormLocalService( + org.opencps.dossiermgt.service.EFormLocalService eFormLocalService) { + this.eFormLocalService = eFormLocalService; + } + + /** + * Returns the e form persistence. + * + * @return the e form persistence + */ + public EFormPersistence getEFormPersistence() { + return eFormPersistence; + } + + /** + * Sets the e form persistence. + * + * @param eFormPersistence the e form persistence + */ + public void setEFormPersistence(EFormPersistence eFormPersistence) { + this.eFormPersistence = eFormPersistence; + } + + /** + * Returns the menu config local service. + * + * @return the menu config local service + */ + public org.opencps.dossiermgt.service.MenuConfigLocalService getMenuConfigLocalService() { + return menuConfigLocalService; + } + + /** + * Sets the menu config local service. + * + * @param menuConfigLocalService the menu config local service + */ + public void setMenuConfigLocalService( + org.opencps.dossiermgt.service.MenuConfigLocalService menuConfigLocalService) { + this.menuConfigLocalService = menuConfigLocalService; + } + + /** + * Returns the menu config persistence. + * + * @return the menu config persistence + */ + public MenuConfigPersistence getMenuConfigPersistence() { + return menuConfigPersistence; + } + + /** + * Sets the menu config persistence. + * + * @param menuConfigPersistence the menu config persistence + */ + public void setMenuConfigPersistence( + MenuConfigPersistence menuConfigPersistence) { + this.menuConfigPersistence = menuConfigPersistence; + } + + /** + * Returns the menu role local service. + * + * @return the menu role local service + */ + public org.opencps.dossiermgt.service.MenuRoleLocalService getMenuRoleLocalService() { + return menuRoleLocalService; + } + + /** + * Sets the menu role local service. + * + * @param menuRoleLocalService the menu role local service + */ + public void setMenuRoleLocalService( + org.opencps.dossiermgt.service.MenuRoleLocalService menuRoleLocalService) { + this.menuRoleLocalService = menuRoleLocalService; + } + + /** + * Returns the menu role persistence. + * + * @return the menu role persistence + */ + public MenuRolePersistence getMenuRolePersistence() { + return menuRolePersistence; + } + + /** + * Sets the menu role persistence. + * + * @param menuRolePersistence the menu role persistence + */ + public void setMenuRolePersistence(MenuRolePersistence menuRolePersistence) { + this.menuRolePersistence = menuRolePersistence; + } + + /** + * Returns the news board local service. + * + * @return the news board local service + */ + public org.opencps.dossiermgt.service.NewsBoardLocalService getNewsBoardLocalService() { + return newsBoardLocalService; + } + + /** + * Sets the news board local service. + * + * @param newsBoardLocalService the news board local service + */ + public void setNewsBoardLocalService( + org.opencps.dossiermgt.service.NewsBoardLocalService newsBoardLocalService) { + this.newsBoardLocalService = newsBoardLocalService; + } + + /** + * Returns the news board persistence. + * + * @return the news board persistence + */ + public NewsBoardPersistence getNewsBoardPersistence() { + return newsBoardPersistence; + } + + /** + * Sets the news board persistence. + * + * @param newsBoardPersistence the news board persistence + */ + public void setNewsBoardPersistence( + NewsBoardPersistence newsBoardPersistence) { + this.newsBoardPersistence = newsBoardPersistence; + } + + /** + * Returns the notarization local service. + * + * @return the notarization local service + */ + public org.opencps.dossiermgt.service.NotarizationLocalService getNotarizationLocalService() { + return notarizationLocalService; + } + + /** + * Sets the notarization local service. + * + * @param notarizationLocalService the notarization local service + */ + public void setNotarizationLocalService( + org.opencps.dossiermgt.service.NotarizationLocalService notarizationLocalService) { + this.notarizationLocalService = notarizationLocalService; + } + + /** + * Returns the notarization persistence. + * + * @return the notarization persistence + */ + public NotarizationPersistence getNotarizationPersistence() { + return notarizationPersistence; + } + + /** + * Sets the notarization persistence. + * + * @param notarizationPersistence the notarization persistence + */ + public void setNotarizationPersistence( + NotarizationPersistence notarizationPersistence) { + this.notarizationPersistence = notarizationPersistence; + } + + /** + * Returns the notarization finder. + * + * @return the notarization finder + */ + public NotarizationFinder getNotarizationFinder() { + return notarizationFinder; + } + + /** + * Sets the notarization finder. + * + * @param notarizationFinder the notarization finder + */ + public void setNotarizationFinder(NotarizationFinder notarizationFinder) { + this.notarizationFinder = notarizationFinder; + } + + /** + * Returns the payment config local service. + * + * @return the payment config local service + */ + public org.opencps.dossiermgt.service.PaymentConfigLocalService getPaymentConfigLocalService() { + return paymentConfigLocalService; + } + + /** + * Sets the payment config local service. + * + * @param paymentConfigLocalService the payment config local service + */ + public void setPaymentConfigLocalService( + org.opencps.dossiermgt.service.PaymentConfigLocalService paymentConfigLocalService) { + this.paymentConfigLocalService = paymentConfigLocalService; + } + + /** + * Returns the payment config persistence. + * + * @return the payment config persistence + */ + public PaymentConfigPersistence getPaymentConfigPersistence() { + return paymentConfigPersistence; + } + + /** + * Sets the payment config persistence. + * + * @param paymentConfigPersistence the payment config persistence + */ + public void setPaymentConfigPersistence( + PaymentConfigPersistence paymentConfigPersistence) { + this.paymentConfigPersistence = paymentConfigPersistence; + } + + /** + * Returns the payment fee info local service. + * + * @return the payment fee info local service + */ + public org.opencps.dossiermgt.service.PaymentFeeInfoLocalService getPaymentFeeInfoLocalService() { + return paymentFeeInfoLocalService; + } + + /** + * Sets the payment fee info local service. + * + * @param paymentFeeInfoLocalService the payment fee info local service + */ + public void setPaymentFeeInfoLocalService( + org.opencps.dossiermgt.service.PaymentFeeInfoLocalService paymentFeeInfoLocalService) { + this.paymentFeeInfoLocalService = paymentFeeInfoLocalService; + } + + /** + * Returns the payment fee info persistence. + * + * @return the payment fee info persistence + */ + public PaymentFeeInfoPersistence getPaymentFeeInfoPersistence() { + return paymentFeeInfoPersistence; + } + + /** + * Sets the payment fee info persistence. + * + * @param paymentFeeInfoPersistence the payment fee info persistence + */ + public void setPaymentFeeInfoPersistence( + PaymentFeeInfoPersistence paymentFeeInfoPersistence) { + this.paymentFeeInfoPersistence = paymentFeeInfoPersistence; + } + + /** + * Returns the payment file local service. + * + * @return the payment file local service + */ + public org.opencps.dossiermgt.service.PaymentFileLocalService getPaymentFileLocalService() { + return paymentFileLocalService; + } + + /** + * Sets the payment file local service. + * + * @param paymentFileLocalService the payment file local service + */ + public void setPaymentFileLocalService( + org.opencps.dossiermgt.service.PaymentFileLocalService paymentFileLocalService) { + this.paymentFileLocalService = paymentFileLocalService; + } + + /** + * Returns the payment file persistence. + * + * @return the payment file persistence + */ + public PaymentFilePersistence getPaymentFilePersistence() { + return paymentFilePersistence; + } + + /** + * Sets the payment file persistence. + * + * @param paymentFilePersistence the payment file persistence + */ + public void setPaymentFilePersistence( + PaymentFilePersistence paymentFilePersistence) { + this.paymentFilePersistence = paymentFilePersistence; + } + + /** + * Returns the payment file finder. + * + * @return the payment file finder + */ + public PaymentFileFinder getPaymentFileFinder() { + return paymentFileFinder; + } + + /** + * Sets the payment file finder. + * + * @param paymentFileFinder the payment file finder + */ + public void setPaymentFileFinder(PaymentFileFinder paymentFileFinder) { + this.paymentFileFinder = paymentFileFinder; + } + + /** + * Returns the post connect local service. + * + * @return the post connect local service + */ + public org.opencps.dossiermgt.service.PostConnectLocalService getPostConnectLocalService() { + return postConnectLocalService; + } + + /** + * Sets the post connect local service. + * + * @param postConnectLocalService the post connect local service + */ + public void setPostConnectLocalService( + org.opencps.dossiermgt.service.PostConnectLocalService postConnectLocalService) { + this.postConnectLocalService = postConnectLocalService; + } + + /** + * Returns the post connect persistence. + * + * @return the post connect persistence + */ + public PostConnectPersistence getPostConnectPersistence() { + return postConnectPersistence; + } + + /** + * Sets the post connect persistence. + * + * @param postConnectPersistence the post connect persistence + */ + public void setPostConnectPersistence( + PostConnectPersistence postConnectPersistence) { + this.postConnectPersistence = postConnectPersistence; + } + + /** + * Returns the process action local service. + * + * @return the process action local service + */ + public org.opencps.dossiermgt.service.ProcessActionLocalService getProcessActionLocalService() { + return processActionLocalService; + } + + /** + * Sets the process action local service. + * + * @param processActionLocalService the process action local service + */ + public void setProcessActionLocalService( + org.opencps.dossiermgt.service.ProcessActionLocalService processActionLocalService) { + this.processActionLocalService = processActionLocalService; + } + + /** + * Returns the process action persistence. + * + * @return the process action persistence + */ + public ProcessActionPersistence getProcessActionPersistence() { + return processActionPersistence; + } + + /** + * Sets the process action persistence. + * + * @param processActionPersistence the process action persistence + */ + public void setProcessActionPersistence( + ProcessActionPersistence processActionPersistence) { + this.processActionPersistence = processActionPersistence; + } + + /** + * Returns the process option local service. + * + * @return the process option local service + */ + public org.opencps.dossiermgt.service.ProcessOptionLocalService getProcessOptionLocalService() { + return processOptionLocalService; + } + + /** + * Sets the process option local service. + * + * @param processOptionLocalService the process option local service + */ + public void setProcessOptionLocalService( + org.opencps.dossiermgt.service.ProcessOptionLocalService processOptionLocalService) { + this.processOptionLocalService = processOptionLocalService; + } + + /** + * Returns the process option persistence. + * + * @return the process option persistence + */ + public ProcessOptionPersistence getProcessOptionPersistence() { + return processOptionPersistence; + } + + /** + * Sets the process option persistence. + * + * @param processOptionPersistence the process option persistence + */ + public void setProcessOptionPersistence( + ProcessOptionPersistence processOptionPersistence) { + this.processOptionPersistence = processOptionPersistence; + } + + /** + * Returns the process plugin local service. + * + * @return the process plugin local service + */ + public org.opencps.dossiermgt.service.ProcessPluginLocalService getProcessPluginLocalService() { + return processPluginLocalService; + } + + /** + * Sets the process plugin local service. + * + * @param processPluginLocalService the process plugin local service + */ + public void setProcessPluginLocalService( + org.opencps.dossiermgt.service.ProcessPluginLocalService processPluginLocalService) { + this.processPluginLocalService = processPluginLocalService; + } + + /** + * Returns the process plugin persistence. + * + * @return the process plugin persistence + */ + public ProcessPluginPersistence getProcessPluginPersistence() { + return processPluginPersistence; + } + + /** + * Sets the process plugin persistence. + * + * @param processPluginPersistence the process plugin persistence + */ + public void setProcessPluginPersistence( + ProcessPluginPersistence processPluginPersistence) { + this.processPluginPersistence = processPluginPersistence; + } + + /** + * Returns the process sequence local service. + * + * @return the process sequence local service + */ + public org.opencps.dossiermgt.service.ProcessSequenceLocalService getProcessSequenceLocalService() { + return processSequenceLocalService; + } + + /** + * Sets the process sequence local service. + * + * @param processSequenceLocalService the process sequence local service + */ + public void setProcessSequenceLocalService( + org.opencps.dossiermgt.service.ProcessSequenceLocalService processSequenceLocalService) { + this.processSequenceLocalService = processSequenceLocalService; + } + + /** + * Returns the process sequence persistence. + * + * @return the process sequence persistence + */ + public ProcessSequencePersistence getProcessSequencePersistence() { + return processSequencePersistence; + } + + /** + * Sets the process sequence persistence. + * + * @param processSequencePersistence the process sequence persistence + */ + public void setProcessSequencePersistence( + ProcessSequencePersistence processSequencePersistence) { + this.processSequencePersistence = processSequencePersistence; + } + + /** + * Returns the process step local service. + * + * @return the process step local service + */ + public org.opencps.dossiermgt.service.ProcessStepLocalService getProcessStepLocalService() { + return processStepLocalService; + } + + /** + * Sets the process step local service. + * + * @param processStepLocalService the process step local service + */ + public void setProcessStepLocalService( + org.opencps.dossiermgt.service.ProcessStepLocalService processStepLocalService) { + this.processStepLocalService = processStepLocalService; + } + + /** + * Returns the process step persistence. + * + * @return the process step persistence + */ + public ProcessStepPersistence getProcessStepPersistence() { + return processStepPersistence; + } + + /** + * Sets the process step persistence. + * + * @param processStepPersistence the process step persistence + */ + public void setProcessStepPersistence( + ProcessStepPersistence processStepPersistence) { + this.processStepPersistence = processStepPersistence; + } + + /** + * Returns the process step role local service. + * + * @return the process step role local service + */ + public org.opencps.dossiermgt.service.ProcessStepRoleLocalService getProcessStepRoleLocalService() { + return processStepRoleLocalService; + } + + /** + * Sets the process step role local service. + * + * @param processStepRoleLocalService the process step role local service + */ + public void setProcessStepRoleLocalService( + org.opencps.dossiermgt.service.ProcessStepRoleLocalService processStepRoleLocalService) { + this.processStepRoleLocalService = processStepRoleLocalService; + } + + /** + * Returns the process step role persistence. + * + * @return the process step role persistence + */ + public ProcessStepRolePersistence getProcessStepRolePersistence() { + return processStepRolePersistence; + } + + /** + * Sets the process step role persistence. + * + * @param processStepRolePersistence the process step role persistence + */ + public void setProcessStepRolePersistence( + ProcessStepRolePersistence processStepRolePersistence) { + this.processStepRolePersistence = processStepRolePersistence; + } + + /** + * Returns the publish queue local service. + * + * @return the publish queue local service + */ + public org.opencps.dossiermgt.service.PublishQueueLocalService getPublishQueueLocalService() { + return publishQueueLocalService; + } + + /** + * Sets the publish queue local service. + * + * @param publishQueueLocalService the publish queue local service + */ + public void setPublishQueueLocalService( + org.opencps.dossiermgt.service.PublishQueueLocalService publishQueueLocalService) { + this.publishQueueLocalService = publishQueueLocalService; + } + + /** + * Returns the publish queue persistence. + * + * @return the publish queue persistence + */ + public PublishQueuePersistence getPublishQueuePersistence() { + return publishQueuePersistence; + } + + /** + * Sets the publish queue persistence. + * + * @param publishQueuePersistence the publish queue persistence + */ + public void setPublishQueuePersistence( + PublishQueuePersistence publishQueuePersistence) { + this.publishQueuePersistence = publishQueuePersistence; + } + + /** + * Returns the registration local service. + * + * @return the registration local service + */ + public org.opencps.dossiermgt.service.RegistrationLocalService getRegistrationLocalService() { + return registrationLocalService; + } + + /** + * Sets the registration local service. + * + * @param registrationLocalService the registration local service + */ + public void setRegistrationLocalService( + org.opencps.dossiermgt.service.RegistrationLocalService registrationLocalService) { + this.registrationLocalService = registrationLocalService; + } + + /** + * Returns the registration persistence. + * + * @return the registration persistence + */ + public RegistrationPersistence getRegistrationPersistence() { + return registrationPersistence; + } + + /** + * Sets the registration persistence. + * + * @param registrationPersistence the registration persistence + */ + public void setRegistrationPersistence( + RegistrationPersistence registrationPersistence) { + this.registrationPersistence = registrationPersistence; + } + + /** + * Returns the registration form local service. + * + * @return the registration form local service + */ + public org.opencps.dossiermgt.service.RegistrationFormLocalService getRegistrationFormLocalService() { + return registrationFormLocalService; + } + + /** + * Sets the registration form local service. + * + * @param registrationFormLocalService the registration form local service + */ + public void setRegistrationFormLocalService( + org.opencps.dossiermgt.service.RegistrationFormLocalService registrationFormLocalService) { + this.registrationFormLocalService = registrationFormLocalService; + } + + /** + * Returns the registration form persistence. + * + * @return the registration form persistence + */ + public RegistrationFormPersistence getRegistrationFormPersistence() { + return registrationFormPersistence; + } + + /** + * Sets the registration form persistence. + * + * @param registrationFormPersistence the registration form persistence + */ + public void setRegistrationFormPersistence( + RegistrationFormPersistence registrationFormPersistence) { + this.registrationFormPersistence = registrationFormPersistence; + } + + /** + * Returns the registration log local service. + * + * @return the registration log local service + */ + public org.opencps.dossiermgt.service.RegistrationLogLocalService getRegistrationLogLocalService() { + return registrationLogLocalService; + } + + /** + * Sets the registration log local service. + * + * @param registrationLogLocalService the registration log local service + */ + public void setRegistrationLogLocalService( + org.opencps.dossiermgt.service.RegistrationLogLocalService registrationLogLocalService) { + this.registrationLogLocalService = registrationLogLocalService; + } + + /** + * Returns the registration log persistence. + * + * @return the registration log persistence + */ + public RegistrationLogPersistence getRegistrationLogPersistence() { + return registrationLogPersistence; + } + + /** + * Sets the registration log persistence. + * + * @param registrationLogPersistence the registration log persistence + */ + public void setRegistrationLogPersistence( + RegistrationLogPersistence registrationLogPersistence) { + this.registrationLogPersistence = registrationLogPersistence; + } + + /** + * Returns the registration templates local service. + * + * @return the registration templates local service + */ + public org.opencps.dossiermgt.service.RegistrationTemplatesLocalService getRegistrationTemplatesLocalService() { + return registrationTemplatesLocalService; + } + + /** + * Sets the registration templates local service. + * + * @param registrationTemplatesLocalService the registration templates local service + */ + public void setRegistrationTemplatesLocalService( + org.opencps.dossiermgt.service.RegistrationTemplatesLocalService registrationTemplatesLocalService) { + this.registrationTemplatesLocalService = registrationTemplatesLocalService; + } + + /** + * Returns the registration templates persistence. + * + * @return the registration templates persistence + */ + public RegistrationTemplatesPersistence getRegistrationTemplatesPersistence() { + return registrationTemplatesPersistence; + } + + /** + * Sets the registration templates persistence. + * + * @param registrationTemplatesPersistence the registration templates persistence + */ + public void setRegistrationTemplatesPersistence( + RegistrationTemplatesPersistence registrationTemplatesPersistence) { + this.registrationTemplatesPersistence = registrationTemplatesPersistence; + } + + /** + * Returns the service config local service. + * + * @return the service config local service + */ + public org.opencps.dossiermgt.service.ServiceConfigLocalService getServiceConfigLocalService() { + return serviceConfigLocalService; + } + + /** + * Sets the service config local service. + * + * @param serviceConfigLocalService the service config local service + */ + public void setServiceConfigLocalService( + org.opencps.dossiermgt.service.ServiceConfigLocalService serviceConfigLocalService) { + this.serviceConfigLocalService = serviceConfigLocalService; + } + + /** + * Returns the service config persistence. + * + * @return the service config persistence + */ + public ServiceConfigPersistence getServiceConfigPersistence() { + return serviceConfigPersistence; + } + + /** + * Sets the service config persistence. + * + * @param serviceConfigPersistence the service config persistence + */ + public void setServiceConfigPersistence( + ServiceConfigPersistence serviceConfigPersistence) { + this.serviceConfigPersistence = serviceConfigPersistence; + } + + /** + * Returns the service config mapping local service. + * + * @return the service config mapping local service + */ + public org.opencps.dossiermgt.service.ServiceConfigMappingLocalService getServiceConfigMappingLocalService() { + return serviceConfigMappingLocalService; + } + + /** + * Sets the service config mapping local service. + * + * @param serviceConfigMappingLocalService the service config mapping local service + */ + public void setServiceConfigMappingLocalService( + org.opencps.dossiermgt.service.ServiceConfigMappingLocalService serviceConfigMappingLocalService) { + this.serviceConfigMappingLocalService = serviceConfigMappingLocalService; + } + + /** + * Returns the service config mapping persistence. + * + * @return the service config mapping persistence + */ + public ServiceConfigMappingPersistence getServiceConfigMappingPersistence() { + return serviceConfigMappingPersistence; + } + + /** + * Sets the service config mapping persistence. + * + * @param serviceConfigMappingPersistence the service config mapping persistence + */ + public void setServiceConfigMappingPersistence( + ServiceConfigMappingPersistence serviceConfigMappingPersistence) { + this.serviceConfigMappingPersistence = serviceConfigMappingPersistence; + } + + /** + * Returns the service file template local service. + * + * @return the service file template local service + */ + public org.opencps.dossiermgt.service.ServiceFileTemplateLocalService getServiceFileTemplateLocalService() { + return serviceFileTemplateLocalService; + } + + /** + * Sets the service file template local service. + * + * @param serviceFileTemplateLocalService the service file template local service + */ + public void setServiceFileTemplateLocalService( + org.opencps.dossiermgt.service.ServiceFileTemplateLocalService serviceFileTemplateLocalService) { + this.serviceFileTemplateLocalService = serviceFileTemplateLocalService; + } + + /** + * Returns the service file template persistence. + * + * @return the service file template persistence + */ + public ServiceFileTemplatePersistence getServiceFileTemplatePersistence() { + return serviceFileTemplatePersistence; + } + + /** + * Sets the service file template persistence. + * + * @param serviceFileTemplatePersistence the service file template persistence + */ + public void setServiceFileTemplatePersistence( + ServiceFileTemplatePersistence serviceFileTemplatePersistence) { + this.serviceFileTemplatePersistence = serviceFileTemplatePersistence; + } + + /** + * Returns the service info local service. + * + * @return the service info local service + */ + public org.opencps.dossiermgt.service.ServiceInfoLocalService getServiceInfoLocalService() { + return serviceInfoLocalService; + } + + /** + * Sets the service info local service. + * + * @param serviceInfoLocalService the service info local service + */ + public void setServiceInfoLocalService( + org.opencps.dossiermgt.service.ServiceInfoLocalService serviceInfoLocalService) { + this.serviceInfoLocalService = serviceInfoLocalService; + } + + /** + * Returns the service info persistence. + * + * @return the service info persistence + */ + public ServiceInfoPersistence getServiceInfoPersistence() { + return serviceInfoPersistence; + } + + /** + * Sets the service info persistence. + * + * @param serviceInfoPersistence the service info persistence + */ + public void setServiceInfoPersistence( + ServiceInfoPersistence serviceInfoPersistence) { + this.serviceInfoPersistence = serviceInfoPersistence; + } + + /** + * Returns the service info mapping local service. + * + * @return the service info mapping local service + */ + public org.opencps.dossiermgt.service.ServiceInfoMappingLocalService getServiceInfoMappingLocalService() { + return serviceInfoMappingLocalService; + } + + /** + * Sets the service info mapping local service. + * + * @param serviceInfoMappingLocalService the service info mapping local service + */ + public void setServiceInfoMappingLocalService( + org.opencps.dossiermgt.service.ServiceInfoMappingLocalService serviceInfoMappingLocalService) { + this.serviceInfoMappingLocalService = serviceInfoMappingLocalService; + } + + /** + * Returns the service info mapping persistence. + * + * @return the service info mapping persistence + */ + public ServiceInfoMappingPersistence getServiceInfoMappingPersistence() { + return serviceInfoMappingPersistence; + } + + /** + * Sets the service info mapping persistence. + * + * @param serviceInfoMappingPersistence the service info mapping persistence + */ + public void setServiceInfoMappingPersistence( + ServiceInfoMappingPersistence serviceInfoMappingPersistence) { + this.serviceInfoMappingPersistence = serviceInfoMappingPersistence; + } + + /** + * Returns the service process local service. + * + * @return the service process local service + */ + public org.opencps.dossiermgt.service.ServiceProcessLocalService getServiceProcessLocalService() { + return serviceProcessLocalService; + } + + /** + * Sets the service process local service. + * + * @param serviceProcessLocalService the service process local service + */ + public void setServiceProcessLocalService( + org.opencps.dossiermgt.service.ServiceProcessLocalService serviceProcessLocalService) { + this.serviceProcessLocalService = serviceProcessLocalService; + } + + /** + * Returns the service process persistence. + * + * @return the service process persistence + */ + public ServiceProcessPersistence getServiceProcessPersistence() { + return serviceProcessPersistence; + } + + /** + * Sets the service process persistence. + * + * @param serviceProcessPersistence the service process persistence + */ + public void setServiceProcessPersistence( + ServiceProcessPersistence serviceProcessPersistence) { + this.serviceProcessPersistence = serviceProcessPersistence; + } + + /** + * Returns the service process role local service. + * + * @return the service process role local service + */ + public org.opencps.dossiermgt.service.ServiceProcessRoleLocalService getServiceProcessRoleLocalService() { + return serviceProcessRoleLocalService; + } + + /** + * Sets the service process role local service. + * + * @param serviceProcessRoleLocalService the service process role local service + */ + public void setServiceProcessRoleLocalService( + org.opencps.dossiermgt.service.ServiceProcessRoleLocalService serviceProcessRoleLocalService) { + this.serviceProcessRoleLocalService = serviceProcessRoleLocalService; + } + + /** + * Returns the service process role persistence. + * + * @return the service process role persistence + */ + public ServiceProcessRolePersistence getServiceProcessRolePersistence() { + return serviceProcessRolePersistence; + } + + /** + * Sets the service process role persistence. + * + * @param serviceProcessRolePersistence the service process role persistence + */ + public void setServiceProcessRolePersistence( + ServiceProcessRolePersistence serviceProcessRolePersistence) { + this.serviceProcessRolePersistence = serviceProcessRolePersistence; + } + + /** + * Returns the step config local service. + * + * @return the step config local service + */ + public org.opencps.dossiermgt.service.StepConfigLocalService getStepConfigLocalService() { + return stepConfigLocalService; + } + + /** + * Sets the step config local service. + * + * @param stepConfigLocalService the step config local service + */ + public void setStepConfigLocalService( + org.opencps.dossiermgt.service.StepConfigLocalService stepConfigLocalService) { + this.stepConfigLocalService = stepConfigLocalService; + } + + /** + * Returns the step config persistence. + * + * @return the step config persistence + */ + public StepConfigPersistence getStepConfigPersistence() { + return stepConfigPersistence; + } + + /** + * Sets the step config persistence. + * + * @param stepConfigPersistence the step config persistence + */ + public void setStepConfigPersistence( + StepConfigPersistence stepConfigPersistence) { + this.stepConfigPersistence = stepConfigPersistence; + } + + /** + * Returns the step config finder. + * + * @return the step config finder + */ + public StepConfigFinder getStepConfigFinder() { + return stepConfigFinder; + } + + /** + * Sets the step config finder. + * + * @param stepConfigFinder the step config finder + */ + public void setStepConfigFinder(StepConfigFinder stepConfigFinder) { + this.stepConfigFinder = stepConfigFinder; + } + + /** + * Returns the user info log local service. + * + * @return the user info log local service + */ + public org.opencps.dossiermgt.service.UserInfoLogLocalService getUserInfoLogLocalService() { + return userInfoLogLocalService; + } + + /** + * Sets the user info log local service. + * + * @param userInfoLogLocalService the user info log local service + */ + public void setUserInfoLogLocalService( + org.opencps.dossiermgt.service.UserInfoLogLocalService userInfoLogLocalService) { + this.userInfoLogLocalService = userInfoLogLocalService; + } + + /** + * Returns the user info log persistence. + * + * @return the user info log persistence + */ + public UserInfoLogPersistence getUserInfoLogPersistence() { + return userInfoLogPersistence; + } + + /** + * Sets the user info log persistence. + * + * @param userInfoLogPersistence the user info log persistence + */ + public void setUserInfoLogPersistence( + UserInfoLogPersistence userInfoLogPersistence) { + this.userInfoLogPersistence = userInfoLogPersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.kernel.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the class name local service. + * + * @return the class name local service + */ + public com.liferay.portal.kernel.service.ClassNameLocalService getClassNameLocalService() { + return classNameLocalService; + } + + /** + * Sets the class name local service. + * + * @param classNameLocalService the class name local service + */ + public void setClassNameLocalService( + com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService) { + this.classNameLocalService = classNameLocalService; + } + + /** + * Returns the class name persistence. + * + * @return the class name persistence + */ + public ClassNamePersistence getClassNamePersistence() { + return classNamePersistence; + } + + /** + * Sets the class name persistence. + * + * @param classNamePersistence the class name persistence + */ + public void setClassNamePersistence( + ClassNamePersistence classNamePersistence) { + this.classNamePersistence = classNamePersistence; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.kernel.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.kernel.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.kernel.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + persistedModelLocalServiceRegistry.register("org.opencps.dossiermgt.model.CsdlDcServiceInfo", + csdlDcServiceInfoLocalService); + } + + public void destroy() { + persistedModelLocalServiceRegistry.unregister( + "org.opencps.dossiermgt.model.CsdlDcServiceInfo"); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + @Override + public String getOSGiServiceIdentifier() { + return CsdlDcServiceInfoLocalService.class.getName(); + } + + protected Class getModelClass() { + return CsdlDcServiceInfo.class; + } + + protected String getModelClassName() { + return CsdlDcServiceInfo.class.getName(); + } + + /** + * Performs a SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) { + try { + DataSource dataSource = csdlDcServiceInfoPersistence.getDataSource(); + + DB db = DBManagerUtil.getDB(); + + sql = db.buildSQL(sql); + sql = PortalUtil.transformSQL(sql); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = org.opencps.dossiermgt.service.AccessTokenLocalService.class) + protected org.opencps.dossiermgt.service.AccessTokenLocalService accessTokenLocalService; + @BeanReference(type = AccessTokenPersistence.class) + protected AccessTokenPersistence accessTokenPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ActionConfigLocalService.class) + protected org.opencps.dossiermgt.service.ActionConfigLocalService actionConfigLocalService; + @BeanReference(type = ActionConfigPersistence.class) + protected ActionConfigPersistence actionConfigPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ApplicableInfoLocalService.class) + protected org.opencps.dossiermgt.service.ApplicableInfoLocalService applicableInfoLocalService; + @BeanReference(type = ApplicableInfoPersistence.class) + protected ApplicableInfoPersistence applicableInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.BookingLocalService.class) + protected org.opencps.dossiermgt.service.BookingLocalService bookingLocalService; + @BeanReference(type = BookingPersistence.class) + protected BookingPersistence bookingPersistence; + @BeanReference(type = BookingFinder.class) + protected BookingFinder bookingFinder; + @BeanReference(type = org.opencps.dossiermgt.service.ConfigCounterLocalService.class) + protected org.opencps.dossiermgt.service.ConfigCounterLocalService configCounterLocalService; + @BeanReference(type = ConfigCounterPersistence.class) + protected ConfigCounterPersistence configCounterPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) + protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = CsdlDcServiceInfoLocalService.class) + protected CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) + protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; + @BeanReference(type = DeliverablePersistence.class) + protected DeliverablePersistence deliverablePersistence; + @BeanReference(type = DeliverableFinder.class) + protected DeliverableFinder deliverableFinder; + @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLogLocalService.class) + protected org.opencps.dossiermgt.service.DeliverableLogLocalService deliverableLogLocalService; + @BeanReference(type = DeliverableLogPersistence.class) + protected DeliverableLogPersistence deliverableLogPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DeliverableTypeLocalService.class) + protected org.opencps.dossiermgt.service.DeliverableTypeLocalService deliverableTypeLocalService; + @BeanReference(type = DeliverableTypePersistence.class) + protected DeliverableTypePersistence deliverableTypePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DeliverableTypeRoleLocalService.class) + protected org.opencps.dossiermgt.service.DeliverableTypeRoleLocalService deliverableTypeRoleLocalService; + @BeanReference(type = DeliverableTypeRolePersistence.class) + protected DeliverableTypeRolePersistence deliverableTypeRolePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DocumentTypeLocalService.class) + protected org.opencps.dossiermgt.service.DocumentTypeLocalService documentTypeLocalService; + @BeanReference(type = DocumentTypePersistence.class) + protected DocumentTypePersistence documentTypePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierLocalService.class) + protected org.opencps.dossiermgt.service.DossierLocalService dossierLocalService; + @BeanReference(type = DossierPersistence.class) + protected DossierPersistence dossierPersistence; + @BeanReference(type = DossierFinder.class) + protected DossierFinder dossierFinder; + @BeanReference(type = org.opencps.dossiermgt.service.DossierActionLocalService.class) + protected org.opencps.dossiermgt.service.DossierActionLocalService dossierActionLocalService; + @BeanReference(type = DossierActionPersistence.class) + protected DossierActionPersistence dossierActionPersistence; + @BeanReference(type = DossierActionFinder.class) + protected DossierActionFinder dossierActionFinder; + @BeanReference(type = org.opencps.dossiermgt.service.DossierActionSyncLocalService.class) + protected org.opencps.dossiermgt.service.DossierActionSyncLocalService dossierActionSyncLocalService; + @BeanReference(type = DossierActionSyncPersistence.class) + protected DossierActionSyncPersistence dossierActionSyncPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierActionUserLocalService.class) + protected org.opencps.dossiermgt.service.DossierActionUserLocalService dossierActionUserLocalService; + @BeanReference(type = DossierActionUserPersistence.class) + protected DossierActionUserPersistence dossierActionUserPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierDocumentLocalService.class) + protected org.opencps.dossiermgt.service.DossierDocumentLocalService dossierDocumentLocalService; + @BeanReference(type = DossierDocumentPersistence.class) + protected DossierDocumentPersistence dossierDocumentPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierFileLocalService.class) + protected org.opencps.dossiermgt.service.DossierFileLocalService dossierFileLocalService; + @BeanReference(type = DossierFilePersistence.class) + protected DossierFilePersistence dossierFilePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierLogLocalService.class) + protected org.opencps.dossiermgt.service.DossierLogLocalService dossierLogLocalService; + @BeanReference(type = DossierLogPersistence.class) + protected DossierLogPersistence dossierLogPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierMarkLocalService.class) + protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; + @BeanReference(type = DossierMarkPersistence.class) + protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; + @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) + protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; + @BeanReference(type = DossierPartPersistence.class) + protected DossierPartPersistence dossierPartPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierRequestUDLocalService.class) + protected org.opencps.dossiermgt.service.DossierRequestUDLocalService dossierRequestUDLocalService; + @BeanReference(type = DossierRequestUDPersistence.class) + protected DossierRequestUDPersistence dossierRequestUDPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierStatisticLocalService.class) + protected org.opencps.dossiermgt.service.DossierStatisticLocalService dossierStatisticLocalService; + @BeanReference(type = DossierStatisticPersistence.class) + protected DossierStatisticPersistence dossierStatisticPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierStatusMappingLocalService.class) + protected org.opencps.dossiermgt.service.DossierStatusMappingLocalService dossierStatusMappingLocalService; + @BeanReference(type = DossierStatusMappingPersistence.class) + protected DossierStatusMappingPersistence dossierStatusMappingPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierSyncLocalService.class) + protected org.opencps.dossiermgt.service.DossierSyncLocalService dossierSyncLocalService; + @BeanReference(type = DossierSyncPersistence.class) + protected DossierSyncPersistence dossierSyncPersistence; + @BeanReference(type = DossierSyncFinder.class) + protected DossierSyncFinder dossierSyncFinder; + @BeanReference(type = org.opencps.dossiermgt.service.DossierTemplateLocalService.class) + protected org.opencps.dossiermgt.service.DossierTemplateLocalService dossierTemplateLocalService; + @BeanReference(type = DossierTemplatePersistence.class) + protected DossierTemplatePersistence dossierTemplatePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierUserLocalService.class) + protected org.opencps.dossiermgt.service.DossierUserLocalService dossierUserLocalService; + @BeanReference(type = DossierUserPersistence.class) + protected DossierUserPersistence dossierUserPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.EFormLocalService.class) + protected org.opencps.dossiermgt.service.EFormLocalService eFormLocalService; + @BeanReference(type = EFormPersistence.class) + protected EFormPersistence eFormPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.MenuConfigLocalService.class) + protected org.opencps.dossiermgt.service.MenuConfigLocalService menuConfigLocalService; + @BeanReference(type = MenuConfigPersistence.class) + protected MenuConfigPersistence menuConfigPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.MenuRoleLocalService.class) + protected org.opencps.dossiermgt.service.MenuRoleLocalService menuRoleLocalService; + @BeanReference(type = MenuRolePersistence.class) + protected MenuRolePersistence menuRolePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.NewsBoardLocalService.class) + protected org.opencps.dossiermgt.service.NewsBoardLocalService newsBoardLocalService; + @BeanReference(type = NewsBoardPersistence.class) + protected NewsBoardPersistence newsBoardPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.NotarizationLocalService.class) + protected org.opencps.dossiermgt.service.NotarizationLocalService notarizationLocalService; + @BeanReference(type = NotarizationPersistence.class) + protected NotarizationPersistence notarizationPersistence; + @BeanReference(type = NotarizationFinder.class) + protected NotarizationFinder notarizationFinder; + @BeanReference(type = org.opencps.dossiermgt.service.PaymentConfigLocalService.class) + protected org.opencps.dossiermgt.service.PaymentConfigLocalService paymentConfigLocalService; + @BeanReference(type = PaymentConfigPersistence.class) + protected PaymentConfigPersistence paymentConfigPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.PaymentFeeInfoLocalService.class) + protected org.opencps.dossiermgt.service.PaymentFeeInfoLocalService paymentFeeInfoLocalService; + @BeanReference(type = PaymentFeeInfoPersistence.class) + protected PaymentFeeInfoPersistence paymentFeeInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.PaymentFileLocalService.class) + protected org.opencps.dossiermgt.service.PaymentFileLocalService paymentFileLocalService; + @BeanReference(type = PaymentFilePersistence.class) + protected PaymentFilePersistence paymentFilePersistence; + @BeanReference(type = PaymentFileFinder.class) + protected PaymentFileFinder paymentFileFinder; + @BeanReference(type = org.opencps.dossiermgt.service.PostConnectLocalService.class) + protected org.opencps.dossiermgt.service.PostConnectLocalService postConnectLocalService; + @BeanReference(type = PostConnectPersistence.class) + protected PostConnectPersistence postConnectPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ProcessActionLocalService.class) + protected org.opencps.dossiermgt.service.ProcessActionLocalService processActionLocalService; + @BeanReference(type = ProcessActionPersistence.class) + protected ProcessActionPersistence processActionPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ProcessOptionLocalService.class) + protected org.opencps.dossiermgt.service.ProcessOptionLocalService processOptionLocalService; + @BeanReference(type = ProcessOptionPersistence.class) + protected ProcessOptionPersistence processOptionPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ProcessPluginLocalService.class) + protected org.opencps.dossiermgt.service.ProcessPluginLocalService processPluginLocalService; + @BeanReference(type = ProcessPluginPersistence.class) + protected ProcessPluginPersistence processPluginPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ProcessSequenceLocalService.class) + protected org.opencps.dossiermgt.service.ProcessSequenceLocalService processSequenceLocalService; + @BeanReference(type = ProcessSequencePersistence.class) + protected ProcessSequencePersistence processSequencePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ProcessStepLocalService.class) + protected org.opencps.dossiermgt.service.ProcessStepLocalService processStepLocalService; + @BeanReference(type = ProcessStepPersistence.class) + protected ProcessStepPersistence processStepPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ProcessStepRoleLocalService.class) + protected org.opencps.dossiermgt.service.ProcessStepRoleLocalService processStepRoleLocalService; + @BeanReference(type = ProcessStepRolePersistence.class) + protected ProcessStepRolePersistence processStepRolePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.PublishQueueLocalService.class) + protected org.opencps.dossiermgt.service.PublishQueueLocalService publishQueueLocalService; + @BeanReference(type = PublishQueuePersistence.class) + protected PublishQueuePersistence publishQueuePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.RegistrationLocalService.class) + protected org.opencps.dossiermgt.service.RegistrationLocalService registrationLocalService; + @BeanReference(type = RegistrationPersistence.class) + protected RegistrationPersistence registrationPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.RegistrationFormLocalService.class) + protected org.opencps.dossiermgt.service.RegistrationFormLocalService registrationFormLocalService; + @BeanReference(type = RegistrationFormPersistence.class) + protected RegistrationFormPersistence registrationFormPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.RegistrationLogLocalService.class) + protected org.opencps.dossiermgt.service.RegistrationLogLocalService registrationLogLocalService; + @BeanReference(type = RegistrationLogPersistence.class) + protected RegistrationLogPersistence registrationLogPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.RegistrationTemplatesLocalService.class) + protected org.opencps.dossiermgt.service.RegistrationTemplatesLocalService registrationTemplatesLocalService; + @BeanReference(type = RegistrationTemplatesPersistence.class) + protected RegistrationTemplatesPersistence registrationTemplatesPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ServiceConfigLocalService.class) + protected org.opencps.dossiermgt.service.ServiceConfigLocalService serviceConfigLocalService; + @BeanReference(type = ServiceConfigPersistence.class) + protected ServiceConfigPersistence serviceConfigPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ServiceConfigMappingLocalService.class) + protected org.opencps.dossiermgt.service.ServiceConfigMappingLocalService serviceConfigMappingLocalService; + @BeanReference(type = ServiceConfigMappingPersistence.class) + protected ServiceConfigMappingPersistence serviceConfigMappingPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ServiceFileTemplateLocalService.class) + protected org.opencps.dossiermgt.service.ServiceFileTemplateLocalService serviceFileTemplateLocalService; + @BeanReference(type = ServiceFileTemplatePersistence.class) + protected ServiceFileTemplatePersistence serviceFileTemplatePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.ServiceInfoLocalService serviceInfoLocalService; + @BeanReference(type = ServiceInfoPersistence.class) + protected ServiceInfoPersistence serviceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ServiceInfoMappingLocalService.class) + protected org.opencps.dossiermgt.service.ServiceInfoMappingLocalService serviceInfoMappingLocalService; + @BeanReference(type = ServiceInfoMappingPersistence.class) + protected ServiceInfoMappingPersistence serviceInfoMappingPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ServiceProcessLocalService.class) + protected org.opencps.dossiermgt.service.ServiceProcessLocalService serviceProcessLocalService; + @BeanReference(type = ServiceProcessPersistence.class) + protected ServiceProcessPersistence serviceProcessPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ServiceProcessRoleLocalService.class) + protected org.opencps.dossiermgt.service.ServiceProcessRoleLocalService serviceProcessRoleLocalService; + @BeanReference(type = ServiceProcessRolePersistence.class) + protected ServiceProcessRolePersistence serviceProcessRolePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.StepConfigLocalService.class) + protected org.opencps.dossiermgt.service.StepConfigLocalService stepConfigLocalService; + @BeanReference(type = StepConfigPersistence.class) + protected StepConfigPersistence stepConfigPersistence; + @BeanReference(type = StepConfigFinder.class) + protected StepConfigFinder stepConfigFinder; + @BeanReference(type = org.opencps.dossiermgt.service.UserInfoLogLocalService.class) + protected org.opencps.dossiermgt.service.UserInfoLogLocalService userInfoLogLocalService; + @BeanReference(type = UserInfoLogPersistence.class) + protected UserInfoLogPersistence userInfoLogPersistence; + @ServiceReference(type = com.liferay.counter.kernel.service.CounterLocalService.class) + protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService; + @ServiceReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class) + protected com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService; + @ServiceReference(type = ClassNamePersistence.class) + protected ClassNamePersistence classNamePersistence; + @ServiceReference(type = com.liferay.portal.kernel.service.ResourceLocalService.class) + protected com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService; + @ServiceReference(type = com.liferay.portal.kernel.service.UserLocalService.class) + protected com.liferay.portal.kernel.service.UserLocalService userLocalService; + @ServiceReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + @ServiceReference(type = PersistedModelLocalServiceRegistry.class) + protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry; +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/CsdlDcUserLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/CsdlDcUserLocalServiceBaseImpl.java new file mode 100644 index 0000000000..4989475af5 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/CsdlDcUserLocalServiceBaseImpl.java @@ -0,0 +1,3165 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service.base; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.dao.db.DB; +import com.liferay.portal.kernel.dao.db.DBManagerUtil; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; +import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.service.BaseLocalServiceImpl; +import com.liferay.portal.kernel.service.PersistedModelLocalServiceRegistry; +import com.liferay.portal.kernel.service.persistence.ClassNamePersistence; +import com.liferay.portal.kernel.service.persistence.UserPersistence; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.PortalUtil; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import org.opencps.dossiermgt.model.CsdlDcUser; +import org.opencps.dossiermgt.service.CsdlDcUserLocalService; +import org.opencps.dossiermgt.service.persistence.AccessTokenPersistence; +import org.opencps.dossiermgt.service.persistence.ActionConfigPersistence; +import org.opencps.dossiermgt.service.persistence.ApplicableInfoPersistence; +import org.opencps.dossiermgt.service.persistence.BookingFinder; +import org.opencps.dossiermgt.service.persistence.BookingPersistence; +import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; +import org.opencps.dossiermgt.service.persistence.DeliverableFinder; +import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; +import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; +import org.opencps.dossiermgt.service.persistence.DeliverableTypePersistence; +import org.opencps.dossiermgt.service.persistence.DeliverableTypeRolePersistence; +import org.opencps.dossiermgt.service.persistence.DocumentTypePersistence; +import org.opencps.dossiermgt.service.persistence.DossierActionFinder; +import org.opencps.dossiermgt.service.persistence.DossierActionPersistence; +import org.opencps.dossiermgt.service.persistence.DossierActionSyncPersistence; +import org.opencps.dossiermgt.service.persistence.DossierActionUserPersistence; +import org.opencps.dossiermgt.service.persistence.DossierDocumentPersistence; +import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; +import org.opencps.dossiermgt.service.persistence.DossierFinder; +import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; +import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; +import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; +import org.opencps.dossiermgt.service.persistence.DossierPersistence; +import org.opencps.dossiermgt.service.persistence.DossierRequestUDPersistence; +import org.opencps.dossiermgt.service.persistence.DossierStatisticPersistence; +import org.opencps.dossiermgt.service.persistence.DossierStatusMappingPersistence; +import org.opencps.dossiermgt.service.persistence.DossierSyncFinder; +import org.opencps.dossiermgt.service.persistence.DossierSyncPersistence; +import org.opencps.dossiermgt.service.persistence.DossierTemplatePersistence; +import org.opencps.dossiermgt.service.persistence.DossierUserPersistence; +import org.opencps.dossiermgt.service.persistence.EFormPersistence; +import org.opencps.dossiermgt.service.persistence.MenuConfigPersistence; +import org.opencps.dossiermgt.service.persistence.MenuRolePersistence; +import org.opencps.dossiermgt.service.persistence.NewsBoardPersistence; +import org.opencps.dossiermgt.service.persistence.NotarizationFinder; +import org.opencps.dossiermgt.service.persistence.NotarizationPersistence; +import org.opencps.dossiermgt.service.persistence.PaymentConfigPersistence; +import org.opencps.dossiermgt.service.persistence.PaymentFeeInfoPersistence; +import org.opencps.dossiermgt.service.persistence.PaymentFileFinder; +import org.opencps.dossiermgt.service.persistence.PaymentFilePersistence; +import org.opencps.dossiermgt.service.persistence.PostConnectPersistence; +import org.opencps.dossiermgt.service.persistence.ProcessActionPersistence; +import org.opencps.dossiermgt.service.persistence.ProcessOptionPersistence; +import org.opencps.dossiermgt.service.persistence.ProcessPluginPersistence; +import org.opencps.dossiermgt.service.persistence.ProcessSequencePersistence; +import org.opencps.dossiermgt.service.persistence.ProcessStepPersistence; +import org.opencps.dossiermgt.service.persistence.ProcessStepRolePersistence; +import org.opencps.dossiermgt.service.persistence.PublishQueuePersistence; +import org.opencps.dossiermgt.service.persistence.RegistrationFormPersistence; +import org.opencps.dossiermgt.service.persistence.RegistrationLogPersistence; +import org.opencps.dossiermgt.service.persistence.RegistrationPersistence; +import org.opencps.dossiermgt.service.persistence.RegistrationTemplatesPersistence; +import org.opencps.dossiermgt.service.persistence.ServiceConfigMappingPersistence; +import org.opencps.dossiermgt.service.persistence.ServiceConfigPersistence; +import org.opencps.dossiermgt.service.persistence.ServiceFileTemplatePersistence; +import org.opencps.dossiermgt.service.persistence.ServiceInfoMappingPersistence; +import org.opencps.dossiermgt.service.persistence.ServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.ServiceProcessPersistence; +import org.opencps.dossiermgt.service.persistence.ServiceProcessRolePersistence; +import org.opencps.dossiermgt.service.persistence.StepConfigFinder; +import org.opencps.dossiermgt.service.persistence.StepConfigPersistence; +import org.opencps.dossiermgt.service.persistence.UserInfoLogPersistence; + +import java.io.Serializable; + +import java.util.List; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the csdl dc user local service. + * + *

+ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.opencps.dossiermgt.service.impl.CsdlDcUserLocalServiceImpl}. + *

+ * + * @author huymq + * @see org.opencps.dossiermgt.service.impl.CsdlDcUserLocalServiceImpl + * @see org.opencps.dossiermgt.service.CsdlDcUserLocalServiceUtil + * @generated + */ +@ProviderType +public abstract class CsdlDcUserLocalServiceBaseImpl + extends BaseLocalServiceImpl implements CsdlDcUserLocalService, + IdentifiableOSGiService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link org.opencps.dossiermgt.service.CsdlDcUserLocalServiceUtil} to access the csdl dc user local service. + */ + + /** + * Adds the csdl dc user to the database. Also notifies the appropriate model listeners. + * + * @param csdlDcUser the csdl dc user + * @return the csdl dc user that was added + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public CsdlDcUser addCsdlDcUser(CsdlDcUser csdlDcUser) { + csdlDcUser.setNew(true); + + return csdlDcUserPersistence.update(csdlDcUser); + } + + /** + * Creates a new csdl dc user with the primary key. Does not add the csdl dc user to the database. + * + * @param idDcUser the primary key for the new csdl dc user + * @return the new csdl dc user + */ + @Override + @Transactional(enabled = false) + public CsdlDcUser createCsdlDcUser(long idDcUser) { + return csdlDcUserPersistence.create(idDcUser); + } + + /** + * Deletes the csdl dc user with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user that was removed + * @throws PortalException if a csdl dc user with the primary key could not be found + */ + @Indexable(type = IndexableType.DELETE) + @Override + public CsdlDcUser deleteCsdlDcUser(long idDcUser) throws PortalException { + return csdlDcUserPersistence.remove(idDcUser); + } + + /** + * Deletes the csdl dc user from the database. Also notifies the appropriate model listeners. + * + * @param csdlDcUser the csdl dc user + * @return the csdl dc user that was removed + */ + @Indexable(type = IndexableType.DELETE) + @Override + public CsdlDcUser deleteCsdlDcUser(CsdlDcUser csdlDcUser) { + return csdlDcUserPersistence.remove(csdlDcUser); + } + + @Override + public DynamicQuery dynamicQuery() { + Class clazz = getClass(); + + return DynamicQueryFactoryUtil.forClass(CsdlDcUser.class, + clazz.getClassLoader()); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery) { + return csdlDcUserPersistence.findWithDynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end) { + return csdlDcUserPersistence.findWithDynamicQuery(dynamicQuery, start, + end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end, OrderByComparator orderByComparator) { + return csdlDcUserPersistence.findWithDynamicQuery(dynamicQuery, start, + end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery) { + return csdlDcUserPersistence.countWithDynamicQuery(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection) { + return csdlDcUserPersistence.countWithDynamicQuery(dynamicQuery, + projection); + } + + @Override + public CsdlDcUser fetchCsdlDcUser(long idDcUser) { + return csdlDcUserPersistence.fetchByPrimaryKey(idDcUser); + } + + /** + * Returns the csdl dc user matching the UUID and group. + * + * @param uuid the csdl dc user's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser fetchCsdlDcUserByUuidAndGroupId(String uuid, long groupId) { + return csdlDcUserPersistence.fetchByUUID_G(uuid, groupId); + } + + /** + * Returns the csdl dc user with the primary key. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user + * @throws PortalException if a csdl dc user with the primary key could not be found + */ + @Override + public CsdlDcUser getCsdlDcUser(long idDcUser) throws PortalException { + return csdlDcUserPersistence.findByPrimaryKey(idDcUser); + } + + @Override + public ActionableDynamicQuery getActionableDynamicQuery() { + ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery(); + + actionableDynamicQuery.setBaseLocalService(csdlDcUserLocalService); + actionableDynamicQuery.setClassLoader(getClassLoader()); + actionableDynamicQuery.setModelClass(CsdlDcUser.class); + + actionableDynamicQuery.setPrimaryKeyPropertyName("idDcUser"); + + return actionableDynamicQuery; + } + + @Override + public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery(); + + indexableActionableDynamicQuery.setBaseLocalService(csdlDcUserLocalService); + indexableActionableDynamicQuery.setClassLoader(getClassLoader()); + indexableActionableDynamicQuery.setModelClass(CsdlDcUser.class); + + indexableActionableDynamicQuery.setPrimaryKeyPropertyName("idDcUser"); + + return indexableActionableDynamicQuery; + } + + protected void initActionableDynamicQuery( + ActionableDynamicQuery actionableDynamicQuery) { + actionableDynamicQuery.setBaseLocalService(csdlDcUserLocalService); + actionableDynamicQuery.setClassLoader(getClassLoader()); + actionableDynamicQuery.setModelClass(CsdlDcUser.class); + + actionableDynamicQuery.setPrimaryKeyPropertyName("idDcUser"); + } + + /** + * @throws PortalException + */ + @Override + public PersistedModel deletePersistedModel(PersistedModel persistedModel) + throws PortalException { + return csdlDcUserLocalService.deleteCsdlDcUser((CsdlDcUser)persistedModel); + } + + @Override + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException { + return csdlDcUserPersistence.findByPrimaryKey(primaryKeyObj); + } + + /** + * Returns all the csdl dc users matching the UUID and company. + * + * @param uuid the UUID of the csdl dc users + * @param companyId the primary key of the company + * @return the matching csdl dc users, or an empty list if no matches were found + */ + @Override + public List getCsdlDcUsersByUuidAndCompanyId(String uuid, + long companyId) { + return csdlDcUserPersistence.findByUuid_C(uuid, companyId); + } + + /** + * Returns a range of csdl dc users matching the UUID and company. + * + * @param uuid the UUID of the csdl dc users + * @param companyId the primary key of the company + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching csdl dc users, or an empty list if no matches were found + */ + @Override + public List getCsdlDcUsersByUuidAndCompanyId(String uuid, + long companyId, int start, int end, + OrderByComparator orderByComparator) { + return csdlDcUserPersistence.findByUuid_C(uuid, companyId, start, end, + orderByComparator); + } + + /** + * Returns the csdl dc user matching the UUID and group. + * + * @param uuid the csdl dc user's UUID + * @param groupId the primary key of the group + * @return the matching csdl dc user + * @throws PortalException if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser getCsdlDcUserByUuidAndGroupId(String uuid, long groupId) + throws PortalException { + return csdlDcUserPersistence.findByUUID_G(uuid, groupId); + } + + /** + * Returns a range of all the csdl dc users. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @return the range of csdl dc users + */ + @Override + public List getCsdlDcUsers(int start, int end) { + return csdlDcUserPersistence.findAll(start, end); + } + + /** + * Returns the number of csdl dc users. + * + * @return the number of csdl dc users + */ + @Override + public int getCsdlDcUsersCount() { + return csdlDcUserPersistence.countAll(); + } + + /** + * Updates the csdl dc user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param csdlDcUser the csdl dc user + * @return the csdl dc user that was updated + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public CsdlDcUser updateCsdlDcUser(CsdlDcUser csdlDcUser) { + return csdlDcUserPersistence.update(csdlDcUser); + } + + /** + * Returns the access token local service. + * + * @return the access token local service + */ + public org.opencps.dossiermgt.service.AccessTokenLocalService getAccessTokenLocalService() { + return accessTokenLocalService; + } + + /** + * Sets the access token local service. + * + * @param accessTokenLocalService the access token local service + */ + public void setAccessTokenLocalService( + org.opencps.dossiermgt.service.AccessTokenLocalService accessTokenLocalService) { + this.accessTokenLocalService = accessTokenLocalService; + } + + /** + * Returns the access token persistence. + * + * @return the access token persistence + */ + public AccessTokenPersistence getAccessTokenPersistence() { + return accessTokenPersistence; + } + + /** + * Sets the access token persistence. + * + * @param accessTokenPersistence the access token persistence + */ + public void setAccessTokenPersistence( + AccessTokenPersistence accessTokenPersistence) { + this.accessTokenPersistence = accessTokenPersistence; + } + + /** + * Returns the action config local service. + * + * @return the action config local service + */ + public org.opencps.dossiermgt.service.ActionConfigLocalService getActionConfigLocalService() { + return actionConfigLocalService; + } + + /** + * Sets the action config local service. + * + * @param actionConfigLocalService the action config local service + */ + public void setActionConfigLocalService( + org.opencps.dossiermgt.service.ActionConfigLocalService actionConfigLocalService) { + this.actionConfigLocalService = actionConfigLocalService; + } + + /** + * Returns the action config persistence. + * + * @return the action config persistence + */ + public ActionConfigPersistence getActionConfigPersistence() { + return actionConfigPersistence; + } + + /** + * Sets the action config persistence. + * + * @param actionConfigPersistence the action config persistence + */ + public void setActionConfigPersistence( + ActionConfigPersistence actionConfigPersistence) { + this.actionConfigPersistence = actionConfigPersistence; + } + + /** + * Returns the applicable info local service. + * + * @return the applicable info local service + */ + public org.opencps.dossiermgt.service.ApplicableInfoLocalService getApplicableInfoLocalService() { + return applicableInfoLocalService; + } + + /** + * Sets the applicable info local service. + * + * @param applicableInfoLocalService the applicable info local service + */ + public void setApplicableInfoLocalService( + org.opencps.dossiermgt.service.ApplicableInfoLocalService applicableInfoLocalService) { + this.applicableInfoLocalService = applicableInfoLocalService; + } + + /** + * Returns the applicable info persistence. + * + * @return the applicable info persistence + */ + public ApplicableInfoPersistence getApplicableInfoPersistence() { + return applicableInfoPersistence; + } + + /** + * Sets the applicable info persistence. + * + * @param applicableInfoPersistence the applicable info persistence + */ + public void setApplicableInfoPersistence( + ApplicableInfoPersistence applicableInfoPersistence) { + this.applicableInfoPersistence = applicableInfoPersistence; + } + + /** + * Returns the booking local service. + * + * @return the booking local service + */ + public org.opencps.dossiermgt.service.BookingLocalService getBookingLocalService() { + return bookingLocalService; + } + + /** + * Sets the booking local service. + * + * @param bookingLocalService the booking local service + */ + public void setBookingLocalService( + org.opencps.dossiermgt.service.BookingLocalService bookingLocalService) { + this.bookingLocalService = bookingLocalService; + } + + /** + * Returns the booking persistence. + * + * @return the booking persistence + */ + public BookingPersistence getBookingPersistence() { + return bookingPersistence; + } + + /** + * Sets the booking persistence. + * + * @param bookingPersistence the booking persistence + */ + public void setBookingPersistence(BookingPersistence bookingPersistence) { + this.bookingPersistence = bookingPersistence; + } + + /** + * Returns the booking finder. + * + * @return the booking finder + */ + public BookingFinder getBookingFinder() { + return bookingFinder; + } + + /** + * Sets the booking finder. + * + * @param bookingFinder the booking finder + */ + public void setBookingFinder(BookingFinder bookingFinder) { + this.bookingFinder = bookingFinder; + } + + /** + * Returns the config counter local service. + * + * @return the config counter local service + */ + public org.opencps.dossiermgt.service.ConfigCounterLocalService getConfigCounterLocalService() { + return configCounterLocalService; + } + + /** + * Sets the config counter local service. + * + * @param configCounterLocalService the config counter local service + */ + public void setConfigCounterLocalService( + org.opencps.dossiermgt.service.ConfigCounterLocalService configCounterLocalService) { + this.configCounterLocalService = configCounterLocalService; + } + + /** + * Returns the config counter persistence. + * + * @return the config counter persistence + */ + public ConfigCounterPersistence getConfigCounterPersistence() { + return configCounterPersistence; + } + + /** + * Sets the config counter persistence. + * + * @param configCounterPersistence the config counter persistence + */ + public void setConfigCounterPersistence( + ConfigCounterPersistence configCounterPersistence) { + this.configCounterPersistence = configCounterPersistence; + } + + /** + * Returns the cps dossier business local service. + * + * @return the cps dossier business local service + */ + public org.opencps.dossiermgt.service.CPSDossierBusinessLocalService getCPSDossierBusinessLocalService() { + return cpsDossierBusinessLocalService; + } + + /** + * Sets the cps dossier business local service. + * + * @param cpsDossierBusinessLocalService the cps dossier business local service + */ + public void setCPSDossierBusinessLocalService( + org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService) { + this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; + } + + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + + /** + * Returns the deliverable local service. + * + * @return the deliverable local service + */ + public org.opencps.dossiermgt.service.DeliverableLocalService getDeliverableLocalService() { + return deliverableLocalService; + } + + /** + * Sets the deliverable local service. + * + * @param deliverableLocalService the deliverable local service + */ + public void setDeliverableLocalService( + org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService) { + this.deliverableLocalService = deliverableLocalService; + } + + /** + * Returns the deliverable persistence. + * + * @return the deliverable persistence + */ + public DeliverablePersistence getDeliverablePersistence() { + return deliverablePersistence; + } + + /** + * Sets the deliverable persistence. + * + * @param deliverablePersistence the deliverable persistence + */ + public void setDeliverablePersistence( + DeliverablePersistence deliverablePersistence) { + this.deliverablePersistence = deliverablePersistence; + } + + /** + * Returns the deliverable finder. + * + * @return the deliverable finder + */ + public DeliverableFinder getDeliverableFinder() { + return deliverableFinder; + } + + /** + * Sets the deliverable finder. + * + * @param deliverableFinder the deliverable finder + */ + public void setDeliverableFinder(DeliverableFinder deliverableFinder) { + this.deliverableFinder = deliverableFinder; + } + + /** + * Returns the deliverable log local service. + * + * @return the deliverable log local service + */ + public org.opencps.dossiermgt.service.DeliverableLogLocalService getDeliverableLogLocalService() { + return deliverableLogLocalService; + } + + /** + * Sets the deliverable log local service. + * + * @param deliverableLogLocalService the deliverable log local service + */ + public void setDeliverableLogLocalService( + org.opencps.dossiermgt.service.DeliverableLogLocalService deliverableLogLocalService) { + this.deliverableLogLocalService = deliverableLogLocalService; + } + + /** + * Returns the deliverable log persistence. + * + * @return the deliverable log persistence + */ + public DeliverableLogPersistence getDeliverableLogPersistence() { + return deliverableLogPersistence; + } + + /** + * Sets the deliverable log persistence. + * + * @param deliverableLogPersistence the deliverable log persistence + */ + public void setDeliverableLogPersistence( + DeliverableLogPersistence deliverableLogPersistence) { + this.deliverableLogPersistence = deliverableLogPersistence; + } + + /** + * Returns the deliverable type local service. + * + * @return the deliverable type local service + */ + public org.opencps.dossiermgt.service.DeliverableTypeLocalService getDeliverableTypeLocalService() { + return deliverableTypeLocalService; + } + + /** + * Sets the deliverable type local service. + * + * @param deliverableTypeLocalService the deliverable type local service + */ + public void setDeliverableTypeLocalService( + org.opencps.dossiermgt.service.DeliverableTypeLocalService deliverableTypeLocalService) { + this.deliverableTypeLocalService = deliverableTypeLocalService; + } + + /** + * Returns the deliverable type persistence. + * + * @return the deliverable type persistence + */ + public DeliverableTypePersistence getDeliverableTypePersistence() { + return deliverableTypePersistence; + } + + /** + * Sets the deliverable type persistence. + * + * @param deliverableTypePersistence the deliverable type persistence + */ + public void setDeliverableTypePersistence( + DeliverableTypePersistence deliverableTypePersistence) { + this.deliverableTypePersistence = deliverableTypePersistence; + } + + /** + * Returns the deliverable type role local service. + * + * @return the deliverable type role local service + */ + public org.opencps.dossiermgt.service.DeliverableTypeRoleLocalService getDeliverableTypeRoleLocalService() { + return deliverableTypeRoleLocalService; + } + + /** + * Sets the deliverable type role local service. + * + * @param deliverableTypeRoleLocalService the deliverable type role local service + */ + public void setDeliverableTypeRoleLocalService( + org.opencps.dossiermgt.service.DeliverableTypeRoleLocalService deliverableTypeRoleLocalService) { + this.deliverableTypeRoleLocalService = deliverableTypeRoleLocalService; + } + + /** + * Returns the deliverable type role persistence. + * + * @return the deliverable type role persistence + */ + public DeliverableTypeRolePersistence getDeliverableTypeRolePersistence() { + return deliverableTypeRolePersistence; + } + + /** + * Sets the deliverable type role persistence. + * + * @param deliverableTypeRolePersistence the deliverable type role persistence + */ + public void setDeliverableTypeRolePersistence( + DeliverableTypeRolePersistence deliverableTypeRolePersistence) { + this.deliverableTypeRolePersistence = deliverableTypeRolePersistence; + } + + /** + * Returns the document type local service. + * + * @return the document type local service + */ + public org.opencps.dossiermgt.service.DocumentTypeLocalService getDocumentTypeLocalService() { + return documentTypeLocalService; + } + + /** + * Sets the document type local service. + * + * @param documentTypeLocalService the document type local service + */ + public void setDocumentTypeLocalService( + org.opencps.dossiermgt.service.DocumentTypeLocalService documentTypeLocalService) { + this.documentTypeLocalService = documentTypeLocalService; + } + + /** + * Returns the document type persistence. + * + * @return the document type persistence + */ + public DocumentTypePersistence getDocumentTypePersistence() { + return documentTypePersistence; + } + + /** + * Sets the document type persistence. + * + * @param documentTypePersistence the document type persistence + */ + public void setDocumentTypePersistence( + DocumentTypePersistence documentTypePersistence) { + this.documentTypePersistence = documentTypePersistence; + } + + /** + * Returns the dossier local service. + * + * @return the dossier local service + */ + public org.opencps.dossiermgt.service.DossierLocalService getDossierLocalService() { + return dossierLocalService; + } + + /** + * Sets the dossier local service. + * + * @param dossierLocalService the dossier local service + */ + public void setDossierLocalService( + org.opencps.dossiermgt.service.DossierLocalService dossierLocalService) { + this.dossierLocalService = dossierLocalService; + } + + /** + * Returns the dossier persistence. + * + * @return the dossier persistence + */ + public DossierPersistence getDossierPersistence() { + return dossierPersistence; + } + + /** + * Sets the dossier persistence. + * + * @param dossierPersistence the dossier persistence + */ + public void setDossierPersistence(DossierPersistence dossierPersistence) { + this.dossierPersistence = dossierPersistence; + } + + /** + * Returns the dossier finder. + * + * @return the dossier finder + */ + public DossierFinder getDossierFinder() { + return dossierFinder; + } + + /** + * Sets the dossier finder. + * + * @param dossierFinder the dossier finder + */ + public void setDossierFinder(DossierFinder dossierFinder) { + this.dossierFinder = dossierFinder; + } + + /** + * Returns the dossier action local service. + * + * @return the dossier action local service + */ + public org.opencps.dossiermgt.service.DossierActionLocalService getDossierActionLocalService() { + return dossierActionLocalService; + } + + /** + * Sets the dossier action local service. + * + * @param dossierActionLocalService the dossier action local service + */ + public void setDossierActionLocalService( + org.opencps.dossiermgt.service.DossierActionLocalService dossierActionLocalService) { + this.dossierActionLocalService = dossierActionLocalService; + } + + /** + * Returns the dossier action persistence. + * + * @return the dossier action persistence + */ + public DossierActionPersistence getDossierActionPersistence() { + return dossierActionPersistence; + } + + /** + * Sets the dossier action persistence. + * + * @param dossierActionPersistence the dossier action persistence + */ + public void setDossierActionPersistence( + DossierActionPersistence dossierActionPersistence) { + this.dossierActionPersistence = dossierActionPersistence; + } + + /** + * Returns the dossier action finder. + * + * @return the dossier action finder + */ + public DossierActionFinder getDossierActionFinder() { + return dossierActionFinder; + } + + /** + * Sets the dossier action finder. + * + * @param dossierActionFinder the dossier action finder + */ + public void setDossierActionFinder(DossierActionFinder dossierActionFinder) { + this.dossierActionFinder = dossierActionFinder; + } + + /** + * Returns the dossier action sync local service. + * + * @return the dossier action sync local service + */ + public org.opencps.dossiermgt.service.DossierActionSyncLocalService getDossierActionSyncLocalService() { + return dossierActionSyncLocalService; + } + + /** + * Sets the dossier action sync local service. + * + * @param dossierActionSyncLocalService the dossier action sync local service + */ + public void setDossierActionSyncLocalService( + org.opencps.dossiermgt.service.DossierActionSyncLocalService dossierActionSyncLocalService) { + this.dossierActionSyncLocalService = dossierActionSyncLocalService; + } + + /** + * Returns the dossier action sync persistence. + * + * @return the dossier action sync persistence + */ + public DossierActionSyncPersistence getDossierActionSyncPersistence() { + return dossierActionSyncPersistence; + } + + /** + * Sets the dossier action sync persistence. + * + * @param dossierActionSyncPersistence the dossier action sync persistence + */ + public void setDossierActionSyncPersistence( + DossierActionSyncPersistence dossierActionSyncPersistence) { + this.dossierActionSyncPersistence = dossierActionSyncPersistence; + } + + /** + * Returns the dossier action user local service. + * + * @return the dossier action user local service + */ + public org.opencps.dossiermgt.service.DossierActionUserLocalService getDossierActionUserLocalService() { + return dossierActionUserLocalService; + } + + /** + * Sets the dossier action user local service. + * + * @param dossierActionUserLocalService the dossier action user local service + */ + public void setDossierActionUserLocalService( + org.opencps.dossiermgt.service.DossierActionUserLocalService dossierActionUserLocalService) { + this.dossierActionUserLocalService = dossierActionUserLocalService; + } + + /** + * Returns the dossier action user persistence. + * + * @return the dossier action user persistence + */ + public DossierActionUserPersistence getDossierActionUserPersistence() { + return dossierActionUserPersistence; + } + + /** + * Sets the dossier action user persistence. + * + * @param dossierActionUserPersistence the dossier action user persistence + */ + public void setDossierActionUserPersistence( + DossierActionUserPersistence dossierActionUserPersistence) { + this.dossierActionUserPersistence = dossierActionUserPersistence; + } + + /** + * Returns the dossier document local service. + * + * @return the dossier document local service + */ + public org.opencps.dossiermgt.service.DossierDocumentLocalService getDossierDocumentLocalService() { + return dossierDocumentLocalService; + } + + /** + * Sets the dossier document local service. + * + * @param dossierDocumentLocalService the dossier document local service + */ + public void setDossierDocumentLocalService( + org.opencps.dossiermgt.service.DossierDocumentLocalService dossierDocumentLocalService) { + this.dossierDocumentLocalService = dossierDocumentLocalService; + } + + /** + * Returns the dossier document persistence. + * + * @return the dossier document persistence + */ + public DossierDocumentPersistence getDossierDocumentPersistence() { + return dossierDocumentPersistence; + } + + /** + * Sets the dossier document persistence. + * + * @param dossierDocumentPersistence the dossier document persistence + */ + public void setDossierDocumentPersistence( + DossierDocumentPersistence dossierDocumentPersistence) { + this.dossierDocumentPersistence = dossierDocumentPersistence; + } + + /** + * Returns the dossier file local service. + * + * @return the dossier file local service + */ + public org.opencps.dossiermgt.service.DossierFileLocalService getDossierFileLocalService() { + return dossierFileLocalService; + } + + /** + * Sets the dossier file local service. + * + * @param dossierFileLocalService the dossier file local service + */ + public void setDossierFileLocalService( + org.opencps.dossiermgt.service.DossierFileLocalService dossierFileLocalService) { + this.dossierFileLocalService = dossierFileLocalService; + } + + /** + * Returns the dossier file persistence. + * + * @return the dossier file persistence + */ + public DossierFilePersistence getDossierFilePersistence() { + return dossierFilePersistence; + } + + /** + * Sets the dossier file persistence. + * + * @param dossierFilePersistence the dossier file persistence + */ + public void setDossierFilePersistence( + DossierFilePersistence dossierFilePersistence) { + this.dossierFilePersistence = dossierFilePersistence; + } + + /** + * Returns the dossier log local service. + * + * @return the dossier log local service + */ + public org.opencps.dossiermgt.service.DossierLogLocalService getDossierLogLocalService() { + return dossierLogLocalService; + } + + /** + * Sets the dossier log local service. + * + * @param dossierLogLocalService the dossier log local service + */ + public void setDossierLogLocalService( + org.opencps.dossiermgt.service.DossierLogLocalService dossierLogLocalService) { + this.dossierLogLocalService = dossierLogLocalService; + } + + /** + * Returns the dossier log persistence. + * + * @return the dossier log persistence + */ + public DossierLogPersistence getDossierLogPersistence() { + return dossierLogPersistence; + } + + /** + * Sets the dossier log persistence. + * + * @param dossierLogPersistence the dossier log persistence + */ + public void setDossierLogPersistence( + DossierLogPersistence dossierLogPersistence) { + this.dossierLogPersistence = dossierLogPersistence; + } + + /** + * Returns the dossier mark local service. + * + * @return the dossier mark local service + */ + public org.opencps.dossiermgt.service.DossierMarkLocalService getDossierMarkLocalService() { + return dossierMarkLocalService; + } + + /** + * Sets the dossier mark local service. + * + * @param dossierMarkLocalService the dossier mark local service + */ + public void setDossierMarkLocalService( + org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService) { + this.dossierMarkLocalService = dossierMarkLocalService; + } + + /** + * Returns the dossier mark persistence. + * + * @return the dossier mark persistence + */ + public DossierMarkPersistence getDossierMarkPersistence() { + return dossierMarkPersistence; + } + + /** + * Sets the dossier mark persistence. + * + * @param dossierMarkPersistence the dossier mark persistence + */ + public void setDossierMarkPersistence( + DossierMarkPersistence dossierMarkPersistence) { + this.dossierMarkPersistence = dossierMarkPersistence; + } + + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + + /** + * Returns the dossier part local service. + * + * @return the dossier part local service + */ + public org.opencps.dossiermgt.service.DossierPartLocalService getDossierPartLocalService() { + return dossierPartLocalService; + } + + /** + * Sets the dossier part local service. + * + * @param dossierPartLocalService the dossier part local service + */ + public void setDossierPartLocalService( + org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService) { + this.dossierPartLocalService = dossierPartLocalService; + } + + /** + * Returns the dossier part persistence. + * + * @return the dossier part persistence + */ + public DossierPartPersistence getDossierPartPersistence() { + return dossierPartPersistence; + } + + /** + * Sets the dossier part persistence. + * + * @param dossierPartPersistence the dossier part persistence + */ + public void setDossierPartPersistence( + DossierPartPersistence dossierPartPersistence) { + this.dossierPartPersistence = dossierPartPersistence; + } + + /** + * Returns the dossier request ud local service. + * + * @return the dossier request ud local service + */ + public org.opencps.dossiermgt.service.DossierRequestUDLocalService getDossierRequestUDLocalService() { + return dossierRequestUDLocalService; + } + + /** + * Sets the dossier request ud local service. + * + * @param dossierRequestUDLocalService the dossier request ud local service + */ + public void setDossierRequestUDLocalService( + org.opencps.dossiermgt.service.DossierRequestUDLocalService dossierRequestUDLocalService) { + this.dossierRequestUDLocalService = dossierRequestUDLocalService; + } + + /** + * Returns the dossier request ud persistence. + * + * @return the dossier request ud persistence + */ + public DossierRequestUDPersistence getDossierRequestUDPersistence() { + return dossierRequestUDPersistence; + } + + /** + * Sets the dossier request ud persistence. + * + * @param dossierRequestUDPersistence the dossier request ud persistence + */ + public void setDossierRequestUDPersistence( + DossierRequestUDPersistence dossierRequestUDPersistence) { + this.dossierRequestUDPersistence = dossierRequestUDPersistence; + } + + /** + * Returns the dossier statistic local service. + * + * @return the dossier statistic local service + */ + public org.opencps.dossiermgt.service.DossierStatisticLocalService getDossierStatisticLocalService() { + return dossierStatisticLocalService; + } + + /** + * Sets the dossier statistic local service. + * + * @param dossierStatisticLocalService the dossier statistic local service + */ + public void setDossierStatisticLocalService( + org.opencps.dossiermgt.service.DossierStatisticLocalService dossierStatisticLocalService) { + this.dossierStatisticLocalService = dossierStatisticLocalService; + } + + /** + * Returns the dossier statistic persistence. + * + * @return the dossier statistic persistence + */ + public DossierStatisticPersistence getDossierStatisticPersistence() { + return dossierStatisticPersistence; + } + + /** + * Sets the dossier statistic persistence. + * + * @param dossierStatisticPersistence the dossier statistic persistence + */ + public void setDossierStatisticPersistence( + DossierStatisticPersistence dossierStatisticPersistence) { + this.dossierStatisticPersistence = dossierStatisticPersistence; + } + + /** + * Returns the dossier status mapping local service. + * + * @return the dossier status mapping local service + */ + public org.opencps.dossiermgt.service.DossierStatusMappingLocalService getDossierStatusMappingLocalService() { + return dossierStatusMappingLocalService; + } + + /** + * Sets the dossier status mapping local service. + * + * @param dossierStatusMappingLocalService the dossier status mapping local service + */ + public void setDossierStatusMappingLocalService( + org.opencps.dossiermgt.service.DossierStatusMappingLocalService dossierStatusMappingLocalService) { + this.dossierStatusMappingLocalService = dossierStatusMappingLocalService; + } + + /** + * Returns the dossier status mapping persistence. + * + * @return the dossier status mapping persistence + */ + public DossierStatusMappingPersistence getDossierStatusMappingPersistence() { + return dossierStatusMappingPersistence; + } + + /** + * Sets the dossier status mapping persistence. + * + * @param dossierStatusMappingPersistence the dossier status mapping persistence + */ + public void setDossierStatusMappingPersistence( + DossierStatusMappingPersistence dossierStatusMappingPersistence) { + this.dossierStatusMappingPersistence = dossierStatusMappingPersistence; + } + + /** + * Returns the dossier sync local service. + * + * @return the dossier sync local service + */ + public org.opencps.dossiermgt.service.DossierSyncLocalService getDossierSyncLocalService() { + return dossierSyncLocalService; + } + + /** + * Sets the dossier sync local service. + * + * @param dossierSyncLocalService the dossier sync local service + */ + public void setDossierSyncLocalService( + org.opencps.dossiermgt.service.DossierSyncLocalService dossierSyncLocalService) { + this.dossierSyncLocalService = dossierSyncLocalService; + } + + /** + * Returns the dossier sync persistence. + * + * @return the dossier sync persistence + */ + public DossierSyncPersistence getDossierSyncPersistence() { + return dossierSyncPersistence; + } + + /** + * Sets the dossier sync persistence. + * + * @param dossierSyncPersistence the dossier sync persistence + */ + public void setDossierSyncPersistence( + DossierSyncPersistence dossierSyncPersistence) { + this.dossierSyncPersistence = dossierSyncPersistence; + } + + /** + * Returns the dossier sync finder. + * + * @return the dossier sync finder + */ + public DossierSyncFinder getDossierSyncFinder() { + return dossierSyncFinder; + } + + /** + * Sets the dossier sync finder. + * + * @param dossierSyncFinder the dossier sync finder + */ + public void setDossierSyncFinder(DossierSyncFinder dossierSyncFinder) { + this.dossierSyncFinder = dossierSyncFinder; + } + + /** + * Returns the dossier template local service. + * + * @return the dossier template local service + */ + public org.opencps.dossiermgt.service.DossierTemplateLocalService getDossierTemplateLocalService() { + return dossierTemplateLocalService; + } + + /** + * Sets the dossier template local service. + * + * @param dossierTemplateLocalService the dossier template local service + */ + public void setDossierTemplateLocalService( + org.opencps.dossiermgt.service.DossierTemplateLocalService dossierTemplateLocalService) { + this.dossierTemplateLocalService = dossierTemplateLocalService; + } + + /** + * Returns the dossier template persistence. + * + * @return the dossier template persistence + */ + public DossierTemplatePersistence getDossierTemplatePersistence() { + return dossierTemplatePersistence; + } + + /** + * Sets the dossier template persistence. + * + * @param dossierTemplatePersistence the dossier template persistence + */ + public void setDossierTemplatePersistence( + DossierTemplatePersistence dossierTemplatePersistence) { + this.dossierTemplatePersistence = dossierTemplatePersistence; + } + + /** + * Returns the dossier user local service. + * + * @return the dossier user local service + */ + public org.opencps.dossiermgt.service.DossierUserLocalService getDossierUserLocalService() { + return dossierUserLocalService; + } + + /** + * Sets the dossier user local service. + * + * @param dossierUserLocalService the dossier user local service + */ + public void setDossierUserLocalService( + org.opencps.dossiermgt.service.DossierUserLocalService dossierUserLocalService) { + this.dossierUserLocalService = dossierUserLocalService; + } + + /** + * Returns the dossier user persistence. + * + * @return the dossier user persistence + */ + public DossierUserPersistence getDossierUserPersistence() { + return dossierUserPersistence; + } + + /** + * Sets the dossier user persistence. + * + * @param dossierUserPersistence the dossier user persistence + */ + public void setDossierUserPersistence( + DossierUserPersistence dossierUserPersistence) { + this.dossierUserPersistence = dossierUserPersistence; + } + + /** + * Returns the e form local service. + * + * @return the e form local service + */ + public org.opencps.dossiermgt.service.EFormLocalService getEFormLocalService() { + return eFormLocalService; + } + + /** + * Sets the e form local service. + * + * @param eFormLocalService the e form local service + */ + public void setEFormLocalService( + org.opencps.dossiermgt.service.EFormLocalService eFormLocalService) { + this.eFormLocalService = eFormLocalService; + } + + /** + * Returns the e form persistence. + * + * @return the e form persistence + */ + public EFormPersistence getEFormPersistence() { + return eFormPersistence; + } + + /** + * Sets the e form persistence. + * + * @param eFormPersistence the e form persistence + */ + public void setEFormPersistence(EFormPersistence eFormPersistence) { + this.eFormPersistence = eFormPersistence; + } + + /** + * Returns the menu config local service. + * + * @return the menu config local service + */ + public org.opencps.dossiermgt.service.MenuConfigLocalService getMenuConfigLocalService() { + return menuConfigLocalService; + } + + /** + * Sets the menu config local service. + * + * @param menuConfigLocalService the menu config local service + */ + public void setMenuConfigLocalService( + org.opencps.dossiermgt.service.MenuConfigLocalService menuConfigLocalService) { + this.menuConfigLocalService = menuConfigLocalService; + } + + /** + * Returns the menu config persistence. + * + * @return the menu config persistence + */ + public MenuConfigPersistence getMenuConfigPersistence() { + return menuConfigPersistence; + } + + /** + * Sets the menu config persistence. + * + * @param menuConfigPersistence the menu config persistence + */ + public void setMenuConfigPersistence( + MenuConfigPersistence menuConfigPersistence) { + this.menuConfigPersistence = menuConfigPersistence; + } + + /** + * Returns the menu role local service. + * + * @return the menu role local service + */ + public org.opencps.dossiermgt.service.MenuRoleLocalService getMenuRoleLocalService() { + return menuRoleLocalService; + } + + /** + * Sets the menu role local service. + * + * @param menuRoleLocalService the menu role local service + */ + public void setMenuRoleLocalService( + org.opencps.dossiermgt.service.MenuRoleLocalService menuRoleLocalService) { + this.menuRoleLocalService = menuRoleLocalService; + } + + /** + * Returns the menu role persistence. + * + * @return the menu role persistence + */ + public MenuRolePersistence getMenuRolePersistence() { + return menuRolePersistence; + } + + /** + * Sets the menu role persistence. + * + * @param menuRolePersistence the menu role persistence + */ + public void setMenuRolePersistence(MenuRolePersistence menuRolePersistence) { + this.menuRolePersistence = menuRolePersistence; + } + + /** + * Returns the news board local service. + * + * @return the news board local service + */ + public org.opencps.dossiermgt.service.NewsBoardLocalService getNewsBoardLocalService() { + return newsBoardLocalService; + } + + /** + * Sets the news board local service. + * + * @param newsBoardLocalService the news board local service + */ + public void setNewsBoardLocalService( + org.opencps.dossiermgt.service.NewsBoardLocalService newsBoardLocalService) { + this.newsBoardLocalService = newsBoardLocalService; + } + + /** + * Returns the news board persistence. + * + * @return the news board persistence + */ + public NewsBoardPersistence getNewsBoardPersistence() { + return newsBoardPersistence; + } + + /** + * Sets the news board persistence. + * + * @param newsBoardPersistence the news board persistence + */ + public void setNewsBoardPersistence( + NewsBoardPersistence newsBoardPersistence) { + this.newsBoardPersistence = newsBoardPersistence; + } + + /** + * Returns the notarization local service. + * + * @return the notarization local service + */ + public org.opencps.dossiermgt.service.NotarizationLocalService getNotarizationLocalService() { + return notarizationLocalService; + } + + /** + * Sets the notarization local service. + * + * @param notarizationLocalService the notarization local service + */ + public void setNotarizationLocalService( + org.opencps.dossiermgt.service.NotarizationLocalService notarizationLocalService) { + this.notarizationLocalService = notarizationLocalService; + } + + /** + * Returns the notarization persistence. + * + * @return the notarization persistence + */ + public NotarizationPersistence getNotarizationPersistence() { + return notarizationPersistence; + } + + /** + * Sets the notarization persistence. + * + * @param notarizationPersistence the notarization persistence + */ + public void setNotarizationPersistence( + NotarizationPersistence notarizationPersistence) { + this.notarizationPersistence = notarizationPersistence; + } + + /** + * Returns the notarization finder. + * + * @return the notarization finder + */ + public NotarizationFinder getNotarizationFinder() { + return notarizationFinder; + } + + /** + * Sets the notarization finder. + * + * @param notarizationFinder the notarization finder + */ + public void setNotarizationFinder(NotarizationFinder notarizationFinder) { + this.notarizationFinder = notarizationFinder; + } + + /** + * Returns the payment config local service. + * + * @return the payment config local service + */ + public org.opencps.dossiermgt.service.PaymentConfigLocalService getPaymentConfigLocalService() { + return paymentConfigLocalService; + } + + /** + * Sets the payment config local service. + * + * @param paymentConfigLocalService the payment config local service + */ + public void setPaymentConfigLocalService( + org.opencps.dossiermgt.service.PaymentConfigLocalService paymentConfigLocalService) { + this.paymentConfigLocalService = paymentConfigLocalService; + } + + /** + * Returns the payment config persistence. + * + * @return the payment config persistence + */ + public PaymentConfigPersistence getPaymentConfigPersistence() { + return paymentConfigPersistence; + } + + /** + * Sets the payment config persistence. + * + * @param paymentConfigPersistence the payment config persistence + */ + public void setPaymentConfigPersistence( + PaymentConfigPersistence paymentConfigPersistence) { + this.paymentConfigPersistence = paymentConfigPersistence; + } + + /** + * Returns the payment fee info local service. + * + * @return the payment fee info local service + */ + public org.opencps.dossiermgt.service.PaymentFeeInfoLocalService getPaymentFeeInfoLocalService() { + return paymentFeeInfoLocalService; + } + + /** + * Sets the payment fee info local service. + * + * @param paymentFeeInfoLocalService the payment fee info local service + */ + public void setPaymentFeeInfoLocalService( + org.opencps.dossiermgt.service.PaymentFeeInfoLocalService paymentFeeInfoLocalService) { + this.paymentFeeInfoLocalService = paymentFeeInfoLocalService; + } + + /** + * Returns the payment fee info persistence. + * + * @return the payment fee info persistence + */ + public PaymentFeeInfoPersistence getPaymentFeeInfoPersistence() { + return paymentFeeInfoPersistence; + } + + /** + * Sets the payment fee info persistence. + * + * @param paymentFeeInfoPersistence the payment fee info persistence + */ + public void setPaymentFeeInfoPersistence( + PaymentFeeInfoPersistence paymentFeeInfoPersistence) { + this.paymentFeeInfoPersistence = paymentFeeInfoPersistence; + } + + /** + * Returns the payment file local service. + * + * @return the payment file local service + */ + public org.opencps.dossiermgt.service.PaymentFileLocalService getPaymentFileLocalService() { + return paymentFileLocalService; + } + + /** + * Sets the payment file local service. + * + * @param paymentFileLocalService the payment file local service + */ + public void setPaymentFileLocalService( + org.opencps.dossiermgt.service.PaymentFileLocalService paymentFileLocalService) { + this.paymentFileLocalService = paymentFileLocalService; + } + + /** + * Returns the payment file persistence. + * + * @return the payment file persistence + */ + public PaymentFilePersistence getPaymentFilePersistence() { + return paymentFilePersistence; + } + + /** + * Sets the payment file persistence. + * + * @param paymentFilePersistence the payment file persistence + */ + public void setPaymentFilePersistence( + PaymentFilePersistence paymentFilePersistence) { + this.paymentFilePersistence = paymentFilePersistence; + } + + /** + * Returns the payment file finder. + * + * @return the payment file finder + */ + public PaymentFileFinder getPaymentFileFinder() { + return paymentFileFinder; + } + + /** + * Sets the payment file finder. + * + * @param paymentFileFinder the payment file finder + */ + public void setPaymentFileFinder(PaymentFileFinder paymentFileFinder) { + this.paymentFileFinder = paymentFileFinder; + } + + /** + * Returns the post connect local service. + * + * @return the post connect local service + */ + public org.opencps.dossiermgt.service.PostConnectLocalService getPostConnectLocalService() { + return postConnectLocalService; + } + + /** + * Sets the post connect local service. + * + * @param postConnectLocalService the post connect local service + */ + public void setPostConnectLocalService( + org.opencps.dossiermgt.service.PostConnectLocalService postConnectLocalService) { + this.postConnectLocalService = postConnectLocalService; + } + + /** + * Returns the post connect persistence. + * + * @return the post connect persistence + */ + public PostConnectPersistence getPostConnectPersistence() { + return postConnectPersistence; + } + + /** + * Sets the post connect persistence. + * + * @param postConnectPersistence the post connect persistence + */ + public void setPostConnectPersistence( + PostConnectPersistence postConnectPersistence) { + this.postConnectPersistence = postConnectPersistence; + } + + /** + * Returns the process action local service. + * + * @return the process action local service + */ + public org.opencps.dossiermgt.service.ProcessActionLocalService getProcessActionLocalService() { + return processActionLocalService; + } + + /** + * Sets the process action local service. + * + * @param processActionLocalService the process action local service + */ + public void setProcessActionLocalService( + org.opencps.dossiermgt.service.ProcessActionLocalService processActionLocalService) { + this.processActionLocalService = processActionLocalService; + } + + /** + * Returns the process action persistence. + * + * @return the process action persistence + */ + public ProcessActionPersistence getProcessActionPersistence() { + return processActionPersistence; + } + + /** + * Sets the process action persistence. + * + * @param processActionPersistence the process action persistence + */ + public void setProcessActionPersistence( + ProcessActionPersistence processActionPersistence) { + this.processActionPersistence = processActionPersistence; + } + + /** + * Returns the process option local service. + * + * @return the process option local service + */ + public org.opencps.dossiermgt.service.ProcessOptionLocalService getProcessOptionLocalService() { + return processOptionLocalService; + } + + /** + * Sets the process option local service. + * + * @param processOptionLocalService the process option local service + */ + public void setProcessOptionLocalService( + org.opencps.dossiermgt.service.ProcessOptionLocalService processOptionLocalService) { + this.processOptionLocalService = processOptionLocalService; + } + + /** + * Returns the process option persistence. + * + * @return the process option persistence + */ + public ProcessOptionPersistence getProcessOptionPersistence() { + return processOptionPersistence; + } + + /** + * Sets the process option persistence. + * + * @param processOptionPersistence the process option persistence + */ + public void setProcessOptionPersistence( + ProcessOptionPersistence processOptionPersistence) { + this.processOptionPersistence = processOptionPersistence; + } + + /** + * Returns the process plugin local service. + * + * @return the process plugin local service + */ + public org.opencps.dossiermgt.service.ProcessPluginLocalService getProcessPluginLocalService() { + return processPluginLocalService; + } + + /** + * Sets the process plugin local service. + * + * @param processPluginLocalService the process plugin local service + */ + public void setProcessPluginLocalService( + org.opencps.dossiermgt.service.ProcessPluginLocalService processPluginLocalService) { + this.processPluginLocalService = processPluginLocalService; + } + + /** + * Returns the process plugin persistence. + * + * @return the process plugin persistence + */ + public ProcessPluginPersistence getProcessPluginPersistence() { + return processPluginPersistence; + } + + /** + * Sets the process plugin persistence. + * + * @param processPluginPersistence the process plugin persistence + */ + public void setProcessPluginPersistence( + ProcessPluginPersistence processPluginPersistence) { + this.processPluginPersistence = processPluginPersistence; + } + + /** + * Returns the process sequence local service. + * + * @return the process sequence local service + */ + public org.opencps.dossiermgt.service.ProcessSequenceLocalService getProcessSequenceLocalService() { + return processSequenceLocalService; + } + + /** + * Sets the process sequence local service. + * + * @param processSequenceLocalService the process sequence local service + */ + public void setProcessSequenceLocalService( + org.opencps.dossiermgt.service.ProcessSequenceLocalService processSequenceLocalService) { + this.processSequenceLocalService = processSequenceLocalService; + } + + /** + * Returns the process sequence persistence. + * + * @return the process sequence persistence + */ + public ProcessSequencePersistence getProcessSequencePersistence() { + return processSequencePersistence; + } + + /** + * Sets the process sequence persistence. + * + * @param processSequencePersistence the process sequence persistence + */ + public void setProcessSequencePersistence( + ProcessSequencePersistence processSequencePersistence) { + this.processSequencePersistence = processSequencePersistence; + } + + /** + * Returns the process step local service. + * + * @return the process step local service + */ + public org.opencps.dossiermgt.service.ProcessStepLocalService getProcessStepLocalService() { + return processStepLocalService; + } + + /** + * Sets the process step local service. + * + * @param processStepLocalService the process step local service + */ + public void setProcessStepLocalService( + org.opencps.dossiermgt.service.ProcessStepLocalService processStepLocalService) { + this.processStepLocalService = processStepLocalService; + } + + /** + * Returns the process step persistence. + * + * @return the process step persistence + */ + public ProcessStepPersistence getProcessStepPersistence() { + return processStepPersistence; + } + + /** + * Sets the process step persistence. + * + * @param processStepPersistence the process step persistence + */ + public void setProcessStepPersistence( + ProcessStepPersistence processStepPersistence) { + this.processStepPersistence = processStepPersistence; + } + + /** + * Returns the process step role local service. + * + * @return the process step role local service + */ + public org.opencps.dossiermgt.service.ProcessStepRoleLocalService getProcessStepRoleLocalService() { + return processStepRoleLocalService; + } + + /** + * Sets the process step role local service. + * + * @param processStepRoleLocalService the process step role local service + */ + public void setProcessStepRoleLocalService( + org.opencps.dossiermgt.service.ProcessStepRoleLocalService processStepRoleLocalService) { + this.processStepRoleLocalService = processStepRoleLocalService; + } + + /** + * Returns the process step role persistence. + * + * @return the process step role persistence + */ + public ProcessStepRolePersistence getProcessStepRolePersistence() { + return processStepRolePersistence; + } + + /** + * Sets the process step role persistence. + * + * @param processStepRolePersistence the process step role persistence + */ + public void setProcessStepRolePersistence( + ProcessStepRolePersistence processStepRolePersistence) { + this.processStepRolePersistence = processStepRolePersistence; + } + + /** + * Returns the publish queue local service. + * + * @return the publish queue local service + */ + public org.opencps.dossiermgt.service.PublishQueueLocalService getPublishQueueLocalService() { + return publishQueueLocalService; + } + + /** + * Sets the publish queue local service. + * + * @param publishQueueLocalService the publish queue local service + */ + public void setPublishQueueLocalService( + org.opencps.dossiermgt.service.PublishQueueLocalService publishQueueLocalService) { + this.publishQueueLocalService = publishQueueLocalService; + } + + /** + * Returns the publish queue persistence. + * + * @return the publish queue persistence + */ + public PublishQueuePersistence getPublishQueuePersistence() { + return publishQueuePersistence; + } + + /** + * Sets the publish queue persistence. + * + * @param publishQueuePersistence the publish queue persistence + */ + public void setPublishQueuePersistence( + PublishQueuePersistence publishQueuePersistence) { + this.publishQueuePersistence = publishQueuePersistence; + } + + /** + * Returns the registration local service. + * + * @return the registration local service + */ + public org.opencps.dossiermgt.service.RegistrationLocalService getRegistrationLocalService() { + return registrationLocalService; + } + + /** + * Sets the registration local service. + * + * @param registrationLocalService the registration local service + */ + public void setRegistrationLocalService( + org.opencps.dossiermgt.service.RegistrationLocalService registrationLocalService) { + this.registrationLocalService = registrationLocalService; + } + + /** + * Returns the registration persistence. + * + * @return the registration persistence + */ + public RegistrationPersistence getRegistrationPersistence() { + return registrationPersistence; + } + + /** + * Sets the registration persistence. + * + * @param registrationPersistence the registration persistence + */ + public void setRegistrationPersistence( + RegistrationPersistence registrationPersistence) { + this.registrationPersistence = registrationPersistence; + } + + /** + * Returns the registration form local service. + * + * @return the registration form local service + */ + public org.opencps.dossiermgt.service.RegistrationFormLocalService getRegistrationFormLocalService() { + return registrationFormLocalService; + } + + /** + * Sets the registration form local service. + * + * @param registrationFormLocalService the registration form local service + */ + public void setRegistrationFormLocalService( + org.opencps.dossiermgt.service.RegistrationFormLocalService registrationFormLocalService) { + this.registrationFormLocalService = registrationFormLocalService; + } + + /** + * Returns the registration form persistence. + * + * @return the registration form persistence + */ + public RegistrationFormPersistence getRegistrationFormPersistence() { + return registrationFormPersistence; + } + + /** + * Sets the registration form persistence. + * + * @param registrationFormPersistence the registration form persistence + */ + public void setRegistrationFormPersistence( + RegistrationFormPersistence registrationFormPersistence) { + this.registrationFormPersistence = registrationFormPersistence; + } + + /** + * Returns the registration log local service. + * + * @return the registration log local service + */ + public org.opencps.dossiermgt.service.RegistrationLogLocalService getRegistrationLogLocalService() { + return registrationLogLocalService; + } + + /** + * Sets the registration log local service. + * + * @param registrationLogLocalService the registration log local service + */ + public void setRegistrationLogLocalService( + org.opencps.dossiermgt.service.RegistrationLogLocalService registrationLogLocalService) { + this.registrationLogLocalService = registrationLogLocalService; + } + + /** + * Returns the registration log persistence. + * + * @return the registration log persistence + */ + public RegistrationLogPersistence getRegistrationLogPersistence() { + return registrationLogPersistence; + } + + /** + * Sets the registration log persistence. + * + * @param registrationLogPersistence the registration log persistence + */ + public void setRegistrationLogPersistence( + RegistrationLogPersistence registrationLogPersistence) { + this.registrationLogPersistence = registrationLogPersistence; + } + + /** + * Returns the registration templates local service. + * + * @return the registration templates local service + */ + public org.opencps.dossiermgt.service.RegistrationTemplatesLocalService getRegistrationTemplatesLocalService() { + return registrationTemplatesLocalService; + } + + /** + * Sets the registration templates local service. + * + * @param registrationTemplatesLocalService the registration templates local service + */ + public void setRegistrationTemplatesLocalService( + org.opencps.dossiermgt.service.RegistrationTemplatesLocalService registrationTemplatesLocalService) { + this.registrationTemplatesLocalService = registrationTemplatesLocalService; + } + + /** + * Returns the registration templates persistence. + * + * @return the registration templates persistence + */ + public RegistrationTemplatesPersistence getRegistrationTemplatesPersistence() { + return registrationTemplatesPersistence; + } + + /** + * Sets the registration templates persistence. + * + * @param registrationTemplatesPersistence the registration templates persistence + */ + public void setRegistrationTemplatesPersistence( + RegistrationTemplatesPersistence registrationTemplatesPersistence) { + this.registrationTemplatesPersistence = registrationTemplatesPersistence; + } + + /** + * Returns the service config local service. + * + * @return the service config local service + */ + public org.opencps.dossiermgt.service.ServiceConfigLocalService getServiceConfigLocalService() { + return serviceConfigLocalService; + } + + /** + * Sets the service config local service. + * + * @param serviceConfigLocalService the service config local service + */ + public void setServiceConfigLocalService( + org.opencps.dossiermgt.service.ServiceConfigLocalService serviceConfigLocalService) { + this.serviceConfigLocalService = serviceConfigLocalService; + } + + /** + * Returns the service config persistence. + * + * @return the service config persistence + */ + public ServiceConfigPersistence getServiceConfigPersistence() { + return serviceConfigPersistence; + } + + /** + * Sets the service config persistence. + * + * @param serviceConfigPersistence the service config persistence + */ + public void setServiceConfigPersistence( + ServiceConfigPersistence serviceConfigPersistence) { + this.serviceConfigPersistence = serviceConfigPersistence; + } + + /** + * Returns the service config mapping local service. + * + * @return the service config mapping local service + */ + public org.opencps.dossiermgt.service.ServiceConfigMappingLocalService getServiceConfigMappingLocalService() { + return serviceConfigMappingLocalService; + } + + /** + * Sets the service config mapping local service. + * + * @param serviceConfigMappingLocalService the service config mapping local service + */ + public void setServiceConfigMappingLocalService( + org.opencps.dossiermgt.service.ServiceConfigMappingLocalService serviceConfigMappingLocalService) { + this.serviceConfigMappingLocalService = serviceConfigMappingLocalService; + } + + /** + * Returns the service config mapping persistence. + * + * @return the service config mapping persistence + */ + public ServiceConfigMappingPersistence getServiceConfigMappingPersistence() { + return serviceConfigMappingPersistence; + } + + /** + * Sets the service config mapping persistence. + * + * @param serviceConfigMappingPersistence the service config mapping persistence + */ + public void setServiceConfigMappingPersistence( + ServiceConfigMappingPersistence serviceConfigMappingPersistence) { + this.serviceConfigMappingPersistence = serviceConfigMappingPersistence; + } + + /** + * Returns the service file template local service. + * + * @return the service file template local service + */ + public org.opencps.dossiermgt.service.ServiceFileTemplateLocalService getServiceFileTemplateLocalService() { + return serviceFileTemplateLocalService; + } + + /** + * Sets the service file template local service. + * + * @param serviceFileTemplateLocalService the service file template local service + */ + public void setServiceFileTemplateLocalService( + org.opencps.dossiermgt.service.ServiceFileTemplateLocalService serviceFileTemplateLocalService) { + this.serviceFileTemplateLocalService = serviceFileTemplateLocalService; + } + + /** + * Returns the service file template persistence. + * + * @return the service file template persistence + */ + public ServiceFileTemplatePersistence getServiceFileTemplatePersistence() { + return serviceFileTemplatePersistence; + } + + /** + * Sets the service file template persistence. + * + * @param serviceFileTemplatePersistence the service file template persistence + */ + public void setServiceFileTemplatePersistence( + ServiceFileTemplatePersistence serviceFileTemplatePersistence) { + this.serviceFileTemplatePersistence = serviceFileTemplatePersistence; + } + + /** + * Returns the service info local service. + * + * @return the service info local service + */ + public org.opencps.dossiermgt.service.ServiceInfoLocalService getServiceInfoLocalService() { + return serviceInfoLocalService; + } + + /** + * Sets the service info local service. + * + * @param serviceInfoLocalService the service info local service + */ + public void setServiceInfoLocalService( + org.opencps.dossiermgt.service.ServiceInfoLocalService serviceInfoLocalService) { + this.serviceInfoLocalService = serviceInfoLocalService; + } + + /** + * Returns the service info persistence. + * + * @return the service info persistence + */ + public ServiceInfoPersistence getServiceInfoPersistence() { + return serviceInfoPersistence; + } + + /** + * Sets the service info persistence. + * + * @param serviceInfoPersistence the service info persistence + */ + public void setServiceInfoPersistence( + ServiceInfoPersistence serviceInfoPersistence) { + this.serviceInfoPersistence = serviceInfoPersistence; + } + + /** + * Returns the service info mapping local service. + * + * @return the service info mapping local service + */ + public org.opencps.dossiermgt.service.ServiceInfoMappingLocalService getServiceInfoMappingLocalService() { + return serviceInfoMappingLocalService; + } + + /** + * Sets the service info mapping local service. + * + * @param serviceInfoMappingLocalService the service info mapping local service + */ + public void setServiceInfoMappingLocalService( + org.opencps.dossiermgt.service.ServiceInfoMappingLocalService serviceInfoMappingLocalService) { + this.serviceInfoMappingLocalService = serviceInfoMappingLocalService; + } + + /** + * Returns the service info mapping persistence. + * + * @return the service info mapping persistence + */ + public ServiceInfoMappingPersistence getServiceInfoMappingPersistence() { + return serviceInfoMappingPersistence; + } + + /** + * Sets the service info mapping persistence. + * + * @param serviceInfoMappingPersistence the service info mapping persistence + */ + public void setServiceInfoMappingPersistence( + ServiceInfoMappingPersistence serviceInfoMappingPersistence) { + this.serviceInfoMappingPersistence = serviceInfoMappingPersistence; + } + + /** + * Returns the service process local service. + * + * @return the service process local service + */ + public org.opencps.dossiermgt.service.ServiceProcessLocalService getServiceProcessLocalService() { + return serviceProcessLocalService; + } + + /** + * Sets the service process local service. + * + * @param serviceProcessLocalService the service process local service + */ + public void setServiceProcessLocalService( + org.opencps.dossiermgt.service.ServiceProcessLocalService serviceProcessLocalService) { + this.serviceProcessLocalService = serviceProcessLocalService; + } + + /** + * Returns the service process persistence. + * + * @return the service process persistence + */ + public ServiceProcessPersistence getServiceProcessPersistence() { + return serviceProcessPersistence; + } + + /** + * Sets the service process persistence. + * + * @param serviceProcessPersistence the service process persistence + */ + public void setServiceProcessPersistence( + ServiceProcessPersistence serviceProcessPersistence) { + this.serviceProcessPersistence = serviceProcessPersistence; + } + + /** + * Returns the service process role local service. + * + * @return the service process role local service + */ + public org.opencps.dossiermgt.service.ServiceProcessRoleLocalService getServiceProcessRoleLocalService() { + return serviceProcessRoleLocalService; + } + + /** + * Sets the service process role local service. + * + * @param serviceProcessRoleLocalService the service process role local service + */ + public void setServiceProcessRoleLocalService( + org.opencps.dossiermgt.service.ServiceProcessRoleLocalService serviceProcessRoleLocalService) { + this.serviceProcessRoleLocalService = serviceProcessRoleLocalService; + } + + /** + * Returns the service process role persistence. + * + * @return the service process role persistence + */ + public ServiceProcessRolePersistence getServiceProcessRolePersistence() { + return serviceProcessRolePersistence; + } + + /** + * Sets the service process role persistence. + * + * @param serviceProcessRolePersistence the service process role persistence + */ + public void setServiceProcessRolePersistence( + ServiceProcessRolePersistence serviceProcessRolePersistence) { + this.serviceProcessRolePersistence = serviceProcessRolePersistence; + } + + /** + * Returns the step config local service. + * + * @return the step config local service + */ + public org.opencps.dossiermgt.service.StepConfigLocalService getStepConfigLocalService() { + return stepConfigLocalService; + } + + /** + * Sets the step config local service. + * + * @param stepConfigLocalService the step config local service + */ + public void setStepConfigLocalService( + org.opencps.dossiermgt.service.StepConfigLocalService stepConfigLocalService) { + this.stepConfigLocalService = stepConfigLocalService; + } + + /** + * Returns the step config persistence. + * + * @return the step config persistence + */ + public StepConfigPersistence getStepConfigPersistence() { + return stepConfigPersistence; + } + + /** + * Sets the step config persistence. + * + * @param stepConfigPersistence the step config persistence + */ + public void setStepConfigPersistence( + StepConfigPersistence stepConfigPersistence) { + this.stepConfigPersistence = stepConfigPersistence; + } + + /** + * Returns the step config finder. + * + * @return the step config finder + */ + public StepConfigFinder getStepConfigFinder() { + return stepConfigFinder; + } + + /** + * Sets the step config finder. + * + * @param stepConfigFinder the step config finder + */ + public void setStepConfigFinder(StepConfigFinder stepConfigFinder) { + this.stepConfigFinder = stepConfigFinder; + } + + /** + * Returns the user info log local service. + * + * @return the user info log local service + */ + public org.opencps.dossiermgt.service.UserInfoLogLocalService getUserInfoLogLocalService() { + return userInfoLogLocalService; + } + + /** + * Sets the user info log local service. + * + * @param userInfoLogLocalService the user info log local service + */ + public void setUserInfoLogLocalService( + org.opencps.dossiermgt.service.UserInfoLogLocalService userInfoLogLocalService) { + this.userInfoLogLocalService = userInfoLogLocalService; + } + + /** + * Returns the user info log persistence. + * + * @return the user info log persistence + */ + public UserInfoLogPersistence getUserInfoLogPersistence() { + return userInfoLogPersistence; + } + + /** + * Sets the user info log persistence. + * + * @param userInfoLogPersistence the user info log persistence + */ + public void setUserInfoLogPersistence( + UserInfoLogPersistence userInfoLogPersistence) { + this.userInfoLogPersistence = userInfoLogPersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.kernel.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the class name local service. + * + * @return the class name local service + */ + public com.liferay.portal.kernel.service.ClassNameLocalService getClassNameLocalService() { + return classNameLocalService; + } + + /** + * Sets the class name local service. + * + * @param classNameLocalService the class name local service + */ + public void setClassNameLocalService( + com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService) { + this.classNameLocalService = classNameLocalService; + } + + /** + * Returns the class name persistence. + * + * @return the class name persistence + */ + public ClassNamePersistence getClassNamePersistence() { + return classNamePersistence; + } + + /** + * Sets the class name persistence. + * + * @param classNamePersistence the class name persistence + */ + public void setClassNamePersistence( + ClassNamePersistence classNamePersistence) { + this.classNamePersistence = classNamePersistence; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.kernel.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.kernel.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.kernel.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + persistedModelLocalServiceRegistry.register("org.opencps.dossiermgt.model.CsdlDcUser", + csdlDcUserLocalService); + } + + public void destroy() { + persistedModelLocalServiceRegistry.unregister( + "org.opencps.dossiermgt.model.CsdlDcUser"); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + @Override + public String getOSGiServiceIdentifier() { + return CsdlDcUserLocalService.class.getName(); + } + + protected Class getModelClass() { + return CsdlDcUser.class; + } + + protected String getModelClassName() { + return CsdlDcUser.class.getName(); + } + + /** + * Performs a SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) { + try { + DataSource dataSource = csdlDcUserPersistence.getDataSource(); + + DB db = DBManagerUtil.getDB(); + + sql = db.buildSQL(sql); + sql = PortalUtil.transformSQL(sql); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = org.opencps.dossiermgt.service.AccessTokenLocalService.class) + protected org.opencps.dossiermgt.service.AccessTokenLocalService accessTokenLocalService; + @BeanReference(type = AccessTokenPersistence.class) + protected AccessTokenPersistence accessTokenPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ActionConfigLocalService.class) + protected org.opencps.dossiermgt.service.ActionConfigLocalService actionConfigLocalService; + @BeanReference(type = ActionConfigPersistence.class) + protected ActionConfigPersistence actionConfigPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ApplicableInfoLocalService.class) + protected org.opencps.dossiermgt.service.ApplicableInfoLocalService applicableInfoLocalService; + @BeanReference(type = ApplicableInfoPersistence.class) + protected ApplicableInfoPersistence applicableInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.BookingLocalService.class) + protected org.opencps.dossiermgt.service.BookingLocalService bookingLocalService; + @BeanReference(type = BookingPersistence.class) + protected BookingPersistence bookingPersistence; + @BeanReference(type = BookingFinder.class) + protected BookingFinder bookingFinder; + @BeanReference(type = org.opencps.dossiermgt.service.ConfigCounterLocalService.class) + protected org.opencps.dossiermgt.service.ConfigCounterLocalService configCounterLocalService; + @BeanReference(type = ConfigCounterPersistence.class) + protected ConfigCounterPersistence configCounterPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) + protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = CsdlDcUserLocalService.class) + protected CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) + protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; + @BeanReference(type = DeliverablePersistence.class) + protected DeliverablePersistence deliverablePersistence; + @BeanReference(type = DeliverableFinder.class) + protected DeliverableFinder deliverableFinder; + @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLogLocalService.class) + protected org.opencps.dossiermgt.service.DeliverableLogLocalService deliverableLogLocalService; + @BeanReference(type = DeliverableLogPersistence.class) + protected DeliverableLogPersistence deliverableLogPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DeliverableTypeLocalService.class) + protected org.opencps.dossiermgt.service.DeliverableTypeLocalService deliverableTypeLocalService; + @BeanReference(type = DeliverableTypePersistence.class) + protected DeliverableTypePersistence deliverableTypePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DeliverableTypeRoleLocalService.class) + protected org.opencps.dossiermgt.service.DeliverableTypeRoleLocalService deliverableTypeRoleLocalService; + @BeanReference(type = DeliverableTypeRolePersistence.class) + protected DeliverableTypeRolePersistence deliverableTypeRolePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DocumentTypeLocalService.class) + protected org.opencps.dossiermgt.service.DocumentTypeLocalService documentTypeLocalService; + @BeanReference(type = DocumentTypePersistence.class) + protected DocumentTypePersistence documentTypePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierLocalService.class) + protected org.opencps.dossiermgt.service.DossierLocalService dossierLocalService; + @BeanReference(type = DossierPersistence.class) + protected DossierPersistence dossierPersistence; + @BeanReference(type = DossierFinder.class) + protected DossierFinder dossierFinder; + @BeanReference(type = org.opencps.dossiermgt.service.DossierActionLocalService.class) + protected org.opencps.dossiermgt.service.DossierActionLocalService dossierActionLocalService; + @BeanReference(type = DossierActionPersistence.class) + protected DossierActionPersistence dossierActionPersistence; + @BeanReference(type = DossierActionFinder.class) + protected DossierActionFinder dossierActionFinder; + @BeanReference(type = org.opencps.dossiermgt.service.DossierActionSyncLocalService.class) + protected org.opencps.dossiermgt.service.DossierActionSyncLocalService dossierActionSyncLocalService; + @BeanReference(type = DossierActionSyncPersistence.class) + protected DossierActionSyncPersistence dossierActionSyncPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierActionUserLocalService.class) + protected org.opencps.dossiermgt.service.DossierActionUserLocalService dossierActionUserLocalService; + @BeanReference(type = DossierActionUserPersistence.class) + protected DossierActionUserPersistence dossierActionUserPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierDocumentLocalService.class) + protected org.opencps.dossiermgt.service.DossierDocumentLocalService dossierDocumentLocalService; + @BeanReference(type = DossierDocumentPersistence.class) + protected DossierDocumentPersistence dossierDocumentPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierFileLocalService.class) + protected org.opencps.dossiermgt.service.DossierFileLocalService dossierFileLocalService; + @BeanReference(type = DossierFilePersistence.class) + protected DossierFilePersistence dossierFilePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierLogLocalService.class) + protected org.opencps.dossiermgt.service.DossierLogLocalService dossierLogLocalService; + @BeanReference(type = DossierLogPersistence.class) + protected DossierLogPersistence dossierLogPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierMarkLocalService.class) + protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; + @BeanReference(type = DossierMarkPersistence.class) + protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; + @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) + protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; + @BeanReference(type = DossierPartPersistence.class) + protected DossierPartPersistence dossierPartPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierRequestUDLocalService.class) + protected org.opencps.dossiermgt.service.DossierRequestUDLocalService dossierRequestUDLocalService; + @BeanReference(type = DossierRequestUDPersistence.class) + protected DossierRequestUDPersistence dossierRequestUDPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierStatisticLocalService.class) + protected org.opencps.dossiermgt.service.DossierStatisticLocalService dossierStatisticLocalService; + @BeanReference(type = DossierStatisticPersistence.class) + protected DossierStatisticPersistence dossierStatisticPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierStatusMappingLocalService.class) + protected org.opencps.dossiermgt.service.DossierStatusMappingLocalService dossierStatusMappingLocalService; + @BeanReference(type = DossierStatusMappingPersistence.class) + protected DossierStatusMappingPersistence dossierStatusMappingPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierSyncLocalService.class) + protected org.opencps.dossiermgt.service.DossierSyncLocalService dossierSyncLocalService; + @BeanReference(type = DossierSyncPersistence.class) + protected DossierSyncPersistence dossierSyncPersistence; + @BeanReference(type = DossierSyncFinder.class) + protected DossierSyncFinder dossierSyncFinder; + @BeanReference(type = org.opencps.dossiermgt.service.DossierTemplateLocalService.class) + protected org.opencps.dossiermgt.service.DossierTemplateLocalService dossierTemplateLocalService; + @BeanReference(type = DossierTemplatePersistence.class) + protected DossierTemplatePersistence dossierTemplatePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.DossierUserLocalService.class) + protected org.opencps.dossiermgt.service.DossierUserLocalService dossierUserLocalService; + @BeanReference(type = DossierUserPersistence.class) + protected DossierUserPersistence dossierUserPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.EFormLocalService.class) + protected org.opencps.dossiermgt.service.EFormLocalService eFormLocalService; + @BeanReference(type = EFormPersistence.class) + protected EFormPersistence eFormPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.MenuConfigLocalService.class) + protected org.opencps.dossiermgt.service.MenuConfigLocalService menuConfigLocalService; + @BeanReference(type = MenuConfigPersistence.class) + protected MenuConfigPersistence menuConfigPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.MenuRoleLocalService.class) + protected org.opencps.dossiermgt.service.MenuRoleLocalService menuRoleLocalService; + @BeanReference(type = MenuRolePersistence.class) + protected MenuRolePersistence menuRolePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.NewsBoardLocalService.class) + protected org.opencps.dossiermgt.service.NewsBoardLocalService newsBoardLocalService; + @BeanReference(type = NewsBoardPersistence.class) + protected NewsBoardPersistence newsBoardPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.NotarizationLocalService.class) + protected org.opencps.dossiermgt.service.NotarizationLocalService notarizationLocalService; + @BeanReference(type = NotarizationPersistence.class) + protected NotarizationPersistence notarizationPersistence; + @BeanReference(type = NotarizationFinder.class) + protected NotarizationFinder notarizationFinder; + @BeanReference(type = org.opencps.dossiermgt.service.PaymentConfigLocalService.class) + protected org.opencps.dossiermgt.service.PaymentConfigLocalService paymentConfigLocalService; + @BeanReference(type = PaymentConfigPersistence.class) + protected PaymentConfigPersistence paymentConfigPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.PaymentFeeInfoLocalService.class) + protected org.opencps.dossiermgt.service.PaymentFeeInfoLocalService paymentFeeInfoLocalService; + @BeanReference(type = PaymentFeeInfoPersistence.class) + protected PaymentFeeInfoPersistence paymentFeeInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.PaymentFileLocalService.class) + protected org.opencps.dossiermgt.service.PaymentFileLocalService paymentFileLocalService; + @BeanReference(type = PaymentFilePersistence.class) + protected PaymentFilePersistence paymentFilePersistence; + @BeanReference(type = PaymentFileFinder.class) + protected PaymentFileFinder paymentFileFinder; + @BeanReference(type = org.opencps.dossiermgt.service.PostConnectLocalService.class) + protected org.opencps.dossiermgt.service.PostConnectLocalService postConnectLocalService; + @BeanReference(type = PostConnectPersistence.class) + protected PostConnectPersistence postConnectPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ProcessActionLocalService.class) + protected org.opencps.dossiermgt.service.ProcessActionLocalService processActionLocalService; + @BeanReference(type = ProcessActionPersistence.class) + protected ProcessActionPersistence processActionPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ProcessOptionLocalService.class) + protected org.opencps.dossiermgt.service.ProcessOptionLocalService processOptionLocalService; + @BeanReference(type = ProcessOptionPersistence.class) + protected ProcessOptionPersistence processOptionPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ProcessPluginLocalService.class) + protected org.opencps.dossiermgt.service.ProcessPluginLocalService processPluginLocalService; + @BeanReference(type = ProcessPluginPersistence.class) + protected ProcessPluginPersistence processPluginPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ProcessSequenceLocalService.class) + protected org.opencps.dossiermgt.service.ProcessSequenceLocalService processSequenceLocalService; + @BeanReference(type = ProcessSequencePersistence.class) + protected ProcessSequencePersistence processSequencePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ProcessStepLocalService.class) + protected org.opencps.dossiermgt.service.ProcessStepLocalService processStepLocalService; + @BeanReference(type = ProcessStepPersistence.class) + protected ProcessStepPersistence processStepPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ProcessStepRoleLocalService.class) + protected org.opencps.dossiermgt.service.ProcessStepRoleLocalService processStepRoleLocalService; + @BeanReference(type = ProcessStepRolePersistence.class) + protected ProcessStepRolePersistence processStepRolePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.PublishQueueLocalService.class) + protected org.opencps.dossiermgt.service.PublishQueueLocalService publishQueueLocalService; + @BeanReference(type = PublishQueuePersistence.class) + protected PublishQueuePersistence publishQueuePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.RegistrationLocalService.class) + protected org.opencps.dossiermgt.service.RegistrationLocalService registrationLocalService; + @BeanReference(type = RegistrationPersistence.class) + protected RegistrationPersistence registrationPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.RegistrationFormLocalService.class) + protected org.opencps.dossiermgt.service.RegistrationFormLocalService registrationFormLocalService; + @BeanReference(type = RegistrationFormPersistence.class) + protected RegistrationFormPersistence registrationFormPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.RegistrationLogLocalService.class) + protected org.opencps.dossiermgt.service.RegistrationLogLocalService registrationLogLocalService; + @BeanReference(type = RegistrationLogPersistence.class) + protected RegistrationLogPersistence registrationLogPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.RegistrationTemplatesLocalService.class) + protected org.opencps.dossiermgt.service.RegistrationTemplatesLocalService registrationTemplatesLocalService; + @BeanReference(type = RegistrationTemplatesPersistence.class) + protected RegistrationTemplatesPersistence registrationTemplatesPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ServiceConfigLocalService.class) + protected org.opencps.dossiermgt.service.ServiceConfigLocalService serviceConfigLocalService; + @BeanReference(type = ServiceConfigPersistence.class) + protected ServiceConfigPersistence serviceConfigPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ServiceConfigMappingLocalService.class) + protected org.opencps.dossiermgt.service.ServiceConfigMappingLocalService serviceConfigMappingLocalService; + @BeanReference(type = ServiceConfigMappingPersistence.class) + protected ServiceConfigMappingPersistence serviceConfigMappingPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ServiceFileTemplateLocalService.class) + protected org.opencps.dossiermgt.service.ServiceFileTemplateLocalService serviceFileTemplateLocalService; + @BeanReference(type = ServiceFileTemplatePersistence.class) + protected ServiceFileTemplatePersistence serviceFileTemplatePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.ServiceInfoLocalService serviceInfoLocalService; + @BeanReference(type = ServiceInfoPersistence.class) + protected ServiceInfoPersistence serviceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ServiceInfoMappingLocalService.class) + protected org.opencps.dossiermgt.service.ServiceInfoMappingLocalService serviceInfoMappingLocalService; + @BeanReference(type = ServiceInfoMappingPersistence.class) + protected ServiceInfoMappingPersistence serviceInfoMappingPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ServiceProcessLocalService.class) + protected org.opencps.dossiermgt.service.ServiceProcessLocalService serviceProcessLocalService; + @BeanReference(type = ServiceProcessPersistence.class) + protected ServiceProcessPersistence serviceProcessPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.ServiceProcessRoleLocalService.class) + protected org.opencps.dossiermgt.service.ServiceProcessRoleLocalService serviceProcessRoleLocalService; + @BeanReference(type = ServiceProcessRolePersistence.class) + protected ServiceProcessRolePersistence serviceProcessRolePersistence; + @BeanReference(type = org.opencps.dossiermgt.service.StepConfigLocalService.class) + protected org.opencps.dossiermgt.service.StepConfigLocalService stepConfigLocalService; + @BeanReference(type = StepConfigPersistence.class) + protected StepConfigPersistence stepConfigPersistence; + @BeanReference(type = StepConfigFinder.class) + protected StepConfigFinder stepConfigFinder; + @BeanReference(type = org.opencps.dossiermgt.service.UserInfoLogLocalService.class) + protected org.opencps.dossiermgt.service.UserInfoLogLocalService userInfoLogLocalService; + @BeanReference(type = UserInfoLogPersistence.class) + protected UserInfoLogPersistence userInfoLogPersistence; + @ServiceReference(type = com.liferay.counter.kernel.service.CounterLocalService.class) + protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService; + @ServiceReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class) + protected com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService; + @ServiceReference(type = ClassNamePersistence.class) + protected ClassNamePersistence classNamePersistence; + @ServiceReference(type = com.liferay.portal.kernel.service.ResourceLocalService.class) + protected com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService; + @ServiceReference(type = com.liferay.portal.kernel.service.UserLocalService.class) + protected com.liferay.portal.kernel.service.UserLocalService userLocalService; + @ServiceReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + @ServiceReference(type = PersistedModelLocalServiceRegistry.class) + protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry; +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableLocalServiceBaseImpl.java index 689e66a502..5b2616dd97 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = DeliverableLocalService.class) protected DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableLogLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableLogLocalServiceBaseImpl.java index cbf6fb9da8..4a60ae4145 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableLogLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableLogLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableTypeLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableTypeLocalServiceBaseImpl.java index 86e94630ee..59f26c8bcb 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableTypeLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableTypeLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -721,6 +724,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1268,6 +1347,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2895,6 +2992,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2953,6 +3058,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableTypeRoleLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableTypeRoleLocalServiceBaseImpl.java index 27a8ab5194..9079f268ff 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableTypeRoleLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DeliverableTypeRoleLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -727,6 +730,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1274,6 +1353,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2901,6 +2998,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2959,6 +3064,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DocumentTypeLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DocumentTypeLocalServiceBaseImpl.java index 1f0400e04d..78b8c3bdb5 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DocumentTypeLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DocumentTypeLocalServiceBaseImpl.java @@ -50,6 +50,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -64,6 +66,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -630,6 +633,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1177,6 +1256,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2804,6 +2901,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2862,6 +2967,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierActionLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierActionLocalServiceBaseImpl.java index b825768658..a8c4c0819d 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierActionLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierActionLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierActionSyncLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierActionSyncLocalServiceBaseImpl.java index 688a77e35d..9acf113968 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierActionSyncLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierActionSyncLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -722,6 +725,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1269,6 +1348,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2896,6 +2993,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2954,6 +3059,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierActionUserLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierActionUserLocalServiceBaseImpl.java index 72d22531ff..824bde13b6 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierActionUserLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierActionUserLocalServiceBaseImpl.java @@ -50,6 +50,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -65,6 +67,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -611,6 +614,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1158,6 +1237,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2785,6 +2882,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2843,6 +2948,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierDocumentLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierDocumentLocalServiceBaseImpl.java index c78bc6fc20..c8e0ce18ea 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierDocumentLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierDocumentLocalServiceBaseImpl.java @@ -50,6 +50,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -64,6 +66,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -632,6 +635,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1179,6 +1258,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2806,6 +2903,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2864,6 +2969,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierFileLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierFileLocalServiceBaseImpl.java index 2f4da143c7..6fcb445659 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierFileLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierFileLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -721,6 +724,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1268,6 +1347,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2895,6 +2992,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2953,6 +3058,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierLocalServiceBaseImpl.java index ecc79ce081..345217c045 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -712,6 +715,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1258,6 +1337,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2885,6 +2982,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2943,6 +3048,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierLogLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierLogLocalServiceBaseImpl.java index d28773373e..60cd474972 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierLogLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierLogLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -718,6 +721,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1265,6 +1344,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2892,6 +2989,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2950,6 +3055,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierMarkLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierMarkLocalServiceBaseImpl.java index 48d3227d83..e9b67c7288 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierMarkLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierMarkLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierPartLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierPartLocalServiceBaseImpl.java index 1c5cd6a290..faafb8b409 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierPartLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierPartLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = DossierPartLocalService.class) protected DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierRequestUDLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierRequestUDLocalServiceBaseImpl.java index cfdb7106d9..29ee4422e7 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierRequestUDLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierRequestUDLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -722,6 +725,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1269,6 +1348,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2896,6 +2993,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2954,6 +3059,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierStatisticLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierStatisticLocalServiceBaseImpl.java index 5f4eb4bda4..330a12b530 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierStatisticLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierStatisticLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -722,6 +725,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1269,6 +1348,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2896,6 +2993,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2954,6 +3059,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierStatusMappingLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierStatusMappingLocalServiceBaseImpl.java index 076c7405d4..6958b1609a 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierStatusMappingLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierStatusMappingLocalServiceBaseImpl.java @@ -53,6 +53,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -67,6 +69,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -614,6 +617,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1161,6 +1240,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2863,6 +2960,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2921,6 +3026,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierSyncLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierSyncLocalServiceBaseImpl.java index 2653d7e0e1..ba31764c94 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierSyncLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierSyncLocalServiceBaseImpl.java @@ -50,6 +50,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -64,6 +66,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -630,6 +633,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1177,6 +1256,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2804,6 +2901,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2862,6 +2967,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierTemplateLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierTemplateLocalServiceBaseImpl.java index bdede3bbc5..ab2e35176d 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierTemplateLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierTemplateLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -721,6 +724,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1268,6 +1347,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2895,6 +2992,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2953,6 +3058,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierUserLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierUserLocalServiceBaseImpl.java index 01cd70bf36..95ded6f275 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierUserLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/DossierUserLocalServiceBaseImpl.java @@ -50,6 +50,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -64,6 +66,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -604,6 +607,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1151,6 +1230,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2778,6 +2875,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2836,6 +2941,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/EFormLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/EFormLocalServiceBaseImpl.java index 54d1acf801..745b993e23 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/EFormLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/EFormLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -710,6 +713,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1257,6 +1336,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2883,6 +2980,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2941,6 +3046,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/MenuConfigLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/MenuConfigLocalServiceBaseImpl.java index 0025408725..8b5302f245 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/MenuConfigLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/MenuConfigLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -718,6 +721,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1265,6 +1344,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2892,6 +2989,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2950,6 +3055,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/MenuRoleLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/MenuRoleLocalServiceBaseImpl.java index 2ff6ab7e56..d4f25f9f26 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/MenuRoleLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/MenuRoleLocalServiceBaseImpl.java @@ -50,6 +50,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -64,6 +66,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -598,6 +601,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1145,6 +1224,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2772,6 +2869,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2830,6 +2935,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/NewsBoardLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/NewsBoardLocalServiceBaseImpl.java index 8c91e57d61..7690c53d0e 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/NewsBoardLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/NewsBoardLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -715,6 +718,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1262,6 +1341,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2889,6 +2986,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2947,6 +3052,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/NotarizationLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/NotarizationLocalServiceBaseImpl.java index c83d0efba0..8a1d48bbb7 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/NotarizationLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/NotarizationLocalServiceBaseImpl.java @@ -50,6 +50,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -64,6 +66,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -603,6 +606,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1150,6 +1229,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2777,6 +2874,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2835,6 +2940,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PaymentConfigLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PaymentConfigLocalServiceBaseImpl.java index bcc466ac28..33cdefcecd 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PaymentConfigLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PaymentConfigLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PaymentFeeInfoLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PaymentFeeInfoLocalServiceBaseImpl.java index f1a60aa8ae..e0f61559c9 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PaymentFeeInfoLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PaymentFeeInfoLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PaymentFileLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PaymentFileLocalServiceBaseImpl.java index 692b6031ec..1a648af042 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PaymentFileLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PaymentFileLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PostConnectLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PostConnectLocalServiceBaseImpl.java index e6bc1b4cee..4fd80cd536 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PostConnectLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PostConnectLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessActionLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessActionLocalServiceBaseImpl.java index 91b50612bf..5a5f8e8ad1 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessActionLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessActionLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessOptionLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessOptionLocalServiceBaseImpl.java index 504f9634cf..16b589c092 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessOptionLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessOptionLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessPluginLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessPluginLocalServiceBaseImpl.java index 709085eb49..70e2bdcb98 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessPluginLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessPluginLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessSequenceLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessSequenceLocalServiceBaseImpl.java index 6b99d66db5..3071bab45e 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessSequenceLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessSequenceLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -721,6 +724,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1268,6 +1347,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2895,6 +2992,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2953,6 +3058,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessStepLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessStepLocalServiceBaseImpl.java index 6a06655ca4..38db4a3ac2 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessStepLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessStepLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessStepRoleLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessStepRoleLocalServiceBaseImpl.java index fe09db7cc3..d7a5e40568 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessStepRoleLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ProcessStepRoleLocalServiceBaseImpl.java @@ -50,6 +50,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -64,6 +66,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -610,6 +613,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1157,6 +1236,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2784,6 +2881,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2842,6 +2947,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PublishQueueLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PublishQueueLocalServiceBaseImpl.java index b61218817a..56beedfc61 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PublishQueueLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/PublishQueueLocalServiceBaseImpl.java @@ -50,6 +50,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -64,6 +66,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -630,6 +633,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1177,6 +1256,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2804,6 +2901,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2862,6 +2967,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationFormLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationFormLocalServiceBaseImpl.java index 1e48f26141..fc9f9344f0 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationFormLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationFormLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -722,6 +725,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1269,6 +1348,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2896,6 +2993,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2954,6 +3059,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationLocalServiceBaseImpl.java index 35bb7a3e34..d4c7f60581 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationLogLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationLogLocalServiceBaseImpl.java index baf2d106a1..eb47988cff 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationLogLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationLogLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -721,6 +724,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1268,6 +1347,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2895,6 +2992,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2953,6 +3058,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationTemplatesLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationTemplatesLocalServiceBaseImpl.java index f3cbc1e769..3d366d51c5 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationTemplatesLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/RegistrationTemplatesLocalServiceBaseImpl.java @@ -50,6 +50,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -64,6 +66,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -638,6 +641,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1185,6 +1264,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2812,6 +2909,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2870,6 +2975,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceConfigLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceConfigLocalServiceBaseImpl.java index 2312135bec..64b969e550 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceConfigLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceConfigLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceConfigMappingLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceConfigMappingLocalServiceBaseImpl.java index 467754b90d..fa596ce25e 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceConfigMappingLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceConfigMappingLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -728,6 +731,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1275,6 +1354,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2902,6 +2999,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2960,6 +3065,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceFileTemplateLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceFileTemplateLocalServiceBaseImpl.java index 2163fdf7a2..49908da455 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceFileTemplateLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceFileTemplateLocalServiceBaseImpl.java @@ -52,6 +52,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -66,6 +68,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -613,6 +616,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1160,6 +1239,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2844,6 +2941,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2902,6 +3007,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceInfoLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceInfoLocalServiceBaseImpl.java index c9b8f9ff86..b4bc2e4bd5 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceInfoLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceInfoLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceInfoMappingLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceInfoMappingLocalServiceBaseImpl.java index 075a951645..6cd75219ce 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceInfoMappingLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceInfoMappingLocalServiceBaseImpl.java @@ -53,6 +53,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -67,6 +69,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -610,6 +613,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1157,6 +1236,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2859,6 +2956,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2917,6 +3022,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceProcessLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceProcessLocalServiceBaseImpl.java index a59fa6ca47..96b097f5e1 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceProcessLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceProcessLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -719,6 +722,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1266,6 +1345,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2893,6 +2990,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2951,6 +3056,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceProcessRoleLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceProcessRoleLocalServiceBaseImpl.java index 2384d34bcb..1e9732af73 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceProcessRoleLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/ServiceProcessRoleLocalServiceBaseImpl.java @@ -50,6 +50,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -64,6 +66,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -611,6 +614,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1158,6 +1237,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2785,6 +2882,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2843,6 +2948,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/StepConfigLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/StepConfigLocalServiceBaseImpl.java index 07abb3365d..1b006d5880 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/StepConfigLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/StepConfigLocalServiceBaseImpl.java @@ -57,6 +57,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -71,6 +73,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -718,6 +721,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1265,6 +1344,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2892,6 +2989,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2950,6 +3055,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/UserInfoLogLocalServiceBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/UserInfoLogLocalServiceBaseImpl.java index 8b8de90c0a..d98e5ba277 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/UserInfoLogLocalServiceBaseImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/base/UserInfoLogLocalServiceBaseImpl.java @@ -50,6 +50,8 @@ import org.opencps.dossiermgt.service.persistence.BookingFinder; import org.opencps.dossiermgt.service.persistence.BookingPersistence; import org.opencps.dossiermgt.service.persistence.ConfigCounterPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; import org.opencps.dossiermgt.service.persistence.DeliverableFinder; import org.opencps.dossiermgt.service.persistence.DeliverableLogPersistence; import org.opencps.dossiermgt.service.persistence.DeliverablePersistence; @@ -64,6 +66,7 @@ import org.opencps.dossiermgt.service.persistence.DossierFilePersistence; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.DossierLogPersistence; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; import org.opencps.dossiermgt.service.persistence.DossierPartPersistence; import org.opencps.dossiermgt.service.persistence.DossierPersistence; @@ -601,6 +604,82 @@ public void setCPSDossierBusinessLocalService( this.cpsDossierBusinessLocalService = cpsDossierBusinessLocalService; } + /** + * Returns the csdl dc service info local service. + * + * @return the csdl dc service info local service + */ + public org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService getCsdlDcServiceInfoLocalService() { + return csdlDcServiceInfoLocalService; + } + + /** + * Sets the csdl dc service info local service. + * + * @param csdlDcServiceInfoLocalService the csdl dc service info local service + */ + public void setCsdlDcServiceInfoLocalService( + org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService) { + this.csdlDcServiceInfoLocalService = csdlDcServiceInfoLocalService; + } + + /** + * Returns the csdl dc service info persistence. + * + * @return the csdl dc service info persistence + */ + public CsdlDcServiceInfoPersistence getCsdlDcServiceInfoPersistence() { + return csdlDcServiceInfoPersistence; + } + + /** + * Sets the csdl dc service info persistence. + * + * @param csdlDcServiceInfoPersistence the csdl dc service info persistence + */ + public void setCsdlDcServiceInfoPersistence( + CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence) { + this.csdlDcServiceInfoPersistence = csdlDcServiceInfoPersistence; + } + + /** + * Returns the csdl dc user local service. + * + * @return the csdl dc user local service + */ + public org.opencps.dossiermgt.service.CsdlDcUserLocalService getCsdlDcUserLocalService() { + return csdlDcUserLocalService; + } + + /** + * Sets the csdl dc user local service. + * + * @param csdlDcUserLocalService the csdl dc user local service + */ + public void setCsdlDcUserLocalService( + org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService) { + this.csdlDcUserLocalService = csdlDcUserLocalService; + } + + /** + * Returns the csdl dc user persistence. + * + * @return the csdl dc user persistence + */ + public CsdlDcUserPersistence getCsdlDcUserPersistence() { + return csdlDcUserPersistence; + } + + /** + * Sets the csdl dc user persistence. + * + * @param csdlDcUserPersistence the csdl dc user persistence + */ + public void setCsdlDcUserPersistence( + CsdlDcUserPersistence csdlDcUserPersistence) { + this.csdlDcUserPersistence = csdlDcUserPersistence; + } + /** * Returns the deliverable local service. * @@ -1148,6 +1227,24 @@ public void setDossierMarkPersistence( this.dossierMarkPersistence = dossierMarkPersistence; } + /** + * Returns the dossier mark finder. + * + * @return the dossier mark finder + */ + public DossierMarkFinder getDossierMarkFinder() { + return dossierMarkFinder; + } + + /** + * Sets the dossier mark finder. + * + * @param dossierMarkFinder the dossier mark finder + */ + public void setDossierMarkFinder(DossierMarkFinder dossierMarkFinder) { + this.dossierMarkFinder = dossierMarkFinder; + } + /** * Returns the dossier part local service. * @@ -2775,6 +2872,14 @@ protected void runSQL(String sql) { protected ConfigCounterPersistence configCounterPersistence; @BeanReference(type = org.opencps.dossiermgt.service.CPSDossierBusinessLocalService.class) protected org.opencps.dossiermgt.service.CPSDossierBusinessLocalService cpsDossierBusinessLocalService; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService csdlDcServiceInfoLocalService; + @BeanReference(type = CsdlDcServiceInfoPersistence.class) + protected CsdlDcServiceInfoPersistence csdlDcServiceInfoPersistence; + @BeanReference(type = org.opencps.dossiermgt.service.CsdlDcUserLocalService.class) + protected org.opencps.dossiermgt.service.CsdlDcUserLocalService csdlDcUserLocalService; + @BeanReference(type = CsdlDcUserPersistence.class) + protected CsdlDcUserPersistence csdlDcUserPersistence; @BeanReference(type = org.opencps.dossiermgt.service.DeliverableLocalService.class) protected org.opencps.dossiermgt.service.DeliverableLocalService deliverableLocalService; @BeanReference(type = DeliverablePersistence.class) @@ -2833,6 +2938,8 @@ protected void runSQL(String sql) { protected org.opencps.dossiermgt.service.DossierMarkLocalService dossierMarkLocalService; @BeanReference(type = DossierMarkPersistence.class) protected DossierMarkPersistence dossierMarkPersistence; + @BeanReference(type = DossierMarkFinder.class) + protected DossierMarkFinder dossierMarkFinder; @BeanReference(type = org.opencps.dossiermgt.service.DossierPartLocalService.class) protected org.opencps.dossiermgt.service.DossierPartLocalService dossierPartLocalService; @BeanReference(type = DossierPartPersistence.class) diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/CPSDossierBusinessLocalServiceImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/CPSDossierBusinessLocalServiceImpl.java index 4d9d0dc67b..5c7cf305f2 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/CPSDossierBusinessLocalServiceImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/CPSDossierBusinessLocalServiceImpl.java @@ -106,6 +106,7 @@ import org.opencps.dossiermgt.action.DossierActions; import org.opencps.dossiermgt.action.DossierFileActions; import org.opencps.dossiermgt.action.DossierUserActions; +import org.opencps.dossiermgt.action.KeyPayV3Action; import org.opencps.dossiermgt.action.FileUploadUtils; import org.opencps.dossiermgt.action.impl.DVCQGIntegrationActionImpl; import org.opencps.dossiermgt.action.impl.DossierActionsImpl; @@ -127,6 +128,8 @@ import org.opencps.dossiermgt.action.util.PaymentUrlGenerator; import org.opencps.dossiermgt.action.util.ReadFilePropertiesUtils; import org.opencps.dossiermgt.action.util.VNPostCLSUtils; +import org.opencps.dossiermgt.action.util.DeliverableNumberGenerator; +import org.opencps.dossiermgt.action.util.POSVCBUtils; import org.opencps.dossiermgt.constants.ActionConfigTerm; import org.opencps.dossiermgt.constants.CInvoiceTerm; import org.opencps.dossiermgt.constants.CacheTerm; @@ -184,6 +187,11 @@ import org.opencps.dossiermgt.model.ServiceProcess; import org.opencps.dossiermgt.model.ServiceProcessRole; import org.opencps.dossiermgt.model.StepConfig; +import org.opencps.dossiermgt.model.DeliverableType; +import org.opencps.dossiermgt.model.impl.DossierImpl; +import org.opencps.dossiermgt.model.impl.DossierModelImpl; +import org.opencps.dossiermgt.rest.utils.ExecuteOneActionTerm; +import org.opencps.dossiermgt.rest.utils.SyncServerTerm; import org.opencps.dossiermgt.scheduler.InvokeREST; import org.opencps.dossiermgt.scheduler.RESTFulConfiguration; import org.opencps.dossiermgt.service.ActionConfigLocalServiceUtil; @@ -1321,7 +1329,7 @@ else if (Validator.isNull(postStepCode)) { logLineLevelDoActionInside(9, dossierIDString); ProcessStep curStep = processStepLocalService.fetchBySC_GID(postStepCode, groupId, serviceProcessId); _log.debug("ProcessStep:" + JSONFactoryUtil.looseSerialize(curStep)); - //Kiểm tra cấu hình cần tạo hồ sơ liên thông + //Kiểm tra cấu hình cần tạo hồ sơ liên thông và trung gian hsltDossier = createCrossDossier(groupId, proAction, curStep, previousAction, employee, dossier, user, payloadObject, context); logLineLevelDoActionInside(10, dossierIDString); @@ -1504,14 +1512,14 @@ else if (Validator.isNull(postStepCode)) { } } }else { - Deliverable deliverable = DeliverableLocalServiceUtil.fetchByGID_DID(groupId, dossierId); - JSONObject deliverablObj = JSONFactoryUtil.createJSONObject(deliverable.getFormData()); - if(Validator.isNotNull(dossier.getDossierNo())){ - deliverablObj.put(DossierTerm.DOSSIER_NO, dossier.getDossierNo()); - } - if (Validator.isNotNull(deliverable)) { - updateDeliverable(deliverable, userId, groupId, dossierPart, dlt, deliverablObj, context); - } +// Deliverable deliverable = DeliverableLocalServiceUtil.fetchByGID_DID(groupId, dossierId); +// JSONObject deliverablObj = JSONFactoryUtil.createJSONObject(deliverable.getFormData()); +// if(Validator.isNotNull(dossier.getDossierNo())){ +// deliverablObj.put(DossierTerm.DOSSIER_NO, dossier.getDossierNo()); +// } +// if (Validator.isNotNull(deliverable)) { +// updateDeliverable(deliverable, userId, groupId, dossierPart, dlt, deliverablObj, context); +// } } } logLineLevelDoActionInside(28, dossierIDString); @@ -2027,7 +2035,7 @@ private void createNotificationQueue(User user, long groupId, Dossier dossier, P Validator.isNotNull(expiredCal) ? expiredCal : expired, context); } - + } } catch (NoSuchUserException e) { _log.debug(e); @@ -3007,12 +3015,19 @@ private PaymentFile createPaymentFile(long groupId, long userId, String payment, } if (epaymentConfigJSON.has(KeyPayTerm.KEYPAY_LATE_CONFIG)) { try { + User user = UserLocalServiceUtil.fetchUser(userId); epaymentProfileJSON.put(KeyPayTerm.KEYPAY_LATE, true); JSONObject schema = epaymentConfigJSON.getJSONObject(KeyPayTerm.KEYPAY_LATE_CONFIG); epaymentProfileJSON.put(KeyPayTerm.KEYPAY_LATE_CONFIG, schema); - createTransactionKeypayV3(dossier, dossier.getDossierActionId()); -// paymentFileLocalService.updateEProfile(dossier.getDossierId(), paymentFile.getReferenceUid(), -// epaymentProfileJSON.toJSONString(), context); +// createTransactionKeypayV3(dossier, dossier.getDossierActionId()); +// createKeypayV3(dossier); + paymentFileLocalService.updateEProfile(dossier.getDossierId(), paymentFile.getReferenceUid(), + epaymentProfileJSON.toJSONString(), context); + KeyPayV3Action keypayAction = new KeyPayV3ActionImpl(); + JSONObject epaymentProFile = keypayAction.createPaylater(user, dossier.getDossierId(), context, null); + if(Validator.isNotNull(epaymentProFile)){ + epaymentProfileJSON.put(KeyPayTerm.KEYPAY_LATE_CONFIG, epaymentProFile); + } } catch (Exception e) { _log.error(e); } @@ -4626,6 +4641,31 @@ private void createTransactionKeypayV3(Dossier dossier, long dossierActionId) { _log.debug("=============create keypay v3============"); MessageBusUtil.sendMessage(DossierTerm.KEYPAY_V3_DESTINATION, message); } + private void createKeypayV3(Dossier dossier) { + try { + long groupId = dossier.getGroupId(); + long dossierId = dossier.getDossierId(); + InvokeREST callRest = new InvokeREST(); + String baseUrl = RESTFulConfiguration.SERVER_PATH_BASE; + HashMap properties = new HashMap(); + Map params = new HashMap<>(); + ServiceContext context = null; + + params.put(DossierTerm.DOSSIER_ID, dossierId); +// _log.info("DossierId " + dossierId + " GroupId " + groupId); + //Hồ sơ đẩy sang chưa kịp tạo ==> Để sleep 2s để hồ sơ có thể tạo +// Thread.sleep(3000); + Dossier dossier3 = DossierLocalServiceUtil.findDossierById(dossierId); + _log.info(" Log Dossier " + JSONFactoryUtil.looseSerialize(dossier3)); + JSONObject resultObj = callRest.callPostAPI(groupId, HttpMethod.POST, MediaType.APPLICATION_JSON, baseUrl, + KeyPayTerm.ENDPOINT_KEYPAY, "", "", properties, params, context); + _log.info("baseUrl: " + baseUrl + KeyPayTerm.ENDPOINT_KEYPAY); +// _log.info("Call post API SEND keypayv3 result: " + resultObj.toJSONString()); + _log.info(params); + } catch (Exception e) { + e.getMessage(); + } + } private void integrateTTTT(Dossier dossier, ServiceContext context, long dossierActionId) { //Add tich hop Thong tin truyen thong @@ -5114,15 +5154,86 @@ private DossierAction doActionOutsideProcess(long groupId, long userId, Dossier } if(DossierActionTerm.ACTION_SPECIAL_WAITING_PAYMENT.equals(actionCode)){ + // Gửi giao dịch thanh toán lên máy POS PaymentFile paymentFile = PaymentFileLocalServiceUtil.getByDossierId(groupId,dossier.getDossierId()); - if (paymentFile != null) { - paymentFile.setPaymentStatus(3); - paymentFile.setApproveDatetime(new Date()); + _log.info(" --- Call API Sale RequestData POSVCB --- "); + try { + String result = POSVCBUtils.saleRequestDataPOSVCB(groupId, dossier.getGovAgencyCode(), + paymentFile.getPaymentAmount(), SyncServerTerm.CURRENCY_CODE, "", paymentFile.getPaymentNote(), + dossier.getDossierCounter(),dossier.getDossierNo(), dossier.getServiceCode()); + JSONObject epaymentProfile = JSONFactoryUtil.createJSONObject(paymentFile.getEpaymentProfile()); + if(Validator.isNotNull(result)) { + JSONObject resultJSON = JSONFactoryUtil.createJSONObject(result); + String key = resultJSON.getString("KEY"); + if (Validator.isNotNull(key)) { + _log.info("KEY POS: " + key); + epaymentProfile.put(SyncServerTerm.KEY_SALE, key); + } + } + if (paymentFile != null) { + paymentFile.setPaymentStatus(3); + paymentFile.setApproveDatetime(new Date()); + paymentFile.setEpaymentProfile(epaymentProfile.toString()); + } + PaymentFileLocalServiceUtil.updatePaymentFile(paymentFile); + _log.info(" --- Result VCB --- : " + result); + }catch (Exception e){ + e.getMessage(); + } + } + if(DossierActionTerm.ACTION_SPECIAL_CONFIRM_PAYMENT.equals(actionCode)) { + // Cán bộ xác nhận thanh toán cập nhật lại trạng thái + // Check giao dịch đã được thanh toán chưa + String key = StringPool.BLANK; + PaymentFile paymentFile = PaymentFileLocalServiceUtil.getByDossierId(groupId, dossier.getDossierId()); + JSONObject paymentObject = JSONFactoryUtil.createJSONObject(paymentFile.getEpaymentProfile()); + key = paymentObject.getString(SyncServerTerm.KEY_SALE); + _log.info("Call API Xác Nhận Thanh toán"); + String result = POSVCBUtils.checkResultPOSVCB(groupId, dossier.getGovAgencyCode(), key, dossier.getServiceCode()); + _log.info("Result thanh toán :" + result); + if (Validator.isNotNull(result)) { + JSONObject resultJSON = JSONFactoryUtil.createJSONObject(result); + String responseCode = resultJSON.getString("RESPONSE_CODE"); + if (paymentFile != null && responseCode.equals("00")) { + paymentFile.setPaymentStatus(5); + paymentFile.setApproveDatetime(new Date()); + PaymentFileLocalServiceUtil.updatePaymentFile(paymentFile); + _log.info("Hồ sơ thanh toán thành công"); + }else if (responseCode.equals("7000")){ + _log.info("Hồ sơ chưa được thanh toán trên máy POS"); + }else{ + _log.info("Hồ sơ chưa gửi thanh toán lên máy POS"); + } } - PaymentFileLocalServiceUtil.updatePaymentFile(paymentFile); } - if(DossierActionTerm.ACTION_SPECIAL_CONFIRM_PAYMENT.equals(actionCode)){ -// POSVCBUtils.saleRequestDataPOSVCB(); + if(DossierActionTerm.ACTION_SPECIAL_CANCEL_PAYMENT.equals(actionCode)){ + // Hủy giao dịch thanh toán lên máy POS + PaymentFile paymentFile = PaymentFileLocalServiceUtil.getByDossierId(groupId,dossier.getDossierId()); + _log.info(" --- Call API Void RequestData POSVCB --- "); + try { + + // Check giao dịch đã được thanh toán chưa + String key = StringPool.BLANK; + String resultVoid = StringPool.BLANK; + JSONObject paymentObject = JSONFactoryUtil.createJSONObject(paymentFile.getEpaymentProfile()); + key = paymentObject.getString(SyncServerTerm.KEY_SALE); + _log.info("Call API Hủy Thanh toán"); + String result = POSVCBUtils.checkResultPOSVCB(groupId, dossier.getGovAgencyCode(), key, dossier.getServiceCode()); + if(Validator.isNotNull(result)) { + JSONObject resultJSON = JSONFactoryUtil.createJSONObject(result); + if ("00".equals(resultJSON.getString("RESPONSE_CODE"))) { + resultVoid = POSVCBUtils.voidPOSVCB(groupId, dossier.getGovAgencyCode(), + SyncServerTerm.CURRENCY_CODE, "", dossier.getDossierNo(), resultJSON, paymentFile.getPaymentNote(), dossier.getServiceCode()); + } else { + resultVoid = "Giao dịch chưa được khởi tạo"; + } + }else{ + resultVoid = "Mất kết nối đến máy POS"; + } + _log.info(" --- Result VCB --- : " + resultVoid); + }catch (Exception e){ + e.getMessage(); + } } return dossierAction; @@ -7279,7 +7390,7 @@ public FrequencyDoAction updateDossierFrequencyAction(long groupId, ServiceConte ProcessAction proAction = null; ProcessAction processActionCurrent; ProcessOption option; - DossierAction dossierActionResult; + DossierAction dossierActionResult = null; Integer syncType = 0; ActionConfig actConfig = ActionConfigLocalServiceUtil.getByCode(groupId, actionCode); long serviceProcessId = 0; @@ -7343,17 +7454,66 @@ public FrequencyDoAction updateDossierFrequencyAction(long groupId, ServiceConte processActionCurrent = proAction; - if(Validator.isNotNull(input)) { - if(Validator.isNull(input.getPayment())) { - dossierActionResult = doAction(groupId, serviceContext.getUserId(), dossier, option, proAction, actionCode, StringPool.BLANK, StringPool.BLANK, - StringPool.BLANK, StringPool.BLANK, null, syncType, serviceContext); + boolean canDoAction = true; + + _log.info("Doing action QLVB for dossier: " + dossier.getDossierId()); + if (Validator.isNotNull(input) + && Validator.isNotNull(input.getStatusQLVB()) + && !input.getStatusQLVB().isEmpty()) { + String statusQLVB = input.getStatusQLVB(); + _log.info("statusQLVB: " + statusQLVB); + + if(Validator.isNotNull(proAction.getPreCondition())) { + _log.info("getPreCondition: " + proAction.getPreCondition()); + + String[] preConditionArr = StringUtil.split(proAction.getPreCondition()); + + boolean hasSequenceQLVB = false; + + for (String preCondition : preConditionArr) { + if (preCondition.contains(DossierTerm.CONTAIN_SEQUENCE_QLVB)) { + hasSequenceQLVB = true; + String[] splitServerSync = preCondition.split(StringPool.EQUAL); + if(splitServerSync.length > 1) { + String sequenceQLVBConfig = splitServerSync[1]; + _log.info("sequenceQLVBConfig: " + sequenceQLVBConfig); + if(!statusQLVB.equals(sequenceQLVBConfig)) { + canDoAction = false; + } + } + } + } + + if(!hasSequenceQLVB && !statusQLVB.equals("1")) { + _log.info("Case default status from QLVB > 1, but Duan chua cau hinh precondition, " + + "thi KO cho thuc hien"); + canDoAction = false; + } + + } else { + _log.info("Null pre condition"); + if(!statusQLVB.equals("1")) { + _log.info("Not first time and no precondition"); + canDoAction = false; + } + } + } + + _log.info("CanDoAction: " + canDoAction); + + if (canDoAction) { + if(Validator.isNotNull(input)) { + if(Validator.isNull(input.getPayment())) { + dossierActionResult = doAction(groupId, serviceContext.getUserId(), dossier, option, proAction, actionCode, StringPool.BLANK, StringPool.BLANK, + StringPool.BLANK, StringPool.BLANK, null, syncType, serviceContext); + } else { + dossierActionResult = doAction(groupId, serviceContext.getUserId(), dossier, option, proAction, actionCode, StringPool.BLANK, StringPool.BLANK, + StringPool.BLANK, StringPool.BLANK, objMapper.writeValueAsString(input.getPayment()), syncType, serviceContext); + } } else { dossierActionResult = doAction(groupId, serviceContext.getUserId(), dossier, option, proAction, actionCode, StringPool.BLANK, StringPool.BLANK, - StringPool.BLANK, StringPool.BLANK, objMapper.writeValueAsString(input.getPayment()), syncType, serviceContext); + StringPool.BLANK, StringPool.BLANK, null, syncType, serviceContext); } - } else { - dossierActionResult = doAction(groupId, serviceContext.getUserId(), dossier, option, proAction, actionCode, StringPool.BLANK, StringPool.BLANK, - StringPool.BLANK, StringPool.BLANK, null, syncType, serviceContext); } if(Validator.isNull(dossierActionResult)) { diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/CsdlDcServiceInfoLocalServiceImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/CsdlDcServiceInfoLocalServiceImpl.java new file mode 100644 index 0000000000..a53583dd9e --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/CsdlDcServiceInfoLocalServiceImpl.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service.impl; + +import org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException; +import org.opencps.dossiermgt.model.CsdlDcServiceInfo; +import org.opencps.dossiermgt.service.base.CsdlDcServiceInfoLocalServiceBaseImpl; + +/** + * The implementation of the csdl dc service info local service. + * + *

+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalService} interface. + * + *

+ * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. + *

+ * + * @author huymq + * @see CsdlDcServiceInfoLocalServiceBaseImpl + * @see org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalServiceUtil + */ +public class CsdlDcServiceInfoLocalServiceImpl + extends CsdlDcServiceInfoLocalServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. Always use {@link org.opencps.dossiermgt.service.CsdlDcServiceInfoLocalServiceUtil} to access the csdl dc service info local service. + */ + public CsdlDcServiceInfo findByServiceCodeAndStatus(String serviceCode, int status) { + try { + return csdlDcServiceInfoPersistence.findByF_SERVICECODE_STATUS(serviceCode, status); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/CsdlDcUserLocalServiceImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/CsdlDcUserLocalServiceImpl.java new file mode 100644 index 0000000000..ade49a2a63 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/CsdlDcUserLocalServiceImpl.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service.impl; + +import org.opencps.dossiermgt.model.CsdlDcUser; +import org.opencps.dossiermgt.service.base.CsdlDcUserLocalServiceBaseImpl; + +/** + * The implementation of the csdl dc user local service. + * + *

+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.dossiermgt.service.CsdlDcUserLocalService} interface. + * + *

+ * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. + *

+ * + * @author huymq + * @see CsdlDcUserLocalServiceBaseImpl + * @see org.opencps.dossiermgt.service.CsdlDcUserLocalServiceUtil + */ +public class CsdlDcUserLocalServiceImpl extends CsdlDcUserLocalServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. Always use {@link org.opencps.dossiermgt.service.CsdlDcUserLocalServiceUtil} to access the csdl dc user local service. + */ + + public CsdlDcUser findByGovAndEmailAndStatus(String govAgencyCode, String email, int status) { + try { + return csdlDcUserPersistence.findByF_GOV_EMAIL_STATUS(govAgencyCode, email, status); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/DeliverableLocalServiceImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/DeliverableLocalServiceImpl.java index ead7360614..e7f85fc828 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/DeliverableLocalServiceImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/DeliverableLocalServiceImpl.java @@ -1777,15 +1777,17 @@ private BooleanQuery processSearchCommon(String keywords, String groupId, String // MultiMatchQuery query = new MultiMatchQuery(keywordDate); // query.addFields(DeliverableTerm.NGAY_QD_SEARCH); // queryBool.add(query, BooleanClauseOccur.MUST); -// }else if(key.split("@")[0].contains(DeliverableTerm.ISSUE_DATE)){ -// MultiMatchQuery query = new MultiMatchQuery(keywordDate); -// query.addFields(DeliverableTerm.ISSUE_DATE_SEARCH); -// queryBool.add(query, BooleanClauseOccur.MUST); -// }else if(key.split("@")[0].contains(DeliverableTerm.NGAY_CAP)){ -// MultiMatchQuery query = new MultiMatchQuery(keywordDate); -// query.addFields(DeliverableTerm.NGAY_CAP_SEARCH); -// queryBool.add(query, BooleanClauseOccur.MUST); // }else + if(key.split("@")[0].contains(DeliverableTerm.ISSUE_DATE)){ + MultiMatchQuery query = new MultiMatchQuery(keywordDate); + query.addFields(DeliverableTerm.ISSUE_DATE_SEARCH); + queryBool.add(query, BooleanClauseOccur.MUST); + }else if(key.split("@")[0].contains(DeliverableTerm.NGAY_CAP)){ + MultiMatchQuery query = new MultiMatchQuery(keywordDate); + query.addFields(DeliverableTerm.NGAY_CAP_SEARCH); + queryBool.add(query, BooleanClauseOccur.MUST); + } +// else // if(DeliverableTerm.NGAY_CAP_CNDKKD.equals(ngayCapCND)) { if(key.split("@")[0].contains(DeliverableTerm.NGAY_CAP_CNDKKD)){ _log.debug("NgaycapCNDKKD: " + keywordDate); diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/DossierLocalServiceImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/DossierLocalServiceImpl.java index 51abbb668f..0ab5e1473b 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/DossierLocalServiceImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/DossierLocalServiceImpl.java @@ -81,7 +81,17 @@ import org.opencps.dossiermgt.constants.PaymentFileTerm; import org.opencps.dossiermgt.constants.ServiceInfoTerm; import org.opencps.dossiermgt.exception.NoSuchDossierException; -import org.opencps.dossiermgt.model.*; +import org.opencps.dossiermgt.model.Dossier; +import org.opencps.dossiermgt.model.DossierAction; +import org.opencps.dossiermgt.model.DossierFile; +import org.opencps.dossiermgt.model.DossierPart; +import org.opencps.dossiermgt.model.DossierTemplate; +import org.opencps.dossiermgt.model.ProcessOption; +import org.opencps.dossiermgt.model.ProcessStep; +import org.opencps.dossiermgt.model.ServiceConfig; +import org.opencps.dossiermgt.model.ServiceInfo; +import org.opencps.dossiermgt.model.ServiceProcess; +import org.opencps.dossiermgt.model.DossierDocument; import org.opencps.dossiermgt.service.DossierActionLocalServiceUtil; import org.opencps.dossiermgt.service.DossierLocalServiceUtil; import org.opencps.dossiermgt.service.ProcessOptionLocalServiceUtil; @@ -7882,6 +7892,11 @@ public List findByGID_PUB_SID(long groupId, boolean public_, long[] public Dossier findDossierByDeclarationCode(String code, long groupId) { return dossierFinder.findDossierByDeclarationCode(code, groupId); } + + public Dossier findDossierById( long dossierId) { + return dossierFinder.findDossierById(dossierId); + } + public java.util.List getListVotingByDossier(long groupId, List listDossier) { return dossierFinder.getListVotingByDossier(groupId, listDossier); } @@ -7920,4 +7935,22 @@ public List findDossierBeforeDateAndDossierStatusisNull(Date date) { return result; } + public List findDossierTransferByORIGIN_NO_ORIGIN_ID_ORIGINALITY(String originDossierNo, Long originDossierId, Integer originality){ + DynamicQuery dynamicQuery = dossierLocalService.dynamicQuery(); + + dynamicQuery.add(RestrictionsFactoryUtil.eq("originDossierNo", originDossierNo)); + + if(Validator.isNotNull(originDossierId)) { + dynamicQuery.add(RestrictionsFactoryUtil.eq("originDossierId", originDossierId)); + } + + if(Validator.isNotNull(originality)) { + dynamicQuery.add(RestrictionsFactoryUtil.eq("originality", originality)); + } + + List result = dossierPersistence.findWithDynamicQuery(dynamicQuery); + return result; + } + + } \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/DossierMarkLocalServiceImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/DossierMarkLocalServiceImpl.java index a403e27754..e311acb75d 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/DossierMarkLocalServiceImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/DossierMarkLocalServiceImpl.java @@ -119,6 +119,11 @@ public DossierMark getDossierMarkbyDossierId(long groupId, long dossierId, Strin return dossierMarkPersistence.fetchByG_DID_PN(groupId, dossierId, dossierPartNo); } + @Override + public List findDossierMarkByDossierId(long groupId, long dossierId) { + return dossierMarkFinder.findDossierMarkByDossierId(groupId, dossierId); + } + public List getDossierMarks(long groupId, long dossierId) { return dossierMarkPersistence.findByG_DID(groupId, dossierId); diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/KeyPayV3ActionImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/KeyPayV3ActionImpl.java new file mode 100644 index 0000000000..356a774416 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/KeyPayV3ActionImpl.java @@ -0,0 +1,554 @@ +/** + * + */ +package org.opencps.dossiermgt.service.impl; + +import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.json.JSONArray; +import com.liferay.portal.kernel.json.JSONException; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.model.User; +import com.liferay.portal.kernel.search.Field; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.util.Validator; +import org.opencps.dossiermgt.action.KeyPayV3Action; +import org.opencps.dossiermgt.action.PaymentFileActions; +import org.opencps.dossiermgt.action.impl.PaymentFileActionsImpl; +import org.opencps.dossiermgt.action.util.*; +import org.opencps.dossiermgt.constants.KeyPayTerm; +import org.opencps.dossiermgt.constants.PaymentFileTerm; +import org.opencps.dossiermgt.model.Dossier; +import org.opencps.dossiermgt.model.DossierAction; +import org.opencps.dossiermgt.model.PaymentFile; +import org.opencps.dossiermgt.model.ProcessAction; +import org.opencps.dossiermgt.service.DossierActionLocalServiceUtil; +import org.opencps.dossiermgt.service.DossierLocalServiceUtil; +import org.opencps.dossiermgt.service.PaymentFileLocalServiceUtil; +import org.opencps.dossiermgt.service.ProcessActionLocalServiceUtil; + +import javax.imageio.ImageIO; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.HttpMethod; +import javax.ws.rs.core.MediaType; +import java.awt.image.BufferedImage; +import java.io.*; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Base64; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author moon + * + */ +public class KeyPayV3ActionImpl implements KeyPayV3Action { + + private Log _log = LogFactoryUtil.getLog(KeyPayV3ActionImpl.class.getName()); + + /* + * (non-Javadoc) + * + * @see + * org.fds.opencps.paygate.integration.action.KeyPayV3Action#createPaylater(com. + * liferay.portal.kernel.model.User, long, long, + * com.liferay.portal.kernel.service.ServiceContext, + * javax.servlet.http.HttpServletRequest) + */ + @Override + public JSONObject createPaylater(User user, long dossierId, ServiceContext serviceContext, + HttpServletRequest request) { + String result = StringPool.BLANK; + JSONObject schemaJson = JSONFactoryUtil.createJSONObject(); + + try { + + Dossier dossier = DossierLocalServiceUtil.findDossierById(dossierId); + + _log.info("Dossier" + JSONFactoryUtil.looseSerialize(dossier)); + PaymentFile paymentFile = PaymentFileLocalServiceUtil.getByDossierId(dossier.getGroupId(), dossierId); + _log.info("Payment" + JSONFactoryUtil.looseSerialize(paymentFile)); + schemaJson = JSONFactoryUtil.createJSONObject(paymentFile.getEpaymentProfile()) + .getJSONObject(KeyPayTerm.KEYPAY_LATE_CONFIG); + if (schemaJson == null) { + return schemaJson; + } + + String client_id = schemaJson.getString(KeyPayV3Term.CLIENT_ID); + String addition_fee = String.valueOf(paymentFile.getShipAmount()); + String trans_amount = String.valueOf(paymentFile.getPaymentAmount()); + String command = schemaJson.getString(KeyPayV3Term.COMMAND_PAYLATER); + String version = schemaJson.getString(KeyPayV3Term.VERSION); + String hash_key_1 = schemaJson.getString(KeyPayV3Term.CLIENT_KEY_1); + + JSONObject data = JSONFactoryUtil.createJSONObject(); + String transactionId = KeyPayV3Utils.encodeTransactionId(dossier.getDossierId()); + data.put(KeyPayV3Term.CLIENT_ID, schemaJson.getString(KeyPayV3Term.CLIENT_ID)); + data.put(KeyPayV3Term.TRANSACTION_ID, transactionId); + data.put(KeyPayV3Term.TRANS_AMOUNT, trans_amount); + data.put(KeyPayV3Term.COMMAND, command);// default PAY + data.put(KeyPayV3Term.VERSION, version);// default "3.0" + data.put(KeyPayV3Term.DESCRIPTION, paymentFile.getPaymentNote());// ? + data.put(KeyPayV3Term.LOCALE, schemaJson.getString(KeyPayV3Term.LOCALE));// default vn + data.put(KeyPayV3Term.COUNTRY_CODE, schemaJson.getString(KeyPayV3Term.COUNTRY_CODE)); // default vi + data.put(KeyPayV3Term.CURRENCY_CODE, schemaJson.getString(KeyPayV3Term.CURRENCY_CODE)); // default VND + data.put(KeyPayV3Term.ENVIRONMENT, schemaJson.getString(KeyPayV3Term.ENVIRONMENT)); // default 1-web, 2-app + data.put(KeyPayV3Term.BILL_ID, dossier.getDossierId()); + + JSONObject bill_info = JSONFactoryUtil.createJSONObject(); + bill_info.put(KeyPayV3Term.MADICHVU, schemaJson.getString(KeyPayV3Term.MADICHVU)); // thu phi le phi = 2 + + // moi dich vu cong co 1 thong tin ngan hang thu huong khac nhau + JSONObject banksInfo = schemaJson.getJSONObject(KeyPayV3Term.BANKINFO); + JSONObject bankInfo = JSONFactoryUtil.createJSONObject(); + if (banksInfo.has(dossier.getServiceCode())) { + bankInfo = banksInfo.getJSONObject(dossier.getServiceCode()); + } else { + bankInfo = banksInfo.getJSONObject(KeyPayV3Term.DEFAULT); + } + bill_info.put(KeyPayV3Term.TKTHUHUONG, bankInfo.getString(KeyPayV3Term.TKTHUHUONG)); + bill_info.put(KeyPayV3Term.MANHTHUHUONG, bankInfo.getString(KeyPayV3Term.MANHTHUHUONG)); + bill_info.put(KeyPayV3Term.TENTKTHUHUONG, bankInfo.getString(KeyPayV3Term.TENTKTHUHUONG)); + + JSONArray philephi = JSONFactoryUtil.createJSONArray(); + + JSONObject philephiJ = JSONFactoryUtil.createJSONObject(); + philephiJ.put(KeyPayV3Term.LOAIPHILEPHI, KeyPayV3Term.LOAIPHILEPHI_PHI); + philephiJ.put(KeyPayV3Term.MAPHILEPHI, "2"); + philephiJ.put(KeyPayV3Term.TENPHILEPHI, schemaJson.getString(KeyPayV3Term.TENPHILEPHI_PHI)); + philephiJ.put(KeyPayV3Term.SOTIEN, paymentFile.getServiceAmount()); + philephi.put(philephiJ); + JSONObject philephiJ2 = JSONFactoryUtil.createJSONObject(); + philephiJ2.put(KeyPayV3Term.LOAIPHILEPHI, KeyPayV3Term.LOAIPHILEPHI_LEPHI); + philephiJ2.put(KeyPayV3Term.MAPHILEPHI, "2"); + philephiJ2.put(KeyPayV3Term.TENPHILEPHI, schemaJson.getString(KeyPayV3Term.TENPHILEPHI_LEPHI)); + philephiJ2.put(KeyPayV3Term.SOTIEN, paymentFile.getFeeAmount()); + philephi.put(philephiJ2); + bill_info.put(KeyPayV3Term.PHILEPHI, philephi); + + // TODO: +// MaDonVi,TenDonVi,MaCoQuanQD,TenCoQuanQD +// +// MaDonVi: 000.00.00.G17 TenDonVi: Bộ Xây dựng +// +// MaCQ và Ten CQ trùng luôn MaDonVi và TenDonVi + bill_info.put(KeyPayV3Term.MADONVI, schemaJson.getString(KeyPayV3Term.MADONVI)); + bill_info.put(KeyPayV3Term.TENDONVI, schemaJson.getString(KeyPayV3Term.TENDONVI)); + bill_info.put(KeyPayV3Term.MAHOSO, dossier.getDossierNo()); +// ServiceInfoMapping serviceInfoMapping = ServiceInfoMappingLocalServiceUtil.fetchDVCQGServiceCode(dossier.getGroupId(), +// dossier.getServiceCode()); + String serviceCode = dossier != null ? dossier.getServiceCode() + : StringPool.BLANK; + // TODO validate + bill_info.put(KeyPayV3Term.MATTHC, dossier.getServiceCode());// ma TTHC = serviceCode + bill_info.put(KeyPayV3Term.TENTTHC, dossier.getServiceName()); + // TODO: fix + bill_info.put(KeyPayV3Term.MADVC, serviceCode + schemaJson.getString(KeyPayV3Term.MADVCAPPEND));// chua xd + bill_info.put(KeyPayV3Term.TENDVC, dossier.getServiceName());// chua xd + bill_info.put(KeyPayV3Term.NOIDUNGTHANHTOAN, paymentFile.getPaymentNote()); + bill_info.put(KeyPayV3Term.MALOAIHINHTHUPHAT, "");// ko bb; + + bill_info.put(KeyPayV3Term.HOTENNGUOINOP, dossier.getApplicantName()); + + bill_info.put(KeyPayV3Term.SOCMNDNGUOINOP, dossier.getApplicantIdNo()); + bill_info.put(KeyPayV3Term.DIACHINGUOINOP, dossier.getAddress()); + bill_info.put(KeyPayV3Term.HUYENNGUOINOP, dossier.getDistrictName());// ko bb + bill_info.put(KeyPayV3Term.TINHNGUOINOP, dossier.getCityName());// ko bb + // TODO: fix MACOQUANQD TENCOQUANQD + bill_info.put(KeyPayV3Term.MACOQUANQD, dossier.getGovAgencyCode()); + bill_info.put(KeyPayV3Term.TENCOQUANQD, dossier.getGovAgencyName()); + + bill_info.put(KeyPayV3Term.KHOBAC, "");// ko bb + bill_info.put(KeyPayV3Term.NGAYQD, "");// ko bb + bill_info.put(KeyPayV3Term.SOQD, "");// ko bb + + bill_info.put(KeyPayV3Term.THOIGIANVIPHAM, ""); + bill_info.put(KeyPayV3Term.DIADIEMVIPHAM, ""); + bill_info.put(KeyPayV3Term.TENNGUOIVIPHAM, ""); + bill_info.put(KeyPayV3Term.TAIKHOANTHUNSNN, ""); + + JSONArray dskhoannop = JSONFactoryUtil.createJSONArray(); + JSONObject dskhoannop_obj = JSONFactoryUtil.createJSONObject(); + + dskhoannop_obj.put(KeyPayV3Term.NOIDUNG, Validator.isNotNull(paymentFile.getPaymentNote()) ? paymentFile.getPaymentNote() : dossier.getDossierNo()); + dskhoannop_obj.put(KeyPayV3Term.SOTIEN, String.valueOf(paymentFile.getPaymentAmount())); + dskhoannop.put(dskhoannop_obj); + + bill_info.put(KeyPayV3Term.DSKHOANNOP, dskhoannop); + + data.put(KeyPayV3Term.BILL_INFO, bill_info); + + JSONObject config = JSONFactoryUtil.createJSONObject(paymentFile.getEpaymentProfile()) + .getJSONObject(KeyPayTerm.KEYPAY_LATE_CONFIG); + if (dossier.isOnline()) { + String returnUrl = config.getJSONObject(KeyPayV3Term.ACTION_IS_ONLINE) + .getString(KeyPayV3Term.URL_DOMAIN); + data.put(KeyPayV3Term.RETURN_URL, returnUrl); + } else { + String returnUrl = config.getJSONObject(KeyPayV3Term.ACTION_IS_NOT_ONLINE) + .getString(KeyPayV3Term.URL_DOMAIN); + data.put(KeyPayV3Term.RETURN_URL, returnUrl); + } + + data.put(KeyPayV3Term.ADDITION_FEE, addition_fee); + + String check_sum = KeyPayV3Utils.genCallbackChecksumReceived(addition_fee, + client_id, command, trans_amount, transactionId, version, hash_key_1); + _log.info("keypay check_sum " + check_sum); + + data.put(KeyPayV3Term.CHECK_SUM, check_sum); + + String endpoint = schemaJson.getString(KeyPayV3Term.KEYPAY_LATE_CREATE_TRANSACTION_ENDPOINT); + + _log.info("keypay endpoint " + endpoint); + + _log.info("keypay data " + data); + // Không có Payment Amount không thực hiện keyPay +// epaymentProfile = JSONFactoryUtil.createJSONObject(paymentFile.getEpaymentProfile()); + if(paymentFile.getPaymentAmount() > 0) { + JSONObject response = KeyPayV3Utils.postAPI(endpoint, data); + _log.info("response " + JSONFactoryUtil.looseSerialize(response)); + if (Validator.isNotNull(response)) { + JSONObject dataJson = response.getJSONObject(KeyPayV3Term.DATA); + if (response.has(KeyPayV3Term.ERROR) + && KeyPayV3Term.ERROR_0.equals(response.getString(KeyPayV3Term.ERROR))) { + String qrcode_pay = dataJson.getString(KeyPayV3Term.QRCODE_PAY); + _log.info("QRCODE_PAY :" + qrcode_pay); + schemaJson.put(KeyPayV3Term.TRANSACTION_ID, transactionId); + schemaJson.put(KeyPayV3Term.QRCODE_PAY, qrcode_pay); + schemaJson.put(KeyPayV3Term.TRANS_AMOUNT, trans_amount); + schemaJson.put(KeyPayV3Term.ADDITION_FEE, addition_fee); + schemaJson.put(KeyPayV3Term.KEY_PAY_SUCCESS, "Success"); + + }else{ + schemaJson.put(KeyPayV3Term.KEY_PAY_FAIL, "Fail"); + } + }else{ + schemaJson.put(KeyPayV3Term.KEY_PAY_FAIL, "Fail"); + } + }else{ + schemaJson.put(KeyPayV3Term.KEY_PAY_FAIL, "Fail"); + } +// epaymentProfile.put(KeyPayTerm.KEYPAY_LATE_CONFIG, schemaJson); + _log.info("EpaymentFile: " + JSONFactoryUtil.looseSerialize(schemaJson)); + } catch (Exception e) { + _log.error(e); + } + + return schemaJson; + } + + public File getQrCode(User user, long dossierId, ServiceContext serviceContext, HttpServletRequest request, HttpServletResponse response, String imaStr) { + + File outputfile = null; + try { + Dossier dossier = DossierLocalServiceUtil.fetchDossier(dossierId); + PaymentFile paymentFile = PaymentFileLocalServiceUtil.findPaymentFileByDossierId(dossier.getGroupId(), dossierId); + JSONObject data = JSONFactoryUtil.createJSONObject(paymentFile.getEpaymentProfile()) + .getJSONObject(KeyPayTerm.KEYPAY_LATE_CONFIG); + String imageStr = data.getString(KeyPayV3Term.QRCODE_PAY); + _log.info("imageStr: " + JSONFactoryUtil.looseSerialize(imageStr)); + if(Validator.isNotNull(imaStr)){ + imageStr = imaStr; + } + if(Validator.isNotNull(imageStr)) { + String imageDataBytes = imageStr.split(",")[1]; + + byte[] imageBytes = javax.xml.bind.DatatypeConverter.parseBase64Binary(imageDataBytes); + BufferedImage image = ImageIO.read(new ByteArrayInputStream(imageBytes)); + + // write the image to a file + outputfile = new File("barcode/tt" + paymentFile.getPaymentFileId() + ".png"); + + if (!outputfile.exists()) { + outputfile.createNewFile(); + } + + ImageIO.write(image, "png", outputfile); + } + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return outputfile; + } + + public JSONObject paylaterCallback(User user, ServiceContext serviceContext, String body) { + JSONObject result = JSONFactoryUtil.createJSONObject(); + try { + if (body != null && body.length() > 0) { + _log.info("=======body========" + body); + JSONObject data = JSONFactoryUtil.createJSONObject(body); + JSONObject billInfo = JSONFactoryUtil.createJSONObject(data.getString(KeyPayV3Term.BILL_INFO)); + String transactionId = data.getString(KeyPayV3Term.TRANSACTION_ID); + String dossierNo = billInfo.getString(KeyPayV3Term.MAHOSO); + Dossier dossier = DossierLocalServiceUtil.fetchByDO_NO(dossierNo); + _log.debug("DossierNo: " + dossierNo); +// PaymentFile paymentFile = PaymentFileLocalServiceUtil.getByDossierId(dossier.getGroupId(), dossier.getDossierId()); + PaymentFile paymentFile = PaymentFileLocalServiceUtil.findPaymentFileByDossierId(dossier.getGroupId(), dossier.getDossierId()); + _log.info("PaymentFile: " + JSONFactoryUtil.looseSerialize(paymentFile)); + JSONObject schema = JSONFactoryUtil.createJSONObject(paymentFile.getEpaymentProfile()) + .getJSONObject(KeyPayTerm.KEYPAY_LATE_CONFIG); + String client_id = schema.getString(KeyPayV3Term.CLIENT_ID); + String addition_fee = String.valueOf(paymentFile.getShipAmount()); + String trans_amount = String.valueOf(paymentFile.getPaymentAmount()); + String command = schema.getString(KeyPayV3Term.COMMAND_PAYLATER); + String version = schema.getString(KeyPayV3Term.VERSION); + String hash_key_1 = schema.getString(KeyPayV3Term.CLIENT_KEY_1); + _log.info("Has Key 1: " + hash_key_1); + String hash_key_2 = schema.getString(KeyPayV3Term.CLIENT_KEY_2); + _log.info("Has Key 2: " + hash_key_2); + try { + String check_sum = KeyPayV3Utils.genCallbackChecksumReceived(addition_fee, client_id, command, trans_amount, transactionId, version, hash_key_2); + _log.info("Checksum " + check_sum); + if (check_sum.equals(data.getString(KeyPayV3Term.CHECK_SUM)) + && KeyPayV3Term.DA_THANH_TOAN.equals(data.getString(KeyPayV3Term.STATUS))) { + boolean doAction = doActionPP(user, dossier.getGroupId(), dossier, paymentFile, data, serviceContext); + if (doAction) { + result.put(KeyPayV3Term.RETURN_CODE, KeyPayV3Term.RETURN_CODE_SUCCESS); + result.put(KeyPayV3Term.RETURN_MSG, "Thành công"); + } else { + result.put(KeyPayV3Term.RETURN_CODE, KeyPayV3Term.RETURN_CODE_ERROR); + result.put(KeyPayV3Term.RETURN_MSG, "Thất bại"); + } + } + }catch (Exception e){ + e.getMessage(); + } + } else { + result.put(KeyPayV3Term.RETURN_CODE, KeyPayV3Term.RETURN_CODE_ERROR); + result.put(KeyPayV3Term.RETURN_MSG, "Thất bại"); + } + } catch (Exception e) { + _log.error(e); + result.put(KeyPayV3Term.RETURN_CODE, KeyPayV3Term.RETURN_CODE_ERROR); + result.put(KeyPayV3Term.RETURN_MSG, "Thất bại"); + } + return result; + } + private boolean doActionPP(User user, long groupId, Dossier dossier, PaymentFile paymentFile, JSONObject confirmPayload, + ServiceContext serviceContext) { + + try { + + JSONObject config = JSONFactoryUtil.createJSONObject(paymentFile.getEpaymentProfile()) + .getJSONObject(KeyPayTerm.KEYPAY_LATE_CONFIG); + + PaymentFileActions actions = new PaymentFileActionsImpl(); + + JSONObject action = JSONFactoryUtil.createJSONObject(); + + if (dossier.isOnline()) { + // TODO: call api doaction to DVC + action = config.getJSONObject(PayGateTerm.ACTION_IS_ONLINE); + + String actionCode = action.getString(PayGateTerm.ACTION_CODE); + + //url doAction + String url = action.getString(PayGateTerm.URL); + + String username = action.getString(PayGateTerm.USERNAME); + + String pwd = action.getString(PayGateTerm.PWD); + + // Change payment Status = 5 + paymentFile = actions.updateFileConfirm(groupId, dossier.getDossierId(), paymentFile.getReferenceUid(), + StringPool.BLANK, PaymentFileTerm.PAYMENT_METHOD_PAY_PLAT_DVCQG, + confirmPayload.toJSONString(), serviceContext); + + HashMap properties = new HashMap(); + + properties.put(Field.GROUP_ID, action.getString(Field.GROUP_ID)); + + String endPoint = PayGateTerm.buildPathDoAction(url, dossier.getReferenceUid()); + + long dossierActionId = dossier.getDossierActionId(); + + DossierAction dossierAction = DossierActionLocalServiceUtil.fetchDossierAction(dossierActionId); + + long serviceProcessId = dossierAction.getServiceProcessId(); + + String stepCode = dossierAction.getStepCode(); + + Map params = new HashMap(); + + params.put(PayGateTerm.ACTION_CODE, actionCode); + + JSONObject payment = JSONFactoryUtil.createJSONObject(); + + payment.put(PaymentFileTerm.ADVANCE_AMOUNT, paymentFile.getAdvanceAmount()); + payment.put(PaymentFileTerm.FEE_AMOUNT, paymentFile.getFeeAmount()); + payment.put(PaymentFileTerm.PAYMENT_NOTE, paymentFile.getPaymentNote()); + payment.put(PaymentFileTerm.SERVICE_AMOUNT, paymentFile.getServiceAmount()); + payment.put(PaymentFileTerm.SHIP_AMOUNT, paymentFile.getShipAmount()); + payment.put(PaymentFileTerm.PAYMENT_METHOD, PaymentFileTerm.PAYMENT_METHOD_PAYLATER); + payment.put(PaymentFileTerm.CONFIRM_PAYLOAD, confirmPayload.toJSONString()); + payment.put(PaymentFileTerm.PAYMENT_REQUEST, 5); + if (stepCode != null) { + + List processActionList = ProcessActionLocalServiceUtil + .getProcessActionByG_SPID_PRESC(groupId, serviceProcessId, stepCode); + + for (ProcessAction processAction : processActionList) { + + _log.info(processAction.getActionCode()); + _log.info(processAction.getRequestPayment()); + if (processAction.getActionCode().equals(actionCode)) { + + payment = JSONFactoryUtil.createJSONObject(); + payment.put(PaymentFileTerm.PAYMENT_REQUEST, processAction.getRequestPayment()); + } + } + } + + params.put(PayGateTerm.PAYMENT, payment.toString()); + + _log.info("params============" + params); + JSONObject resPostDossier = callPostAPI(HttpMethod.POST, MediaType.APPLICATION_JSON, endPoint, + properties, params, username, pwd); + + _log.info("=====resPostDossier=========" + resPostDossier); + + return true; + } else { + paymentFile = actions.updateFileConfirm(groupId, dossier.getDossierId(), paymentFile.getReferenceUid(), + StringPool.BLANK, PaymentFileTerm.PAYMENT_METHOD_PAY_PLAT_DVCQG, + confirmPayload.toJSONString(), serviceContext); + + action = config.getJSONObject(PayGateTerm.ACTION_IS_NOT_ONLINE); + + HashMap properties = new HashMap(); + + properties.put(Field.GROUP_ID, action.getString(Field.GROUP_ID)); //124302 +// String endPoint = PayGateTerm.buildPathDoAction("http://192.168.68.78:8080", +// String.valueOf(dossier.getDossierId())); + String endPoint = PayGateTerm.buildPathDoAction(action.getString(PayGateTerm.URL), + dossier.getReferenceUid()); + Map params = new HashMap(); + + params.put(PayGateTerm.ACTION_CODE, action.get(PayGateTerm.ACTION_CODE)); + JSONObject payment = JSONFactoryUtil.createJSONObject(); + payment.put(PaymentFileTerm.PAYMENT_REQUEST, 5); + payment.put(PaymentFileTerm.ADVANCE_AMOUNT, paymentFile.getAdvanceAmount()); + payment.put(PaymentFileTerm.FEE_AMOUNT, paymentFile.getFeeAmount()); + payment.put(PaymentFileTerm.PAYMENT_NOTE, paymentFile.getPaymentNote()); + payment.put(PaymentFileTerm.SERVICE_AMOUNT, paymentFile.getServiceAmount()); + payment.put(PaymentFileTerm.SHIP_AMOUNT, paymentFile.getShipAmount()); + payment.put(PaymentFileTerm.PAYMENT_METHOD, PaymentFileTerm.PAYMENT_METHOD_PAYLATER); + payment.put(PaymentFileTerm.CONFIRM_PAYLOAD, confirmPayload.toJSONString()); + params.put(PayGateTerm.PAYMENT, payment.toString()); + + _log.info(endPoint); + JSONObject resPostDossier = callPostAPI(HttpMethod.POST, MediaType.APPLICATION_JSON, endPoint, + properties, params, action.getString(PayGateTerm.USERNAME), action.getString(PayGateTerm.PWD)); + + _log.info("=====resPostDossier=========" + resPostDossier); + if(resPostDossier.length() >0){ + return true; + }else{ + return false; + } + } + + } catch (Exception e) { + _log.error(e); + return false; + } + } + @SuppressWarnings("rawtypes") + public JSONObject callPostAPI(String httpMethod, String accept, String urlPath, HashMap properties, + Map params, String username, String password) { + + JSONObject response = JSONFactoryUtil.createJSONObject(); + + HttpURLConnection conn = null; + + BufferedReader br = null; + + try { + + URL url = new URL(urlPath); + + conn = (HttpURLConnection) url.openConnection(); + conn.setConnectTimeout(OpenCPSConfigUtil.getRestConnectionTimeout()); + conn.setReadTimeout(OpenCPSConfigUtil.getRestReadTimeout()); + conn.setRequestMethod(httpMethod); + conn.setDoInput(true); + conn.setDoOutput(true); + + conn.setRequestProperty(ConstantUtils.VALUE_ACCEPT, accept); + + if (Validator.isNotNull(username) && Validator.isNotNull(password)) { + String authString = username + StringPool.COLON + password; + + String authStringEnc = new String(Base64.getEncoder().encodeToString(authString.getBytes())); + + conn.setRequestProperty(ConstantUtils.VALUE_AUTHORIZATION, ConstantUtils.VALUE_BASIC + authStringEnc); + } + + if (!properties.isEmpty()) { + for (Map.Entry m : properties.entrySet()) { + conn.setRequestProperty(m.getKey().toString(), m.getValue().toString()); + } + } + + StringBuilder postData = new StringBuilder(); + + for (Map.Entry param : params.entrySet()) { + if (postData.length() != 0) + postData.append(StringPool.AMPERSAND.charAt(0)); + postData.append(java.net.URLEncoder.encode(param.getKey(), ConstantUtils.UTF_8)); + postData.append(StringPool.EQUAL.charAt(0)); + postData.append(java.net.URLEncoder.encode(String.valueOf(param.getValue()), ConstantUtils.UTF_8)); + } + + byte[] postDataBytes = postData.toString().getBytes(ConstantUtils.UTF_8); + + conn.setRequestProperty(ConstantUtils.CONTENT_LENGTH, String.valueOf(postDataBytes.length)); + + conn.getOutputStream().write(postDataBytes); + + br = new BufferedReader(new InputStreamReader((conn.getInputStream()))); + + String output; + + StringBuilder sb = new StringBuilder(); + + while ((output = br.readLine()) != null) { + sb.append(output); + } + + response = JSONFactoryUtil.createJSONObject(sb.toString()); + + conn.disconnect(); + + } catch (MalformedURLException e) { + _log.error("Can't invoke api " + urlPath); + } catch (IOException e) { + _log.error("Can't invoke api " + urlPath); + } catch (JSONException e) { + _log.error("Can't invoke api " + urlPath); + e.printStackTrace(); + } finally { + if (conn != null) { + conn.disconnect(); + } + if (br != null) { + try { + br.close(); + } catch (IOException e) { + _log.error(e); + } + } + + } + + return response; + } +} diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/ServiceConfigLocalServiceImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/ServiceConfigLocalServiceImpl.java index 633e1bd12e..4ea53893fa 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/ServiceConfigLocalServiceImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/impl/ServiceConfigLocalServiceImpl.java @@ -658,8 +658,8 @@ public List getByGovAgencyCode(String govAgencyCode) { return serviceConfigPersistence.findByF_GAC(govAgencyCode); } - public ServiceConfig fetchByGID_SI_GOV_LEVEL(long groupId, long serviceInfo, String govAgencyCode, int serviceLevel) { - return serviceConfigPersistence.fetchByGID_SI_GOV_LEVEL(groupId,serviceInfo,govAgencyCode,serviceLevel); + public List fetchByGID_SI_GOV_LEVEL(long groupId, long serviceInfo, String govAgencyCode) { + return serviceConfigPersistence.findByGID_SI_GOV_LEVEL(groupId,serviceInfo,govAgencyCode); } public List getByLevel(long groupId, int level) { diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/indexer/DossierIndexer.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/indexer/DossierIndexer.java index 8b2946f699..c09160d017 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/indexer/DossierIndexer.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/indexer/DossierIndexer.java @@ -546,13 +546,11 @@ protected Document doGetDocument(Dossier object) throws Exception { }else if(dossierAction2.getUserId() == dossierAction.getUserId() && dossierAction2.getNextActionId() == 0) { List lstdossierActionUser = DossierActionUserLocalServiceUtil.getByDID_DAID(dossierAction2.getDossierId(), dossierAction2.getDossierActionId()); - _log.debug("lstdossierActionUser :" + JSONFactoryUtil.looseSerialize(lstdossierActionUser)); if (lstdossierActionUser != null && lstdossierActionUser.size() > 0) { for (DossierActionUser doActionUser : lstdossierActionUser) { if (doActionUser.getUserId() != dossierAction2.getUserId() && doActionUser.getStepCode().contentEquals(dossierAction2.getStepCode())) { setUserId.add(String.valueOf(dossierAction2.getUserId())); - _log.debug("setUserId2 : " + setUserId); } } } @@ -560,7 +558,6 @@ protected Document doGetDocument(Dossier object) throws Exception { } } String userPeriodActionIds = String.join(" ", setUserId); - _log.info("userPeriodActionIds : " + userPeriodActionIds); document.addTextSortable(DossierTerm.USER_DOSSIER_ACTION_ID, userPeriodActionIds); } } else { diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/CsdlDcServiceInfoPersistenceImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/CsdlDcServiceInfoPersistenceImpl.java new file mode 100644 index 0000000000..9497ad763d --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/CsdlDcServiceInfoPersistenceImpl.java @@ -0,0 +1,2593 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service.persistence.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.EntityCache; +import com.liferay.portal.kernel.dao.orm.FinderCache; +import com.liferay.portal.kernel.dao.orm.FinderPath; +import com.liferay.portal.kernel.dao.orm.Query; +import com.liferay.portal.kernel.dao.orm.QueryPos; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.dao.orm.Session; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.service.persistence.CompanyProvider; +import com.liferay.portal.kernel.service.persistence.CompanyProviderWrapper; +import com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.SetUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.kernel.uuid.PortalUUIDUtil; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import org.opencps.dossiermgt.exception.NoSuchCsdlDcServiceInfoException; +import org.opencps.dossiermgt.model.CsdlDcServiceInfo; +import org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoImpl; +import org.opencps.dossiermgt.model.impl.CsdlDcServiceInfoModelImpl; +import org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoPersistence; + +import java.io.Serializable; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationHandler; + +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * The persistence implementation for the csdl dc service info service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author huymq + * @see CsdlDcServiceInfoPersistence + * @see org.opencps.dossiermgt.service.persistence.CsdlDcServiceInfoUtil + * @generated + */ +@ProviderType +public class CsdlDcServiceInfoPersistenceImpl extends BasePersistenceImpl + implements CsdlDcServiceInfoPersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link CsdlDcServiceInfoUtil} to access the csdl dc service info persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + public static final String FINDER_CLASS_NAME_ENTITY = CsdlDcServiceInfoImpl.class.getName(); + public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List1"; + public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List2"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoModelImpl.FINDER_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoModelImpl.FINDER_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID = new FinderPath(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoModelImpl.FINDER_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid", + new String[] { + String.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID = new FinderPath(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoModelImpl.FINDER_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid", + new String[] { String.class.getName() }, + CsdlDcServiceInfoModelImpl.UUID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid", + new String[] { String.class.getName() }); + + /** + * Returns all the csdl dc service infos where uuid = ?. + * + * @param uuid the uuid + * @return the matching csdl dc service infos + */ + @Override + public List findByUuid(String uuid) { + return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the csdl dc service infos where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @return the range of matching csdl dc service infos + */ + @Override + public List findByUuid(String uuid, int start, int end) { + return findByUuid(uuid, start, end, null); + } + + /** + * Returns an ordered range of all the csdl dc service infos where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching csdl dc service infos + */ + @Override + public List findByUuid(String uuid, int start, int end, + OrderByComparator orderByComparator) { + return findByUuid(uuid, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the csdl dc service infos where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching csdl dc service infos + */ + @Override + public List findByUuid(String uuid, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID; + finderArgs = new Object[] { uuid }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID; + finderArgs = new Object[] { uuid, start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (CsdlDcServiceInfo csdlDcServiceInfo : list) { + if (!Objects.equals(uuid, csdlDcServiceInfo.getUuid())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(3 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_CSDLDCSERVICEINFO_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(CsdlDcServiceInfoModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first csdl dc service info in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo findByUuid_First(String uuid, + OrderByComparator orderByComparator) + throws NoSuchCsdlDcServiceInfoException { + CsdlDcServiceInfo csdlDcServiceInfo = fetchByUuid_First(uuid, + orderByComparator); + + if (csdlDcServiceInfo != null) { + return csdlDcServiceInfo; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append("}"); + + throw new NoSuchCsdlDcServiceInfoException(msg.toString()); + } + + /** + * Returns the first csdl dc service info in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo fetchByUuid_First(String uuid, + OrderByComparator orderByComparator) { + List list = findByUuid(uuid, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last csdl dc service info in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo findByUuid_Last(String uuid, + OrderByComparator orderByComparator) + throws NoSuchCsdlDcServiceInfoException { + CsdlDcServiceInfo csdlDcServiceInfo = fetchByUuid_Last(uuid, + orderByComparator); + + if (csdlDcServiceInfo != null) { + return csdlDcServiceInfo; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append("}"); + + throw new NoSuchCsdlDcServiceInfoException(msg.toString()); + } + + /** + * Returns the last csdl dc service info in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo fetchByUuid_Last(String uuid, + OrderByComparator orderByComparator) { + int count = countByUuid(uuid); + + if (count == 0) { + return null; + } + + List list = findByUuid(uuid, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the csdl dc service infos before and after the current csdl dc service info in the ordered set where uuid = ?. + * + * @param idDcService the primary key of the current csdl dc service info + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a csdl dc service info with the primary key could not be found + */ + @Override + public CsdlDcServiceInfo[] findByUuid_PrevAndNext(long idDcService, + String uuid, OrderByComparator orderByComparator) + throws NoSuchCsdlDcServiceInfoException { + CsdlDcServiceInfo csdlDcServiceInfo = findByPrimaryKey(idDcService); + + Session session = null; + + try { + session = openSession(); + + CsdlDcServiceInfo[] array = new CsdlDcServiceInfoImpl[3]; + + array[0] = getByUuid_PrevAndNext(session, csdlDcServiceInfo, uuid, + orderByComparator, true); + + array[1] = csdlDcServiceInfo; + + array[2] = getByUuid_PrevAndNext(session, csdlDcServiceInfo, uuid, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected CsdlDcServiceInfo getByUuid_PrevAndNext(Session session, + CsdlDcServiceInfo csdlDcServiceInfo, String uuid, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_CSDLDCSERVICEINFO_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(CsdlDcServiceInfoModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(csdlDcServiceInfo); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the csdl dc service infos where uuid = ? from the database. + * + * @param uuid the uuid + */ + @Override + public void removeByUuid(String uuid) { + for (CsdlDcServiceInfo csdlDcServiceInfo : findByUuid(uuid, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(csdlDcServiceInfo); + } + } + + /** + * Returns the number of csdl dc service infos where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching csdl dc service infos + */ + @Override + public int countByUuid(String uuid) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID; + + Object[] finderArgs = new Object[] { uuid }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_CSDLDCSERVICEINFO_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_UUID_UUID_1 = "csdlDcServiceInfo.uuid IS NULL"; + private static final String _FINDER_COLUMN_UUID_UUID_2 = "csdlDcServiceInfo.uuid = ?"; + private static final String _FINDER_COLUMN_UUID_UUID_3 = "(csdlDcServiceInfo.uuid IS NULL OR csdlDcServiceInfo.uuid = '')"; + public static final FinderPath FINDER_PATH_FETCH_BY_UUID_G = new FinderPath(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoModelImpl.FINDER_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, FINDER_CLASS_NAME_ENTITY, + "fetchByUUID_G", + new String[] { String.class.getName(), Long.class.getName() }, + CsdlDcServiceInfoModelImpl.UUID_COLUMN_BITMASK | + CsdlDcServiceInfoModelImpl.GROUPID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_UUID_G = new FinderPath(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUUID_G", + new String[] { String.class.getName(), Long.class.getName() }); + + /** + * Returns the csdl dc service info where uuid = ? and groupId = ? or throws a {@link NoSuchCsdlDcServiceInfoException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo findByUUID_G(String uuid, long groupId) + throws NoSuchCsdlDcServiceInfoException { + CsdlDcServiceInfo csdlDcServiceInfo = fetchByUUID_G(uuid, groupId); + + if (csdlDcServiceInfo == null) { + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append(", groupId="); + msg.append(groupId); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchCsdlDcServiceInfoException(msg.toString()); + } + + return csdlDcServiceInfo; + } + + /** + * Returns the csdl dc service info where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo fetchByUUID_G(String uuid, long groupId) { + return fetchByUUID_G(uuid, groupId, true); + } + + /** + * Returns the csdl dc service info where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo fetchByUUID_G(String uuid, long groupId, + boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { uuid, groupId }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_UUID_G, + finderArgs, this); + } + + if (result instanceof CsdlDcServiceInfo) { + CsdlDcServiceInfo csdlDcServiceInfo = (CsdlDcServiceInfo)result; + + if (!Objects.equals(uuid, csdlDcServiceInfo.getUuid()) || + (groupId != csdlDcServiceInfo.getGroupId())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_SELECT_CSDLDCSERVICEINFO_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_G_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_G_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_G_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(groupId); + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, + finderArgs, list); + } + else { + CsdlDcServiceInfo csdlDcServiceInfo = list.get(0); + + result = csdlDcServiceInfo; + + cacheResult(csdlDcServiceInfo); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (CsdlDcServiceInfo)result; + } + } + + /** + * Removes the csdl dc service info where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the csdl dc service info that was removed + */ + @Override + public CsdlDcServiceInfo removeByUUID_G(String uuid, long groupId) + throws NoSuchCsdlDcServiceInfoException { + CsdlDcServiceInfo csdlDcServiceInfo = findByUUID_G(uuid, groupId); + + return remove(csdlDcServiceInfo); + } + + /** + * Returns the number of csdl dc service infos where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching csdl dc service infos + */ + @Override + public int countByUUID_G(String uuid, long groupId) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; + + Object[] finderArgs = new Object[] { uuid, groupId }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_CSDLDCSERVICEINFO_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_G_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_G_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_G_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(groupId); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_UUID_G_UUID_1 = "csdlDcServiceInfo.uuid IS NULL AND "; + private static final String _FINDER_COLUMN_UUID_G_UUID_2 = "csdlDcServiceInfo.uuid = ? AND "; + private static final String _FINDER_COLUMN_UUID_G_UUID_3 = "(csdlDcServiceInfo.uuid IS NULL OR csdlDcServiceInfo.uuid = '') AND "; + private static final String _FINDER_COLUMN_UUID_G_GROUPID_2 = "csdlDcServiceInfo.groupId = ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C = new FinderPath(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoModelImpl.FINDER_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid_C", + new String[] { + String.class.getName(), Long.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C = + new FinderPath(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoModelImpl.FINDER_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid_C", + new String[] { String.class.getName(), Long.class.getName() }, + CsdlDcServiceInfoModelImpl.UUID_COLUMN_BITMASK | + CsdlDcServiceInfoModelImpl.COMPANYID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_UUID_C = new FinderPath(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid_C", + new String[] { String.class.getName(), Long.class.getName() }); + + /** + * Returns all the csdl dc service infos where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the matching csdl dc service infos + */ + @Override + public List findByUuid_C(String uuid, long companyId) { + return findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the csdl dc service infos where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @return the range of matching csdl dc service infos + */ + @Override + public List findByUuid_C(String uuid, long companyId, + int start, int end) { + return findByUuid_C(uuid, companyId, start, end, null); + } + + /** + * Returns an ordered range of all the csdl dc service infos where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching csdl dc service infos + */ + @Override + public List findByUuid_C(String uuid, long companyId, + int start, int end, + OrderByComparator orderByComparator) { + return findByUuid_C(uuid, companyId, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the csdl dc service infos where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching csdl dc service infos + */ + @Override + public List findByUuid_C(String uuid, long companyId, + int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C; + finderArgs = new Object[] { uuid, companyId }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C; + finderArgs = new Object[] { + uuid, companyId, + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (CsdlDcServiceInfo csdlDcServiceInfo : list) { + if (!Objects.equals(uuid, csdlDcServiceInfo.getUuid()) || + (companyId != csdlDcServiceInfo.getCompanyId())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_CSDLDCSERVICEINFO_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_C_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_C_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_C_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(CsdlDcServiceInfoModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(companyId); + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo findByUuid_C_First(String uuid, long companyId, + OrderByComparator orderByComparator) + throws NoSuchCsdlDcServiceInfoException { + CsdlDcServiceInfo csdlDcServiceInfo = fetchByUuid_C_First(uuid, + companyId, orderByComparator); + + if (csdlDcServiceInfo != null) { + return csdlDcServiceInfo; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append(", companyId="); + msg.append(companyId); + + msg.append("}"); + + throw new NoSuchCsdlDcServiceInfoException(msg.toString()); + } + + /** + * Returns the first csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo fetchByUuid_C_First(String uuid, long companyId, + OrderByComparator orderByComparator) { + List list = findByUuid_C(uuid, companyId, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo findByUuid_C_Last(String uuid, long companyId, + OrderByComparator orderByComparator) + throws NoSuchCsdlDcServiceInfoException { + CsdlDcServiceInfo csdlDcServiceInfo = fetchByUuid_C_Last(uuid, + companyId, orderByComparator); + + if (csdlDcServiceInfo != null) { + return csdlDcServiceInfo; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append(", companyId="); + msg.append(companyId); + + msg.append("}"); + + throw new NoSuchCsdlDcServiceInfoException(msg.toString()); + } + + /** + * Returns the last csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo fetchByUuid_C_Last(String uuid, long companyId, + OrderByComparator orderByComparator) { + int count = countByUuid_C(uuid, companyId); + + if (count == 0) { + return null; + } + + List list = findByUuid_C(uuid, companyId, count - 1, + count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the csdl dc service infos before and after the current csdl dc service info in the ordered set where uuid = ? and companyId = ?. + * + * @param idDcService the primary key of the current csdl dc service info + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a csdl dc service info with the primary key could not be found + */ + @Override + public CsdlDcServiceInfo[] findByUuid_C_PrevAndNext(long idDcService, + String uuid, long companyId, + OrderByComparator orderByComparator) + throws NoSuchCsdlDcServiceInfoException { + CsdlDcServiceInfo csdlDcServiceInfo = findByPrimaryKey(idDcService); + + Session session = null; + + try { + session = openSession(); + + CsdlDcServiceInfo[] array = new CsdlDcServiceInfoImpl[3]; + + array[0] = getByUuid_C_PrevAndNext(session, csdlDcServiceInfo, + uuid, companyId, orderByComparator, true); + + array[1] = csdlDcServiceInfo; + + array[2] = getByUuid_C_PrevAndNext(session, csdlDcServiceInfo, + uuid, companyId, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected CsdlDcServiceInfo getByUuid_C_PrevAndNext(Session session, + CsdlDcServiceInfo csdlDcServiceInfo, String uuid, long companyId, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_CSDLDCSERVICEINFO_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_C_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_C_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_C_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(CsdlDcServiceInfoModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(companyId); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(csdlDcServiceInfo); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the csdl dc service infos where uuid = ? and companyId = ? from the database. + * + * @param uuid the uuid + * @param companyId the company ID + */ + @Override + public void removeByUuid_C(String uuid, long companyId) { + for (CsdlDcServiceInfo csdlDcServiceInfo : findByUuid_C(uuid, + companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(csdlDcServiceInfo); + } + } + + /** + * Returns the number of csdl dc service infos where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the number of matching csdl dc service infos + */ + @Override + public int countByUuid_C(String uuid, long companyId) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C; + + Object[] finderArgs = new Object[] { uuid, companyId }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_CSDLDCSERVICEINFO_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_C_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_C_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_C_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(companyId); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_UUID_C_UUID_1 = "csdlDcServiceInfo.uuid IS NULL AND "; + private static final String _FINDER_COLUMN_UUID_C_UUID_2 = "csdlDcServiceInfo.uuid = ? AND "; + private static final String _FINDER_COLUMN_UUID_C_UUID_3 = "(csdlDcServiceInfo.uuid IS NULL OR csdlDcServiceInfo.uuid = '') AND "; + private static final String _FINDER_COLUMN_UUID_C_COMPANYID_2 = "csdlDcServiceInfo.companyId = ?"; + public static final FinderPath FINDER_PATH_FETCH_BY_F_SERVICECODE_STATUS = new FinderPath(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoModelImpl.FINDER_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, FINDER_CLASS_NAME_ENTITY, + "fetchByF_SERVICECODE_STATUS", + new String[] { String.class.getName(), Integer.class.getName() }, + CsdlDcServiceInfoModelImpl.SERVICECODE_COLUMN_BITMASK | + CsdlDcServiceInfoModelImpl.STATUS_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_SERVICECODE_STATUS = new FinderPath(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByF_SERVICECODE_STATUS", + new String[] { String.class.getName(), Integer.class.getName() }); + + /** + * Returns the csdl dc service info where serviceCode = ? and status = ? or throws a {@link NoSuchCsdlDcServiceInfoException} if it could not be found. + * + * @param serviceCode the service code + * @param status the status + * @return the matching csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo findByF_SERVICECODE_STATUS(String serviceCode, + int status) throws NoSuchCsdlDcServiceInfoException { + CsdlDcServiceInfo csdlDcServiceInfo = fetchByF_SERVICECODE_STATUS(serviceCode, + status); + + if (csdlDcServiceInfo == null) { + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("serviceCode="); + msg.append(serviceCode); + + msg.append(", status="); + msg.append(status); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchCsdlDcServiceInfoException(msg.toString()); + } + + return csdlDcServiceInfo; + } + + /** + * Returns the csdl dc service info where serviceCode = ? and status = ? or returns null if it could not be found. Uses the finder cache. + * + * @param serviceCode the service code + * @param status the status + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo fetchByF_SERVICECODE_STATUS(String serviceCode, + int status) { + return fetchByF_SERVICECODE_STATUS(serviceCode, status, true); + } + + /** + * Returns the csdl dc service info where serviceCode = ? and status = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param serviceCode the service code + * @param status the status + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching csdl dc service info, or null if a matching csdl dc service info could not be found + */ + @Override + public CsdlDcServiceInfo fetchByF_SERVICECODE_STATUS(String serviceCode, + int status, boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { serviceCode, status }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_F_SERVICECODE_STATUS, + finderArgs, this); + } + + if (result instanceof CsdlDcServiceInfo) { + CsdlDcServiceInfo csdlDcServiceInfo = (CsdlDcServiceInfo)result; + + if (!Objects.equals(serviceCode, csdlDcServiceInfo.getServiceCode()) || + (status != csdlDcServiceInfo.getStatus())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_SELECT_CSDLDCSERVICEINFO_WHERE); + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_STATUS_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_SERVICECODE_STATUS_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_STATUS_SERVICECODE_2); + } + + query.append(_FINDER_COLUMN_F_SERVICECODE_STATUS_STATUS_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + qPos.add(status); + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_F_SERVICECODE_STATUS, + finderArgs, list); + } + else { + if (list.size() > 1) { + Collections.sort(list, Collections.reverseOrder()); + + if (_log.isWarnEnabled()) { + _log.warn( + "CsdlDcServiceInfoPersistenceImpl.fetchByF_SERVICECODE_STATUS(String, int, boolean) with parameters (" + + StringUtil.merge(finderArgs) + + ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); + } + } + + CsdlDcServiceInfo csdlDcServiceInfo = list.get(0); + + result = csdlDcServiceInfo; + + cacheResult(csdlDcServiceInfo); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_SERVICECODE_STATUS, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (CsdlDcServiceInfo)result; + } + } + + /** + * Removes the csdl dc service info where serviceCode = ? and status = ? from the database. + * + * @param serviceCode the service code + * @param status the status + * @return the csdl dc service info that was removed + */ + @Override + public CsdlDcServiceInfo removeByF_SERVICECODE_STATUS(String serviceCode, + int status) throws NoSuchCsdlDcServiceInfoException { + CsdlDcServiceInfo csdlDcServiceInfo = findByF_SERVICECODE_STATUS(serviceCode, + status); + + return remove(csdlDcServiceInfo); + } + + /** + * Returns the number of csdl dc service infos where serviceCode = ? and status = ?. + * + * @param serviceCode the service code + * @param status the status + * @return the number of matching csdl dc service infos + */ + @Override + public int countByF_SERVICECODE_STATUS(String serviceCode, int status) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_SERVICECODE_STATUS; + + Object[] finderArgs = new Object[] { serviceCode, status }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_CSDLDCSERVICEINFO_WHERE); + + boolean bindServiceCode = false; + + if (serviceCode == null) { + query.append(_FINDER_COLUMN_F_SERVICECODE_STATUS_SERVICECODE_1); + } + else if (serviceCode.equals("")) { + query.append(_FINDER_COLUMN_F_SERVICECODE_STATUS_SERVICECODE_3); + } + else { + bindServiceCode = true; + + query.append(_FINDER_COLUMN_F_SERVICECODE_STATUS_SERVICECODE_2); + } + + query.append(_FINDER_COLUMN_F_SERVICECODE_STATUS_STATUS_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindServiceCode) { + qPos.add(serviceCode); + } + + qPos.add(status); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_SERVICECODE_STATUS_SERVICECODE_1 = + "csdlDcServiceInfo.serviceCode IS NULL AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_STATUS_SERVICECODE_2 = + "csdlDcServiceInfo.serviceCode = ? AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_STATUS_SERVICECODE_3 = + "(csdlDcServiceInfo.serviceCode IS NULL OR csdlDcServiceInfo.serviceCode = '') AND "; + private static final String _FINDER_COLUMN_F_SERVICECODE_STATUS_STATUS_2 = "csdlDcServiceInfo.status = ?"; + + public CsdlDcServiceInfoPersistenceImpl() { + setModelClass(CsdlDcServiceInfo.class); + + try { + Field field = BasePersistenceImpl.class.getDeclaredField( + "_dbColumnNames"); + + field.setAccessible(true); + + Map dbColumnNames = new HashMap(); + + dbColumnNames.put("uuid", "uuid_"); + + field.set(this, dbColumnNames); + } + catch (Exception e) { + if (_log.isDebugEnabled()) { + _log.debug(e, e); + } + } + } + + /** + * Caches the csdl dc service info in the entity cache if it is enabled. + * + * @param csdlDcServiceInfo the csdl dc service info + */ + @Override + public void cacheResult(CsdlDcServiceInfo csdlDcServiceInfo) { + entityCache.putResult(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, csdlDcServiceInfo.getPrimaryKey(), + csdlDcServiceInfo); + + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, + new Object[] { + csdlDcServiceInfo.getUuid(), csdlDcServiceInfo.getGroupId() + }, csdlDcServiceInfo); + + finderCache.putResult(FINDER_PATH_FETCH_BY_F_SERVICECODE_STATUS, + new Object[] { + csdlDcServiceInfo.getServiceCode(), + csdlDcServiceInfo.getStatus() + }, csdlDcServiceInfo); + + csdlDcServiceInfo.resetOriginalValues(); + } + + /** + * Caches the csdl dc service infos in the entity cache if it is enabled. + * + * @param csdlDcServiceInfos the csdl dc service infos + */ + @Override + public void cacheResult(List csdlDcServiceInfos) { + for (CsdlDcServiceInfo csdlDcServiceInfo : csdlDcServiceInfos) { + if (entityCache.getResult( + CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, + csdlDcServiceInfo.getPrimaryKey()) == null) { + cacheResult(csdlDcServiceInfo); + } + else { + csdlDcServiceInfo.resetOriginalValues(); + } + } + } + + /** + * Clears the cache for all csdl dc service infos. + * + *

+ * The {@link EntityCache} and {@link FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache() { + entityCache.clearCache(CsdlDcServiceInfoImpl.class); + + finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + /** + * Clears the cache for the csdl dc service info. + * + *

+ * The {@link EntityCache} and {@link FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache(CsdlDcServiceInfo csdlDcServiceInfo) { + entityCache.removeResult(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, csdlDcServiceInfo.getPrimaryKey()); + + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + clearUniqueFindersCache((CsdlDcServiceInfoModelImpl)csdlDcServiceInfo, + true); + } + + @Override + public void clearCache(List csdlDcServiceInfos) { + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + for (CsdlDcServiceInfo csdlDcServiceInfo : csdlDcServiceInfos) { + entityCache.removeResult(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, csdlDcServiceInfo.getPrimaryKey()); + + clearUniqueFindersCache((CsdlDcServiceInfoModelImpl)csdlDcServiceInfo, + true); + } + } + + protected void cacheUniqueFindersCache( + CsdlDcServiceInfoModelImpl csdlDcServiceInfoModelImpl) { + Object[] args = new Object[] { + csdlDcServiceInfoModelImpl.getUuid(), + csdlDcServiceInfoModelImpl.getGroupId() + }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, + Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, + csdlDcServiceInfoModelImpl, false); + + args = new Object[] { + csdlDcServiceInfoModelImpl.getServiceCode(), + csdlDcServiceInfoModelImpl.getStatus() + }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_F_SERVICECODE_STATUS, args, + Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_F_SERVICECODE_STATUS, args, + csdlDcServiceInfoModelImpl, false); + } + + protected void clearUniqueFindersCache( + CsdlDcServiceInfoModelImpl csdlDcServiceInfoModelImpl, + boolean clearCurrent) { + if (clearCurrent) { + Object[] args = new Object[] { + csdlDcServiceInfoModelImpl.getUuid(), + csdlDcServiceInfoModelImpl.getGroupId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); + } + + if ((csdlDcServiceInfoModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + csdlDcServiceInfoModelImpl.getOriginalUuid(), + csdlDcServiceInfoModelImpl.getOriginalGroupId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); + } + + if (clearCurrent) { + Object[] args = new Object[] { + csdlDcServiceInfoModelImpl.getServiceCode(), + csdlDcServiceInfoModelImpl.getStatus() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_SERVICECODE_STATUS, + args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_SERVICECODE_STATUS, + args); + } + + if ((csdlDcServiceInfoModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_F_SERVICECODE_STATUS.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + csdlDcServiceInfoModelImpl.getOriginalServiceCode(), + csdlDcServiceInfoModelImpl.getOriginalStatus() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_SERVICECODE_STATUS, + args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_SERVICECODE_STATUS, + args); + } + } + + /** + * Creates a new csdl dc service info with the primary key. Does not add the csdl dc service info to the database. + * + * @param idDcService the primary key for the new csdl dc service info + * @return the new csdl dc service info + */ + @Override + public CsdlDcServiceInfo create(long idDcService) { + CsdlDcServiceInfo csdlDcServiceInfo = new CsdlDcServiceInfoImpl(); + + csdlDcServiceInfo.setNew(true); + csdlDcServiceInfo.setPrimaryKey(idDcService); + + String uuid = PortalUUIDUtil.generate(); + + csdlDcServiceInfo.setUuid(uuid); + + csdlDcServiceInfo.setCompanyId(companyProvider.getCompanyId()); + + return csdlDcServiceInfo; + } + + /** + * Removes the csdl dc service info with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info that was removed + * @throws NoSuchCsdlDcServiceInfoException if a csdl dc service info with the primary key could not be found + */ + @Override + public CsdlDcServiceInfo remove(long idDcService) + throws NoSuchCsdlDcServiceInfoException { + return remove((Serializable)idDcService); + } + + /** + * Removes the csdl dc service info with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param primaryKey the primary key of the csdl dc service info + * @return the csdl dc service info that was removed + * @throws NoSuchCsdlDcServiceInfoException if a csdl dc service info with the primary key could not be found + */ + @Override + public CsdlDcServiceInfo remove(Serializable primaryKey) + throws NoSuchCsdlDcServiceInfoException { + Session session = null; + + try { + session = openSession(); + + CsdlDcServiceInfo csdlDcServiceInfo = (CsdlDcServiceInfo)session.get(CsdlDcServiceInfoImpl.class, + primaryKey); + + if (csdlDcServiceInfo == null) { + if (_log.isDebugEnabled()) { + _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchCsdlDcServiceInfoException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return remove(csdlDcServiceInfo); + } + catch (NoSuchCsdlDcServiceInfoException nsee) { + throw nsee; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + @Override + protected CsdlDcServiceInfo removeImpl(CsdlDcServiceInfo csdlDcServiceInfo) { + Session session = null; + + try { + session = openSession(); + + if (!session.contains(csdlDcServiceInfo)) { + csdlDcServiceInfo = (CsdlDcServiceInfo)session.get(CsdlDcServiceInfoImpl.class, + csdlDcServiceInfo.getPrimaryKeyObj()); + } + + if (csdlDcServiceInfo != null) { + session.delete(csdlDcServiceInfo); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + if (csdlDcServiceInfo != null) { + clearCache(csdlDcServiceInfo); + } + + return csdlDcServiceInfo; + } + + @Override + public CsdlDcServiceInfo updateImpl(CsdlDcServiceInfo csdlDcServiceInfo) { + boolean isNew = csdlDcServiceInfo.isNew(); + + if (!(csdlDcServiceInfo instanceof CsdlDcServiceInfoModelImpl)) { + InvocationHandler invocationHandler = null; + + if (ProxyUtil.isProxyClass(csdlDcServiceInfo.getClass())) { + invocationHandler = ProxyUtil.getInvocationHandler(csdlDcServiceInfo); + + throw new IllegalArgumentException( + "Implement ModelWrapper in csdlDcServiceInfo proxy " + + invocationHandler.getClass()); + } + + throw new IllegalArgumentException( + "Implement ModelWrapper in custom CsdlDcServiceInfo implementation " + + csdlDcServiceInfo.getClass()); + } + + CsdlDcServiceInfoModelImpl csdlDcServiceInfoModelImpl = (CsdlDcServiceInfoModelImpl)csdlDcServiceInfo; + + if (Validator.isNull(csdlDcServiceInfo.getUuid())) { + String uuid = PortalUUIDUtil.generate(); + + csdlDcServiceInfo.setUuid(uuid); + } + + Session session = null; + + try { + session = openSession(); + + if (csdlDcServiceInfo.isNew()) { + session.save(csdlDcServiceInfo); + + csdlDcServiceInfo.setNew(false); + } + else { + csdlDcServiceInfo = (CsdlDcServiceInfo)session.merge(csdlDcServiceInfo); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + + if (!CsdlDcServiceInfoModelImpl.COLUMN_BITMASK_ENABLED) { + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + else + if (isNew) { + Object[] args = new Object[] { csdlDcServiceInfoModelImpl.getUuid() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + + args = new Object[] { + csdlDcServiceInfoModelImpl.getUuid(), + csdlDcServiceInfoModelImpl.getCompanyId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, + args); + + finderCache.removeResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL, + FINDER_ARGS_EMPTY); + } + + else { + if ((csdlDcServiceInfoModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + csdlDcServiceInfoModelImpl.getOriginalUuid() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + + args = new Object[] { csdlDcServiceInfoModelImpl.getUuid() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + } + + if ((csdlDcServiceInfoModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + csdlDcServiceInfoModelImpl.getOriginalUuid(), + csdlDcServiceInfoModelImpl.getOriginalCompanyId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, + args); + + args = new Object[] { + csdlDcServiceInfoModelImpl.getUuid(), + csdlDcServiceInfoModelImpl.getCompanyId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, + args); + } + } + + entityCache.putResult(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, csdlDcServiceInfo.getPrimaryKey(), + csdlDcServiceInfo, false); + + clearUniqueFindersCache(csdlDcServiceInfoModelImpl, false); + cacheUniqueFindersCache(csdlDcServiceInfoModelImpl); + + csdlDcServiceInfo.resetOriginalValues(); + + return csdlDcServiceInfo; + } + + /** + * Returns the csdl dc service info with the primary key or throws a {@link com.liferay.portal.kernel.exception.NoSuchModelException} if it could not be found. + * + * @param primaryKey the primary key of the csdl dc service info + * @return the csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a csdl dc service info with the primary key could not be found + */ + @Override + public CsdlDcServiceInfo findByPrimaryKey(Serializable primaryKey) + throws NoSuchCsdlDcServiceInfoException { + CsdlDcServiceInfo csdlDcServiceInfo = fetchByPrimaryKey(primaryKey); + + if (csdlDcServiceInfo == null) { + if (_log.isDebugEnabled()) { + _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchCsdlDcServiceInfoException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return csdlDcServiceInfo; + } + + /** + * Returns the csdl dc service info with the primary key or throws a {@link NoSuchCsdlDcServiceInfoException} if it could not be found. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info + * @throws NoSuchCsdlDcServiceInfoException if a csdl dc service info with the primary key could not be found + */ + @Override + public CsdlDcServiceInfo findByPrimaryKey(long idDcService) + throws NoSuchCsdlDcServiceInfoException { + return findByPrimaryKey((Serializable)idDcService); + } + + /** + * Returns the csdl dc service info with the primary key or returns null if it could not be found. + * + * @param primaryKey the primary key of the csdl dc service info + * @return the csdl dc service info, or null if a csdl dc service info with the primary key could not be found + */ + @Override + public CsdlDcServiceInfo fetchByPrimaryKey(Serializable primaryKey) { + Serializable serializable = entityCache.getResult(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, primaryKey); + + if (serializable == nullModel) { + return null; + } + + CsdlDcServiceInfo csdlDcServiceInfo = (CsdlDcServiceInfo)serializable; + + if (csdlDcServiceInfo == null) { + Session session = null; + + try { + session = openSession(); + + csdlDcServiceInfo = (CsdlDcServiceInfo)session.get(CsdlDcServiceInfoImpl.class, + primaryKey); + + if (csdlDcServiceInfo != null) { + cacheResult(csdlDcServiceInfo); + } + else { + entityCache.putResult(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, primaryKey, nullModel); + } + } + catch (Exception e) { + entityCache.removeResult(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, primaryKey); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return csdlDcServiceInfo; + } + + /** + * Returns the csdl dc service info with the primary key or returns null if it could not be found. + * + * @param idDcService the primary key of the csdl dc service info + * @return the csdl dc service info, or null if a csdl dc service info with the primary key could not be found + */ + @Override + public CsdlDcServiceInfo fetchByPrimaryKey(long idDcService) { + return fetchByPrimaryKey((Serializable)idDcService); + } + + @Override + public Map fetchByPrimaryKeys( + Set primaryKeys) { + if (primaryKeys.isEmpty()) { + return Collections.emptyMap(); + } + + Map map = new HashMap(); + + if (primaryKeys.size() == 1) { + Iterator iterator = primaryKeys.iterator(); + + Serializable primaryKey = iterator.next(); + + CsdlDcServiceInfo csdlDcServiceInfo = fetchByPrimaryKey(primaryKey); + + if (csdlDcServiceInfo != null) { + map.put(primaryKey, csdlDcServiceInfo); + } + + return map; + } + + Set uncachedPrimaryKeys = null; + + for (Serializable primaryKey : primaryKeys) { + Serializable serializable = entityCache.getResult(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, primaryKey); + + if (serializable != nullModel) { + if (serializable == null) { + if (uncachedPrimaryKeys == null) { + uncachedPrimaryKeys = new HashSet(); + } + + uncachedPrimaryKeys.add(primaryKey); + } + else { + map.put(primaryKey, (CsdlDcServiceInfo)serializable); + } + } + } + + if (uncachedPrimaryKeys == null) { + return map; + } + + StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) + + 1); + + query.append(_SQL_SELECT_CSDLDCSERVICEINFO_WHERE_PKS_IN); + + for (Serializable primaryKey : uncachedPrimaryKeys) { + query.append((long)primaryKey); + + query.append(","); + } + + query.setIndex(query.index() - 1); + + query.append(")"); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + for (CsdlDcServiceInfo csdlDcServiceInfo : (List)q.list()) { + map.put(csdlDcServiceInfo.getPrimaryKeyObj(), csdlDcServiceInfo); + + cacheResult(csdlDcServiceInfo); + + uncachedPrimaryKeys.remove(csdlDcServiceInfo.getPrimaryKeyObj()); + } + + for (Serializable primaryKey : uncachedPrimaryKeys) { + entityCache.putResult(CsdlDcServiceInfoModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcServiceInfoImpl.class, primaryKey, nullModel); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + return map; + } + + /** + * Returns all the csdl dc service infos. + * + * @return the csdl dc service infos + */ + @Override + public List findAll() { + return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the csdl dc service infos. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @return the range of csdl dc service infos + */ + @Override + public List findAll(int start, int end) { + return findAll(start, end, null); + } + + /** + * Returns an ordered range of all the csdl dc service infos. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of csdl dc service infos + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator) { + return findAll(start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the csdl dc service infos. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcServiceInfoModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc service infos + * @param end the upper bound of the range of csdl dc service infos (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of csdl dc service infos + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL; + finderArgs = FINDER_ARGS_EMPTY; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL; + finderArgs = new Object[] { start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + } + + if (list == null) { + StringBundler query = null; + String sql = null; + + if (orderByComparator != null) { + query = new StringBundler(2 + + (orderByComparator.getOrderByFields().length * 2)); + + query.append(_SQL_SELECT_CSDLDCSERVICEINFO); + + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + + sql = query.toString(); + } + else { + sql = _SQL_SELECT_CSDLDCSERVICEINFO; + + if (pagination) { + sql = sql.concat(CsdlDcServiceInfoModelImpl.ORDER_BY_JPQL); + } + } + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Removes all the csdl dc service infos from the database. + * + */ + @Override + public void removeAll() { + for (CsdlDcServiceInfo csdlDcServiceInfo : findAll()) { + remove(csdlDcServiceInfo); + } + } + + /** + * Returns the number of csdl dc service infos. + * + * @return the number of csdl dc service infos + */ + @Override + public int countAll() { + Long count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, this); + + if (count == null) { + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(_SQL_COUNT_CSDLDCSERVICEINFO); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY, + count); + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + @Override + public Set getBadColumnNames() { + return _badColumnNames; + } + + @Override + protected Map getTableColumnsMap() { + return CsdlDcServiceInfoModelImpl.TABLE_COLUMNS_MAP; + } + + /** + * Initializes the csdl dc service info persistence. + */ + public void afterPropertiesSet() { + } + + public void destroy() { + entityCache.removeCache(CsdlDcServiceInfoImpl.class.getName()); + finderCache.removeCache(FINDER_CLASS_NAME_ENTITY); + finderCache.removeCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + @ServiceReference(type = CompanyProviderWrapper.class) + protected CompanyProvider companyProvider; + @ServiceReference(type = EntityCache.class) + protected EntityCache entityCache; + @ServiceReference(type = FinderCache.class) + protected FinderCache finderCache; + private static final String _SQL_SELECT_CSDLDCSERVICEINFO = "SELECT csdlDcServiceInfo FROM CsdlDcServiceInfo csdlDcServiceInfo"; + private static final String _SQL_SELECT_CSDLDCSERVICEINFO_WHERE_PKS_IN = "SELECT csdlDcServiceInfo FROM CsdlDcServiceInfo csdlDcServiceInfo WHERE idDcService IN ("; + private static final String _SQL_SELECT_CSDLDCSERVICEINFO_WHERE = "SELECT csdlDcServiceInfo FROM CsdlDcServiceInfo csdlDcServiceInfo WHERE "; + private static final String _SQL_COUNT_CSDLDCSERVICEINFO = "SELECT COUNT(csdlDcServiceInfo) FROM CsdlDcServiceInfo csdlDcServiceInfo"; + private static final String _SQL_COUNT_CSDLDCSERVICEINFO_WHERE = "SELECT COUNT(csdlDcServiceInfo) FROM CsdlDcServiceInfo csdlDcServiceInfo WHERE "; + private static final String _ORDER_BY_ENTITY_ALIAS = "csdlDcServiceInfo."; + private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No CsdlDcServiceInfo exists with the primary key "; + private static final String _NO_SUCH_ENTITY_WITH_KEY = "No CsdlDcServiceInfo exists with the key {"; + private static final Log _log = LogFactoryUtil.getLog(CsdlDcServiceInfoPersistenceImpl.class); + private static final Set _badColumnNames = SetUtil.fromArray(new String[] { + "uuid" + }); +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/CsdlDcUserPersistenceImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/CsdlDcUserPersistenceImpl.java new file mode 100644 index 0000000000..5db967da77 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/CsdlDcUserPersistenceImpl.java @@ -0,0 +1,2634 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service.persistence.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.EntityCache; +import com.liferay.portal.kernel.dao.orm.FinderCache; +import com.liferay.portal.kernel.dao.orm.FinderPath; +import com.liferay.portal.kernel.dao.orm.Query; +import com.liferay.portal.kernel.dao.orm.QueryPos; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.dao.orm.Session; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.service.persistence.CompanyProvider; +import com.liferay.portal.kernel.service.persistence.CompanyProviderWrapper; +import com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.SetUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.kernel.uuid.PortalUUIDUtil; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import org.opencps.dossiermgt.exception.NoSuchCsdlDcUserException; +import org.opencps.dossiermgt.model.CsdlDcUser; +import org.opencps.dossiermgt.model.impl.CsdlDcUserImpl; +import org.opencps.dossiermgt.model.impl.CsdlDcUserModelImpl; +import org.opencps.dossiermgt.service.persistence.CsdlDcUserPersistence; + +import java.io.Serializable; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationHandler; + +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * The persistence implementation for the csdl dc user service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author huymq + * @see CsdlDcUserPersistence + * @see org.opencps.dossiermgt.service.persistence.CsdlDcUserUtil + * @generated + */ +@ProviderType +public class CsdlDcUserPersistenceImpl extends BasePersistenceImpl + implements CsdlDcUserPersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link CsdlDcUserUtil} to access the csdl dc user persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + public static final String FINDER_CLASS_NAME_ENTITY = CsdlDcUserImpl.class.getName(); + public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List1"; + public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List2"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserModelImpl.FINDER_CACHE_ENABLED, CsdlDcUserImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserModelImpl.FINDER_CACHE_ENABLED, CsdlDcUserImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID = new FinderPath(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserModelImpl.FINDER_CACHE_ENABLED, CsdlDcUserImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid", + new String[] { + String.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID = new FinderPath(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserModelImpl.FINDER_CACHE_ENABLED, CsdlDcUserImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid", + new String[] { String.class.getName() }, + CsdlDcUserModelImpl.UUID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid", + new String[] { String.class.getName() }); + + /** + * Returns all the csdl dc users where uuid = ?. + * + * @param uuid the uuid + * @return the matching csdl dc users + */ + @Override + public List findByUuid(String uuid) { + return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the csdl dc users where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @return the range of matching csdl dc users + */ + @Override + public List findByUuid(String uuid, int start, int end) { + return findByUuid(uuid, start, end, null); + } + + /** + * Returns an ordered range of all the csdl dc users where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching csdl dc users + */ + @Override + public List findByUuid(String uuid, int start, int end, + OrderByComparator orderByComparator) { + return findByUuid(uuid, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the csdl dc users where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching csdl dc users + */ + @Override + public List findByUuid(String uuid, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID; + finderArgs = new Object[] { uuid }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID; + finderArgs = new Object[] { uuid, start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (CsdlDcUser csdlDcUser : list) { + if (!Objects.equals(uuid, csdlDcUser.getUuid())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(3 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_CSDLDCUSER_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(CsdlDcUserModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first csdl dc user in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser findByUuid_First(String uuid, + OrderByComparator orderByComparator) + throws NoSuchCsdlDcUserException { + CsdlDcUser csdlDcUser = fetchByUuid_First(uuid, orderByComparator); + + if (csdlDcUser != null) { + return csdlDcUser; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append("}"); + + throw new NoSuchCsdlDcUserException(msg.toString()); + } + + /** + * Returns the first csdl dc user in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc user, or null if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser fetchByUuid_First(String uuid, + OrderByComparator orderByComparator) { + List list = findByUuid(uuid, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last csdl dc user in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser findByUuid_Last(String uuid, + OrderByComparator orderByComparator) + throws NoSuchCsdlDcUserException { + CsdlDcUser csdlDcUser = fetchByUuid_Last(uuid, orderByComparator); + + if (csdlDcUser != null) { + return csdlDcUser; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append("}"); + + throw new NoSuchCsdlDcUserException(msg.toString()); + } + + /** + * Returns the last csdl dc user in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc user, or null if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser fetchByUuid_Last(String uuid, + OrderByComparator orderByComparator) { + int count = countByUuid(uuid); + + if (count == 0) { + return null; + } + + List list = findByUuid(uuid, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the csdl dc users before and after the current csdl dc user in the ordered set where uuid = ?. + * + * @param idDcUser the primary key of the current csdl dc user + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next csdl dc user + * @throws NoSuchCsdlDcUserException if a csdl dc user with the primary key could not be found + */ + @Override + public CsdlDcUser[] findByUuid_PrevAndNext(long idDcUser, String uuid, + OrderByComparator orderByComparator) + throws NoSuchCsdlDcUserException { + CsdlDcUser csdlDcUser = findByPrimaryKey(idDcUser); + + Session session = null; + + try { + session = openSession(); + + CsdlDcUser[] array = new CsdlDcUserImpl[3]; + + array[0] = getByUuid_PrevAndNext(session, csdlDcUser, uuid, + orderByComparator, true); + + array[1] = csdlDcUser; + + array[2] = getByUuid_PrevAndNext(session, csdlDcUser, uuid, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected CsdlDcUser getByUuid_PrevAndNext(Session session, + CsdlDcUser csdlDcUser, String uuid, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_CSDLDCUSER_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(CsdlDcUserModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(csdlDcUser); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the csdl dc users where uuid = ? from the database. + * + * @param uuid the uuid + */ + @Override + public void removeByUuid(String uuid) { + for (CsdlDcUser csdlDcUser : findByUuid(uuid, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(csdlDcUser); + } + } + + /** + * Returns the number of csdl dc users where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching csdl dc users + */ + @Override + public int countByUuid(String uuid) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID; + + Object[] finderArgs = new Object[] { uuid }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_CSDLDCUSER_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_UUID_UUID_1 = "csdlDcUser.uuid IS NULL"; + private static final String _FINDER_COLUMN_UUID_UUID_2 = "csdlDcUser.uuid = ?"; + private static final String _FINDER_COLUMN_UUID_UUID_3 = "(csdlDcUser.uuid IS NULL OR csdlDcUser.uuid = '')"; + public static final FinderPath FINDER_PATH_FETCH_BY_UUID_G = new FinderPath(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserModelImpl.FINDER_CACHE_ENABLED, CsdlDcUserImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByUUID_G", + new String[] { String.class.getName(), Long.class.getName() }, + CsdlDcUserModelImpl.UUID_COLUMN_BITMASK | + CsdlDcUserModelImpl.GROUPID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_UUID_G = new FinderPath(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUUID_G", + new String[] { String.class.getName(), Long.class.getName() }); + + /** + * Returns the csdl dc user where uuid = ? and groupId = ? or throws a {@link NoSuchCsdlDcUserException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser findByUUID_G(String uuid, long groupId) + throws NoSuchCsdlDcUserException { + CsdlDcUser csdlDcUser = fetchByUUID_G(uuid, groupId); + + if (csdlDcUser == null) { + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append(", groupId="); + msg.append(groupId); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchCsdlDcUserException(msg.toString()); + } + + return csdlDcUser; + } + + /** + * Returns the csdl dc user where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser fetchByUUID_G(String uuid, long groupId) { + return fetchByUUID_G(uuid, groupId, true); + } + + /** + * Returns the csdl dc user where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser fetchByUUID_G(String uuid, long groupId, + boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { uuid, groupId }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_UUID_G, + finderArgs, this); + } + + if (result instanceof CsdlDcUser) { + CsdlDcUser csdlDcUser = (CsdlDcUser)result; + + if (!Objects.equals(uuid, csdlDcUser.getUuid()) || + (groupId != csdlDcUser.getGroupId())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_SELECT_CSDLDCUSER_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_G_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_G_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_G_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(groupId); + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, + finderArgs, list); + } + else { + CsdlDcUser csdlDcUser = list.get(0); + + result = csdlDcUser; + + cacheResult(csdlDcUser); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (CsdlDcUser)result; + } + } + + /** + * Removes the csdl dc user where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the csdl dc user that was removed + */ + @Override + public CsdlDcUser removeByUUID_G(String uuid, long groupId) + throws NoSuchCsdlDcUserException { + CsdlDcUser csdlDcUser = findByUUID_G(uuid, groupId); + + return remove(csdlDcUser); + } + + /** + * Returns the number of csdl dc users where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching csdl dc users + */ + @Override + public int countByUUID_G(String uuid, long groupId) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; + + Object[] finderArgs = new Object[] { uuid, groupId }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_CSDLDCUSER_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_G_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_G_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_G_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(groupId); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_UUID_G_UUID_1 = "csdlDcUser.uuid IS NULL AND "; + private static final String _FINDER_COLUMN_UUID_G_UUID_2 = "csdlDcUser.uuid = ? AND "; + private static final String _FINDER_COLUMN_UUID_G_UUID_3 = "(csdlDcUser.uuid IS NULL OR csdlDcUser.uuid = '') AND "; + private static final String _FINDER_COLUMN_UUID_G_GROUPID_2 = "csdlDcUser.groupId = ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C = new FinderPath(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserModelImpl.FINDER_CACHE_ENABLED, CsdlDcUserImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid_C", + new String[] { + String.class.getName(), Long.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C = + new FinderPath(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserModelImpl.FINDER_CACHE_ENABLED, CsdlDcUserImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid_C", + new String[] { String.class.getName(), Long.class.getName() }, + CsdlDcUserModelImpl.UUID_COLUMN_BITMASK | + CsdlDcUserModelImpl.COMPANYID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_UUID_C = new FinderPath(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid_C", + new String[] { String.class.getName(), Long.class.getName() }); + + /** + * Returns all the csdl dc users where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the matching csdl dc users + */ + @Override + public List findByUuid_C(String uuid, long companyId) { + return findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the csdl dc users where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @return the range of matching csdl dc users + */ + @Override + public List findByUuid_C(String uuid, long companyId, + int start, int end) { + return findByUuid_C(uuid, companyId, start, end, null); + } + + /** + * Returns an ordered range of all the csdl dc users where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching csdl dc users + */ + @Override + public List findByUuid_C(String uuid, long companyId, + int start, int end, OrderByComparator orderByComparator) { + return findByUuid_C(uuid, companyId, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the csdl dc users where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching csdl dc users + */ + @Override + public List findByUuid_C(String uuid, long companyId, + int start, int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C; + finderArgs = new Object[] { uuid, companyId }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C; + finderArgs = new Object[] { + uuid, companyId, + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (CsdlDcUser csdlDcUser : list) { + if (!Objects.equals(uuid, csdlDcUser.getUuid()) || + (companyId != csdlDcUser.getCompanyId())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_CSDLDCUSER_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_C_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_C_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_C_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(CsdlDcUserModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(companyId); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser findByUuid_C_First(String uuid, long companyId, + OrderByComparator orderByComparator) + throws NoSuchCsdlDcUserException { + CsdlDcUser csdlDcUser = fetchByUuid_C_First(uuid, companyId, + orderByComparator); + + if (csdlDcUser != null) { + return csdlDcUser; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append(", companyId="); + msg.append(companyId); + + msg.append("}"); + + throw new NoSuchCsdlDcUserException(msg.toString()); + } + + /** + * Returns the first csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching csdl dc user, or null if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser fetchByUuid_C_First(String uuid, long companyId, + OrderByComparator orderByComparator) { + List list = findByUuid_C(uuid, companyId, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser findByUuid_C_Last(String uuid, long companyId, + OrderByComparator orderByComparator) + throws NoSuchCsdlDcUserException { + CsdlDcUser csdlDcUser = fetchByUuid_C_Last(uuid, companyId, + orderByComparator); + + if (csdlDcUser != null) { + return csdlDcUser; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append(", companyId="); + msg.append(companyId); + + msg.append("}"); + + throw new NoSuchCsdlDcUserException(msg.toString()); + } + + /** + * Returns the last csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching csdl dc user, or null if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser fetchByUuid_C_Last(String uuid, long companyId, + OrderByComparator orderByComparator) { + int count = countByUuid_C(uuid, companyId); + + if (count == 0) { + return null; + } + + List list = findByUuid_C(uuid, companyId, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the csdl dc users before and after the current csdl dc user in the ordered set where uuid = ? and companyId = ?. + * + * @param idDcUser the primary key of the current csdl dc user + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next csdl dc user + * @throws NoSuchCsdlDcUserException if a csdl dc user with the primary key could not be found + */ + @Override + public CsdlDcUser[] findByUuid_C_PrevAndNext(long idDcUser, String uuid, + long companyId, OrderByComparator orderByComparator) + throws NoSuchCsdlDcUserException { + CsdlDcUser csdlDcUser = findByPrimaryKey(idDcUser); + + Session session = null; + + try { + session = openSession(); + + CsdlDcUser[] array = new CsdlDcUserImpl[3]; + + array[0] = getByUuid_C_PrevAndNext(session, csdlDcUser, uuid, + companyId, orderByComparator, true); + + array[1] = csdlDcUser; + + array[2] = getByUuid_C_PrevAndNext(session, csdlDcUser, uuid, + companyId, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected CsdlDcUser getByUuid_C_PrevAndNext(Session session, + CsdlDcUser csdlDcUser, String uuid, long companyId, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_CSDLDCUSER_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_C_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_C_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_C_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(CsdlDcUserModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(companyId); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(csdlDcUser); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the csdl dc users where uuid = ? and companyId = ? from the database. + * + * @param uuid the uuid + * @param companyId the company ID + */ + @Override + public void removeByUuid_C(String uuid, long companyId) { + for (CsdlDcUser csdlDcUser : findByUuid_C(uuid, companyId, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(csdlDcUser); + } + } + + /** + * Returns the number of csdl dc users where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the number of matching csdl dc users + */ + @Override + public int countByUuid_C(String uuid, long companyId) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C; + + Object[] finderArgs = new Object[] { uuid, companyId }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_CSDLDCUSER_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_C_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_C_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_C_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(companyId); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_UUID_C_UUID_1 = "csdlDcUser.uuid IS NULL AND "; + private static final String _FINDER_COLUMN_UUID_C_UUID_2 = "csdlDcUser.uuid = ? AND "; + private static final String _FINDER_COLUMN_UUID_C_UUID_3 = "(csdlDcUser.uuid IS NULL OR csdlDcUser.uuid = '') AND "; + private static final String _FINDER_COLUMN_UUID_C_COMPANYID_2 = "csdlDcUser.companyId = ?"; + public static final FinderPath FINDER_PATH_FETCH_BY_F_GOV_EMAIL_STATUS = new FinderPath(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserModelImpl.FINDER_CACHE_ENABLED, CsdlDcUserImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByF_GOV_EMAIL_STATUS", + new String[] { + String.class.getName(), String.class.getName(), + Integer.class.getName() + }, + CsdlDcUserModelImpl.GOVAGENCYCODE_COLUMN_BITMASK | + CsdlDcUserModelImpl.EMPLOYEEEMAIL_COLUMN_BITMASK | + CsdlDcUserModelImpl.STATUS_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_GOV_EMAIL_STATUS = new FinderPath(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByF_GOV_EMAIL_STATUS", + new String[] { + String.class.getName(), String.class.getName(), + Integer.class.getName() + }); + + /** + * Returns the csdl dc user where govAgencyCode = ? and employeeEmail = ? and status = ? or throws a {@link NoSuchCsdlDcUserException} if it could not be found. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @return the matching csdl dc user + * @throws NoSuchCsdlDcUserException if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser findByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status) throws NoSuchCsdlDcUserException { + CsdlDcUser csdlDcUser = fetchByF_GOV_EMAIL_STATUS(govAgencyCode, + employeeEmail, status); + + if (csdlDcUser == null) { + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("govAgencyCode="); + msg.append(govAgencyCode); + + msg.append(", employeeEmail="); + msg.append(employeeEmail); + + msg.append(", status="); + msg.append(status); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchCsdlDcUserException(msg.toString()); + } + + return csdlDcUser; + } + + /** + * Returns the csdl dc user where govAgencyCode = ? and employeeEmail = ? and status = ? or returns null if it could not be found. Uses the finder cache. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser fetchByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status) { + return fetchByF_GOV_EMAIL_STATUS(govAgencyCode, employeeEmail, status, + true); + } + + /** + * Returns the csdl dc user where govAgencyCode = ? and employeeEmail = ? and status = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching csdl dc user, or null if a matching csdl dc user could not be found + */ + @Override + public CsdlDcUser fetchByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status, boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { govAgencyCode, employeeEmail, status }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_F_GOV_EMAIL_STATUS, + finderArgs, this); + } + + if (result instanceof CsdlDcUser) { + CsdlDcUser csdlDcUser = (CsdlDcUser)result; + + if (!Objects.equals(govAgencyCode, csdlDcUser.getGovAgencyCode()) || + !Objects.equals(employeeEmail, csdlDcUser.getEmployeeEmail()) || + (status != csdlDcUser.getStatus())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(5); + + query.append(_SQL_SELECT_CSDLDCUSER_WHERE); + + boolean bindGovAgencyCode = false; + + if (govAgencyCode == null) { + query.append(_FINDER_COLUMN_F_GOV_EMAIL_STATUS_GOVAGENCYCODE_1); + } + else if (govAgencyCode.equals("")) { + query.append(_FINDER_COLUMN_F_GOV_EMAIL_STATUS_GOVAGENCYCODE_3); + } + else { + bindGovAgencyCode = true; + + query.append(_FINDER_COLUMN_F_GOV_EMAIL_STATUS_GOVAGENCYCODE_2); + } + + boolean bindEmployeeEmail = false; + + if (employeeEmail == null) { + query.append(_FINDER_COLUMN_F_GOV_EMAIL_STATUS_EMPLOYEEEMAIL_1); + } + else if (employeeEmail.equals("")) { + query.append(_FINDER_COLUMN_F_GOV_EMAIL_STATUS_EMPLOYEEEMAIL_3); + } + else { + bindEmployeeEmail = true; + + query.append(_FINDER_COLUMN_F_GOV_EMAIL_STATUS_EMPLOYEEEMAIL_2); + } + + query.append(_FINDER_COLUMN_F_GOV_EMAIL_STATUS_STATUS_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindGovAgencyCode) { + qPos.add(govAgencyCode); + } + + if (bindEmployeeEmail) { + qPos.add(employeeEmail); + } + + qPos.add(status); + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_F_GOV_EMAIL_STATUS, + finderArgs, list); + } + else { + if (list.size() > 1) { + Collections.sort(list, Collections.reverseOrder()); + + if (_log.isWarnEnabled()) { + _log.warn( + "CsdlDcUserPersistenceImpl.fetchByF_GOV_EMAIL_STATUS(String, String, int, boolean) with parameters (" + + StringUtil.merge(finderArgs) + + ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); + } + } + + CsdlDcUser csdlDcUser = list.get(0); + + result = csdlDcUser; + + cacheResult(csdlDcUser); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_GOV_EMAIL_STATUS, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (CsdlDcUser)result; + } + } + + /** + * Removes the csdl dc user where govAgencyCode = ? and employeeEmail = ? and status = ? from the database. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @return the csdl dc user that was removed + */ + @Override + public CsdlDcUser removeByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status) throws NoSuchCsdlDcUserException { + CsdlDcUser csdlDcUser = findByF_GOV_EMAIL_STATUS(govAgencyCode, + employeeEmail, status); + + return remove(csdlDcUser); + } + + /** + * Returns the number of csdl dc users where govAgencyCode = ? and employeeEmail = ? and status = ?. + * + * @param govAgencyCode the gov agency code + * @param employeeEmail the employee email + * @param status the status + * @return the number of matching csdl dc users + */ + @Override + public int countByF_GOV_EMAIL_STATUS(String govAgencyCode, + String employeeEmail, int status) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_GOV_EMAIL_STATUS; + + Object[] finderArgs = new Object[] { govAgencyCode, employeeEmail, status }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_COUNT_CSDLDCUSER_WHERE); + + boolean bindGovAgencyCode = false; + + if (govAgencyCode == null) { + query.append(_FINDER_COLUMN_F_GOV_EMAIL_STATUS_GOVAGENCYCODE_1); + } + else if (govAgencyCode.equals("")) { + query.append(_FINDER_COLUMN_F_GOV_EMAIL_STATUS_GOVAGENCYCODE_3); + } + else { + bindGovAgencyCode = true; + + query.append(_FINDER_COLUMN_F_GOV_EMAIL_STATUS_GOVAGENCYCODE_2); + } + + boolean bindEmployeeEmail = false; + + if (employeeEmail == null) { + query.append(_FINDER_COLUMN_F_GOV_EMAIL_STATUS_EMPLOYEEEMAIL_1); + } + else if (employeeEmail.equals("")) { + query.append(_FINDER_COLUMN_F_GOV_EMAIL_STATUS_EMPLOYEEEMAIL_3); + } + else { + bindEmployeeEmail = true; + + query.append(_FINDER_COLUMN_F_GOV_EMAIL_STATUS_EMPLOYEEEMAIL_2); + } + + query.append(_FINDER_COLUMN_F_GOV_EMAIL_STATUS_STATUS_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindGovAgencyCode) { + qPos.add(govAgencyCode); + } + + if (bindEmployeeEmail) { + qPos.add(employeeEmail); + } + + qPos.add(status); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_GOV_EMAIL_STATUS_GOVAGENCYCODE_1 = + "csdlDcUser.govAgencyCode IS NULL AND "; + private static final String _FINDER_COLUMN_F_GOV_EMAIL_STATUS_GOVAGENCYCODE_2 = + "csdlDcUser.govAgencyCode = ? AND "; + private static final String _FINDER_COLUMN_F_GOV_EMAIL_STATUS_GOVAGENCYCODE_3 = + "(csdlDcUser.govAgencyCode IS NULL OR csdlDcUser.govAgencyCode = '') AND "; + private static final String _FINDER_COLUMN_F_GOV_EMAIL_STATUS_EMPLOYEEEMAIL_1 = + "csdlDcUser.employeeEmail IS NULL AND "; + private static final String _FINDER_COLUMN_F_GOV_EMAIL_STATUS_EMPLOYEEEMAIL_2 = + "csdlDcUser.employeeEmail = ? AND "; + private static final String _FINDER_COLUMN_F_GOV_EMAIL_STATUS_EMPLOYEEEMAIL_3 = + "(csdlDcUser.employeeEmail IS NULL OR csdlDcUser.employeeEmail = '') AND "; + private static final String _FINDER_COLUMN_F_GOV_EMAIL_STATUS_STATUS_2 = "csdlDcUser.status = ?"; + + public CsdlDcUserPersistenceImpl() { + setModelClass(CsdlDcUser.class); + + try { + Field field = BasePersistenceImpl.class.getDeclaredField( + "_dbColumnNames"); + + field.setAccessible(true); + + Map dbColumnNames = new HashMap(); + + dbColumnNames.put("uuid", "uuid_"); + + field.set(this, dbColumnNames); + } + catch (Exception e) { + if (_log.isDebugEnabled()) { + _log.debug(e, e); + } + } + } + + /** + * Caches the csdl dc user in the entity cache if it is enabled. + * + * @param csdlDcUser the csdl dc user + */ + @Override + public void cacheResult(CsdlDcUser csdlDcUser) { + entityCache.putResult(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserImpl.class, csdlDcUser.getPrimaryKey(), csdlDcUser); + + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, + new Object[] { csdlDcUser.getUuid(), csdlDcUser.getGroupId() }, + csdlDcUser); + + finderCache.putResult(FINDER_PATH_FETCH_BY_F_GOV_EMAIL_STATUS, + new Object[] { + csdlDcUser.getGovAgencyCode(), csdlDcUser.getEmployeeEmail(), + csdlDcUser.getStatus() + }, csdlDcUser); + + csdlDcUser.resetOriginalValues(); + } + + /** + * Caches the csdl dc users in the entity cache if it is enabled. + * + * @param csdlDcUsers the csdl dc users + */ + @Override + public void cacheResult(List csdlDcUsers) { + for (CsdlDcUser csdlDcUser : csdlDcUsers) { + if (entityCache.getResult( + CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserImpl.class, csdlDcUser.getPrimaryKey()) == null) { + cacheResult(csdlDcUser); + } + else { + csdlDcUser.resetOriginalValues(); + } + } + } + + /** + * Clears the cache for all csdl dc users. + * + *

+ * The {@link EntityCache} and {@link FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache() { + entityCache.clearCache(CsdlDcUserImpl.class); + + finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + /** + * Clears the cache for the csdl dc user. + * + *

+ * The {@link EntityCache} and {@link FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache(CsdlDcUser csdlDcUser) { + entityCache.removeResult(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserImpl.class, csdlDcUser.getPrimaryKey()); + + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + clearUniqueFindersCache((CsdlDcUserModelImpl)csdlDcUser, true); + } + + @Override + public void clearCache(List csdlDcUsers) { + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + for (CsdlDcUser csdlDcUser : csdlDcUsers) { + entityCache.removeResult(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserImpl.class, csdlDcUser.getPrimaryKey()); + + clearUniqueFindersCache((CsdlDcUserModelImpl)csdlDcUser, true); + } + } + + protected void cacheUniqueFindersCache( + CsdlDcUserModelImpl csdlDcUserModelImpl) { + Object[] args = new Object[] { + csdlDcUserModelImpl.getUuid(), csdlDcUserModelImpl.getGroupId() + }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, + Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, + csdlDcUserModelImpl, false); + + args = new Object[] { + csdlDcUserModelImpl.getGovAgencyCode(), + csdlDcUserModelImpl.getEmployeeEmail(), + csdlDcUserModelImpl.getStatus() + }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_F_GOV_EMAIL_STATUS, args, + Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_F_GOV_EMAIL_STATUS, args, + csdlDcUserModelImpl, false); + } + + protected void clearUniqueFindersCache( + CsdlDcUserModelImpl csdlDcUserModelImpl, boolean clearCurrent) { + if (clearCurrent) { + Object[] args = new Object[] { + csdlDcUserModelImpl.getUuid(), + csdlDcUserModelImpl.getGroupId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); + } + + if ((csdlDcUserModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + csdlDcUserModelImpl.getOriginalUuid(), + csdlDcUserModelImpl.getOriginalGroupId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); + } + + if (clearCurrent) { + Object[] args = new Object[] { + csdlDcUserModelImpl.getGovAgencyCode(), + csdlDcUserModelImpl.getEmployeeEmail(), + csdlDcUserModelImpl.getStatus() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_GOV_EMAIL_STATUS, + args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_GOV_EMAIL_STATUS, + args); + } + + if ((csdlDcUserModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_F_GOV_EMAIL_STATUS.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + csdlDcUserModelImpl.getOriginalGovAgencyCode(), + csdlDcUserModelImpl.getOriginalEmployeeEmail(), + csdlDcUserModelImpl.getOriginalStatus() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_GOV_EMAIL_STATUS, + args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_GOV_EMAIL_STATUS, + args); + } + } + + /** + * Creates a new csdl dc user with the primary key. Does not add the csdl dc user to the database. + * + * @param idDcUser the primary key for the new csdl dc user + * @return the new csdl dc user + */ + @Override + public CsdlDcUser create(long idDcUser) { + CsdlDcUser csdlDcUser = new CsdlDcUserImpl(); + + csdlDcUser.setNew(true); + csdlDcUser.setPrimaryKey(idDcUser); + + String uuid = PortalUUIDUtil.generate(); + + csdlDcUser.setUuid(uuid); + + csdlDcUser.setCompanyId(companyProvider.getCompanyId()); + + return csdlDcUser; + } + + /** + * Removes the csdl dc user with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user that was removed + * @throws NoSuchCsdlDcUserException if a csdl dc user with the primary key could not be found + */ + @Override + public CsdlDcUser remove(long idDcUser) throws NoSuchCsdlDcUserException { + return remove((Serializable)idDcUser); + } + + /** + * Removes the csdl dc user with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param primaryKey the primary key of the csdl dc user + * @return the csdl dc user that was removed + * @throws NoSuchCsdlDcUserException if a csdl dc user with the primary key could not be found + */ + @Override + public CsdlDcUser remove(Serializable primaryKey) + throws NoSuchCsdlDcUserException { + Session session = null; + + try { + session = openSession(); + + CsdlDcUser csdlDcUser = (CsdlDcUser)session.get(CsdlDcUserImpl.class, + primaryKey); + + if (csdlDcUser == null) { + if (_log.isDebugEnabled()) { + _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchCsdlDcUserException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return remove(csdlDcUser); + } + catch (NoSuchCsdlDcUserException nsee) { + throw nsee; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + @Override + protected CsdlDcUser removeImpl(CsdlDcUser csdlDcUser) { + Session session = null; + + try { + session = openSession(); + + if (!session.contains(csdlDcUser)) { + csdlDcUser = (CsdlDcUser)session.get(CsdlDcUserImpl.class, + csdlDcUser.getPrimaryKeyObj()); + } + + if (csdlDcUser != null) { + session.delete(csdlDcUser); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + if (csdlDcUser != null) { + clearCache(csdlDcUser); + } + + return csdlDcUser; + } + + @Override + public CsdlDcUser updateImpl(CsdlDcUser csdlDcUser) { + boolean isNew = csdlDcUser.isNew(); + + if (!(csdlDcUser instanceof CsdlDcUserModelImpl)) { + InvocationHandler invocationHandler = null; + + if (ProxyUtil.isProxyClass(csdlDcUser.getClass())) { + invocationHandler = ProxyUtil.getInvocationHandler(csdlDcUser); + + throw new IllegalArgumentException( + "Implement ModelWrapper in csdlDcUser proxy " + + invocationHandler.getClass()); + } + + throw new IllegalArgumentException( + "Implement ModelWrapper in custom CsdlDcUser implementation " + + csdlDcUser.getClass()); + } + + CsdlDcUserModelImpl csdlDcUserModelImpl = (CsdlDcUserModelImpl)csdlDcUser; + + if (Validator.isNull(csdlDcUser.getUuid())) { + String uuid = PortalUUIDUtil.generate(); + + csdlDcUser.setUuid(uuid); + } + + Session session = null; + + try { + session = openSession(); + + if (csdlDcUser.isNew()) { + session.save(csdlDcUser); + + csdlDcUser.setNew(false); + } + else { + csdlDcUser = (CsdlDcUser)session.merge(csdlDcUser); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + + if (!CsdlDcUserModelImpl.COLUMN_BITMASK_ENABLED) { + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + else + if (isNew) { + Object[] args = new Object[] { csdlDcUserModelImpl.getUuid() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + + args = new Object[] { + csdlDcUserModelImpl.getUuid(), + csdlDcUserModelImpl.getCompanyId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, + args); + + finderCache.removeResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL, + FINDER_ARGS_EMPTY); + } + + else { + if ((csdlDcUserModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + csdlDcUserModelImpl.getOriginalUuid() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + + args = new Object[] { csdlDcUserModelImpl.getUuid() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + } + + if ((csdlDcUserModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + csdlDcUserModelImpl.getOriginalUuid(), + csdlDcUserModelImpl.getOriginalCompanyId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, + args); + + args = new Object[] { + csdlDcUserModelImpl.getUuid(), + csdlDcUserModelImpl.getCompanyId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, + args); + } + } + + entityCache.putResult(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserImpl.class, csdlDcUser.getPrimaryKey(), csdlDcUser, false); + + clearUniqueFindersCache(csdlDcUserModelImpl, false); + cacheUniqueFindersCache(csdlDcUserModelImpl); + + csdlDcUser.resetOriginalValues(); + + return csdlDcUser; + } + + /** + * Returns the csdl dc user with the primary key or throws a {@link com.liferay.portal.kernel.exception.NoSuchModelException} if it could not be found. + * + * @param primaryKey the primary key of the csdl dc user + * @return the csdl dc user + * @throws NoSuchCsdlDcUserException if a csdl dc user with the primary key could not be found + */ + @Override + public CsdlDcUser findByPrimaryKey(Serializable primaryKey) + throws NoSuchCsdlDcUserException { + CsdlDcUser csdlDcUser = fetchByPrimaryKey(primaryKey); + + if (csdlDcUser == null) { + if (_log.isDebugEnabled()) { + _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchCsdlDcUserException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return csdlDcUser; + } + + /** + * Returns the csdl dc user with the primary key or throws a {@link NoSuchCsdlDcUserException} if it could not be found. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user + * @throws NoSuchCsdlDcUserException if a csdl dc user with the primary key could not be found + */ + @Override + public CsdlDcUser findByPrimaryKey(long idDcUser) + throws NoSuchCsdlDcUserException { + return findByPrimaryKey((Serializable)idDcUser); + } + + /** + * Returns the csdl dc user with the primary key or returns null if it could not be found. + * + * @param primaryKey the primary key of the csdl dc user + * @return the csdl dc user, or null if a csdl dc user with the primary key could not be found + */ + @Override + public CsdlDcUser fetchByPrimaryKey(Serializable primaryKey) { + Serializable serializable = entityCache.getResult(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserImpl.class, primaryKey); + + if (serializable == nullModel) { + return null; + } + + CsdlDcUser csdlDcUser = (CsdlDcUser)serializable; + + if (csdlDcUser == null) { + Session session = null; + + try { + session = openSession(); + + csdlDcUser = (CsdlDcUser)session.get(CsdlDcUserImpl.class, + primaryKey); + + if (csdlDcUser != null) { + cacheResult(csdlDcUser); + } + else { + entityCache.putResult(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserImpl.class, primaryKey, nullModel); + } + } + catch (Exception e) { + entityCache.removeResult(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserImpl.class, primaryKey); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return csdlDcUser; + } + + /** + * Returns the csdl dc user with the primary key or returns null if it could not be found. + * + * @param idDcUser the primary key of the csdl dc user + * @return the csdl dc user, or null if a csdl dc user with the primary key could not be found + */ + @Override + public CsdlDcUser fetchByPrimaryKey(long idDcUser) { + return fetchByPrimaryKey((Serializable)idDcUser); + } + + @Override + public Map fetchByPrimaryKeys( + Set primaryKeys) { + if (primaryKeys.isEmpty()) { + return Collections.emptyMap(); + } + + Map map = new HashMap(); + + if (primaryKeys.size() == 1) { + Iterator iterator = primaryKeys.iterator(); + + Serializable primaryKey = iterator.next(); + + CsdlDcUser csdlDcUser = fetchByPrimaryKey(primaryKey); + + if (csdlDcUser != null) { + map.put(primaryKey, csdlDcUser); + } + + return map; + } + + Set uncachedPrimaryKeys = null; + + for (Serializable primaryKey : primaryKeys) { + Serializable serializable = entityCache.getResult(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserImpl.class, primaryKey); + + if (serializable != nullModel) { + if (serializable == null) { + if (uncachedPrimaryKeys == null) { + uncachedPrimaryKeys = new HashSet(); + } + + uncachedPrimaryKeys.add(primaryKey); + } + else { + map.put(primaryKey, (CsdlDcUser)serializable); + } + } + } + + if (uncachedPrimaryKeys == null) { + return map; + } + + StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) + + 1); + + query.append(_SQL_SELECT_CSDLDCUSER_WHERE_PKS_IN); + + for (Serializable primaryKey : uncachedPrimaryKeys) { + query.append((long)primaryKey); + + query.append(","); + } + + query.setIndex(query.index() - 1); + + query.append(")"); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + for (CsdlDcUser csdlDcUser : (List)q.list()) { + map.put(csdlDcUser.getPrimaryKeyObj(), csdlDcUser); + + cacheResult(csdlDcUser); + + uncachedPrimaryKeys.remove(csdlDcUser.getPrimaryKeyObj()); + } + + for (Serializable primaryKey : uncachedPrimaryKeys) { + entityCache.putResult(CsdlDcUserModelImpl.ENTITY_CACHE_ENABLED, + CsdlDcUserImpl.class, primaryKey, nullModel); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + return map; + } + + /** + * Returns all the csdl dc users. + * + * @return the csdl dc users + */ + @Override + public List findAll() { + return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the csdl dc users. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @return the range of csdl dc users + */ + @Override + public List findAll(int start, int end) { + return findAll(start, end, null); + } + + /** + * Returns an ordered range of all the csdl dc users. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of csdl dc users + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator) { + return findAll(start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the csdl dc users. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link CsdlDcUserModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of csdl dc users + * @param end the upper bound of the range of csdl dc users (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of csdl dc users + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL; + finderArgs = FINDER_ARGS_EMPTY; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL; + finderArgs = new Object[] { start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + } + + if (list == null) { + StringBundler query = null; + String sql = null; + + if (orderByComparator != null) { + query = new StringBundler(2 + + (orderByComparator.getOrderByFields().length * 2)); + + query.append(_SQL_SELECT_CSDLDCUSER); + + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + + sql = query.toString(); + } + else { + sql = _SQL_SELECT_CSDLDCUSER; + + if (pagination) { + sql = sql.concat(CsdlDcUserModelImpl.ORDER_BY_JPQL); + } + } + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Removes all the csdl dc users from the database. + * + */ + @Override + public void removeAll() { + for (CsdlDcUser csdlDcUser : findAll()) { + remove(csdlDcUser); + } + } + + /** + * Returns the number of csdl dc users. + * + * @return the number of csdl dc users + */ + @Override + public int countAll() { + Long count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, this); + + if (count == null) { + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(_SQL_COUNT_CSDLDCUSER); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY, + count); + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + @Override + public Set getBadColumnNames() { + return _badColumnNames; + } + + @Override + protected Map getTableColumnsMap() { + return CsdlDcUserModelImpl.TABLE_COLUMNS_MAP; + } + + /** + * Initializes the csdl dc user persistence. + */ + public void afterPropertiesSet() { + } + + public void destroy() { + entityCache.removeCache(CsdlDcUserImpl.class.getName()); + finderCache.removeCache(FINDER_CLASS_NAME_ENTITY); + finderCache.removeCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + @ServiceReference(type = CompanyProviderWrapper.class) + protected CompanyProvider companyProvider; + @ServiceReference(type = EntityCache.class) + protected EntityCache entityCache; + @ServiceReference(type = FinderCache.class) + protected FinderCache finderCache; + private static final String _SQL_SELECT_CSDLDCUSER = "SELECT csdlDcUser FROM CsdlDcUser csdlDcUser"; + private static final String _SQL_SELECT_CSDLDCUSER_WHERE_PKS_IN = "SELECT csdlDcUser FROM CsdlDcUser csdlDcUser WHERE idDcUser IN ("; + private static final String _SQL_SELECT_CSDLDCUSER_WHERE = "SELECT csdlDcUser FROM CsdlDcUser csdlDcUser WHERE "; + private static final String _SQL_COUNT_CSDLDCUSER = "SELECT COUNT(csdlDcUser) FROM CsdlDcUser csdlDcUser"; + private static final String _SQL_COUNT_CSDLDCUSER_WHERE = "SELECT COUNT(csdlDcUser) FROM CsdlDcUser csdlDcUser WHERE "; + private static final String _ORDER_BY_ENTITY_ALIAS = "csdlDcUser."; + private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No CsdlDcUser exists with the primary key "; + private static final String _NO_SUCH_ENTITY_WITH_KEY = "No CsdlDcUser exists with the key {"; + private static final Log _log = LogFactoryUtil.getLog(CsdlDcUserPersistenceImpl.class); + private static final Set _badColumnNames = SetUtil.fromArray(new String[] { + "uuid" + }); +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/DossierFinderImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/DossierFinderImpl.java index eb93c79b8e..48a3f5942a 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/DossierFinderImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/DossierFinderImpl.java @@ -10,6 +10,8 @@ import org.opencps.dossiermgt.model.Dossier; import org.opencps.dossiermgt.model.DossierDocument; import org.opencps.dossiermgt.model.impl.DossierDocumentImpl; +import org.opencps.dossiermgt.model.DossierFile; +import org.opencps.dossiermgt.model.impl.DossierFileImpl; import org.opencps.dossiermgt.model.impl.DossierImpl; import org.opencps.dossiermgt.service.persistence.DossierFinder; import org.opencps.dossiermgt.service.persistence.NotarizationFinder; @@ -167,4 +169,35 @@ public DossierDocument findDossierDocumentByDossierId(long dossierDocumentId) { return dossierDocument; } + + @Override + public Dossier findDossierById(long dossierId) { + Session session = null; + Dossier dossier = null; + String sql = "SELECT * FROM opencps_dossier WHERE" + + " dossierId = "+dossierId+" ORDER BY dossierId DESC LIMIT 1"; + _log.info("SQL: "+ sql); + try { + session = openSession(); + + SQLQuery q = session.createSQLQuery(sql); + q.setCacheable(false); + q.addEntity("opencps_dossier", DossierImpl.class); + + dossier = (Dossier) q.uniqueResult(); + } + catch (Exception e) { + try { + throw new SystemException(e); + } + catch (SystemException se) { + _log.error(se); + } + } + finally { + closeSession(session); + } + + return dossier; + } } diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/DossierMarkFinderBaseImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/DossierMarkFinderBaseImpl.java new file mode 100644 index 0000000000..452cf299b5 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/DossierMarkFinderBaseImpl.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.dossiermgt.service.persistence.impl; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl; + +import org.opencps.dossiermgt.model.DossierMark; +import org.opencps.dossiermgt.service.persistence.DossierMarkPersistence; + +import java.lang.reflect.Field; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +/** + * @author huymq + * @generated + */ +public class DossierMarkFinderBaseImpl extends BasePersistenceImpl { + public DossierMarkFinderBaseImpl() { + setModelClass(DossierMark.class); + + try { + Field field = BasePersistenceImpl.class.getDeclaredField( + "_dbColumnNames"); + + field.setAccessible(true); + + Map dbColumnNames = new HashMap(); + + dbColumnNames.put("uuid", "uuid_"); + + field.set(this, dbColumnNames); + } + catch (Exception e) { + if (_log.isDebugEnabled()) { + _log.debug(e, e); + } + } + } + + @Override + public Set getBadColumnNames() { + return getDossierMarkPersistence().getBadColumnNames(); + } + + /** + * Returns the dossier mark persistence. + * + * @return the dossier mark persistence + */ + public DossierMarkPersistence getDossierMarkPersistence() { + return dossierMarkPersistence; + } + + /** + * Sets the dossier mark persistence. + * + * @param dossierMarkPersistence the dossier mark persistence + */ + public void setDossierMarkPersistence( + DossierMarkPersistence dossierMarkPersistence) { + this.dossierMarkPersistence = dossierMarkPersistence; + } + + @BeanReference(type = DossierMarkPersistence.class) + protected DossierMarkPersistence dossierMarkPersistence; + private static final Log _log = LogFactoryUtil.getLog(DossierMarkFinderBaseImpl.class); +} \ No newline at end of file diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/DossierMarkFinderImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/DossierMarkFinderImpl.java new file mode 100644 index 0000000000..e43458ee65 --- /dev/null +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/DossierMarkFinderImpl.java @@ -0,0 +1,47 @@ +package org.opencps.dossiermgt.service.persistence.impl; + +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import org.opencps.dossiermgt.model.DossierMark; +import org.opencps.dossiermgt.model.impl.DossierMarkImpl; +import org.opencps.dossiermgt.service.persistence.DossierMarkFinder; +import com.liferay.portal.kernel.dao.orm.Query; +import com.liferay.portal.kernel.dao.orm.SQLQuery; +import com.liferay.portal.kernel.dao.orm.Session; +import com.liferay.portal.kernel.exception.SystemException; + +import java.util.List; + +public class DossierMarkFinderImpl extends DossierMarkFinderBaseImpl implements DossierMarkFinder { + Log _log = LogFactoryUtil.getLog(DossierMarkFinderImpl.class); + + @Override + public List findDossierMarkByDossierId(long groupId, long dossierId) { + Session session = null; + List lstDossierMark = null; + String sql = "SELECT * FROM opencps_dossiermark WHERE" + + " groupId = "+groupId+ " AND dossierId = " +dossierId+ " ORDER BY dossierId desc "; + + try { + session = openSession(); + + SQLQuery q = session.createSQLQuery(sql); + q.setCacheable(false); + q.addEntity("opencps_dossiermark", DossierMarkImpl.class); + + lstDossierMark = q.list(); + }catch (Exception e) { + try { + throw new SystemException(e); + } + catch (SystemException se) { + _log.error(se); + } + } + finally { + closeSession(session); + } + return lstDossierMark; + + } +} diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/ServiceConfigPersistenceImpl.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/ServiceConfigPersistenceImpl.java index 300a53a9e1..10f87d9f4c 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/ServiceConfigPersistenceImpl.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/dossiermgt/service/persistence/impl/ServiceConfigPersistenceImpl.java @@ -4507,128 +4507,168 @@ public int countByGID_LEVEL(long groupId, int serviceLevel) { private static final String _FINDER_COLUMN_GID_LEVEL_GROUPID_2 = "serviceConfig.groupId = ? AND "; private static final String _FINDER_COLUMN_GID_LEVEL_SERVICELEVEL_2 = "serviceConfig.serviceLevel = ?"; - public static final FinderPath FINDER_PATH_FETCH_BY_GID_SI_GOV_LEVEL = new FinderPath(ServiceConfigModelImpl.ENTITY_CACHE_ENABLED, + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_GID_SI_GOV_LEVEL = + new FinderPath(ServiceConfigModelImpl.ENTITY_CACHE_ENABLED, ServiceConfigModelImpl.FINDER_CACHE_ENABLED, - ServiceConfigImpl.class, FINDER_CLASS_NAME_ENTITY, - "fetchByGID_SI_GOV_LEVEL", + ServiceConfigImpl.class, FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "findByGID_SI_GOV_LEVEL", + new String[] { + Long.class.getName(), Long.class.getName(), + String.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GID_SI_GOV_LEVEL = + new FinderPath(ServiceConfigModelImpl.ENTITY_CACHE_ENABLED, + ServiceConfigModelImpl.FINDER_CACHE_ENABLED, + ServiceConfigImpl.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "findByGID_SI_GOV_LEVEL", new String[] { Long.class.getName(), Long.class.getName(), - String.class.getName(), Integer.class.getName() + String.class.getName() }, ServiceConfigModelImpl.GROUPID_COLUMN_BITMASK | ServiceConfigModelImpl.SERVICEINFOID_COLUMN_BITMASK | - ServiceConfigModelImpl.GOVAGENCYCODE_COLUMN_BITMASK | - ServiceConfigModelImpl.SERVICELEVEL_COLUMN_BITMASK); + ServiceConfigModelImpl.GOVAGENCYCODE_COLUMN_BITMASK); public static final FinderPath FINDER_PATH_COUNT_BY_GID_SI_GOV_LEVEL = new FinderPath(ServiceConfigModelImpl.ENTITY_CACHE_ENABLED, ServiceConfigModelImpl.FINDER_CACHE_ENABLED, Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByGID_SI_GOV_LEVEL", new String[] { Long.class.getName(), Long.class.getName(), - String.class.getName(), Integer.class.getName() + String.class.getName() }); /** - * Returns the service config where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ? or throws a {@link NoSuchServiceConfigException} if it could not be found. + * Returns all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. * * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level - * @return the matching service config - * @throws NoSuchServiceConfigException if a matching service config could not be found + * @return the matching service configs */ @Override - public ServiceConfig findByGID_SI_GOV_LEVEL(long groupId, - long serviceInfoId, String govAgencyCode, int serviceLevel) - throws NoSuchServiceConfigException { - ServiceConfig serviceConfig = fetchByGID_SI_GOV_LEVEL(groupId, - serviceInfoId, govAgencyCode, serviceLevel); - - if (serviceConfig == null) { - StringBundler msg = new StringBundler(10); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("groupId="); - msg.append(groupId); - - msg.append(", serviceInfoId="); - msg.append(serviceInfoId); - - msg.append(", govAgencyCode="); - msg.append(govAgencyCode); - - msg.append(", serviceLevel="); - msg.append(serviceLevel); - - msg.append("}"); - - if (_log.isDebugEnabled()) { - _log.debug(msg.toString()); - } - - throw new NoSuchServiceConfigException(msg.toString()); - } + public List findByGID_SI_GOV_LEVEL(long groupId, + long serviceInfoId, String govAgencyCode) { + return findByGID_SI_GOV_LEVEL(groupId, serviceInfoId, govAgencyCode, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } - return serviceConfig; + /** + * Returns a range of all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ServiceConfigModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param start the lower bound of the range of service configs + * @param end the upper bound of the range of service configs (not inclusive) + * @return the range of matching service configs + */ + @Override + public List findByGID_SI_GOV_LEVEL(long groupId, + long serviceInfoId, String govAgencyCode, int start, int end) { + return findByGID_SI_GOV_LEVEL(groupId, serviceInfoId, govAgencyCode, + start, end, null); } /** - * Returns the service config where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ? or returns null if it could not be found. Uses the finder cache. + * Returns an ordered range of all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ServiceConfigModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

* * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level - * @return the matching service config, or null if a matching service config could not be found + * @param start the lower bound of the range of service configs + * @param end the upper bound of the range of service configs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching service configs */ @Override - public ServiceConfig fetchByGID_SI_GOV_LEVEL(long groupId, - long serviceInfoId, String govAgencyCode, int serviceLevel) { - return fetchByGID_SI_GOV_LEVEL(groupId, serviceInfoId, govAgencyCode, - serviceLevel, true); + public List findByGID_SI_GOV_LEVEL(long groupId, + long serviceInfoId, String govAgencyCode, int start, int end, + OrderByComparator orderByComparator) { + return findByGID_SI_GOV_LEVEL(groupId, serviceInfoId, govAgencyCode, + start, end, orderByComparator, true); } /** - * Returns the service config where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ? or returns null if it could not be found, optionally using the finder cache. + * Returns an ordered range of all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link ServiceConfigModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

* * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level + * @param start the lower bound of the range of service configs + * @param end the upper bound of the range of service configs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) * @param retrieveFromCache whether to retrieve from the finder cache - * @return the matching service config, or null if a matching service config could not be found + * @return the ordered range of matching service configs */ @Override - public ServiceConfig fetchByGID_SI_GOV_LEVEL(long groupId, - long serviceInfoId, String govAgencyCode, int serviceLevel, + public List findByGID_SI_GOV_LEVEL(long groupId, + long serviceInfoId, String govAgencyCode, int start, int end, + OrderByComparator orderByComparator, boolean retrieveFromCache) { - Object[] finderArgs = new Object[] { - groupId, serviceInfoId, govAgencyCode, serviceLevel - }; + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; - Object result = null; + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GID_SI_GOV_LEVEL; + finderArgs = new Object[] { groupId, serviceInfoId, govAgencyCode }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_GID_SI_GOV_LEVEL; + finderArgs = new Object[] { + groupId, serviceInfoId, govAgencyCode, + + start, end, orderByComparator + }; + } + + List list = null; if (retrieveFromCache) { - result = finderCache.getResult(FINDER_PATH_FETCH_BY_GID_SI_GOV_LEVEL, + list = (List)finderCache.getResult(finderPath, finderArgs, this); - } - if (result instanceof ServiceConfig) { - ServiceConfig serviceConfig = (ServiceConfig)result; + if ((list != null) && !list.isEmpty()) { + for (ServiceConfig serviceConfig : list) { + if ((groupId != serviceConfig.getGroupId()) || + (serviceInfoId != serviceConfig.getServiceInfoId()) || + !Objects.equals(govAgencyCode, + serviceConfig.getGovAgencyCode())) { + list = null; - if ((groupId != serviceConfig.getGroupId()) || - (serviceInfoId != serviceConfig.getServiceInfoId()) || - !Objects.equals(govAgencyCode, - serviceConfig.getGovAgencyCode()) || - (serviceLevel != serviceConfig.getServiceLevel())) { - result = null; + break; + } + } } } - if (result == null) { - StringBundler query = new StringBundler(6); + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(5); + } query.append(_SQL_SELECT_SERVICECONFIG_WHERE); @@ -4650,7 +4690,14 @@ else if (govAgencyCode.equals("")) { query.append(_FINDER_COLUMN_GID_SI_GOV_LEVEL_GOVAGENCYCODE_2); } - query.append(_FINDER_COLUMN_GID_SI_GOV_LEVEL_SERVICELEVEL_2); + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(ServiceConfigModelImpl.ORDER_BY_JPQL); + } String sql = query.toString(); @@ -4671,36 +4718,25 @@ else if (govAgencyCode.equals("")) { qPos.add(govAgencyCode); } - qPos.add(serviceLevel); + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); - List list = q.list(); + Collections.sort(list); - if (list.isEmpty()) { - finderCache.putResult(FINDER_PATH_FETCH_BY_GID_SI_GOV_LEVEL, - finderArgs, list); + list = Collections.unmodifiableList(list); } else { - if (list.size() > 1) { - Collections.sort(list, Collections.reverseOrder()); - - if (_log.isWarnEnabled()) { - _log.warn( - "ServiceConfigPersistenceImpl.fetchByGID_SI_GOV_LEVEL(long, long, String, int, boolean) with parameters (" + - StringUtil.merge(finderArgs) + - ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); - } - } - - ServiceConfig serviceConfig = list.get(0); + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } - result = serviceConfig; + cacheResult(list); - cacheResult(serviceConfig); - } + finderCache.putResult(finderPath, finderArgs, list); } catch (Exception e) { - finderCache.removeResult(FINDER_PATH_FETCH_BY_GID_SI_GOV_LEVEL, - finderArgs); + finderCache.removeResult(finderPath, finderArgs); throw processException(e); } @@ -4709,55 +4745,353 @@ else if (govAgencyCode.equals("")) { } } - if (result instanceof List) { + return list; + } + + /** + * Returns the first service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching service config + * @throws NoSuchServiceConfigException if a matching service config could not be found + */ + @Override + public ServiceConfig findByGID_SI_GOV_LEVEL_First(long groupId, + long serviceInfoId, String govAgencyCode, + OrderByComparator orderByComparator) + throws NoSuchServiceConfigException { + ServiceConfig serviceConfig = fetchByGID_SI_GOV_LEVEL_First(groupId, + serviceInfoId, govAgencyCode, orderByComparator); + + if (serviceConfig != null) { + return serviceConfig; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", serviceInfoId="); + msg.append(serviceInfoId); + + msg.append(", govAgencyCode="); + msg.append(govAgencyCode); + + msg.append("}"); + + throw new NoSuchServiceConfigException(msg.toString()); + } + + /** + * Returns the first service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching service config, or null if a matching service config could not be found + */ + @Override + public ServiceConfig fetchByGID_SI_GOV_LEVEL_First(long groupId, + long serviceInfoId, String govAgencyCode, + OrderByComparator orderByComparator) { + List list = findByGID_SI_GOV_LEVEL(groupId, + serviceInfoId, govAgencyCode, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching service config + * @throws NoSuchServiceConfigException if a matching service config could not be found + */ + @Override + public ServiceConfig findByGID_SI_GOV_LEVEL_Last(long groupId, + long serviceInfoId, String govAgencyCode, + OrderByComparator orderByComparator) + throws NoSuchServiceConfigException { + ServiceConfig serviceConfig = fetchByGID_SI_GOV_LEVEL_Last(groupId, + serviceInfoId, govAgencyCode, orderByComparator); + + if (serviceConfig != null) { + return serviceConfig; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", serviceInfoId="); + msg.append(serviceInfoId); + + msg.append(", govAgencyCode="); + msg.append(govAgencyCode); + + msg.append("}"); + + throw new NoSuchServiceConfigException(msg.toString()); + } + + /** + * Returns the last service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. + * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching service config, or null if a matching service config could not be found + */ + @Override + public ServiceConfig fetchByGID_SI_GOV_LEVEL_Last(long groupId, + long serviceInfoId, String govAgencyCode, + OrderByComparator orderByComparator) { + int count = countByGID_SI_GOV_LEVEL(groupId, serviceInfoId, + govAgencyCode); + + if (count == 0) { return null; } - else { - return (ServiceConfig)result; + + List list = findByGID_SI_GOV_LEVEL(groupId, + serviceInfoId, govAgencyCode, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); } + + return null; } /** - * Removes the service config where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ? from the database. + * Returns the service configs before and after the current service config in the ordered set where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. * + * @param serviceConfigId the primary key of the current service config * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level - * @return the service config that was removed + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next service config + * @throws NoSuchServiceConfigException if a service config with the primary key could not be found */ @Override - public ServiceConfig removeByGID_SI_GOV_LEVEL(long groupId, - long serviceInfoId, String govAgencyCode, int serviceLevel) + public ServiceConfig[] findByGID_SI_GOV_LEVEL_PrevAndNext( + long serviceConfigId, long groupId, long serviceInfoId, + String govAgencyCode, OrderByComparator orderByComparator) throws NoSuchServiceConfigException { - ServiceConfig serviceConfig = findByGID_SI_GOV_LEVEL(groupId, - serviceInfoId, govAgencyCode, serviceLevel); + ServiceConfig serviceConfig = findByPrimaryKey(serviceConfigId); - return remove(serviceConfig); + Session session = null; + + try { + session = openSession(); + + ServiceConfig[] array = new ServiceConfigImpl[3]; + + array[0] = getByGID_SI_GOV_LEVEL_PrevAndNext(session, + serviceConfig, groupId, serviceInfoId, govAgencyCode, + orderByComparator, true); + + array[1] = serviceConfig; + + array[2] = getByGID_SI_GOV_LEVEL_PrevAndNext(session, + serviceConfig, groupId, serviceInfoId, govAgencyCode, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected ServiceConfig getByGID_SI_GOV_LEVEL_PrevAndNext(Session session, + ServiceConfig serviceConfig, long groupId, long serviceInfoId, + String govAgencyCode, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_SERVICECONFIG_WHERE); + + query.append(_FINDER_COLUMN_GID_SI_GOV_LEVEL_GROUPID_2); + + query.append(_FINDER_COLUMN_GID_SI_GOV_LEVEL_SERVICEINFOID_2); + + boolean bindGovAgencyCode = false; + + if (govAgencyCode == null) { + query.append(_FINDER_COLUMN_GID_SI_GOV_LEVEL_GOVAGENCYCODE_1); + } + else if (govAgencyCode.equals("")) { + query.append(_FINDER_COLUMN_GID_SI_GOV_LEVEL_GOVAGENCYCODE_3); + } + else { + bindGovAgencyCode = true; + + query.append(_FINDER_COLUMN_GID_SI_GOV_LEVEL_GOVAGENCYCODE_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(ServiceConfigModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(serviceInfoId); + + if (bindGovAgencyCode) { + qPos.add(govAgencyCode); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(serviceConfig); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } } /** - * Returns the number of service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ? and serviceLevel = ?. + * Removes all the service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ? from the database. + * + * @param groupId the group ID + * @param serviceInfoId the service info ID + * @param govAgencyCode the gov agency code + */ + @Override + public void removeByGID_SI_GOV_LEVEL(long groupId, long serviceInfoId, + String govAgencyCode) { + for (ServiceConfig serviceConfig : findByGID_SI_GOV_LEVEL(groupId, + serviceInfoId, govAgencyCode, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(serviceConfig); + } + } + + /** + * Returns the number of service configs where groupId = ? and serviceInfoId = ? and govAgencyCode = ?. * * @param groupId the group ID * @param serviceInfoId the service info ID * @param govAgencyCode the gov agency code - * @param serviceLevel the service level * @return the number of matching service configs */ @Override public int countByGID_SI_GOV_LEVEL(long groupId, long serviceInfoId, - String govAgencyCode, int serviceLevel) { + String govAgencyCode) { FinderPath finderPath = FINDER_PATH_COUNT_BY_GID_SI_GOV_LEVEL; - Object[] finderArgs = new Object[] { - groupId, serviceInfoId, govAgencyCode, serviceLevel - }; + Object[] finderArgs = new Object[] { groupId, serviceInfoId, govAgencyCode }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { - StringBundler query = new StringBundler(5); + StringBundler query = new StringBundler(4); query.append(_SQL_COUNT_SERVICECONFIG_WHERE); @@ -4779,8 +5113,6 @@ else if (govAgencyCode.equals("")) { query.append(_FINDER_COLUMN_GID_SI_GOV_LEVEL_GOVAGENCYCODE_2); } - query.append(_FINDER_COLUMN_GID_SI_GOV_LEVEL_SERVICELEVEL_2); - String sql = query.toString(); Session session = null; @@ -4800,8 +5132,6 @@ else if (govAgencyCode.equals("")) { qPos.add(govAgencyCode); } - qPos.add(serviceLevel); - count = (Long)q.uniqueResult(); finderCache.putResult(finderPath, finderArgs, count); @@ -4821,10 +5151,9 @@ else if (govAgencyCode.equals("")) { private static final String _FINDER_COLUMN_GID_SI_GOV_LEVEL_GROUPID_2 = "serviceConfig.groupId = ? AND "; private static final String _FINDER_COLUMN_GID_SI_GOV_LEVEL_SERVICEINFOID_2 = "serviceConfig.serviceInfoId = ? AND "; - private static final String _FINDER_COLUMN_GID_SI_GOV_LEVEL_GOVAGENCYCODE_1 = "serviceConfig.govAgencyCode IS NULL AND "; - private static final String _FINDER_COLUMN_GID_SI_GOV_LEVEL_GOVAGENCYCODE_2 = "serviceConfig.govAgencyCode = ? AND "; - private static final String _FINDER_COLUMN_GID_SI_GOV_LEVEL_GOVAGENCYCODE_3 = "(serviceConfig.govAgencyCode IS NULL OR serviceConfig.govAgencyCode = '') AND "; - private static final String _FINDER_COLUMN_GID_SI_GOV_LEVEL_SERVICELEVEL_2 = "serviceConfig.serviceLevel = ?"; + private static final String _FINDER_COLUMN_GID_SI_GOV_LEVEL_GOVAGENCYCODE_1 = "serviceConfig.govAgencyCode IS NULL"; + private static final String _FINDER_COLUMN_GID_SI_GOV_LEVEL_GOVAGENCYCODE_2 = "serviceConfig.govAgencyCode = ?"; + private static final String _FINDER_COLUMN_GID_SI_GOV_LEVEL_GOVAGENCYCODE_3 = "(serviceConfig.govAgencyCode IS NULL OR serviceConfig.govAgencyCode = '')"; public ServiceConfigPersistenceImpl() { setModelClass(ServiceConfig.class); @@ -4869,13 +5198,6 @@ public void cacheResult(ServiceConfig serviceConfig) { serviceConfig.getGovAgencyCode() }, serviceConfig); - finderCache.putResult(FINDER_PATH_FETCH_BY_GID_SI_GOV_LEVEL, - new Object[] { - serviceConfig.getGroupId(), serviceConfig.getServiceInfoId(), - serviceConfig.getGovAgencyCode(), - serviceConfig.getServiceLevel() - }, serviceConfig); - serviceConfig.resetOriginalValues(); } @@ -4967,18 +5289,6 @@ protected void cacheUniqueFindersCache( Long.valueOf(1), false); finderCache.putResult(FINDER_PATH_FETCH_BY_GID_SI_GAC, args, serviceConfigModelImpl, false); - - args = new Object[] { - serviceConfigModelImpl.getGroupId(), - serviceConfigModelImpl.getServiceInfoId(), - serviceConfigModelImpl.getGovAgencyCode(), - serviceConfigModelImpl.getServiceLevel() - }; - - finderCache.putResult(FINDER_PATH_COUNT_BY_GID_SI_GOV_LEVEL, args, - Long.valueOf(1), false); - finderCache.putResult(FINDER_PATH_FETCH_BY_GID_SI_GOV_LEVEL, args, - serviceConfigModelImpl, false); } protected void clearUniqueFindersCache( @@ -5026,31 +5336,6 @@ protected void clearUniqueFindersCache( finderCache.removeResult(FINDER_PATH_COUNT_BY_GID_SI_GAC, args); finderCache.removeResult(FINDER_PATH_FETCH_BY_GID_SI_GAC, args); } - - if (clearCurrent) { - Object[] args = new Object[] { - serviceConfigModelImpl.getGroupId(), - serviceConfigModelImpl.getServiceInfoId(), - serviceConfigModelImpl.getGovAgencyCode(), - serviceConfigModelImpl.getServiceLevel() - }; - - finderCache.removeResult(FINDER_PATH_COUNT_BY_GID_SI_GOV_LEVEL, args); - finderCache.removeResult(FINDER_PATH_FETCH_BY_GID_SI_GOV_LEVEL, args); - } - - if ((serviceConfigModelImpl.getColumnBitmask() & - FINDER_PATH_FETCH_BY_GID_SI_GOV_LEVEL.getColumnBitmask()) != 0) { - Object[] args = new Object[] { - serviceConfigModelImpl.getOriginalGroupId(), - serviceConfigModelImpl.getOriginalServiceInfoId(), - serviceConfigModelImpl.getOriginalGovAgencyCode(), - serviceConfigModelImpl.getOriginalServiceLevel() - }; - - finderCache.removeResult(FINDER_PATH_COUNT_BY_GID_SI_GOV_LEVEL, args); - finderCache.removeResult(FINDER_PATH_FETCH_BY_GID_SI_GOV_LEVEL, args); - } } /** @@ -5291,6 +5576,16 @@ public ServiceConfig updateImpl(ServiceConfig serviceConfig) { finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GID_LEVEL, args); + args = new Object[] { + serviceConfigModelImpl.getGroupId(), + serviceConfigModelImpl.getServiceInfoId(), + serviceConfigModelImpl.getGovAgencyCode() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_GID_SI_GOV_LEVEL, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GID_SI_GOV_LEVEL, + args); + finderCache.removeResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY); finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL, FINDER_ARGS_EMPTY); @@ -5433,6 +5728,31 @@ public ServiceConfig updateImpl(ServiceConfig serviceConfig) { finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GID_LEVEL, args); } + + if ((serviceConfigModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GID_SI_GOV_LEVEL.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + serviceConfigModelImpl.getOriginalGroupId(), + serviceConfigModelImpl.getOriginalServiceInfoId(), + serviceConfigModelImpl.getOriginalGovAgencyCode() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_GID_SI_GOV_LEVEL, + args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GID_SI_GOV_LEVEL, + args); + + args = new Object[] { + serviceConfigModelImpl.getGroupId(), + serviceConfigModelImpl.getServiceInfoId(), + serviceConfigModelImpl.getGovAgencyCode() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_GID_SI_GOV_LEVEL, + args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GID_SI_GOV_LEVEL, + args); + } } entityCache.putResult(ServiceConfigModelImpl.ENTITY_CACHE_ENABLED, diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/event/message/KeypayV3Event.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/event/message/KeypayV3Event.java index c420531881..f0e5f2280d 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/event/message/KeypayV3Event.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/event/message/KeypayV3Event.java @@ -62,7 +62,7 @@ private void _doReceiveRequest(Message message) throws PortalException { JSONObject resultObj = callRest.callPostAPI(groupId, HttpMethod.POST, MediaType.APPLICATION_JSON, baseUrl, KeyPayTerm.ENDPOINT_KEYPAY, "", "", properties, params, context); _log.info("baseUrl: " + baseUrl + KeyPayTerm.ENDPOINT_KEYPAY); - _log.info("Call post API SEND keypayv3 result: " + resultObj.toJSONString()); +// _log.info("Call post API SEND keypayv3 result: " + resultObj.toJSONString()); _log.info(params); } catch (Exception e) { _log.error(e); diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/jasper/message/Engine.java b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/jasper/message/Engine.java index e16e06fd8a..14b87c9ae4 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/jasper/message/Engine.java +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/java/org/opencps/jasper/message/Engine.java @@ -209,13 +209,6 @@ else if (engineClass.isAssignableFrom(Deliverable.class)) { // } // } - System.out.println("==========addDossierByDeliverable=========" + deliverable.getDeliverableCode()); - DossierFileLocalServiceUtil.addDossierByDeliverable(dossierFile.getGroupId(), - dossierFile.getCompanyId(), dossierFile.getUserId(), dossierFile.getUserName(), - dossierFile.getDossierId(), StringPool.BLANK, dossierFile.getDossierTemplateNo(), - dossierFile.getDossierPartNo(), dossierFile.getDossierPartType(), - dossierFile.getFileTemplateNo(), fileEntry.getFileName(), dossierFile.getFormData(), - fileEntryId, dossierFile.getOriginal(), false, false, false, deliverable.getDeliverableCode()); } } } diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/module-hbm.xml b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/module-hbm.xml index a579859ded..6ac7f76fdc 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/module-hbm.xml +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/module-hbm.xml @@ -7,6 +7,8 @@ + + @@ -156,6 +158,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/portlet-model-hints.xml b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/portlet-model-hints.xml index 4be2f1aff6..d0fd6062ab 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/portlet-model-hints.xml +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/portlet-model-hints.xml @@ -135,6 +135,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/spring/module-spring.xml b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/spring/module-spring.xml index 893bf45ac8..ee2140bc49 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/spring/module-spring.xml +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/spring/module-spring.xml @@ -19,6 +19,10 @@ + + + + @@ -48,6 +52,7 @@ + diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/sql/indexes.sql b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/sql/indexes.sql index 2bebf41caf..c87440377e 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/sql/indexes.sql +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/sql/indexes.sql @@ -21,6 +21,14 @@ create index IX_F420D66C on opencps_configcounter (groupId, counterCode[$COLUMN_ create index IX_6442A351 on opencps_configcounter (uuid_[$COLUMN_LENGTH:75$], companyId); create unique index IX_EA0DCA13 on opencps_configcounter (uuid_[$COLUMN_LENGTH:75$], groupId); +create index IX_1F11AAF4 on opencps_csdldc_serviceinfo (serviceCode[$COLUMN_LENGTH:75$], status); +create index IX_BCB95758 on opencps_csdldc_serviceinfo (uuid_[$COLUMN_LENGTH:75$], companyId); +create unique index IX_2EDFD3DA on opencps_csdldc_serviceinfo (uuid_[$COLUMN_LENGTH:75$], groupId); + +create index IX_3E74E06A on opencps_csdldc_user (govAgencyCode[$COLUMN_LENGTH:75$], employeeEmail[$COLUMN_LENGTH:75$], status); +create index IX_8E5C272A on opencps_csdldc_user (uuid_[$COLUMN_LENGTH:75$], companyId); +create unique index IX_F438702C on opencps_csdldc_user (uuid_[$COLUMN_LENGTH:75$], groupId); + create index IX_62C6C2A0 on opencps_deliverable (deliverableCode[$COLUMN_LENGTH:128$], deliverableState); create index IX_8D12CC2D on opencps_deliverable (deliverableState, govAgencyCode[$COLUMN_LENGTH:128$], deliverableType[$COLUMN_LENGTH:255$], applicantIdNo[$COLUMN_LENGTH:128$]); create index IX_B5D727C6 on opencps_deliverable (groupId, applicantIdNo[$COLUMN_LENGTH:128$]); @@ -305,6 +313,7 @@ create unique index IX_CB4E0745 on opencps_reportlandtax (uuid_[$COLUMN_LENGTH:7 create index IX_29DADB16 on opencps_serviceconfig (govAgencyCode[$COLUMN_LENGTH:128$]); create index IX_E713E0A0 on opencps_serviceconfig (groupId, govAgencyCode[$COLUMN_LENGTH:128$]); create index IX_5ED8CC55 on opencps_serviceconfig (groupId, serviceInfoId, govAgencyCode[$COLUMN_LENGTH:128$], serviceLevel); +create index IX_4900D761 on opencps_serviceconfig (groupId, serviceInfoId, serviceLevel); create index IX_195F08D3 on opencps_serviceconfig (groupId, serviceLevel); create index IX_4F240C8E on opencps_serviceconfig (uuid_[$COLUMN_LENGTH:75$], companyId); create unique index IX_6FC25E90 on opencps_serviceconfig (uuid_[$COLUMN_LENGTH:75$], groupId); diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/sql/tables.sql b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/sql/tables.sql index e8ca5cede6..204e6cfc50 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/sql/tables.sql +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/META-INF/sql/tables.sql @@ -93,6 +93,32 @@ create table opencps_configcounter ( startCounter INTEGER ); +create table opencps_csdldc_serviceinfo ( + uuid_ VARCHAR(75) null, + idDcService LONG not null primary key, + groupId LONG, + companyId LONG, + userId LONG, + serviceCode VARCHAR(75) null, + serviceCodeDvcqg VARCHAR(75) null, + status INTEGER +); + +create table opencps_csdldc_user ( + uuid_ VARCHAR(75) null, + idDcUser LONG not null primary key, + groupId LONG, + companyId LONG, + userId LONG, + govAgencyCode VARCHAR(75) null, + govAgencyCodeDvcqg VARCHAR(75) null, + keyName VARCHAR(75) null, + keyPass VARCHAR(75) null, + userName VARCHAR(75) null, + employeeEmail VARCHAR(75) null, + status INTEGER +); + create table opencps_deliverable ( uuid_ VARCHAR(75) null, deliverableId LONG not null primary key, diff --git a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/service.properties b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/service.properties index f9196f3e85..1aaba3b012 100644 --- a/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/service.properties +++ b/modules/backend-dossiermgt/backend-dossiermgt-service/src/main/resources/service.properties @@ -13,5 +13,5 @@ ## build.namespace=dossiermgt - build.number=1558 - build.date=1623139977796 \ No newline at end of file + build.number=1582 + build.date=1626060413653 \ No newline at end of file diff --git a/modules/backend-postal-api-rest/src/main/java/backend/postal/api/rest/controller/impl/EInvoiceVNPTManagementImpl.java b/modules/backend-postal-api-rest/src/main/java/backend/postal/api/rest/controller/impl/EInvoiceVNPTManagementImpl.java index 7866310c4f..56c291547e 100644 --- a/modules/backend-postal-api-rest/src/main/java/backend/postal/api/rest/controller/impl/EInvoiceVNPTManagementImpl.java +++ b/modules/backend-postal-api-rest/src/main/java/backend/postal/api/rest/controller/impl/EInvoiceVNPTManagementImpl.java @@ -5,6 +5,7 @@ import com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil; import com.liferay.document.library.kernel.util.DLUtil; import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.json.JSONException; import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONObject; @@ -115,122 +116,133 @@ public Response downloadInvPDFFkeyNoPay(HttpServletRequest request, HttpHeaders long groupId = GetterUtil.getLong(header.getHeaderString(Field.GROUP_ID)); Dossier dossier = DossierLocalServiceUtil.fetchDossier(dossierId); PaymentFile paymentFile = PaymentFileLocalServiceUtil.getByDossierId(groupId, dossierId); + String result = StringPool.BLANK; // Hồ sơ có thanh toán và được cấu hình in biên lai if(dossier != null && paymentFile != null && paymentFile.getInvoicePayload().contentEquals("VNPT")) { - // Call api phát hành biên lai - Response importInvResponse = importAndPublishInv(request, header, company, locale, user, serviceContext, dossier, paymentFile); - int status = importInvResponse.getStatus(); - if (status != HttpStatus.SC_OK) { - return Response.status(HttpStatus.SC_NOT_FOUND) - .entity("Hồ sơ không có hóa đơn điện tử VNPT") - .type(MediaType.APPLICATION_JSON) - .build(); - } - - //Cấu hình đầu vào cho node của file xml downloadInvPDFFkeyNoPay - JSONObject schema = JSONFactoryUtil.createJSONObject(paymentFile.getEpaymentProfile()).getJSONObject("EINVOICE_VNPT_CONFIG").getJSONObject("downloadInvPDFFkeyNoPay"); - String xmlUsername = schema.getString(EInvoiceVNPTTerm.USER_NAME); - String xmlPassword = schema.getString(EInvoiceVNPTTerm.PASS_WORD); - - //Read file xml - String realPath = PropsUtil.get(ConfigProps.EINV_VNPT_HOME) + "/" ; - File xmlFile = new File(realPath + EInvoiceVNPTTerm.downloadInvPDFFkeyNoPayFile); - - String soapRequest = ""; - JSONObject importInv = JSONFactoryUtil.createJSONObject(importInvResponse.getEntity().toString()); - String fkey = importInv.getString("Fkey"); - - if (xmlFile.exists()) { - DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); - DocumentBuilder dBuilder; + if(paymentFile.getInvoiceFileEntryId() > 0 && paymentFile.getEinvoice() != null) { + // da co bien lai + _log.info("Ho so da co bien lai dien tu"); + return getEInvoiceFile(paymentFile).build(); - try { - - dBuilder = dbFactory.newDocumentBuilder(); - Document doc = dBuilder.parse(xmlFile); - doc.getDocumentElement().normalize(); - - // Set node value - NodeList nodeList = doc.getElementsByTagName(EInvoiceVNPTTerm.DOWNLOADINVPDFFKEYNOPAY); - Element element = null; - for (int i =0; i< nodeList.getLength(); i++) { - element = (Element) nodeList.item(i); - Node fkeyNode = element.getElementsByTagName(EInvoiceVNPTTerm.XML_FKEY).item(0).getFirstChild(); - fkeyNode.setNodeValue(fkey); - Node xmlUserNameNode = element.getElementsByTagName(EInvoiceVNPTTerm.XML_UserName).item(0).getFirstChild(); - xmlUserNameNode.setNodeValue(xmlUsername); - Node xmlPassWordNode = element.getElementsByTagName(EInvoiceVNPTTerm.XML_UserPass).item(0).getFirstChild(); - xmlPassWordNode.setNodeValue(xmlPassword); - } - - doc.getDocumentElement().normalize(); - StringWriter sw = new StringWriter(); - TransformerFactory tf = TransformerFactory.newInstance(); - Transformer transformer = tf.newTransformer(); - transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); - transformer.setOutputProperty(OutputKeys.METHOD, "xml"); - transformer.setOutputProperty(OutputKeys.INDENT, "yes"); - transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); - - transformer.transform(new DOMSource(doc), new StreamResult(sw)); - soapRequest = removeSpecialChar(sw.toString()); - - _log.debug("downloadInvPDFFkeyNoPay : " + soapRequest); - - HashMap properties = new HashMap(); - properties.put("Content-Type","text/xml; charset=utf-8"); - properties.put("SOAPAction", EInvoiceVNPTTerm.DOWNLOADINVPDFFKEYNOPAY_SOAP_ACTION); - - result = callSoapApi("POST", EInvoiceVNPTTerm.DOWNLOADINVPDFFKEYNOPAY_SOAP_ENDPOINT, - properties, soapRequest, EInvoiceVNPTTerm.DOWNLOADINVPDFFKEYNOPAY_SOAP_ACTION); - - _log.info("DownloadInvPDFFkeyNoPayResponse : " + result.toString()); - } catch (Exception e) { - e.printStackTrace(); + }else { + // Call api phát hành biên lai + _log.info("Ho so chua co bien lai dien tu"); + Response importInvResponse = importAndPublishInv(request, header, company, locale, user, serviceContext, dossier, paymentFile); + int status = importInvResponse.getStatus(); + if (status != HttpStatus.SC_OK) { + return Response.status(HttpStatus.SC_NOT_FOUND) + .entity("Hồ sơ không có hóa đơn điện tử VNPT") + .type(MediaType.APPLICATION_JSON) + .build(); } - } - - } - - DownloadInvPDFFkeyNoPayResponse doFkeyNoPayResponse = unMarshalXmlToDownloadInvPDFFkeyNoPayResponse(result); - String downloadInvPDFFkeyNoPayResult = doFkeyNoPayResponse.getDownloadInvPDFFkeyNoPayResult(); - switch (downloadInvPDFFkeyNoPayResult) { - case "ERR:1": - return Response.status(HttpStatus.SC_NON_AUTHORITATIVE_INFORMATION) - .entity(EInvoiceVNPTTerm.DOWNLOADINVPDFFKEYNOPAY_RES_MESSAGE_ERR1) - .type(MediaType.APPLICATION_JSON) - .build(); - case "ERR:6": - return Response.status(HttpStatus.SC_BAD_REQUEST) - .entity(EInvoiceVNPTTerm.DOWNLOADINVPDFFKEYNOPAY_RES_MESSAGE_ERR6) - .type(MediaType.APPLICATION_JSON) - .build(); - case "ERR:7": - return Response.status(HttpStatus.SC_NOT_IMPLEMENTED) - .entity(EInvoiceVNPTTerm.DOWNLOADINVPDFFKEYNOPAY_RES_MESSAGE_ERR7) - .type(MediaType.APPLICATION_JSON) - .build(); - default: - // download bien lai - Response saveResponse = uploadEInvoicePDF(paymentFile, downloadInvPDFFkeyNoPayResult, groupId, serviceContext, user, request); - if(saveResponse.getStatus() == 200) { - if(paymentFile.getInvoiceFileEntryId() > 0) { - FileEntry fileEntry = DLAppLocalServiceUtil.getFileEntry(paymentFile.getInvoiceFileEntryId()); - - File file = DLFileEntryLocalServiceUtil.getFile(fileEntry.getFileEntryId(), fileEntry.getVersion(), - true); + //Cấu hình đầu vào cho node của file xml downloadInvPDFFkeyNoPay + JSONObject schema = JSONFactoryUtil.createJSONObject(paymentFile.getEpaymentProfile()).getJSONObject("EINVOICE_VNPT_CONFIG").getJSONObject("downloadInvPDFFkeyNoPay"); + String xmlUsername = schema.getString(EInvoiceVNPTTerm.USER_NAME); + String xmlPassword = schema.getString(EInvoiceVNPTTerm.PASS_WORD); + String urlPath = schema.getString(EInvoiceVNPTTerm.DOWNLOADINVPDFFKEYNOPAY_SOAP_ENDPOINT); + //Read file xml + String realPath = PropsUtil.get(ConfigProps.EINV_VNPT_HOME) + "/" ; + File xmlFile = new File(realPath + EInvoiceVNPTTerm.downloadInvPDFFkeyNoPayFile); + + String soapRequest = ""; + JSONObject importInv = JSONFactoryUtil.createJSONObject(importInvResponse.getEntity().toString()); + String fkey = importInv.getString("Fkey"); + + if (xmlFile.exists()) { + DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder dBuilder; + + try { + + dBuilder = dbFactory.newDocumentBuilder(); + Document doc = dBuilder.parse(xmlFile); + doc.getDocumentElement().normalize(); + + // Set node value + NodeList nodeList = doc.getElementsByTagName(EInvoiceVNPTTerm.DOWNLOADINVPDFFKEYNOPAY); + Element element = null; + for (int i =0; i< nodeList.getLength(); i++) { + element = (Element) nodeList.item(i); + Node fkeyNode = element.getElementsByTagName(EInvoiceVNPTTerm.XML_FKEY).item(0).getFirstChild(); + fkeyNode.setNodeValue(fkey); + Node xmlUserNameNode = element.getElementsByTagName(EInvoiceVNPTTerm.XML_UserName).item(0).getFirstChild(); + xmlUserNameNode.setNodeValue(xmlUsername); + Node xmlPassWordNode = element.getElementsByTagName(EInvoiceVNPTTerm.XML_UserPass).item(0).getFirstChild(); + xmlPassWordNode.setNodeValue(xmlPassword); + } + + doc.getDocumentElement().normalize(); + StringWriter sw = new StringWriter(); + TransformerFactory tf = TransformerFactory.newInstance(); + Transformer transformer = tf.newTransformer(); + transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); + transformer.setOutputProperty(OutputKeys.METHOD, "xml"); + transformer.setOutputProperty(OutputKeys.INDENT, "yes"); + transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); + + transformer.transform(new DOMSource(doc), new StreamResult(sw)); + soapRequest = removeSpecialChar(sw.toString()); + + _log.debug("downloadInvPDFFkeyNoPay : " + soapRequest); + + HashMap properties = new HashMap(); + properties.put("Content-Type","text/xml; charset=utf-8"); + properties.put("SOAPAction", EInvoiceVNPTTerm.DOWNLOADINVPDFFKEYNOPAY_SOAP_ACTION); + + result = callSoapApi("POST", urlPath, + properties, soapRequest, EInvoiceVNPTTerm.DOWNLOADINVPDFFKEYNOPAY_SOAP_ACTION); + + _log.debug("DownloadInvPDFFkeyNoPayResponse : " + result.toString()); + } catch (Exception e) { + e.printStackTrace(); + } - ResponseBuilder responseBuilder = Response.ok((Object) file); - - responseBuilder.header("Content-Disposition", - "attachment; filename=\"" + fileEntry.getFileName() + "\""); - responseBuilder.header("Content-Type", fileEntry.getMimeType()); - - return responseBuilder.build(); } + + DownloadInvPDFFkeyNoPayResponse doFkeyNoPayResponse = unMarshalXmlToDownloadInvPDFFkeyNoPayResponse(result); + String downloadInvPDFFkeyNoPayResult = doFkeyNoPayResponse.getDownloadInvPDFFkeyNoPayResult(); + + switch (downloadInvPDFFkeyNoPayResult) { + case "ERR:1": + return Response.status(HttpStatus.SC_NON_AUTHORITATIVE_INFORMATION) + .entity(EInvoiceVNPTTerm.DOWNLOADINVPDFFKEYNOPAY_RES_MESSAGE_ERR1) + .type(MediaType.APPLICATION_JSON) + .build(); + case "ERR:6": + return Response.status(HttpStatus.SC_BAD_REQUEST) + .entity(EInvoiceVNPTTerm.DOWNLOADINVPDFFKEYNOPAY_RES_MESSAGE_ERR6) + .type(MediaType.APPLICATION_JSON) + .build(); + case "ERR:7": + return Response.status(HttpStatus.SC_NOT_IMPLEMENTED) + .entity(EInvoiceVNPTTerm.DOWNLOADINVPDFFKEYNOPAY_RES_MESSAGE_ERR7) + .type(MediaType.APPLICATION_JSON) + .build(); + default: + // download bien lai + Response saveResponse = uploadEInvoicePDF(paymentFile, downloadInvPDFFkeyNoPayResult, groupId, serviceContext, user, request); + _log.info("3333 :" + saveResponse.getStatus()); + _log.info("4444 :" + JSONFactoryUtil.looseSerialize(paymentFile)); + int tryCount = 0; + long invoiceFileEntryId = paymentFile.getInvoiceFileEntryId(); + while (Validator.isNull(invoiceFileEntryId) || invoiceFileEntryId == 0) { + try { + Thread.sleep(2000); + uploadEInvoicePDF(paymentFile, downloadInvPDFFkeyNoPayResult, groupId, serviceContext, user, request); + tryCount++; + if (tryCount == 5 ) break; + if (paymentFile.getInvoiceFileEntryId() > 0 ) break; + } catch (Exception e) { + e.getMessage(); + } + } + if(saveResponse.getStatus() == 200 && paymentFile.getInvoiceFileEntryId() > 0) { + return getEInvoiceFile(paymentFile).build(); + } + } } } return null; @@ -264,7 +276,7 @@ private Response importAndPublishInv(HttpServletRequest request, HttpHeaders hea String xmlPattern = schema.getString(EInvoiceVNPTTerm.PATTERN); String xmlSerial = schema.getString(EInvoiceVNPTTerm.SERIAL); String xmlConvert = schema.getString(EInvoiceVNPTTerm.CONVERT); - + String urlPath = schema.getString(EInvoiceVNPTTerm.IMPORTANDPUBLISHINV_SOAP_ENDPOINT); // Set value for ListInvModel ProductModel productModel = new ProductModel(); @@ -371,10 +383,10 @@ private Response importAndPublishInv(HttpServletRequest request, HttpHeaders hea properties.put("Content-Type","text/xml; charset=utf-8"); properties.put("SOAPAction", EInvoiceVNPTTerm.IMPORTANDPUBLISHINV_SOAP_ACTION); - result = callSoapApi("POST", EInvoiceVNPTTerm.IMPORTANDPUBLISHINV_SOAP_ENDPOINT, + result = callSoapApi("POST", urlPath, properties, soapRequest, EInvoiceVNPTTerm.IMPORTANDPUBLISHINV_SOAP_ACTION); - _log.info("ImportAndPublishInvResponse : " + result.toString()); + _log.debug("ImportAndPublishInvResponse : " + result.toString()); } catch (Exception e) { e.printStackTrace(); } @@ -443,6 +455,7 @@ private Response updateCus(Dossier dossier, PaymentFile paymentFile) throws JAXB String xmlUsername = schema.getString(EInvoiceVNPTTerm.USER_NAME); String xmlPassword = schema.getString(EInvoiceVNPTTerm.PASS_WORD); String xmlConvert = schema.getString(EInvoiceVNPTTerm.CONVERT); + String urlPath = schema.getString(EInvoiceVNPTTerm.UPDATE_CUS_SOAP_ENDPOINT); // Create ListCustomerModel CustomerModel customerModel = new CustomerModel(); @@ -521,10 +534,10 @@ private Response updateCus(Dossier dossier, PaymentFile paymentFile) throws JAXB properties.put("Content-Type","text/xml; charset=utf-8"); properties.put("SOAPAction", EInvoiceVNPTTerm.UPDATE_CUS_SOAP_ACTION); - result = callSoapApi("POST", EInvoiceVNPTTerm.UPDATE_CUS_SOAP_ENDPOINT, + result = callSoapApi("POST", urlPath, properties, soapRequest, EInvoiceVNPTTerm.UPDATE_CUS_SOAP_ACTION); - _log.info("UpdateCusResponse : " + result.toString()); + _log.debug("UpdateCusResponse : " + result.toString()); } catch (Exception e) { e.printStackTrace(); } @@ -783,8 +796,8 @@ private String callSoapApi(String httpMethod, String urlPath, HashMap) jsonData.get(PostalConstantUtils.DATA))); diff --git a/modules/backend-postal-api-rest/src/main/java/org/opencps/api/controller/util/EInvoiceVNPTTerm.java b/modules/backend-postal-api-rest/src/main/java/org/opencps/api/controller/util/EInvoiceVNPTTerm.java index 121afc1bcd..76bbab0245 100644 --- a/modules/backend-postal-api-rest/src/main/java/org/opencps/api/controller/util/EInvoiceVNPTTerm.java +++ b/modules/backend-postal-api-rest/src/main/java/org/opencps/api/controller/util/EInvoiceVNPTTerm.java @@ -10,6 +10,10 @@ public class EInvoiceVNPTTerm { public static final String PATTERN = "pattern"; public static final String SERIAL = "serial"; public static final String CONVERT = "convert"; + public static final String UPDATE_CUS_SOAP_ENDPOINT = "updateCusSoapEndPoint"; + public static final String IMPORTANDPUBLISHINV_SOAP_ENDPOINT = "ImportAndPublishInvSoapEndPoint"; + public static final String DOWNLOADINVPDFFKEYNOPAY_SOAP_ENDPOINT = "downloadInvPDFFkeyNoPaySoapEndPoint"; + //common public static final String NAME_SPACE = "tem"; @@ -30,14 +34,12 @@ public class EInvoiceVNPTTerm { public static final String XML_SERIAL = "tem:serial"; public static final String XML_CONVERT = "tem:convert"; public static final String XML_PASS = "tem:pass"; - public static final String XML_UserName = "userName"; - public static final String XML_UserPass = "userPass"; - public static final String XML_FKEY = "fkey"; + public static final String XML_UserName = "tem:userName"; + public static final String XML_UserPass = "tem:userPass"; + public static final String XML_FKEY = "tem:fkey"; //api update customer - public static final String UPDATE_CUS_SOAP_ENDPOINT = - "https://vpboxaydungadmindemo.vnpt-invoice.com.vn/PublishService.asmx"; public static final String UPDATE_CUS_SOAP_ACTION = "http://tempuri.org/UpdateCus"; public static final String UPDATE_CUS_RES = "UpdateCusResponse"; @@ -48,8 +50,6 @@ public class EInvoiceVNPTTerm { //api ImportAndPublishInv public static final String IMPORTANDPUBLISHINV = "tem:ImportAndPublishInv"; - public static final String IMPORTANDPUBLISHINV_SOAP_ENDPOINT = - "https://vpboxaydungadmindemo.vnpt-invoice.com.vn/PublishService.asmx"; public static final String IMPORTANDPUBLISHINV_SOAP_ACTION = "http://tempuri.org/ImportAndPublishInv"; public static final String IMPORTANDPUBLISHINV_RES = "ImportAndPublishInvResponse"; @@ -62,9 +62,7 @@ public class EInvoiceVNPTTerm { public static final String IMPORTANDPUBLISHINV_RES_MESSAGE_SUCCESS = "Biên lai đã phát hành thành công"; //api downloadInvPDFFkeyNoPay - public static final String DOWNLOADINVPDFFKEYNOPAY = "downloadInvPDFFkeyNoPay"; - public static final String DOWNLOADINVPDFFKEYNOPAY_SOAP_ENDPOINT = - "https://vpboxaydungadmindemo.vnpt-invoice.com.vn/PortalService.asmx?wsdl"; + public static final String DOWNLOADINVPDFFKEYNOPAY = "tem:downloadInvPDFFkeyNoPay"; public static final String DOWNLOADINVPDFFKEYNOPAY_SOAP_ACTION = "http://tempuri.org/downloadInvPDFFkeyNoPay"; public static final String DOWNLOADINVPDFFKEYNOPAY_RES = "downloadInvPDFFkeyNoPayResponse"; diff --git a/modules/backend-postal-api-rest/src/main/java/org/opencps/api/controller/util/VotingUtils.java b/modules/backend-postal-api-rest/src/main/java/org/opencps/api/controller/util/VotingUtils.java index ad5f1cd5c5..9a1f4482a1 100644 --- a/modules/backend-postal-api-rest/src/main/java/org/opencps/api/controller/util/VotingUtils.java +++ b/modules/backend-postal-api-rest/src/main/java/org/opencps/api/controller/util/VotingUtils.java @@ -589,9 +589,11 @@ public static Long getVotingCount(List votingList) { int countTem = 0; int countVotingId = 0; if (votingList == null || votingList.size() < 1) return result; + _log.info("votingList: " + votingList.size()); for (Document doc : votingList) { Long votingId = Long.valueOf(doc.get(VotingTerm.VOTING_ID)); countVotingId ++; + _log.info("votingId: " + votingId); if (!StringUtils.isEmpty(votingId)) { count = VotingResultLocalServiceUtil.countByF_votingId(votingId); countTem = countTem + count; diff --git a/modules/backend-statistic-rest/build.gradle b/modules/backend-statistic-rest/build.gradle index 9ed71f8956..d733142653 100644 --- a/modules/backend-statistic-rest/build.gradle +++ b/modules/backend-statistic-rest/build.gradle @@ -44,7 +44,8 @@ dependencies { compileOnly project(":modules:backend-feedback:backend-feedback-api") compileOnly project(":modules:backend-usermgt:backend-usermgt-service") - compileOnly project(":modules:backend-usermgt:backend-usermgt-api") + compileOnly project(":modules:backend-usermgt:backend-usermgt-api") + } repositories { flatDir { diff --git a/modules/backend-statistic-rest/src/main/java/org/opencps/statistic/rest/application/OpencpsStatisticRestApplication.java b/modules/backend-statistic-rest/src/main/java/org/opencps/statistic/rest/application/OpencpsStatisticRestApplication.java index ccab84efd8..0510ba9362 100644 --- a/modules/backend-statistic-rest/src/main/java/org/opencps/statistic/rest/application/OpencpsStatisticRestApplication.java +++ b/modules/backend-statistic-rest/src/main/java/org/opencps/statistic/rest/application/OpencpsStatisticRestApplication.java @@ -184,6 +184,8 @@ public class OpencpsStatisticRestApplication extends Application { private DossierStatisticManualFinderService dossierStatisticManualFinderService = new DossierStatisticManualFinderServiceImpl(); public static final String ALL_MONTH = "-1"; + + public static final String API_VOTING_STATISTIC = "API_VOTING_STATISTIC"; public Set getSingletons() { return Collections.singleton(this); @@ -713,7 +715,10 @@ public Response searchDossierStatistic(@HeaderParam("groupId") long groupId, @GET @Path("/votingsCountPoint") public VotingResultResponse searchVotingStatisticCountPoint(@HeaderParam("groupId") long groupId, - @BeanParam VotingSearchModel query) { + @BeanParam VotingSearchModel query, @Context HttpServletRequest request) { + + User user = (User) request.getAttribute("USER"); + try { String fromStatisticDate = query.getFromStatisticDate() != null ? query.getFromStatisticDate() : "1/1/2019"; String toStatisticDate = query.getToStatisticDate() != null ? query.getToStatisticDate() : "1/1/2100"; @@ -757,9 +762,24 @@ public VotingResultResponse searchVotingStatisticCountPoint(@HeaderParam("groupI statisticResponse.setTotal(listVotingResult.size()); statisticResponse.setData(listVotingResult); + // ghi log vao syncTracking + /* + * OpenCPSUtils.addSyncTracking(API_VOTING_STATISTIC, user.getUserId(), groupId, + * StringPool.NULL, StringPool.NULL, StringPool.NULL, 1, + * JSONFactoryUtil.looseSerialize(query), + * JSONFactoryUtil.looseSerialize(statisticResponse)); + */ + return statisticResponse; }catch (Exception e) { _log.error("error", e); + // ghi log vao syncTracking + /* + * OpenCPSUtils.addSyncTracking(API_VOTING_STATISTIC, user.getUserId(), groupId, + * StringPool.NULL, StringPool.NULL, StringPool.NULL, 0, + * JSONFactoryUtil.looseSerialize(query), StringPool.NULL); + */ + OpencpsServiceExceptionDetails serviceExceptionDetails = new OpencpsServiceExceptionDetails(); serviceExceptionDetails.setFaultCode(String.valueOf(HttpURLConnection.HTTP_INTERNAL_ERROR)); diff --git a/modules/backend-statistic-rest/src/main/java/org/opencps/statistic/rest/dto/DossierStatisticKey.java b/modules/backend-statistic-rest/src/main/java/org/opencps/statistic/rest/dto/DossierStatisticKey.java index c76633a7fe..60771464d7 100644 --- a/modules/backend-statistic-rest/src/main/java/org/opencps/statistic/rest/dto/DossierStatisticKey.java +++ b/modules/backend-statistic-rest/src/main/java/org/opencps/statistic/rest/dto/DossierStatisticKey.java @@ -41,17 +41,18 @@ public int getReporting() { public void setReporting(int reporting) { this.reporting = reporting; } - public int getMonth() { - return month; - } - public void setMonth(int month) { - this.month = month; - } public int getYear() { return year; } public void setYear(int year) { this.year = year; } + public int getMonth() { + return month; + } + public void setMonth(int month) { + this.month = month; + } + } diff --git a/modules/backend-statistic-rest/src/main/java/org/opencps/statistic/rest/engine/DossierStatisticEngine.java b/modules/backend-statistic-rest/src/main/java/org/opencps/statistic/rest/engine/DossierStatisticEngine.java index ecf249a806..7d0b50b3df 100644 --- a/modules/backend-statistic-rest/src/main/java/org/opencps/statistic/rest/engine/DossierStatisticEngine.java +++ b/modules/backend-statistic-rest/src/main/java/org/opencps/statistic/rest/engine/DossierStatisticEngine.java @@ -241,7 +241,8 @@ protected void doReceive(Message message) throws Exception { for (int month = 1; month <= monthCurrent; month ++) { boolean flagStatistic = true; if (month < monthCurrent) { - _log.info("STATISTICS CALCULATE ONE MONTH SITE: " + month + ", " + site.getGroupId() + ", " + site.getName(Locale.getDefault()) + " " + (System.currentTimeMillis() - startTime) + " ms");; + _log.debug("STATISTICS CALCULATE ONE MONTH SITE: " + month + ", " + site.getGroupId() + ", " + site.getName(Locale.getDefault()) + " " + (System.currentTimeMillis() - startTime) + " ms");; + OpencpsDossierStatistic statisticInfo = engineUpdateAction .getStatisticByMonthYearAndNotReport(site.getGroupId(), month, yearCurrent, 0); if (statisticInfo != null) { @@ -277,7 +278,7 @@ protected void doReceive(Message message) throws Exception { processUpdateStatistic(site.getGroupId(), month, yearCurrent, payload, engineUpdateAction, serviceDomainResponse, calculateData); try { -// _log.debug("2 :" + site.getGroupId() + " || " + month + " || " + yearCurrent + " || " + JSONFactoryUtil.looseSerialize(calculateData.get(1))); + //_log.info("2 :" + site.getGroupId() + " || " + month + " || " + yearCurrent + " || " + JSONFactoryUtil.looseSerialize(calculateData.get(1))); } catch (Exception e) { _log.error(e.getMessage()); } @@ -610,12 +611,12 @@ private void processUpdateStatistic(long groupId, int month, int year, GetDossie int total = jsonData.getInt(ConstantUtils.TOTAL); //_log.info("GET DOSSIER SIZE: " + datas != null ? datas.size() : 0); - _log.info("GET DOSSIER total: " + total); + _log.debug("GET DOSSIER total: " + total); if (total > datas.size()) { JSONObject jsonData2 = actions.getDossiers(-1, companyId, groupId, params, sorts, 0, total, new ServiceContext()); datas = (List) jsonData2.get(ConstantUtils.DATA); - _log.info("_GET ALL DOSSIER SIZE_: " + datas.size()); + _log.debug("_GET ALL DOSSIER SIZE_: " + datas.size()); } for (Document doc : datas) { @@ -678,7 +679,7 @@ private void processUpdateStatistic(long groupId, int month, int year, GetDossie calculateData.put(month, statisticData); try { - _log.debug("1 :" + groupId + " || " + month + " || " + year + " || " + JSONFactoryUtil.looseSerialize(calculateData.get(1))); + //_log.info("1 :" + groupId + " || " + month + " || " + year + " || " + JSONFactoryUtil.looseSerialize(calculateData.get(1))); } catch (Exception e) { _log.error(e.getMessage()); } diff --git a/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/exception/NoSuchOpencpsDossierStatisticMgtException.java b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/exception/NoSuchOpencpsDossierStatisticMgtException.java new file mode 100644 index 0000000000..25f60be0bd --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/exception/NoSuchOpencpsDossierStatisticMgtException.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +package org.opencps.statistic.exception; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.exception.NoSuchModelException; + +/** + * @author khoavu + */ +@ProviderType +public class NoSuchOpencpsDossierStatisticMgtException extends NoSuchModelException { + + public NoSuchOpencpsDossierStatisticMgtException() { + } + + public NoSuchOpencpsDossierStatisticMgtException(String msg) { + super(msg); + } + + public NoSuchOpencpsDossierStatisticMgtException(String msg, Throwable cause) { + super(msg, cause); + } + + public NoSuchOpencpsDossierStatisticMgtException(Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/model/OpencpsDossierStatisticMgt.java b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/model/OpencpsDossierStatisticMgt.java new file mode 100644 index 0000000000..d49f1c467c --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/model/OpencpsDossierStatisticMgt.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.annotation.ImplementationClassName; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.util.Accessor; + +/** + * The extended model interface for the OpencpsDossierStatisticMgt service. Represents a row in the "opencps_statistic_mgt" database table, with each column mapped to a property of this class. + * + * @author khoavu + * @see OpencpsDossierStatisticMgtModel + * @see org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtImpl + * @see org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl + * @generated + */ +@ImplementationClassName("org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtImpl") +@ProviderType +public interface OpencpsDossierStatisticMgt + extends OpencpsDossierStatisticMgtModel, PersistedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this interface directly. Add methods to {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + public static final Accessor DOSSIER_STATISTIC_MGT_ID_ACCESSOR = + new Accessor() { + @Override + public Long get( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + return opencpsDossierStatisticMgt.getDossierStatisticMgtId(); + } + + @Override + public Class getAttributeClass() { + return Long.class; + } + + @Override + public Class getTypeClass() { + return OpencpsDossierStatisticMgt.class; + } + }; +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/model/OpencpsDossierStatisticMgtModel.java b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/model/OpencpsDossierStatisticMgtModel.java new file mode 100644 index 0000000000..795fdbd46f --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/model/OpencpsDossierStatisticMgtModel.java @@ -0,0 +1,633 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; + +import com.liferay.portal.kernel.bean.AutoEscape; +import com.liferay.portal.kernel.model.BaseModel; +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.service.ServiceContext; + +import java.io.Serializable; + +import java.util.Date; + +/** + * The base model interface for the OpencpsDossierStatisticMgt service. Represents a row in the "opencps_statistic_mgt" database table, with each column mapped to a property of this class. + * + *

+ * This interface and its corresponding implementation {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtImpl}. + *

+ * + * @author khoavu + * @see OpencpsDossierStatisticMgt + * @see org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtImpl + * @see org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl + * @generated + */ +@ProviderType +public interface OpencpsDossierStatisticMgtModel extends BaseModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. All methods that expect a opencps dossier statistic mgt model instance should use the {@link OpencpsDossierStatisticMgt} interface instead. + */ + + /** + * Returns the primary key of this opencps dossier statistic mgt. + * + * @return the primary key of this opencps dossier statistic mgt + */ + public long getPrimaryKey(); + + /** + * Sets the primary key of this opencps dossier statistic mgt. + * + * @param primaryKey the primary key of this opencps dossier statistic mgt + */ + public void setPrimaryKey(long primaryKey); + + /** + * Returns the uuid of this opencps dossier statistic mgt. + * + * @return the uuid of this opencps dossier statistic mgt + */ + @AutoEscape + public String getUuid(); + + /** + * Sets the uuid of this opencps dossier statistic mgt. + * + * @param uuid the uuid of this opencps dossier statistic mgt + */ + public void setUuid(String uuid); + + /** + * Returns the dossier statistic mgt ID of this opencps dossier statistic mgt. + * + * @return the dossier statistic mgt ID of this opencps dossier statistic mgt + */ + public long getDossierStatisticMgtId(); + + /** + * Sets the dossier statistic mgt ID of this opencps dossier statistic mgt. + * + * @param dossierStatisticMgtId the dossier statistic mgt ID of this opencps dossier statistic mgt + */ + public void setDossierStatisticMgtId(long dossierStatisticMgtId); + + /** + * Returns the group ID of this opencps dossier statistic mgt. + * + * @return the group ID of this opencps dossier statistic mgt + */ + public long getGroupId(); + + /** + * Sets the group ID of this opencps dossier statistic mgt. + * + * @param groupId the group ID of this opencps dossier statistic mgt + */ + public void setGroupId(long groupId); + + /** + * Returns the user ID of this opencps dossier statistic mgt. + * + * @return the user ID of this opencps dossier statistic mgt + */ + public long getUserId(); + + /** + * Sets the user ID of this opencps dossier statistic mgt. + * + * @param userId the user ID of this opencps dossier statistic mgt + */ + public void setUserId(long userId); + + /** + * Returns the user uuid of this opencps dossier statistic mgt. + * + * @return the user uuid of this opencps dossier statistic mgt + */ + public String getUserUuid(); + + /** + * Sets the user uuid of this opencps dossier statistic mgt. + * + * @param userUuid the user uuid of this opencps dossier statistic mgt + */ + public void setUserUuid(String userUuid); + + /** + * Returns the user name of this opencps dossier statistic mgt. + * + * @return the user name of this opencps dossier statistic mgt + */ + @AutoEscape + public String getUserName(); + + /** + * Sets the user name of this opencps dossier statistic mgt. + * + * @param userName the user name of this opencps dossier statistic mgt + */ + public void setUserName(String userName); + + /** + * Returns the create date of this opencps dossier statistic mgt. + * + * @return the create date of this opencps dossier statistic mgt + */ + public Date getCreateDate(); + + /** + * Sets the create date of this opencps dossier statistic mgt. + * + * @param createDate the create date of this opencps dossier statistic mgt + */ + public void setCreateDate(Date createDate); + + /** + * Returns the modified date of this opencps dossier statistic mgt. + * + * @return the modified date of this opencps dossier statistic mgt + */ + public Date getModifiedDate(); + + /** + * Sets the modified date of this opencps dossier statistic mgt. + * + * @param modifiedDate the modified date of this opencps dossier statistic mgt + */ + public void setModifiedDate(Date modifiedDate); + + /** + * Returns the month of this opencps dossier statistic mgt. + * + * @return the month of this opencps dossier statistic mgt + */ + public int getMonth(); + + /** + * Sets the month of this opencps dossier statistic mgt. + * + * @param month the month of this opencps dossier statistic mgt + */ + public void setMonth(int month); + + /** + * Returns the year of this opencps dossier statistic mgt. + * + * @return the year of this opencps dossier statistic mgt + */ + public int getYear(); + + /** + * Sets the year of this opencps dossier statistic mgt. + * + * @param year the year of this opencps dossier statistic mgt + */ + public void setYear(int year); + + /** + * Returns the total count of this opencps dossier statistic mgt. + * + * @return the total count of this opencps dossier statistic mgt + */ + public int getTotalCount(); + + /** + * Sets the total count of this opencps dossier statistic mgt. + * + * @param totalCount the total count of this opencps dossier statistic mgt + */ + public void setTotalCount(int totalCount); + + /** + * Returns the process count of this opencps dossier statistic mgt. + * + * @return the process count of this opencps dossier statistic mgt + */ + public int getProcessCount(); + + /** + * Sets the process count of this opencps dossier statistic mgt. + * + * @param processCount the process count of this opencps dossier statistic mgt + */ + public void setProcessCount(int processCount); + + /** + * Returns the remaining count of this opencps dossier statistic mgt. + * + * @return the remaining count of this opencps dossier statistic mgt + */ + public int getRemainingCount(); + + /** + * Sets the remaining count of this opencps dossier statistic mgt. + * + * @param remainingCount the remaining count of this opencps dossier statistic mgt + */ + public void setRemainingCount(int remainingCount); + + /** + * Returns the received count of this opencps dossier statistic mgt. + * + * @return the received count of this opencps dossier statistic mgt + */ + public int getReceivedCount(); + + /** + * Sets the received count of this opencps dossier statistic mgt. + * + * @param receivedCount the received count of this opencps dossier statistic mgt + */ + public void setReceivedCount(int receivedCount); + + /** + * Returns the online count of this opencps dossier statistic mgt. + * + * @return the online count of this opencps dossier statistic mgt + */ + public int getOnlineCount(); + + /** + * Sets the online count of this opencps dossier statistic mgt. + * + * @param onlineCount the online count of this opencps dossier statistic mgt + */ + public void setOnlineCount(int onlineCount); + + /** + * Returns the onegate count of this opencps dossier statistic mgt. + * + * @return the onegate count of this opencps dossier statistic mgt + */ + public int getOnegateCount(); + + /** + * Sets the onegate count of this opencps dossier statistic mgt. + * + * @param onegateCount the onegate count of this opencps dossier statistic mgt + */ + public void setOnegateCount(int onegateCount); + + /** + * Returns the release count of this opencps dossier statistic mgt. + * + * @return the release count of this opencps dossier statistic mgt + */ + public int getReleaseCount(); + + /** + * Sets the release count of this opencps dossier statistic mgt. + * + * @param releaseCount the release count of this opencps dossier statistic mgt + */ + public void setReleaseCount(int releaseCount); + + /** + * Returns the betimes count of this opencps dossier statistic mgt. + * + * @return the betimes count of this opencps dossier statistic mgt + */ + public int getBetimesCount(); + + /** + * Sets the betimes count of this opencps dossier statistic mgt. + * + * @param betimesCount the betimes count of this opencps dossier statistic mgt + */ + public void setBetimesCount(int betimesCount); + + /** + * Returns the ontime count of this opencps dossier statistic mgt. + * + * @return the ontime count of this opencps dossier statistic mgt + */ + public int getOntimeCount(); + + /** + * Sets the ontime count of this opencps dossier statistic mgt. + * + * @param ontimeCount the ontime count of this opencps dossier statistic mgt + */ + public void setOntimeCount(int ontimeCount); + + /** + * Returns the overtime count of this opencps dossier statistic mgt. + * + * @return the overtime count of this opencps dossier statistic mgt + */ + public int getOvertimeCount(); + + /** + * Sets the overtime count of this opencps dossier statistic mgt. + * + * @param overtimeCount the overtime count of this opencps dossier statistic mgt + */ + public void setOvertimeCount(int overtimeCount); + + /** + * Returns the done count of this opencps dossier statistic mgt. + * + * @return the done count of this opencps dossier statistic mgt + */ + public int getDoneCount(); + + /** + * Sets the done count of this opencps dossier statistic mgt. + * + * @param doneCount the done count of this opencps dossier statistic mgt + */ + public void setDoneCount(int doneCount); + + /** + * Returns the releasing count of this opencps dossier statistic mgt. + * + * @return the releasing count of this opencps dossier statistic mgt + */ + public int getReleasingCount(); + + /** + * Sets the releasing count of this opencps dossier statistic mgt. + * + * @param releasingCount the releasing count of this opencps dossier statistic mgt + */ + public void setReleasingCount(int releasingCount); + + /** + * Returns the processing count of this opencps dossier statistic mgt. + * + * @return the processing count of this opencps dossier statistic mgt + */ + public int getProcessingCount(); + + /** + * Sets the processing count of this opencps dossier statistic mgt. + * + * @param processingCount the processing count of this opencps dossier statistic mgt + */ + public void setProcessingCount(int processingCount); + + /** + * Returns the undue count of this opencps dossier statistic mgt. + * + * @return the undue count of this opencps dossier statistic mgt + */ + public int getUndueCount(); + + /** + * Sets the undue count of this opencps dossier statistic mgt. + * + * @param undueCount the undue count of this opencps dossier statistic mgt + */ + public void setUndueCount(int undueCount); + + /** + * Returns the overdue count of this opencps dossier statistic mgt. + * + * @return the overdue count of this opencps dossier statistic mgt + */ + public int getOverdueCount(); + + /** + * Sets the overdue count of this opencps dossier statistic mgt. + * + * @param overdueCount the overdue count of this opencps dossier statistic mgt + */ + public void setOverdueCount(int overdueCount); + + /** + * Returns the ontime percentage of this opencps dossier statistic mgt. + * + * @return the ontime percentage of this opencps dossier statistic mgt + */ + public int getOntimePercentage(); + + /** + * Sets the ontime percentage of this opencps dossier statistic mgt. + * + * @param ontimePercentage the ontime percentage of this opencps dossier statistic mgt + */ + public void setOntimePercentage(int ontimePercentage); + + /** + * Returns the waiting count of this opencps dossier statistic mgt. + * + * @return the waiting count of this opencps dossier statistic mgt + */ + public int getWaitingCount(); + + /** + * Sets the waiting count of this opencps dossier statistic mgt. + * + * @param waitingCount the waiting count of this opencps dossier statistic mgt + */ + public void setWaitingCount(int waitingCount); + + /** + * Returns the gov agency code of this opencps dossier statistic mgt. + * + * @return the gov agency code of this opencps dossier statistic mgt + */ + @AutoEscape + public String getGovAgencyCode(); + + /** + * Sets the gov agency code of this opencps dossier statistic mgt. + * + * @param govAgencyCode the gov agency code of this opencps dossier statistic mgt + */ + public void setGovAgencyCode(String govAgencyCode); + + /** + * Returns the gov agency name of this opencps dossier statistic mgt. + * + * @return the gov agency name of this opencps dossier statistic mgt + */ + @AutoEscape + public String getGovAgencyName(); + + /** + * Sets the gov agency name of this opencps dossier statistic mgt. + * + * @param govAgencyName the gov agency name of this opencps dossier statistic mgt + */ + public void setGovAgencyName(String govAgencyName); + + /** + * Returns the domain code of this opencps dossier statistic mgt. + * + * @return the domain code of this opencps dossier statistic mgt + */ + @AutoEscape + public String getDomainCode(); + + /** + * Sets the domain code of this opencps dossier statistic mgt. + * + * @param domainCode the domain code of this opencps dossier statistic mgt + */ + public void setDomainCode(String domainCode); + + /** + * Returns the domain name of this opencps dossier statistic mgt. + * + * @return the domain name of this opencps dossier statistic mgt + */ + @AutoEscape + public String getDomainName(); + + /** + * Sets the domain name of this opencps dossier statistic mgt. + * + * @param domainName the domain name of this opencps dossier statistic mgt + */ + public void setDomainName(String domainName); + + /** + * Returns the service code of this opencps dossier statistic mgt. + * + * @return the service code of this opencps dossier statistic mgt + */ + @AutoEscape + public String getServiceCode(); + + /** + * Sets the service code of this opencps dossier statistic mgt. + * + * @param serviceCode the service code of this opencps dossier statistic mgt + */ + public void setServiceCode(String serviceCode); + + /** + * Returns the service name of this opencps dossier statistic mgt. + * + * @return the service name of this opencps dossier statistic mgt + */ + @AutoEscape + public String getServiceName(); + + /** + * Sets the service name of this opencps dossier statistic mgt. + * + * @param serviceName the service name of this opencps dossier statistic mgt + */ + public void setServiceName(String serviceName); + + /** + * Returns the group by of this opencps dossier statistic mgt. + * + * @return the group by of this opencps dossier statistic mgt + */ + public int getGroupBy(); + + /** + * Sets the group by of this opencps dossier statistic mgt. + * + * @param groupBy the group by of this opencps dossier statistic mgt + */ + public void setGroupBy(int groupBy); + + /** + * Returns the cancelled count of this opencps dossier statistic mgt. + * + * @return the cancelled count of this opencps dossier statistic mgt + */ + public int getCancelledCount(); + + /** + * Sets the cancelled count of this opencps dossier statistic mgt. + * + * @param cancelledCount the cancelled count of this opencps dossier statistic mgt + */ + public void setCancelledCount(int cancelledCount); + + /** + * Returns the unresolved count of this opencps dossier statistic mgt. + * + * @return the unresolved count of this opencps dossier statistic mgt + */ + public int getUnresolvedCount(); + + /** + * Sets the unresolved count of this opencps dossier statistic mgt. + * + * @param unresolvedCount the unresolved count of this opencps dossier statistic mgt + */ + public void setUnresolvedCount(int unresolvedCount); + + @Override + public boolean isNew(); + + @Override + public void setNew(boolean n); + + @Override + public boolean isCachedModel(); + + @Override + public void setCachedModel(boolean cachedModel); + + @Override + public boolean isEscapedModel(); + + @Override + public Serializable getPrimaryKeyObj(); + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj); + + @Override + public ExpandoBridge getExpandoBridge(); + + @Override + public void setExpandoBridgeAttributes(BaseModel baseModel); + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge); + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext); + + @Override + public Object clone(); + + @Override + public int compareTo(OpencpsDossierStatisticMgt opencpsDossierStatisticMgt); + + @Override + public int hashCode(); + + @Override + public CacheModel toCacheModel(); + + @Override + public OpencpsDossierStatisticMgt toEscapedModel(); + + @Override + public OpencpsDossierStatisticMgt toUnescapedModel(); + + @Override + public String toString(); + + @Override + public String toXmlString(); +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/model/OpencpsDossierStatisticMgtSoap.java b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/model/OpencpsDossierStatisticMgtSoap.java new file mode 100644 index 0000000000..3e737e5d70 --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/model/OpencpsDossierStatisticMgtSoap.java @@ -0,0 +1,442 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.model; + +import aQute.bnd.annotation.ProviderType; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * This class is used by SOAP remote services. + * + * @author khoavu + * @generated + */ +@ProviderType +public class OpencpsDossierStatisticMgtSoap implements Serializable { + public static OpencpsDossierStatisticMgtSoap toSoapModel( + OpencpsDossierStatisticMgt model) { + OpencpsDossierStatisticMgtSoap soapModel = new OpencpsDossierStatisticMgtSoap(); + + soapModel.setUuid(model.getUuid()); + soapModel.setDossierStatisticMgtId(model.getDossierStatisticMgtId()); + soapModel.setGroupId(model.getGroupId()); + soapModel.setUserId(model.getUserId()); + soapModel.setUserName(model.getUserName()); + soapModel.setCreateDate(model.getCreateDate()); + soapModel.setModifiedDate(model.getModifiedDate()); + soapModel.setMonth(model.getMonth()); + soapModel.setYear(model.getYear()); + soapModel.setTotalCount(model.getTotalCount()); + soapModel.setProcessCount(model.getProcessCount()); + soapModel.setRemainingCount(model.getRemainingCount()); + soapModel.setReceivedCount(model.getReceivedCount()); + soapModel.setOnlineCount(model.getOnlineCount()); + soapModel.setOnegateCount(model.getOnegateCount()); + soapModel.setReleaseCount(model.getReleaseCount()); + soapModel.setBetimesCount(model.getBetimesCount()); + soapModel.setOntimeCount(model.getOntimeCount()); + soapModel.setOvertimeCount(model.getOvertimeCount()); + soapModel.setDoneCount(model.getDoneCount()); + soapModel.setReleasingCount(model.getReleasingCount()); + soapModel.setProcessingCount(model.getProcessingCount()); + soapModel.setUndueCount(model.getUndueCount()); + soapModel.setOverdueCount(model.getOverdueCount()); + soapModel.setOntimePercentage(model.getOntimePercentage()); + soapModel.setWaitingCount(model.getWaitingCount()); + soapModel.setGovAgencyCode(model.getGovAgencyCode()); + soapModel.setGovAgencyName(model.getGovAgencyName()); + soapModel.setDomainCode(model.getDomainCode()); + soapModel.setDomainName(model.getDomainName()); + soapModel.setServiceCode(model.getServiceCode()); + soapModel.setServiceName(model.getServiceName()); + soapModel.setGroupBy(model.getGroupBy()); + soapModel.setCancelledCount(model.getCancelledCount()); + soapModel.setUnresolvedCount(model.getUnresolvedCount()); + + return soapModel; + } + + public static OpencpsDossierStatisticMgtSoap[] toSoapModels( + OpencpsDossierStatisticMgt[] models) { + OpencpsDossierStatisticMgtSoap[] soapModels = new OpencpsDossierStatisticMgtSoap[models.length]; + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModel(models[i]); + } + + return soapModels; + } + + public static OpencpsDossierStatisticMgtSoap[][] toSoapModels( + OpencpsDossierStatisticMgt[][] models) { + OpencpsDossierStatisticMgtSoap[][] soapModels = null; + + if (models.length > 0) { + soapModels = new OpencpsDossierStatisticMgtSoap[models.length][models[0].length]; + } + else { + soapModels = new OpencpsDossierStatisticMgtSoap[0][0]; + } + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModels(models[i]); + } + + return soapModels; + } + + public static OpencpsDossierStatisticMgtSoap[] toSoapModels( + List models) { + List soapModels = new ArrayList(models.size()); + + for (OpencpsDossierStatisticMgt model : models) { + soapModels.add(toSoapModel(model)); + } + + return soapModels.toArray(new OpencpsDossierStatisticMgtSoap[soapModels.size()]); + } + + public OpencpsDossierStatisticMgtSoap() { + } + + public long getPrimaryKey() { + return _dossierStatisticMgtId; + } + + public void setPrimaryKey(long pk) { + setDossierStatisticMgtId(pk); + } + + public String getUuid() { + return _uuid; + } + + public void setUuid(String uuid) { + _uuid = uuid; + } + + public long getDossierStatisticMgtId() { + return _dossierStatisticMgtId; + } + + public void setDossierStatisticMgtId(long dossierStatisticMgtId) { + _dossierStatisticMgtId = dossierStatisticMgtId; + } + + public long getGroupId() { + return _groupId; + } + + public void setGroupId(long groupId) { + _groupId = groupId; + } + + public long getUserId() { + return _userId; + } + + public void setUserId(long userId) { + _userId = userId; + } + + public String getUserName() { + return _userName; + } + + public void setUserName(String userName) { + _userName = userName; + } + + public Date getCreateDate() { + return _createDate; + } + + public void setCreateDate(Date createDate) { + _createDate = createDate; + } + + public Date getModifiedDate() { + return _modifiedDate; + } + + public void setModifiedDate(Date modifiedDate) { + _modifiedDate = modifiedDate; + } + + public int getMonth() { + return _month; + } + + public void setMonth(int month) { + _month = month; + } + + public int getYear() { + return _year; + } + + public void setYear(int year) { + _year = year; + } + + public int getTotalCount() { + return _totalCount; + } + + public void setTotalCount(int totalCount) { + _totalCount = totalCount; + } + + public int getProcessCount() { + return _processCount; + } + + public void setProcessCount(int processCount) { + _processCount = processCount; + } + + public int getRemainingCount() { + return _remainingCount; + } + + public void setRemainingCount(int remainingCount) { + _remainingCount = remainingCount; + } + + public int getReceivedCount() { + return _receivedCount; + } + + public void setReceivedCount(int receivedCount) { + _receivedCount = receivedCount; + } + + public int getOnlineCount() { + return _onlineCount; + } + + public void setOnlineCount(int onlineCount) { + _onlineCount = onlineCount; + } + + public int getOnegateCount() { + return _onegateCount; + } + + public void setOnegateCount(int onegateCount) { + _onegateCount = onegateCount; + } + + public int getReleaseCount() { + return _releaseCount; + } + + public void setReleaseCount(int releaseCount) { + _releaseCount = releaseCount; + } + + public int getBetimesCount() { + return _betimesCount; + } + + public void setBetimesCount(int betimesCount) { + _betimesCount = betimesCount; + } + + public int getOntimeCount() { + return _ontimeCount; + } + + public void setOntimeCount(int ontimeCount) { + _ontimeCount = ontimeCount; + } + + public int getOvertimeCount() { + return _overtimeCount; + } + + public void setOvertimeCount(int overtimeCount) { + _overtimeCount = overtimeCount; + } + + public int getDoneCount() { + return _doneCount; + } + + public void setDoneCount(int doneCount) { + _doneCount = doneCount; + } + + public int getReleasingCount() { + return _releasingCount; + } + + public void setReleasingCount(int releasingCount) { + _releasingCount = releasingCount; + } + + public int getProcessingCount() { + return _processingCount; + } + + public void setProcessingCount(int processingCount) { + _processingCount = processingCount; + } + + public int getUndueCount() { + return _undueCount; + } + + public void setUndueCount(int undueCount) { + _undueCount = undueCount; + } + + public int getOverdueCount() { + return _overdueCount; + } + + public void setOverdueCount(int overdueCount) { + _overdueCount = overdueCount; + } + + public int getOntimePercentage() { + return _ontimePercentage; + } + + public void setOntimePercentage(int ontimePercentage) { + _ontimePercentage = ontimePercentage; + } + + public int getWaitingCount() { + return _waitingCount; + } + + public void setWaitingCount(int waitingCount) { + _waitingCount = waitingCount; + } + + public String getGovAgencyCode() { + return _govAgencyCode; + } + + public void setGovAgencyCode(String govAgencyCode) { + _govAgencyCode = govAgencyCode; + } + + public String getGovAgencyName() { + return _govAgencyName; + } + + public void setGovAgencyName(String govAgencyName) { + _govAgencyName = govAgencyName; + } + + public String getDomainCode() { + return _domainCode; + } + + public void setDomainCode(String domainCode) { + _domainCode = domainCode; + } + + public String getDomainName() { + return _domainName; + } + + public void setDomainName(String domainName) { + _domainName = domainName; + } + + public String getServiceCode() { + return _serviceCode; + } + + public void setServiceCode(String serviceCode) { + _serviceCode = serviceCode; + } + + public String getServiceName() { + return _serviceName; + } + + public void setServiceName(String serviceName) { + _serviceName = serviceName; + } + + public int getGroupBy() { + return _groupBy; + } + + public void setGroupBy(int groupBy) { + _groupBy = groupBy; + } + + public int getCancelledCount() { + return _cancelledCount; + } + + public void setCancelledCount(int cancelledCount) { + _cancelledCount = cancelledCount; + } + + public int getUnresolvedCount() { + return _unresolvedCount; + } + + public void setUnresolvedCount(int unresolvedCount) { + _unresolvedCount = unresolvedCount; + } + + private String _uuid; + private long _dossierStatisticMgtId; + private long _groupId; + private long _userId; + private String _userName; + private Date _createDate; + private Date _modifiedDate; + private int _month; + private int _year; + private int _totalCount; + private int _processCount; + private int _remainingCount; + private int _receivedCount; + private int _onlineCount; + private int _onegateCount; + private int _releaseCount; + private int _betimesCount; + private int _ontimeCount; + private int _overtimeCount; + private int _doneCount; + private int _releasingCount; + private int _processingCount; + private int _undueCount; + private int _overdueCount; + private int _ontimePercentage; + private int _waitingCount; + private String _govAgencyCode; + private String _govAgencyName; + private String _domainCode; + private String _domainName; + private String _serviceCode; + private String _serviceName; + private int _groupBy; + private int _cancelledCount; + private int _unresolvedCount; +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/model/OpencpsDossierStatisticMgtWrapper.java b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/model/OpencpsDossierStatisticMgtWrapper.java new file mode 100644 index 0000000000..6755866a77 --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/model/OpencpsDossierStatisticMgtWrapper.java @@ -0,0 +1,1198 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; + +import com.liferay.portal.kernel.model.ModelWrapper; +import com.liferay.portal.kernel.service.ServiceContext; + +import java.io.Serializable; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + *

+ * This class is a wrapper for {@link OpencpsDossierStatisticMgt}. + *

+ * + * @author khoavu + * @see OpencpsDossierStatisticMgt + * @generated + */ +@ProviderType +public class OpencpsDossierStatisticMgtWrapper + implements OpencpsDossierStatisticMgt, + ModelWrapper { + public OpencpsDossierStatisticMgtWrapper( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + _opencpsDossierStatisticMgt = opencpsDossierStatisticMgt; + } + + @Override + public Class getModelClass() { + return OpencpsDossierStatisticMgt.class; + } + + @Override + public String getModelClassName() { + return OpencpsDossierStatisticMgt.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("uuid", getUuid()); + attributes.put("dossierStatisticMgtId", getDossierStatisticMgtId()); + attributes.put("groupId", getGroupId()); + attributes.put("userId", getUserId()); + attributes.put("userName", getUserName()); + attributes.put("createDate", getCreateDate()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("month", getMonth()); + attributes.put("year", getYear()); + attributes.put("totalCount", getTotalCount()); + attributes.put("processCount", getProcessCount()); + attributes.put("remainingCount", getRemainingCount()); + attributes.put("receivedCount", getReceivedCount()); + attributes.put("onlineCount", getOnlineCount()); + attributes.put("onegateCount", getOnegateCount()); + attributes.put("releaseCount", getReleaseCount()); + attributes.put("betimesCount", getBetimesCount()); + attributes.put("ontimeCount", getOntimeCount()); + attributes.put("overtimeCount", getOvertimeCount()); + attributes.put("doneCount", getDoneCount()); + attributes.put("releasingCount", getReleasingCount()); + attributes.put("processingCount", getProcessingCount()); + attributes.put("undueCount", getUndueCount()); + attributes.put("overdueCount", getOverdueCount()); + attributes.put("ontimePercentage", getOntimePercentage()); + attributes.put("waitingCount", getWaitingCount()); + attributes.put("govAgencyCode", getGovAgencyCode()); + attributes.put("govAgencyName", getGovAgencyName()); + attributes.put("domainCode", getDomainCode()); + attributes.put("domainName", getDomainName()); + attributes.put("serviceCode", getServiceCode()); + attributes.put("serviceName", getServiceName()); + attributes.put("groupBy", getGroupBy()); + attributes.put("cancelledCount", getCancelledCount()); + attributes.put("unresolvedCount", getUnresolvedCount()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + String uuid = (String)attributes.get("uuid"); + + if (uuid != null) { + setUuid(uuid); + } + + Long dossierStatisticMgtId = (Long)attributes.get( + "dossierStatisticMgtId"); + + if (dossierStatisticMgtId != null) { + setDossierStatisticMgtId(dossierStatisticMgtId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String userName = (String)attributes.get("userName"); + + if (userName != null) { + setUserName(userName); + } + + Date createDate = (Date)attributes.get("createDate"); + + if (createDate != null) { + setCreateDate(createDate); + } + + Date modifiedDate = (Date)attributes.get("modifiedDate"); + + if (modifiedDate != null) { + setModifiedDate(modifiedDate); + } + + Integer month = (Integer)attributes.get("month"); + + if (month != null) { + setMonth(month); + } + + Integer year = (Integer)attributes.get("year"); + + if (year != null) { + setYear(year); + } + + Integer totalCount = (Integer)attributes.get("totalCount"); + + if (totalCount != null) { + setTotalCount(totalCount); + } + + Integer processCount = (Integer)attributes.get("processCount"); + + if (processCount != null) { + setProcessCount(processCount); + } + + Integer remainingCount = (Integer)attributes.get("remainingCount"); + + if (remainingCount != null) { + setRemainingCount(remainingCount); + } + + Integer receivedCount = (Integer)attributes.get("receivedCount"); + + if (receivedCount != null) { + setReceivedCount(receivedCount); + } + + Integer onlineCount = (Integer)attributes.get("onlineCount"); + + if (onlineCount != null) { + setOnlineCount(onlineCount); + } + + Integer onegateCount = (Integer)attributes.get("onegateCount"); + + if (onegateCount != null) { + setOnegateCount(onegateCount); + } + + Integer releaseCount = (Integer)attributes.get("releaseCount"); + + if (releaseCount != null) { + setReleaseCount(releaseCount); + } + + Integer betimesCount = (Integer)attributes.get("betimesCount"); + + if (betimesCount != null) { + setBetimesCount(betimesCount); + } + + Integer ontimeCount = (Integer)attributes.get("ontimeCount"); + + if (ontimeCount != null) { + setOntimeCount(ontimeCount); + } + + Integer overtimeCount = (Integer)attributes.get("overtimeCount"); + + if (overtimeCount != null) { + setOvertimeCount(overtimeCount); + } + + Integer doneCount = (Integer)attributes.get("doneCount"); + + if (doneCount != null) { + setDoneCount(doneCount); + } + + Integer releasingCount = (Integer)attributes.get("releasingCount"); + + if (releasingCount != null) { + setReleasingCount(releasingCount); + } + + Integer processingCount = (Integer)attributes.get("processingCount"); + + if (processingCount != null) { + setProcessingCount(processingCount); + } + + Integer undueCount = (Integer)attributes.get("undueCount"); + + if (undueCount != null) { + setUndueCount(undueCount); + } + + Integer overdueCount = (Integer)attributes.get("overdueCount"); + + if (overdueCount != null) { + setOverdueCount(overdueCount); + } + + Integer ontimePercentage = (Integer)attributes.get("ontimePercentage"); + + if (ontimePercentage != null) { + setOntimePercentage(ontimePercentage); + } + + Integer waitingCount = (Integer)attributes.get("waitingCount"); + + if (waitingCount != null) { + setWaitingCount(waitingCount); + } + + String govAgencyCode = (String)attributes.get("govAgencyCode"); + + if (govAgencyCode != null) { + setGovAgencyCode(govAgencyCode); + } + + String govAgencyName = (String)attributes.get("govAgencyName"); + + if (govAgencyName != null) { + setGovAgencyName(govAgencyName); + } + + String domainCode = (String)attributes.get("domainCode"); + + if (domainCode != null) { + setDomainCode(domainCode); + } + + String domainName = (String)attributes.get("domainName"); + + if (domainName != null) { + setDomainName(domainName); + } + + String serviceCode = (String)attributes.get("serviceCode"); + + if (serviceCode != null) { + setServiceCode(serviceCode); + } + + String serviceName = (String)attributes.get("serviceName"); + + if (serviceName != null) { + setServiceName(serviceName); + } + + Integer groupBy = (Integer)attributes.get("groupBy"); + + if (groupBy != null) { + setGroupBy(groupBy); + } + + Integer cancelledCount = (Integer)attributes.get("cancelledCount"); + + if (cancelledCount != null) { + setCancelledCount(cancelledCount); + } + + Integer unresolvedCount = (Integer)attributes.get("unresolvedCount"); + + if (unresolvedCount != null) { + setUnresolvedCount(unresolvedCount); + } + } + + @Override + public Object clone() { + return new OpencpsDossierStatisticMgtWrapper((OpencpsDossierStatisticMgt)_opencpsDossierStatisticMgt.clone()); + } + + @Override + public int compareTo(OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + return _opencpsDossierStatisticMgt.compareTo(opencpsDossierStatisticMgt); + } + + /** + * Returns the betimes count of this opencps dossier statistic mgt. + * + * @return the betimes count of this opencps dossier statistic mgt + */ + @Override + public int getBetimesCount() { + return _opencpsDossierStatisticMgt.getBetimesCount(); + } + + /** + * Returns the cancelled count of this opencps dossier statistic mgt. + * + * @return the cancelled count of this opencps dossier statistic mgt + */ + @Override + public int getCancelledCount() { + return _opencpsDossierStatisticMgt.getCancelledCount(); + } + + /** + * Returns the create date of this opencps dossier statistic mgt. + * + * @return the create date of this opencps dossier statistic mgt + */ + @Override + public Date getCreateDate() { + return _opencpsDossierStatisticMgt.getCreateDate(); + } + + /** + * Returns the domain code of this opencps dossier statistic mgt. + * + * @return the domain code of this opencps dossier statistic mgt + */ + @Override + public String getDomainCode() { + return _opencpsDossierStatisticMgt.getDomainCode(); + } + + /** + * Returns the domain name of this opencps dossier statistic mgt. + * + * @return the domain name of this opencps dossier statistic mgt + */ + @Override + public String getDomainName() { + return _opencpsDossierStatisticMgt.getDomainName(); + } + + /** + * Returns the done count of this opencps dossier statistic mgt. + * + * @return the done count of this opencps dossier statistic mgt + */ + @Override + public int getDoneCount() { + return _opencpsDossierStatisticMgt.getDoneCount(); + } + + /** + * Returns the dossier statistic mgt ID of this opencps dossier statistic mgt. + * + * @return the dossier statistic mgt ID of this opencps dossier statistic mgt + */ + @Override + public long getDossierStatisticMgtId() { + return _opencpsDossierStatisticMgt.getDossierStatisticMgtId(); + } + + @Override + public ExpandoBridge getExpandoBridge() { + return _opencpsDossierStatisticMgt.getExpandoBridge(); + } + + /** + * Returns the gov agency code of this opencps dossier statistic mgt. + * + * @return the gov agency code of this opencps dossier statistic mgt + */ + @Override + public String getGovAgencyCode() { + return _opencpsDossierStatisticMgt.getGovAgencyCode(); + } + + /** + * Returns the gov agency name of this opencps dossier statistic mgt. + * + * @return the gov agency name of this opencps dossier statistic mgt + */ + @Override + public String getGovAgencyName() { + return _opencpsDossierStatisticMgt.getGovAgencyName(); + } + + /** + * Returns the group by of this opencps dossier statistic mgt. + * + * @return the group by of this opencps dossier statistic mgt + */ + @Override + public int getGroupBy() { + return _opencpsDossierStatisticMgt.getGroupBy(); + } + + /** + * Returns the group ID of this opencps dossier statistic mgt. + * + * @return the group ID of this opencps dossier statistic mgt + */ + @Override + public long getGroupId() { + return _opencpsDossierStatisticMgt.getGroupId(); + } + + /** + * Returns the modified date of this opencps dossier statistic mgt. + * + * @return the modified date of this opencps dossier statistic mgt + */ + @Override + public Date getModifiedDate() { + return _opencpsDossierStatisticMgt.getModifiedDate(); + } + + /** + * Returns the month of this opencps dossier statistic mgt. + * + * @return the month of this opencps dossier statistic mgt + */ + @Override + public int getMonth() { + return _opencpsDossierStatisticMgt.getMonth(); + } + + /** + * Returns the onegate count of this opencps dossier statistic mgt. + * + * @return the onegate count of this opencps dossier statistic mgt + */ + @Override + public int getOnegateCount() { + return _opencpsDossierStatisticMgt.getOnegateCount(); + } + + /** + * Returns the online count of this opencps dossier statistic mgt. + * + * @return the online count of this opencps dossier statistic mgt + */ + @Override + public int getOnlineCount() { + return _opencpsDossierStatisticMgt.getOnlineCount(); + } + + /** + * Returns the ontime count of this opencps dossier statistic mgt. + * + * @return the ontime count of this opencps dossier statistic mgt + */ + @Override + public int getOntimeCount() { + return _opencpsDossierStatisticMgt.getOntimeCount(); + } + + /** + * Returns the ontime percentage of this opencps dossier statistic mgt. + * + * @return the ontime percentage of this opencps dossier statistic mgt + */ + @Override + public int getOntimePercentage() { + return _opencpsDossierStatisticMgt.getOntimePercentage(); + } + + /** + * Returns the overdue count of this opencps dossier statistic mgt. + * + * @return the overdue count of this opencps dossier statistic mgt + */ + @Override + public int getOverdueCount() { + return _opencpsDossierStatisticMgt.getOverdueCount(); + } + + /** + * Returns the overtime count of this opencps dossier statistic mgt. + * + * @return the overtime count of this opencps dossier statistic mgt + */ + @Override + public int getOvertimeCount() { + return _opencpsDossierStatisticMgt.getOvertimeCount(); + } + + /** + * Returns the primary key of this opencps dossier statistic mgt. + * + * @return the primary key of this opencps dossier statistic mgt + */ + @Override + public long getPrimaryKey() { + return _opencpsDossierStatisticMgt.getPrimaryKey(); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _opencpsDossierStatisticMgt.getPrimaryKeyObj(); + } + + /** + * Returns the process count of this opencps dossier statistic mgt. + * + * @return the process count of this opencps dossier statistic mgt + */ + @Override + public int getProcessCount() { + return _opencpsDossierStatisticMgt.getProcessCount(); + } + + /** + * Returns the processing count of this opencps dossier statistic mgt. + * + * @return the processing count of this opencps dossier statistic mgt + */ + @Override + public int getProcessingCount() { + return _opencpsDossierStatisticMgt.getProcessingCount(); + } + + /** + * Returns the received count of this opencps dossier statistic mgt. + * + * @return the received count of this opencps dossier statistic mgt + */ + @Override + public int getReceivedCount() { + return _opencpsDossierStatisticMgt.getReceivedCount(); + } + + /** + * Returns the release count of this opencps dossier statistic mgt. + * + * @return the release count of this opencps dossier statistic mgt + */ + @Override + public int getReleaseCount() { + return _opencpsDossierStatisticMgt.getReleaseCount(); + } + + /** + * Returns the releasing count of this opencps dossier statistic mgt. + * + * @return the releasing count of this opencps dossier statistic mgt + */ + @Override + public int getReleasingCount() { + return _opencpsDossierStatisticMgt.getReleasingCount(); + } + + /** + * Returns the remaining count of this opencps dossier statistic mgt. + * + * @return the remaining count of this opencps dossier statistic mgt + */ + @Override + public int getRemainingCount() { + return _opencpsDossierStatisticMgt.getRemainingCount(); + } + + /** + * Returns the service code of this opencps dossier statistic mgt. + * + * @return the service code of this opencps dossier statistic mgt + */ + @Override + public String getServiceCode() { + return _opencpsDossierStatisticMgt.getServiceCode(); + } + + /** + * Returns the service name of this opencps dossier statistic mgt. + * + * @return the service name of this opencps dossier statistic mgt + */ + @Override + public String getServiceName() { + return _opencpsDossierStatisticMgt.getServiceName(); + } + + /** + * Returns the total count of this opencps dossier statistic mgt. + * + * @return the total count of this opencps dossier statistic mgt + */ + @Override + public int getTotalCount() { + return _opencpsDossierStatisticMgt.getTotalCount(); + } + + /** + * Returns the undue count of this opencps dossier statistic mgt. + * + * @return the undue count of this opencps dossier statistic mgt + */ + @Override + public int getUndueCount() { + return _opencpsDossierStatisticMgt.getUndueCount(); + } + + /** + * Returns the unresolved count of this opencps dossier statistic mgt. + * + * @return the unresolved count of this opencps dossier statistic mgt + */ + @Override + public int getUnresolvedCount() { + return _opencpsDossierStatisticMgt.getUnresolvedCount(); + } + + /** + * Returns the user ID of this opencps dossier statistic mgt. + * + * @return the user ID of this opencps dossier statistic mgt + */ + @Override + public long getUserId() { + return _opencpsDossierStatisticMgt.getUserId(); + } + + /** + * Returns the user name of this opencps dossier statistic mgt. + * + * @return the user name of this opencps dossier statistic mgt + */ + @Override + public String getUserName() { + return _opencpsDossierStatisticMgt.getUserName(); + } + + /** + * Returns the user uuid of this opencps dossier statistic mgt. + * + * @return the user uuid of this opencps dossier statistic mgt + */ + @Override + public String getUserUuid() { + return _opencpsDossierStatisticMgt.getUserUuid(); + } + + /** + * Returns the uuid of this opencps dossier statistic mgt. + * + * @return the uuid of this opencps dossier statistic mgt + */ + @Override + public String getUuid() { + return _opencpsDossierStatisticMgt.getUuid(); + } + + /** + * Returns the waiting count of this opencps dossier statistic mgt. + * + * @return the waiting count of this opencps dossier statistic mgt + */ + @Override + public int getWaitingCount() { + return _opencpsDossierStatisticMgt.getWaitingCount(); + } + + /** + * Returns the year of this opencps dossier statistic mgt. + * + * @return the year of this opencps dossier statistic mgt + */ + @Override + public int getYear() { + return _opencpsDossierStatisticMgt.getYear(); + } + + @Override + public int hashCode() { + return _opencpsDossierStatisticMgt.hashCode(); + } + + @Override + public boolean isCachedModel() { + return _opencpsDossierStatisticMgt.isCachedModel(); + } + + @Override + public boolean isEscapedModel() { + return _opencpsDossierStatisticMgt.isEscapedModel(); + } + + @Override + public boolean isNew() { + return _opencpsDossierStatisticMgt.isNew(); + } + + @Override + public void persist() { + _opencpsDossierStatisticMgt.persist(); + } + + /** + * Sets the betimes count of this opencps dossier statistic mgt. + * + * @param betimesCount the betimes count of this opencps dossier statistic mgt + */ + @Override + public void setBetimesCount(int betimesCount) { + _opencpsDossierStatisticMgt.setBetimesCount(betimesCount); + } + + @Override + public void setCachedModel(boolean cachedModel) { + _opencpsDossierStatisticMgt.setCachedModel(cachedModel); + } + + /** + * Sets the cancelled count of this opencps dossier statistic mgt. + * + * @param cancelledCount the cancelled count of this opencps dossier statistic mgt + */ + @Override + public void setCancelledCount(int cancelledCount) { + _opencpsDossierStatisticMgt.setCancelledCount(cancelledCount); + } + + /** + * Sets the create date of this opencps dossier statistic mgt. + * + * @param createDate the create date of this opencps dossier statistic mgt + */ + @Override + public void setCreateDate(Date createDate) { + _opencpsDossierStatisticMgt.setCreateDate(createDate); + } + + /** + * Sets the domain code of this opencps dossier statistic mgt. + * + * @param domainCode the domain code of this opencps dossier statistic mgt + */ + @Override + public void setDomainCode(String domainCode) { + _opencpsDossierStatisticMgt.setDomainCode(domainCode); + } + + /** + * Sets the domain name of this opencps dossier statistic mgt. + * + * @param domainName the domain name of this opencps dossier statistic mgt + */ + @Override + public void setDomainName(String domainName) { + _opencpsDossierStatisticMgt.setDomainName(domainName); + } + + /** + * Sets the done count of this opencps dossier statistic mgt. + * + * @param doneCount the done count of this opencps dossier statistic mgt + */ + @Override + public void setDoneCount(int doneCount) { + _opencpsDossierStatisticMgt.setDoneCount(doneCount); + } + + /** + * Sets the dossier statistic mgt ID of this opencps dossier statistic mgt. + * + * @param dossierStatisticMgtId the dossier statistic mgt ID of this opencps dossier statistic mgt + */ + @Override + public void setDossierStatisticMgtId(long dossierStatisticMgtId) { + _opencpsDossierStatisticMgt.setDossierStatisticMgtId(dossierStatisticMgtId); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.kernel.model.BaseModel baseModel) { + _opencpsDossierStatisticMgt.setExpandoBridgeAttributes(baseModel); + } + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) { + _opencpsDossierStatisticMgt.setExpandoBridgeAttributes(expandoBridge); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + _opencpsDossierStatisticMgt.setExpandoBridgeAttributes(serviceContext); + } + + /** + * Sets the gov agency code of this opencps dossier statistic mgt. + * + * @param govAgencyCode the gov agency code of this opencps dossier statistic mgt + */ + @Override + public void setGovAgencyCode(String govAgencyCode) { + _opencpsDossierStatisticMgt.setGovAgencyCode(govAgencyCode); + } + + /** + * Sets the gov agency name of this opencps dossier statistic mgt. + * + * @param govAgencyName the gov agency name of this opencps dossier statistic mgt + */ + @Override + public void setGovAgencyName(String govAgencyName) { + _opencpsDossierStatisticMgt.setGovAgencyName(govAgencyName); + } + + /** + * Sets the group by of this opencps dossier statistic mgt. + * + * @param groupBy the group by of this opencps dossier statistic mgt + */ + @Override + public void setGroupBy(int groupBy) { + _opencpsDossierStatisticMgt.setGroupBy(groupBy); + } + + /** + * Sets the group ID of this opencps dossier statistic mgt. + * + * @param groupId the group ID of this opencps dossier statistic mgt + */ + @Override + public void setGroupId(long groupId) { + _opencpsDossierStatisticMgt.setGroupId(groupId); + } + + /** + * Sets the modified date of this opencps dossier statistic mgt. + * + * @param modifiedDate the modified date of this opencps dossier statistic mgt + */ + @Override + public void setModifiedDate(Date modifiedDate) { + _opencpsDossierStatisticMgt.setModifiedDate(modifiedDate); + } + + /** + * Sets the month of this opencps dossier statistic mgt. + * + * @param month the month of this opencps dossier statistic mgt + */ + @Override + public void setMonth(int month) { + _opencpsDossierStatisticMgt.setMonth(month); + } + + @Override + public void setNew(boolean n) { + _opencpsDossierStatisticMgt.setNew(n); + } + + /** + * Sets the onegate count of this opencps dossier statistic mgt. + * + * @param onegateCount the onegate count of this opencps dossier statistic mgt + */ + @Override + public void setOnegateCount(int onegateCount) { + _opencpsDossierStatisticMgt.setOnegateCount(onegateCount); + } + + /** + * Sets the online count of this opencps dossier statistic mgt. + * + * @param onlineCount the online count of this opencps dossier statistic mgt + */ + @Override + public void setOnlineCount(int onlineCount) { + _opencpsDossierStatisticMgt.setOnlineCount(onlineCount); + } + + /** + * Sets the ontime count of this opencps dossier statistic mgt. + * + * @param ontimeCount the ontime count of this opencps dossier statistic mgt + */ + @Override + public void setOntimeCount(int ontimeCount) { + _opencpsDossierStatisticMgt.setOntimeCount(ontimeCount); + } + + /** + * Sets the ontime percentage of this opencps dossier statistic mgt. + * + * @param ontimePercentage the ontime percentage of this opencps dossier statistic mgt + */ + @Override + public void setOntimePercentage(int ontimePercentage) { + _opencpsDossierStatisticMgt.setOntimePercentage(ontimePercentage); + } + + /** + * Sets the overdue count of this opencps dossier statistic mgt. + * + * @param overdueCount the overdue count of this opencps dossier statistic mgt + */ + @Override + public void setOverdueCount(int overdueCount) { + _opencpsDossierStatisticMgt.setOverdueCount(overdueCount); + } + + /** + * Sets the overtime count of this opencps dossier statistic mgt. + * + * @param overtimeCount the overtime count of this opencps dossier statistic mgt + */ + @Override + public void setOvertimeCount(int overtimeCount) { + _opencpsDossierStatisticMgt.setOvertimeCount(overtimeCount); + } + + /** + * Sets the primary key of this opencps dossier statistic mgt. + * + * @param primaryKey the primary key of this opencps dossier statistic mgt + */ + @Override + public void setPrimaryKey(long primaryKey) { + _opencpsDossierStatisticMgt.setPrimaryKey(primaryKey); + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + _opencpsDossierStatisticMgt.setPrimaryKeyObj(primaryKeyObj); + } + + /** + * Sets the process count of this opencps dossier statistic mgt. + * + * @param processCount the process count of this opencps dossier statistic mgt + */ + @Override + public void setProcessCount(int processCount) { + _opencpsDossierStatisticMgt.setProcessCount(processCount); + } + + /** + * Sets the processing count of this opencps dossier statistic mgt. + * + * @param processingCount the processing count of this opencps dossier statistic mgt + */ + @Override + public void setProcessingCount(int processingCount) { + _opencpsDossierStatisticMgt.setProcessingCount(processingCount); + } + + /** + * Sets the received count of this opencps dossier statistic mgt. + * + * @param receivedCount the received count of this opencps dossier statistic mgt + */ + @Override + public void setReceivedCount(int receivedCount) { + _opencpsDossierStatisticMgt.setReceivedCount(receivedCount); + } + + /** + * Sets the release count of this opencps dossier statistic mgt. + * + * @param releaseCount the release count of this opencps dossier statistic mgt + */ + @Override + public void setReleaseCount(int releaseCount) { + _opencpsDossierStatisticMgt.setReleaseCount(releaseCount); + } + + /** + * Sets the releasing count of this opencps dossier statistic mgt. + * + * @param releasingCount the releasing count of this opencps dossier statistic mgt + */ + @Override + public void setReleasingCount(int releasingCount) { + _opencpsDossierStatisticMgt.setReleasingCount(releasingCount); + } + + /** + * Sets the remaining count of this opencps dossier statistic mgt. + * + * @param remainingCount the remaining count of this opencps dossier statistic mgt + */ + @Override + public void setRemainingCount(int remainingCount) { + _opencpsDossierStatisticMgt.setRemainingCount(remainingCount); + } + + /** + * Sets the service code of this opencps dossier statistic mgt. + * + * @param serviceCode the service code of this opencps dossier statistic mgt + */ + @Override + public void setServiceCode(String serviceCode) { + _opencpsDossierStatisticMgt.setServiceCode(serviceCode); + } + + /** + * Sets the service name of this opencps dossier statistic mgt. + * + * @param serviceName the service name of this opencps dossier statistic mgt + */ + @Override + public void setServiceName(String serviceName) { + _opencpsDossierStatisticMgt.setServiceName(serviceName); + } + + /** + * Sets the total count of this opencps dossier statistic mgt. + * + * @param totalCount the total count of this opencps dossier statistic mgt + */ + @Override + public void setTotalCount(int totalCount) { + _opencpsDossierStatisticMgt.setTotalCount(totalCount); + } + + /** + * Sets the undue count of this opencps dossier statistic mgt. + * + * @param undueCount the undue count of this opencps dossier statistic mgt + */ + @Override + public void setUndueCount(int undueCount) { + _opencpsDossierStatisticMgt.setUndueCount(undueCount); + } + + /** + * Sets the unresolved count of this opencps dossier statistic mgt. + * + * @param unresolvedCount the unresolved count of this opencps dossier statistic mgt + */ + @Override + public void setUnresolvedCount(int unresolvedCount) { + _opencpsDossierStatisticMgt.setUnresolvedCount(unresolvedCount); + } + + /** + * Sets the user ID of this opencps dossier statistic mgt. + * + * @param userId the user ID of this opencps dossier statistic mgt + */ + @Override + public void setUserId(long userId) { + _opencpsDossierStatisticMgt.setUserId(userId); + } + + /** + * Sets the user name of this opencps dossier statistic mgt. + * + * @param userName the user name of this opencps dossier statistic mgt + */ + @Override + public void setUserName(String userName) { + _opencpsDossierStatisticMgt.setUserName(userName); + } + + /** + * Sets the user uuid of this opencps dossier statistic mgt. + * + * @param userUuid the user uuid of this opencps dossier statistic mgt + */ + @Override + public void setUserUuid(String userUuid) { + _opencpsDossierStatisticMgt.setUserUuid(userUuid); + } + + /** + * Sets the uuid of this opencps dossier statistic mgt. + * + * @param uuid the uuid of this opencps dossier statistic mgt + */ + @Override + public void setUuid(String uuid) { + _opencpsDossierStatisticMgt.setUuid(uuid); + } + + /** + * Sets the waiting count of this opencps dossier statistic mgt. + * + * @param waitingCount the waiting count of this opencps dossier statistic mgt + */ + @Override + public void setWaitingCount(int waitingCount) { + _opencpsDossierStatisticMgt.setWaitingCount(waitingCount); + } + + /** + * Sets the year of this opencps dossier statistic mgt. + * + * @param year the year of this opencps dossier statistic mgt + */ + @Override + public void setYear(int year) { + _opencpsDossierStatisticMgt.setYear(year); + } + + @Override + public com.liferay.portal.kernel.model.CacheModel toCacheModel() { + return _opencpsDossierStatisticMgt.toCacheModel(); + } + + @Override + public OpencpsDossierStatisticMgt toEscapedModel() { + return new OpencpsDossierStatisticMgtWrapper(_opencpsDossierStatisticMgt.toEscapedModel()); + } + + @Override + public String toString() { + return _opencpsDossierStatisticMgt.toString(); + } + + @Override + public OpencpsDossierStatisticMgt toUnescapedModel() { + return new OpencpsDossierStatisticMgtWrapper(_opencpsDossierStatisticMgt.toUnescapedModel()); + } + + @Override + public String toXmlString() { + return _opencpsDossierStatisticMgt.toXmlString(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof OpencpsDossierStatisticMgtWrapper)) { + return false; + } + + OpencpsDossierStatisticMgtWrapper opencpsDossierStatisticMgtWrapper = (OpencpsDossierStatisticMgtWrapper)obj; + + if (Objects.equals(_opencpsDossierStatisticMgt, + opencpsDossierStatisticMgtWrapper._opencpsDossierStatisticMgt)) { + return true; + } + + return false; + } + + @Override + public OpencpsDossierStatisticMgt getWrappedModel() { + return _opencpsDossierStatisticMgt; + } + + @Override + public boolean isEntityCacheEnabled() { + return _opencpsDossierStatisticMgt.isEntityCacheEnabled(); + } + + @Override + public boolean isFinderCacheEnabled() { + return _opencpsDossierStatisticMgt.isFinderCacheEnabled(); + } + + @Override + public void resetOriginalValues() { + _opencpsDossierStatisticMgt.resetOriginalValues(); + } + + private final OpencpsDossierStatisticMgt _opencpsDossierStatisticMgt; +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/OpencpsDossierStatisticMgtLocalService.java b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/OpencpsDossierStatisticMgtLocalService.java new file mode 100644 index 0000000000..6e1c10068d --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/OpencpsDossierStatisticMgtLocalService.java @@ -0,0 +1,291 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.service; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.service.BaseLocalService; +import com.liferay.portal.kernel.service.PersistedModelLocalService; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Propagation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.kernel.util.OrderByComparator; + +import org.opencps.statistic.model.OpencpsDossierStatisticMgt; + +import java.io.Serializable; + +import java.util.List; + +/** + * Provides the local service interface for OpencpsDossierStatisticMgt. Methods of this + * service will not have security checks based on the propagated JAAS + * credentials because this service can only be accessed from within the same + * VM. + * + * @author khoavu + * @see OpencpsDossierStatisticMgtLocalServiceUtil + * @see org.opencps.statistic.service.base.OpencpsDossierStatisticMgtLocalServiceBaseImpl + * @see org.opencps.statistic.service.impl.OpencpsDossierStatisticMgtLocalServiceImpl + * @generated + */ +@ProviderType +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface OpencpsDossierStatisticMgtLocalService extends BaseLocalService, + PersistedModelLocalService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link OpencpsDossierStatisticMgtLocalServiceUtil} to access the opencps dossier statistic mgt local service. Add custom service methods to {@link org.opencps.statistic.service.impl.OpencpsDossierStatisticMgtLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Adds the opencps dossier statistic mgt to the database. Also notifies the appropriate model listeners. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was added + */ + @Indexable(type = IndexableType.REINDEX) + public OpencpsDossierStatisticMgt addOpencpsDossierStatisticMgt( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt); + + public OpencpsDossierStatisticMgt checkContainGroupBy(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy); + + public OpencpsDossierStatisticMgt checkContains(long groupId, int month, + int year, String govAgencyCode, String domainCode); + + /** + * Creates a new opencps dossier statistic mgt with the primary key. Does not add the opencps dossier statistic mgt to the database. + * + * @param dossierStatisticMgtId the primary key for the new opencps dossier statistic mgt + * @return the new opencps dossier statistic mgt + */ + @Transactional(enabled = false) + public OpencpsDossierStatisticMgt createOpencpsDossierStatisticMgt( + long dossierStatisticMgtId); + + /** + * Deletes the opencps dossier statistic mgt with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was removed + * @throws PortalException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Indexable(type = IndexableType.DELETE) + public OpencpsDossierStatisticMgt deleteOpencpsDossierStatisticMgt( + long dossierStatisticMgtId) throws PortalException; + + /** + * Deletes the opencps dossier statistic mgt from the database. Also notifies the appropriate model listeners. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was removed + */ + @Indexable(type = IndexableType.DELETE) + public OpencpsDossierStatisticMgt deleteOpencpsDossierStatisticMgt( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt); + + /** + * @throws PortalException + */ + @Override + public PersistedModel deletePersistedModel(PersistedModel persistedModel) + throws PortalException; + + public DynamicQuery dynamicQuery(); + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery); + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end); + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end, OrderByComparator orderByComparator); + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + public long dynamicQueryCount(DynamicQuery dynamicQuery); + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public OpencpsDossierStatisticMgt fetchOpencpsDossierStatisticMgt( + long dossierStatisticMgtId); + + /** + * Returns the opencps dossier statistic mgt matching the UUID and group. + * + * @param uuid the opencps dossier statistic mgt's UUID + * @param groupId the primary key of the group + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public OpencpsDossierStatisticMgt fetchOpencpsDossierStatisticMgtByUuidAndGroupId( + String uuid, long groupId); + + public List findByG_NM_Y(long groupId, + int month, int year); + + public List findByG_NM_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy); + + public List findByG_NM_Y_GB(long groupId, + int month, int year, int groupBy); + + public List findByG_Y_ARR(long groupId, + int[] yearArr); + + public List findByG_Y_ARR_GB(long groupId, + int[] yearArr, int groupBy); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ActionableDynamicQuery getActionableDynamicQuery(); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); + + /** + * Returns the opencps dossier statistic mgt with the primary key. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt + * @throws PortalException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public OpencpsDossierStatisticMgt getOpencpsDossierStatisticMgt( + long dossierStatisticMgtId) throws PortalException; + + /** + * Returns the opencps dossier statistic mgt matching the UUID and group. + * + * @param uuid the opencps dossier statistic mgt's UUID + * @param groupId the primary key of the group + * @return the matching opencps dossier statistic mgt + * @throws PortalException if a matching opencps dossier statistic mgt could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public OpencpsDossierStatisticMgt getOpencpsDossierStatisticMgtByUuidAndGroupId( + String uuid, long groupId) throws PortalException; + + /** + * Returns a range of all the opencps dossier statistic mgts. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of opencps dossier statistic mgts + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getOpencpsDossierStatisticMgts( + int start, int end); + + /** + * Returns the number of opencps dossier statistic mgts. + * + * @return the number of opencps dossier statistic mgts + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getOpencpsDossierStatisticMgtsCount(); + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + public String getOSGiServiceIdentifier(); + + @Override + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException; + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List searchDossierStatistic( + long groupId, int month, int year, String domainCode, + String govAgencyCode, int groupBy, int start, int end); + + public void updateBatchStatisticMgt(List dossierDataObjs) + throws PortalException, SystemException; + + /** + * Updates the opencps dossier statistic mgt in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was updated + */ + @Indexable(type = IndexableType.REINDEX) + public OpencpsDossierStatisticMgt updateOpencpsDossierStatisticMgt( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt); +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/OpencpsDossierStatisticMgtLocalServiceUtil.java b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/OpencpsDossierStatisticMgtLocalServiceUtil.java new file mode 100644 index 0000000000..20b13cdac1 --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/OpencpsDossierStatisticMgtLocalServiceUtil.java @@ -0,0 +1,367 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.service; + +import aQute.bnd.annotation.ProviderType; + +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; + +import org.osgi.util.tracker.ServiceTracker; + +/** + * Provides the local service utility for OpencpsDossierStatisticMgt. This utility wraps + * {@link org.opencps.statistic.service.impl.OpencpsDossierStatisticMgtLocalServiceImpl} and is the + * primary access point for service operations in application layer code running + * on the local server. Methods of this service will not have security checks + * based on the propagated JAAS credentials because this service can only be + * accessed from within the same VM. + * + * @author khoavu + * @see OpencpsDossierStatisticMgtLocalService + * @see org.opencps.statistic.service.base.OpencpsDossierStatisticMgtLocalServiceBaseImpl + * @see org.opencps.statistic.service.impl.OpencpsDossierStatisticMgtLocalServiceImpl + * @generated + */ +@ProviderType +public class OpencpsDossierStatisticMgtLocalServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link org.opencps.statistic.service.impl.OpencpsDossierStatisticMgtLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Adds the opencps dossier statistic mgt to the database. Also notifies the appropriate model listeners. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was added + */ + public static org.opencps.statistic.model.OpencpsDossierStatisticMgt addOpencpsDossierStatisticMgt( + org.opencps.statistic.model.OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + return getService() + .addOpencpsDossierStatisticMgt(opencpsDossierStatisticMgt); + } + + public static org.opencps.statistic.model.OpencpsDossierStatisticMgt checkContainGroupBy( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy) { + return getService() + .checkContainGroupBy(groupId, month, year, govAgencyCode, + domainCode, groupBy); + } + + public static org.opencps.statistic.model.OpencpsDossierStatisticMgt checkContains( + long groupId, int month, int year, String govAgencyCode, + String domainCode) { + return getService() + .checkContains(groupId, month, year, govAgencyCode, + domainCode); + } + + /** + * Creates a new opencps dossier statistic mgt with the primary key. Does not add the opencps dossier statistic mgt to the database. + * + * @param dossierStatisticMgtId the primary key for the new opencps dossier statistic mgt + * @return the new opencps dossier statistic mgt + */ + public static org.opencps.statistic.model.OpencpsDossierStatisticMgt createOpencpsDossierStatisticMgt( + long dossierStatisticMgtId) { + return getService() + .createOpencpsDossierStatisticMgt(dossierStatisticMgtId); + } + + /** + * Deletes the opencps dossier statistic mgt with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was removed + * @throws PortalException if a opencps dossier statistic mgt with the primary key could not be found + */ + public static org.opencps.statistic.model.OpencpsDossierStatisticMgt deleteOpencpsDossierStatisticMgt( + long dossierStatisticMgtId) + throws com.liferay.portal.kernel.exception.PortalException { + return getService() + .deleteOpencpsDossierStatisticMgt(dossierStatisticMgtId); + } + + /** + * Deletes the opencps dossier statistic mgt from the database. Also notifies the appropriate model listeners. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was removed + */ + public static org.opencps.statistic.model.OpencpsDossierStatisticMgt deleteOpencpsDossierStatisticMgt( + org.opencps.statistic.model.OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + return getService() + .deleteOpencpsDossierStatisticMgt(opencpsDossierStatisticMgt); + } + + /** + * @throws PortalException + */ + public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( + com.liferay.portal.kernel.model.PersistedModel persistedModel) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().deletePersistedModel(persistedModel); + } + + public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return getService().dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return getService().dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) { + return getService().dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return getService() + .dynamicQuery(dynamicQuery, start, end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return getService().dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) { + return getService().dynamicQueryCount(dynamicQuery, projection); + } + + public static org.opencps.statistic.model.OpencpsDossierStatisticMgt fetchOpencpsDossierStatisticMgt( + long dossierStatisticMgtId) { + return getService() + .fetchOpencpsDossierStatisticMgt(dossierStatisticMgtId); + } + + /** + * Returns the opencps dossier statistic mgt matching the UUID and group. + * + * @param uuid the opencps dossier statistic mgt's UUID + * @param groupId the primary key of the group + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static org.opencps.statistic.model.OpencpsDossierStatisticMgt fetchOpencpsDossierStatisticMgtByUuidAndGroupId( + String uuid, long groupId) { + return getService() + .fetchOpencpsDossierStatisticMgtByUuidAndGroupId(uuid, + groupId); + } + + public static java.util.List findByG_NM_Y( + long groupId, int month, int year) { + return getService().findByG_NM_Y(groupId, month, year); + } + + public static java.util.List findByG_NM_Y_G_D_GB( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy) { + return getService() + .findByG_NM_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy); + } + + public static java.util.List findByG_NM_Y_GB( + long groupId, int month, int year, int groupBy) { + return getService().findByG_NM_Y_GB(groupId, month, year, groupBy); + } + + public static java.util.List findByG_Y_ARR( + long groupId, int[] yearArr) { + return getService().findByG_Y_ARR(groupId, yearArr); + } + + public static java.util.List findByG_Y_ARR_GB( + long groupId, int[] yearArr, int groupBy) { + return getService().findByG_Y_ARR_GB(groupId, yearArr, groupBy); + } + + public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { + return getService().getActionableDynamicQuery(); + } + + public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + return getService().getIndexableActionableDynamicQuery(); + } + + /** + * Returns the opencps dossier statistic mgt with the primary key. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt + * @throws PortalException if a opencps dossier statistic mgt with the primary key could not be found + */ + public static org.opencps.statistic.model.OpencpsDossierStatisticMgt getOpencpsDossierStatisticMgt( + long dossierStatisticMgtId) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getOpencpsDossierStatisticMgt(dossierStatisticMgtId); + } + + /** + * Returns the opencps dossier statistic mgt matching the UUID and group. + * + * @param uuid the opencps dossier statistic mgt's UUID + * @param groupId the primary key of the group + * @return the matching opencps dossier statistic mgt + * @throws PortalException if a matching opencps dossier statistic mgt could not be found + */ + public static org.opencps.statistic.model.OpencpsDossierStatisticMgt getOpencpsDossierStatisticMgtByUuidAndGroupId( + String uuid, long groupId) + throws com.liferay.portal.kernel.exception.PortalException { + return getService() + .getOpencpsDossierStatisticMgtByUuidAndGroupId(uuid, groupId); + } + + /** + * Returns a range of all the opencps dossier statistic mgts. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of opencps dossier statistic mgts + */ + public static java.util.List getOpencpsDossierStatisticMgts( + int start, int end) { + return getService().getOpencpsDossierStatisticMgts(start, end); + } + + /** + * Returns the number of opencps dossier statistic mgts. + * + * @return the number of opencps dossier statistic mgts + */ + public static int getOpencpsDossierStatisticMgtsCount() { + return getService().getOpencpsDossierStatisticMgtsCount(); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + public static String getOSGiServiceIdentifier() { + return getService().getOSGiServiceIdentifier(); + } + + public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getPersistedModel(primaryKeyObj); + } + + public static java.util.List searchDossierStatistic( + long groupId, int month, int year, String domainCode, + String govAgencyCode, int groupBy, int start, int end) { + return getService() + .searchDossierStatistic(groupId, month, year, domainCode, + govAgencyCode, groupBy, start, end); + } + + public static void updateBatchStatisticMgt( + java.util.List dossierDataObjs) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + getService().updateBatchStatisticMgt(dossierDataObjs); + } + + /** + * Updates the opencps dossier statistic mgt in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was updated + */ + public static org.opencps.statistic.model.OpencpsDossierStatisticMgt updateOpencpsDossierStatisticMgt( + org.opencps.statistic.model.OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + return getService() + .updateOpencpsDossierStatisticMgt(opencpsDossierStatisticMgt); + } + + public static OpencpsDossierStatisticMgtLocalService getService() { + return _serviceTracker.getService(); + } + + private static ServiceTracker _serviceTracker; + + static { + Bundle bundle = FrameworkUtil.getBundle(OpencpsDossierStatisticMgtLocalService.class); + + ServiceTracker serviceTracker = + new ServiceTracker(bundle.getBundleContext(), + OpencpsDossierStatisticMgtLocalService.class, null); + + serviceTracker.open(); + + _serviceTracker = serviceTracker; + } +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/OpencpsDossierStatisticMgtLocalServiceWrapper.java b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/OpencpsDossierStatisticMgtLocalServiceWrapper.java new file mode 100644 index 0000000000..15d34e9ba6 --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/OpencpsDossierStatisticMgtLocalServiceWrapper.java @@ -0,0 +1,380 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.service; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link OpencpsDossierStatisticMgtLocalService}. + * + * @author khoavu + * @see OpencpsDossierStatisticMgtLocalService + * @generated + */ +@ProviderType +public class OpencpsDossierStatisticMgtLocalServiceWrapper + implements OpencpsDossierStatisticMgtLocalService, + ServiceWrapper { + public OpencpsDossierStatisticMgtLocalServiceWrapper( + OpencpsDossierStatisticMgtLocalService opencpsDossierStatisticMgtLocalService) { + _opencpsDossierStatisticMgtLocalService = opencpsDossierStatisticMgtLocalService; + } + + /** + * Adds the opencps dossier statistic mgt to the database. Also notifies the appropriate model listeners. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was added + */ + @Override + public org.opencps.statistic.model.OpencpsDossierStatisticMgt addOpencpsDossierStatisticMgt( + org.opencps.statistic.model.OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + return _opencpsDossierStatisticMgtLocalService.addOpencpsDossierStatisticMgt(opencpsDossierStatisticMgt); + } + + @Override + public org.opencps.statistic.model.OpencpsDossierStatisticMgt checkContainGroupBy( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy) { + return _opencpsDossierStatisticMgtLocalService.checkContainGroupBy(groupId, + month, year, govAgencyCode, domainCode, groupBy); + } + + @Override + public org.opencps.statistic.model.OpencpsDossierStatisticMgt checkContains( + long groupId, int month, int year, String govAgencyCode, + String domainCode) { + return _opencpsDossierStatisticMgtLocalService.checkContains(groupId, + month, year, govAgencyCode, domainCode); + } + + /** + * Creates a new opencps dossier statistic mgt with the primary key. Does not add the opencps dossier statistic mgt to the database. + * + * @param dossierStatisticMgtId the primary key for the new opencps dossier statistic mgt + * @return the new opencps dossier statistic mgt + */ + @Override + public org.opencps.statistic.model.OpencpsDossierStatisticMgt createOpencpsDossierStatisticMgt( + long dossierStatisticMgtId) { + return _opencpsDossierStatisticMgtLocalService.createOpencpsDossierStatisticMgt(dossierStatisticMgtId); + } + + /** + * Deletes the opencps dossier statistic mgt with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was removed + * @throws PortalException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public org.opencps.statistic.model.OpencpsDossierStatisticMgt deleteOpencpsDossierStatisticMgt( + long dossierStatisticMgtId) + throws com.liferay.portal.kernel.exception.PortalException { + return _opencpsDossierStatisticMgtLocalService.deleteOpencpsDossierStatisticMgt(dossierStatisticMgtId); + } + + /** + * Deletes the opencps dossier statistic mgt from the database. Also notifies the appropriate model listeners. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was removed + */ + @Override + public org.opencps.statistic.model.OpencpsDossierStatisticMgt deleteOpencpsDossierStatisticMgt( + org.opencps.statistic.model.OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + return _opencpsDossierStatisticMgtLocalService.deleteOpencpsDossierStatisticMgt(opencpsDossierStatisticMgt); + } + + /** + * @throws PortalException + */ + @Override + public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( + com.liferay.portal.kernel.model.PersistedModel persistedModel) + throws com.liferay.portal.kernel.exception.PortalException { + return _opencpsDossierStatisticMgtLocalService.deletePersistedModel(persistedModel); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return _opencpsDossierStatisticMgtLocalService.dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return _opencpsDossierStatisticMgtLocalService.dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) { + return _opencpsDossierStatisticMgtLocalService.dynamicQuery(dynamicQuery, + start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return _opencpsDossierStatisticMgtLocalService.dynamicQuery(dynamicQuery, + start, end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return _opencpsDossierStatisticMgtLocalService.dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) { + return _opencpsDossierStatisticMgtLocalService.dynamicQueryCount(dynamicQuery, + projection); + } + + @Override + public org.opencps.statistic.model.OpencpsDossierStatisticMgt fetchOpencpsDossierStatisticMgt( + long dossierStatisticMgtId) { + return _opencpsDossierStatisticMgtLocalService.fetchOpencpsDossierStatisticMgt(dossierStatisticMgtId); + } + + /** + * Returns the opencps dossier statistic mgt matching the UUID and group. + * + * @param uuid the opencps dossier statistic mgt's UUID + * @param groupId the primary key of the group + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public org.opencps.statistic.model.OpencpsDossierStatisticMgt fetchOpencpsDossierStatisticMgtByUuidAndGroupId( + String uuid, long groupId) { + return _opencpsDossierStatisticMgtLocalService.fetchOpencpsDossierStatisticMgtByUuidAndGroupId(uuid, + groupId); + } + + @Override + public java.util.List findByG_NM_Y( + long groupId, int month, int year) { + return _opencpsDossierStatisticMgtLocalService.findByG_NM_Y(groupId, + month, year); + } + + @Override + public java.util.List findByG_NM_Y_G_D_GB( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy) { + return _opencpsDossierStatisticMgtLocalService.findByG_NM_Y_G_D_GB(groupId, + month, year, govAgencyCode, domainCode, groupBy); + } + + @Override + public java.util.List findByG_NM_Y_GB( + long groupId, int month, int year, int groupBy) { + return _opencpsDossierStatisticMgtLocalService.findByG_NM_Y_GB(groupId, + month, year, groupBy); + } + + @Override + public java.util.List findByG_Y_ARR( + long groupId, int[] yearArr) { + return _opencpsDossierStatisticMgtLocalService.findByG_Y_ARR(groupId, + yearArr); + } + + @Override + public java.util.List findByG_Y_ARR_GB( + long groupId, int[] yearArr, int groupBy) { + return _opencpsDossierStatisticMgtLocalService.findByG_Y_ARR_GB(groupId, + yearArr, groupBy); + } + + @Override + public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { + return _opencpsDossierStatisticMgtLocalService.getActionableDynamicQuery(); + } + + @Override + public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + return _opencpsDossierStatisticMgtLocalService.getIndexableActionableDynamicQuery(); + } + + /** + * Returns the opencps dossier statistic mgt with the primary key. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt + * @throws PortalException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public org.opencps.statistic.model.OpencpsDossierStatisticMgt getOpencpsDossierStatisticMgt( + long dossierStatisticMgtId) + throws com.liferay.portal.kernel.exception.PortalException { + return _opencpsDossierStatisticMgtLocalService.getOpencpsDossierStatisticMgt(dossierStatisticMgtId); + } + + /** + * Returns the opencps dossier statistic mgt matching the UUID and group. + * + * @param uuid the opencps dossier statistic mgt's UUID + * @param groupId the primary key of the group + * @return the matching opencps dossier statistic mgt + * @throws PortalException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public org.opencps.statistic.model.OpencpsDossierStatisticMgt getOpencpsDossierStatisticMgtByUuidAndGroupId( + String uuid, long groupId) + throws com.liferay.portal.kernel.exception.PortalException { + return _opencpsDossierStatisticMgtLocalService.getOpencpsDossierStatisticMgtByUuidAndGroupId(uuid, + groupId); + } + + /** + * Returns a range of all the opencps dossier statistic mgts. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of opencps dossier statistic mgts + */ + @Override + public java.util.List getOpencpsDossierStatisticMgts( + int start, int end) { + return _opencpsDossierStatisticMgtLocalService.getOpencpsDossierStatisticMgts(start, + end); + } + + /** + * Returns the number of opencps dossier statistic mgts. + * + * @return the number of opencps dossier statistic mgts + */ + @Override + public int getOpencpsDossierStatisticMgtsCount() { + return _opencpsDossierStatisticMgtLocalService.getOpencpsDossierStatisticMgtsCount(); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + @Override + public String getOSGiServiceIdentifier() { + return _opencpsDossierStatisticMgtLocalService.getOSGiServiceIdentifier(); + } + + @Override + public com.liferay.portal.kernel.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException { + return _opencpsDossierStatisticMgtLocalService.getPersistedModel(primaryKeyObj); + } + + @Override + public java.util.List searchDossierStatistic( + long groupId, int month, int year, String domainCode, + String govAgencyCode, int groupBy, int start, int end) { + return _opencpsDossierStatisticMgtLocalService.searchDossierStatistic(groupId, + month, year, domainCode, govAgencyCode, groupBy, start, end); + } + + @Override + public void updateBatchStatisticMgt( + java.util.List dossierDataObjs) + throws com.liferay.portal.kernel.exception.PortalException, + com.liferay.portal.kernel.exception.SystemException { + _opencpsDossierStatisticMgtLocalService.updateBatchStatisticMgt(dossierDataObjs); + } + + /** + * Updates the opencps dossier statistic mgt in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was updated + */ + @Override + public org.opencps.statistic.model.OpencpsDossierStatisticMgt updateOpencpsDossierStatisticMgt( + org.opencps.statistic.model.OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + return _opencpsDossierStatisticMgtLocalService.updateOpencpsDossierStatisticMgt(opencpsDossierStatisticMgt); + } + + @Override + public OpencpsDossierStatisticMgtLocalService getWrappedService() { + return _opencpsDossierStatisticMgtLocalService; + } + + @Override + public void setWrappedService( + OpencpsDossierStatisticMgtLocalService opencpsDossierStatisticMgtLocalService) { + _opencpsDossierStatisticMgtLocalService = opencpsDossierStatisticMgtLocalService; + } + + private OpencpsDossierStatisticMgtLocalService _opencpsDossierStatisticMgtLocalService; +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/persistence/OpencpsDossierStatisticMgtFinder.java b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/persistence/OpencpsDossierStatisticMgtFinder.java new file mode 100644 index 0000000000..ee39dabc8a --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/persistence/OpencpsDossierStatisticMgtFinder.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +/** + * @author khoavu + * @generated + */ +@ProviderType +public interface OpencpsDossierStatisticMgtFinder { + public org.opencps.statistic.model.OpencpsDossierStatisticMgt checkContains( + long groupId, int month, int year, String govAgencyCode, + String domainCode); + + public org.opencps.statistic.model.OpencpsDossierStatisticMgt checkContainsGroupBy( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy); + + public java.util.List searchByDomainAgencyGroupBy( + long groupId, int month, int year, String domainCode, + String govAgencyCode, int groupBy, int start, int end); +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/persistence/OpencpsDossierStatisticMgtPersistence.java b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/persistence/OpencpsDossierStatisticMgtPersistence.java new file mode 100644 index 0000000000..72dd31c9d3 --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/persistence/OpencpsDossierStatisticMgtPersistence.java @@ -0,0 +1,1832 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.service.persistence.BasePersistence; + +import org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException; +import org.opencps.statistic.model.OpencpsDossierStatisticMgt; + +/** + * The persistence interface for the opencps dossier statistic mgt service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author khoavu + * @see org.opencps.statistic.service.persistence.impl.OpencpsDossierStatisticMgtPersistenceImpl + * @see OpencpsDossierStatisticMgtUtil + * @generated + */ +@ProviderType +public interface OpencpsDossierStatisticMgtPersistence extends BasePersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link OpencpsDossierStatisticMgtUtil} to access the opencps dossier statistic mgt persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. + */ + + /** + * Returns all the opencps dossier statistic mgts where uuid = ?. + * + * @param uuid the uuid + * @return the matching opencps dossier statistic mgts + */ + public java.util.List findByUuid(String uuid); + + /** + * Returns a range of all the opencps dossier statistic mgts where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public java.util.List findByUuid(String uuid, + int start, int end); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByUuid(String uuid, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByUuid(String uuid, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByUuid_First(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByUuid_First(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByUuid_Last(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByUuid_Last(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public OpencpsDossierStatisticMgt[] findByUuid_PrevAndNext( + long dossierStatisticMgtId, String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Removes all the opencps dossier statistic mgts where uuid = ? from the database. + * + * @param uuid the uuid + */ + public void removeByUuid(String uuid); + + /** + * Returns the number of opencps dossier statistic mgts where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching opencps dossier statistic mgts + */ + public int countByUuid(String uuid); + + /** + * Returns the opencps dossier statistic mgt where uuid = ? and groupId = ? or throws a {@link NoSuchOpencpsDossierStatisticMgtException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByUUID_G(String uuid, long groupId) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the opencps dossier statistic mgt where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByUUID_G(String uuid, long groupId); + + /** + * Returns the opencps dossier statistic mgt where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByUUID_G(String uuid, long groupId, + boolean retrieveFromCache); + + /** + * Removes the opencps dossier statistic mgt where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the opencps dossier statistic mgt that was removed + */ + public OpencpsDossierStatisticMgt removeByUUID_G(String uuid, long groupId) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the number of opencps dossier statistic mgts where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching opencps dossier statistic mgts + */ + public int countByUUID_G(String uuid, long groupId); + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @return the matching opencps dossier statistic mgts + */ + public java.util.List findByG_UID_Y( + long groupId, long userId, int year); + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_UID_Y( + long groupId, long userId, int year, int start, int end); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_UID_Y( + long groupId, long userId, int year, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_UID_Y( + long groupId, long userId, int year, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_UID_Y_First(long groupId, + long userId, int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_UID_Y_First(long groupId, + long userId, int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_UID_Y_Last(long groupId, + long userId, int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_UID_Y_Last(long groupId, + long userId, int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public OpencpsDossierStatisticMgt[] findByG_UID_Y_PrevAndNext( + long dossierStatisticMgtId, long groupId, long userId, int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? from the database. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + */ + public void removeByG_UID_Y(long groupId, long userId, int year); + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @return the number of matching opencps dossier statistic mgts + */ + public int countByG_UID_Y(long groupId, long userId, int year); + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? or throws a {@link NoSuchOpencpsDossierStatisticMgtException} if it could not be found. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @return the matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_M_Y_G_D(long groupId, int month, + int year, String govAgencyCode, String domainCode) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? or returns null if it could not be found. Uses the finder cache. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_M_Y_G_D(long groupId, int month, + int year, String govAgencyCode, String domainCode); + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_M_Y_G_D(long groupId, int month, + int year, String govAgencyCode, String domainCode, + boolean retrieveFromCache); + + /** + * Removes the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @return the opencps dossier statistic mgt that was removed + */ + public OpencpsDossierStatisticMgt removeByG_M_Y_G_D(long groupId, + int month, int year, String govAgencyCode, String domainCode) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @return the number of matching opencps dossier statistic mgts + */ + public int countByG_M_Y_G_D(long groupId, int month, int year, + String govAgencyCode, String domainCode); + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @return the matching opencps dossier statistic mgts + */ + public java.util.List findByG_NM_Y( + long groupId, int month, int year); + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_NM_Y( + long groupId, int month, int year, int start, int end); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_NM_Y( + long groupId, int month, int year, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_NM_Y( + long groupId, int month, int year, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_NM_Y_First(long groupId, + int month, int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_NM_Y_First(long groupId, + int month, int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_NM_Y_Last(long groupId, + int month, int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_NM_Y_Last(long groupId, + int month, int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public OpencpsDossierStatisticMgt[] findByG_NM_Y_PrevAndNext( + long dossierStatisticMgtId, long groupId, int month, int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + */ + public void removeByG_NM_Y(long groupId, int month, int year); + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @return the number of matching opencps dossier statistic mgts + */ + public int countByG_NM_Y(long groupId, int month, int year); + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @return the matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO( + long groupId, int year); + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO( + long groupId, int year, int start, int end); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO( + long groupId, int year, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO( + long groupId, int year, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_Y_REPO_First(long groupId, + int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_Y_REPO_First(long groupId, + int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_Y_REPO_Last(long groupId, + int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_Y_REPO_Last(long groupId, + int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public OpencpsDossierStatisticMgt[] findByG_Y_REPO_PrevAndNext( + long dossierStatisticMgtId, long groupId, int year, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and year = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @return the matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO( + long groupId, int[] years); + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and year = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO( + long groupId, int[] years, int start, int end); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO( + long groupId, int[] years, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ?, optionally using the finder cache. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO( + long groupId, int[] years, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and year = ? from the database. + * + * @param groupId the group ID + * @param year the year + */ + public void removeByG_Y_REPO(long groupId, int year); + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @return the number of matching opencps dossier statistic mgts + */ + public int countByG_Y_REPO(long groupId, int year); + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and year = any ?. + * + * @param groupId the group ID + * @param years the years + * @return the number of matching opencps dossier statistic mgts + */ + public int countByG_Y_REPO(long groupId, int[] years); + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + public java.util.List findByG_UID_Y_GB( + long groupId, long userId, int year, int groupBy); + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_UID_Y_GB( + long groupId, long userId, int year, int groupBy, int start, int end); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_UID_Y_GB( + long groupId, long userId, int year, int groupBy, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_UID_Y_GB( + long groupId, long userId, int year, int groupBy, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_UID_Y_GB_First(long groupId, + long userId, int year, int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_UID_Y_GB_First(long groupId, + long userId, int year, int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_UID_Y_GB_Last(long groupId, + long userId, int year, int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_UID_Y_GB_Last(long groupId, + long userId, int year, int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public OpencpsDossierStatisticMgt[] findByG_UID_Y_GB_PrevAndNext( + long dossierStatisticMgtId, long groupId, long userId, int year, + int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + */ + public void removeByG_UID_Y_GB(long groupId, long userId, int year, + int groupBy); + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + public int countByG_UID_Y_GB(long groupId, long userId, int year, + int groupBy); + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? or throws a {@link NoSuchOpencpsDossierStatisticMgtException} if it could not be found. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_M_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy) throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? or returns null if it could not be found. Uses the finder cache. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_M_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy); + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_M_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy, boolean retrieveFromCache); + + /** + * Removes the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the opencps dossier statistic mgt that was removed + */ + public OpencpsDossierStatisticMgt removeByG_M_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy) throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + public int countByG_M_Y_G_D_GB(long groupId, int month, int year, + String govAgencyCode, String domainCode, int groupBy); + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + public java.util.List findByG_NM_Y_GB( + long groupId, int month, int year, int groupBy); + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_NM_Y_GB( + long groupId, int month, int year, int groupBy, int start, int end); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_NM_Y_GB( + long groupId, int month, int year, int groupBy, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_NM_Y_GB( + long groupId, int month, int year, int groupBy, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_NM_Y_GB_First(long groupId, + int month, int year, int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_NM_Y_GB_First(long groupId, + int month, int year, int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_NM_Y_GB_Last(long groupId, + int month, int year, int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_NM_Y_GB_Last(long groupId, + int month, int year, int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public OpencpsDossierStatisticMgt[] findByG_NM_Y_GB_PrevAndNext( + long dossierStatisticMgtId, long groupId, int month, int year, + int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + */ + public void removeByG_NM_Y_GB(long groupId, int month, int year, int groupBy); + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + public int countByG_NM_Y_GB(long groupId, int month, int year, int groupBy); + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO_GB( + long groupId, int year, int groupBy); + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO_GB( + long groupId, int year, int groupBy, int start, int end); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO_GB( + long groupId, int year, int groupBy, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO_GB( + long groupId, int year, int groupBy, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_Y_REPO_GB_First(long groupId, + int year, int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_Y_REPO_GB_First(long groupId, + int year, int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_Y_REPO_GB_Last(long groupId, + int year, int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_Y_REPO_GB_Last(long groupId, + int year, int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public OpencpsDossierStatisticMgt[] findByG_Y_REPO_GB_PrevAndNext( + long dossierStatisticMgtId, long groupId, int year, int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and year = any ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO_GB( + long groupId, int[] years, int groupBy); + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and year = any ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO_GB( + long groupId, int[] years, int groupBy, int start, int end); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = any ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO_GB( + long groupId, int[] years, int groupBy, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?, optionally using the finder cache. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_Y_REPO_GB( + long groupId, int[] years, int groupBy, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + */ + public void removeByG_Y_REPO_GB(long groupId, int year, int groupBy); + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + public int countByG_Y_REPO_GB(long groupId, int year, int groupBy); + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and year = any ? and groupBy = ?. + * + * @param groupId the group ID + * @param years the years + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + public int countByG_Y_REPO_GB(long groupId, int[] years, int groupBy); + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + public java.util.List findByG_NM_Y_G_D_GB( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy); + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_NM_Y_G_D_GB( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy, int start, int end); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_NM_Y_G_D_GB( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public java.util.List findByG_NM_Y_G_D_GB( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_NM_Y_G_D_GB_First(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_NM_Y_G_D_GB_First(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt findByG_NM_Y_G_D_GB_Last(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public OpencpsDossierStatisticMgt fetchByG_NM_Y_G_D_GB_Last(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public OpencpsDossierStatisticMgt[] findByG_NM_Y_G_D_GB_PrevAndNext( + long dossierStatisticMgtId, long groupId, int month, int year, + String govAgencyCode, String domainCode, int groupBy, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + */ + public void removeByG_NM_Y_G_D_GB(long groupId, int month, int year, + String govAgencyCode, String domainCode, int groupBy); + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + public int countByG_NM_Y_G_D_GB(long groupId, int month, int year, + String govAgencyCode, String domainCode, int groupBy); + + /** + * Caches the opencps dossier statistic mgt in the entity cache if it is enabled. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + */ + public void cacheResult( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt); + + /** + * Caches the opencps dossier statistic mgts in the entity cache if it is enabled. + * + * @param opencpsDossierStatisticMgts the opencps dossier statistic mgts + */ + public void cacheResult( + java.util.List opencpsDossierStatisticMgts); + + /** + * Creates a new opencps dossier statistic mgt with the primary key. Does not add the opencps dossier statistic mgt to the database. + * + * @param dossierStatisticMgtId the primary key for the new opencps dossier statistic mgt + * @return the new opencps dossier statistic mgt + */ + public OpencpsDossierStatisticMgt create(long dossierStatisticMgtId); + + /** + * Removes the opencps dossier statistic mgt with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was removed + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public OpencpsDossierStatisticMgt remove(long dossierStatisticMgtId) + throws NoSuchOpencpsDossierStatisticMgtException; + + public OpencpsDossierStatisticMgt updateImpl( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt); + + /** + * Returns the opencps dossier statistic mgt with the primary key or throws a {@link NoSuchOpencpsDossierStatisticMgtException} if it could not be found. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public OpencpsDossierStatisticMgt findByPrimaryKey( + long dossierStatisticMgtId) + throws NoSuchOpencpsDossierStatisticMgtException; + + /** + * Returns the opencps dossier statistic mgt with the primary key or returns null if it could not be found. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt, or null if a opencps dossier statistic mgt with the primary key could not be found + */ + public OpencpsDossierStatisticMgt fetchByPrimaryKey( + long dossierStatisticMgtId); + + @Override + public java.util.Map fetchByPrimaryKeys( + java.util.Set primaryKeys); + + /** + * Returns all the opencps dossier statistic mgts. + * + * @return the opencps dossier statistic mgts + */ + public java.util.List findAll(); + + /** + * Returns a range of all the opencps dossier statistic mgts. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of opencps dossier statistic mgts + */ + public java.util.List findAll(int start, int end); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of opencps dossier statistic mgts + */ + public java.util.List findAll(int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the opencps dossier statistic mgts. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of opencps dossier statistic mgts + */ + public java.util.List findAll(int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Removes all the opencps dossier statistic mgts from the database. + */ + public void removeAll(); + + /** + * Returns the number of opencps dossier statistic mgts. + * + * @return the number of opencps dossier statistic mgts + */ + public int countAll(); + + @Override + public java.util.Set getBadColumnNames(); +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/persistence/OpencpsDossierStatisticMgtUtil.java b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/persistence/OpencpsDossierStatisticMgtUtil.java new file mode 100644 index 0000000000..9f5b5f5782 --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-api/src/main/java/org/opencps/statistic/service/persistence/OpencpsDossierStatisticMgtUtil.java @@ -0,0 +1,2316 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.util.OrderByComparator; + +import org.opencps.statistic.model.OpencpsDossierStatisticMgt; + +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; + +import org.osgi.util.tracker.ServiceTracker; + +import java.util.List; + +/** + * The persistence utility for the opencps dossier statistic mgt service. This utility wraps {@link org.opencps.statistic.service.persistence.impl.OpencpsDossierStatisticMgtPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author khoavu + * @see OpencpsDossierStatisticMgtPersistence + * @see org.opencps.statistic.service.persistence.impl.OpencpsDossierStatisticMgtPersistenceImpl + * @generated + */ +@ProviderType +public class OpencpsDossierStatisticMgtUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache() + */ + public static void clearCache() { + getPersistence().clearCache(); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache(com.liferay.portal.kernel.model.BaseModel) + */ + public static void clearCache( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + getPersistence().clearCache(opencpsDossierStatisticMgt); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) + */ + public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { + return getPersistence().countWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery) { + return getPersistence().findWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end) { + return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findWithDynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel) + */ + public static OpencpsDossierStatisticMgt update( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + return getPersistence().update(opencpsDossierStatisticMgt); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel, ServiceContext) + */ + public static OpencpsDossierStatisticMgt update( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt, + ServiceContext serviceContext) { + return getPersistence() + .update(opencpsDossierStatisticMgt, serviceContext); + } + + /** + * Returns all the opencps dossier statistic mgts where uuid = ?. + * + * @param uuid the uuid + * @return the matching opencps dossier statistic mgts + */ + public static List findByUuid(String uuid) { + return getPersistence().findByUuid(uuid); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public static List findByUuid(String uuid, + int start, int end) { + return getPersistence().findByUuid(uuid, start, end); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByUuid(String uuid, + int start, int end, + OrderByComparator orderByComparator) { + return getPersistence().findByUuid(uuid, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByUuid(String uuid, + int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByUuid(uuid, start, end, orderByComparator, + retrieveFromCache); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByUuid_First(String uuid, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence().findByUuid_First(uuid, orderByComparator); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByUuid_First(String uuid, + OrderByComparator orderByComparator) { + return getPersistence().fetchByUuid_First(uuid, orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByUuid_Last(String uuid, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence().findByUuid_Last(uuid, orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByUuid_Last(String uuid, + OrderByComparator orderByComparator) { + return getPersistence().fetchByUuid_Last(uuid, orderByComparator); + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public static OpencpsDossierStatisticMgt[] findByUuid_PrevAndNext( + long dossierStatisticMgtId, String uuid, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByUuid_PrevAndNext(dossierStatisticMgtId, uuid, + orderByComparator); + } + + /** + * Removes all the opencps dossier statistic mgts where uuid = ? from the database. + * + * @param uuid the uuid + */ + public static void removeByUuid(String uuid) { + getPersistence().removeByUuid(uuid); + } + + /** + * Returns the number of opencps dossier statistic mgts where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching opencps dossier statistic mgts + */ + public static int countByUuid(String uuid) { + return getPersistence().countByUuid(uuid); + } + + /** + * Returns the opencps dossier statistic mgt where uuid = ? and groupId = ? or throws a {@link NoSuchOpencpsDossierStatisticMgtException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByUUID_G(String uuid, + long groupId) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence().findByUUID_G(uuid, groupId); + } + + /** + * Returns the opencps dossier statistic mgt where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByUUID_G(String uuid, + long groupId) { + return getPersistence().fetchByUUID_G(uuid, groupId); + } + + /** + * Returns the opencps dossier statistic mgt where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByUUID_G(String uuid, + long groupId, boolean retrieveFromCache) { + return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); + } + + /** + * Removes the opencps dossier statistic mgt where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the opencps dossier statistic mgt that was removed + */ + public static OpencpsDossierStatisticMgt removeByUUID_G(String uuid, + long groupId) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence().removeByUUID_G(uuid, groupId); + } + + /** + * Returns the number of opencps dossier statistic mgts where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching opencps dossier statistic mgts + */ + public static int countByUUID_G(String uuid, long groupId) { + return getPersistence().countByUUID_G(uuid, groupId); + } + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @return the matching opencps dossier statistic mgts + */ + public static List findByG_UID_Y(long groupId, + long userId, int year) { + return getPersistence().findByG_UID_Y(groupId, userId, year); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public static List findByG_UID_Y(long groupId, + long userId, int year, int start, int end) { + return getPersistence().findByG_UID_Y(groupId, userId, year, start, end); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_UID_Y(long groupId, + long userId, int year, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByG_UID_Y(groupId, userId, year, start, end, + orderByComparator); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_UID_Y(long groupId, + long userId, int year, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByG_UID_Y(groupId, userId, year, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_UID_Y_First(long groupId, + long userId, int year, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_UID_Y_First(groupId, userId, year, orderByComparator); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_UID_Y_First( + long groupId, long userId, int year, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByG_UID_Y_First(groupId, userId, year, + orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_UID_Y_Last(long groupId, + long userId, int year, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_UID_Y_Last(groupId, userId, year, orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_UID_Y_Last(long groupId, + long userId, int year, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByG_UID_Y_Last(groupId, userId, year, orderByComparator); + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public static OpencpsDossierStatisticMgt[] findByG_UID_Y_PrevAndNext( + long dossierStatisticMgtId, long groupId, long userId, int year, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_UID_Y_PrevAndNext(dossierStatisticMgtId, groupId, + userId, year, orderByComparator); + } + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? from the database. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + */ + public static void removeByG_UID_Y(long groupId, long userId, int year) { + getPersistence().removeByG_UID_Y(groupId, userId, year); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @return the number of matching opencps dossier statistic mgts + */ + public static int countByG_UID_Y(long groupId, long userId, int year) { + return getPersistence().countByG_UID_Y(groupId, userId, year); + } + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? or throws a {@link NoSuchOpencpsDossierStatisticMgtException} if it could not be found. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @return the matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_M_Y_G_D(long groupId, + int month, int year, String govAgencyCode, String domainCode) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_M_Y_G_D(groupId, month, year, govAgencyCode, + domainCode); + } + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? or returns null if it could not be found. Uses the finder cache. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_M_Y_G_D(long groupId, + int month, int year, String govAgencyCode, String domainCode) { + return getPersistence() + .fetchByG_M_Y_G_D(groupId, month, year, govAgencyCode, + domainCode); + } + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_M_Y_G_D(long groupId, + int month, int year, String govAgencyCode, String domainCode, + boolean retrieveFromCache) { + return getPersistence() + .fetchByG_M_Y_G_D(groupId, month, year, govAgencyCode, + domainCode, retrieveFromCache); + } + + /** + * Removes the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @return the opencps dossier statistic mgt that was removed + */ + public static OpencpsDossierStatisticMgt removeByG_M_Y_G_D(long groupId, + int month, int year, String govAgencyCode, String domainCode) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .removeByG_M_Y_G_D(groupId, month, year, govAgencyCode, + domainCode); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @return the number of matching opencps dossier statistic mgts + */ + public static int countByG_M_Y_G_D(long groupId, int month, int year, + String govAgencyCode, String domainCode) { + return getPersistence() + .countByG_M_Y_G_D(groupId, month, year, govAgencyCode, + domainCode); + } + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @return the matching opencps dossier statistic mgts + */ + public static List findByG_NM_Y(long groupId, + int month, int year) { + return getPersistence().findByG_NM_Y(groupId, month, year); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public static List findByG_NM_Y(long groupId, + int month, int year, int start, int end) { + return getPersistence().findByG_NM_Y(groupId, month, year, start, end); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_NM_Y(long groupId, + int month, int year, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByG_NM_Y(groupId, month, year, start, end, + orderByComparator); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_NM_Y(long groupId, + int month, int year, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByG_NM_Y(groupId, month, year, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_NM_Y_First(long groupId, + int month, int year, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_NM_Y_First(groupId, month, year, orderByComparator); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_NM_Y_First(long groupId, + int month, int year, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByG_NM_Y_First(groupId, month, year, orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_NM_Y_Last(long groupId, + int month, int year, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_NM_Y_Last(groupId, month, year, orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_NM_Y_Last(long groupId, + int month, int year, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByG_NM_Y_Last(groupId, month, year, orderByComparator); + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public static OpencpsDossierStatisticMgt[] findByG_NM_Y_PrevAndNext( + long dossierStatisticMgtId, long groupId, int month, int year, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_NM_Y_PrevAndNext(dossierStatisticMgtId, groupId, + month, year, orderByComparator); + } + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + */ + public static void removeByG_NM_Y(long groupId, int month, int year) { + getPersistence().removeByG_NM_Y(groupId, month, year); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @return the number of matching opencps dossier statistic mgts + */ + public static int countByG_NM_Y(long groupId, int month, int year) { + return getPersistence().countByG_NM_Y(groupId, month, year); + } + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @return the matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO( + long groupId, int year) { + return getPersistence().findByG_Y_REPO(groupId, year); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO( + long groupId, int year, int start, int end) { + return getPersistence().findByG_Y_REPO(groupId, year, start, end); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO( + long groupId, int year, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByG_Y_REPO(groupId, year, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO( + long groupId, int year, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByG_Y_REPO(groupId, year, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_Y_REPO_First( + long groupId, int year, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_Y_REPO_First(groupId, year, orderByComparator); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_Y_REPO_First( + long groupId, int year, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByG_Y_REPO_First(groupId, year, orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_Y_REPO_Last(long groupId, + int year, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_Y_REPO_Last(groupId, year, orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_Y_REPO_Last( + long groupId, int year, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByG_Y_REPO_Last(groupId, year, orderByComparator); + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public static OpencpsDossierStatisticMgt[] findByG_Y_REPO_PrevAndNext( + long dossierStatisticMgtId, long groupId, int year, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_Y_REPO_PrevAndNext(dossierStatisticMgtId, groupId, + year, orderByComparator); + } + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and year = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @return the matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO( + long groupId, int[] years) { + return getPersistence().findByG_Y_REPO(groupId, years); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and year = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO( + long groupId, int[] years, int start, int end) { + return getPersistence().findByG_Y_REPO(groupId, years, start, end); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO( + long groupId, int[] years, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByG_Y_REPO(groupId, years, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ?, optionally using the finder cache. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO( + long groupId, int[] years, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByG_Y_REPO(groupId, years, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and year = ? from the database. + * + * @param groupId the group ID + * @param year the year + */ + public static void removeByG_Y_REPO(long groupId, int year) { + getPersistence().removeByG_Y_REPO(groupId, year); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @return the number of matching opencps dossier statistic mgts + */ + public static int countByG_Y_REPO(long groupId, int year) { + return getPersistence().countByG_Y_REPO(groupId, year); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and year = any ?. + * + * @param groupId the group ID + * @param years the years + * @return the number of matching opencps dossier statistic mgts + */ + public static int countByG_Y_REPO(long groupId, int[] years) { + return getPersistence().countByG_Y_REPO(groupId, years); + } + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + public static List findByG_UID_Y_GB( + long groupId, long userId, int year, int groupBy) { + return getPersistence().findByG_UID_Y_GB(groupId, userId, year, groupBy); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public static List findByG_UID_Y_GB( + long groupId, long userId, int year, int groupBy, int start, int end) { + return getPersistence() + .findByG_UID_Y_GB(groupId, userId, year, groupBy, start, end); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_UID_Y_GB( + long groupId, long userId, int year, int groupBy, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByG_UID_Y_GB(groupId, userId, year, groupBy, start, + end, orderByComparator); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_UID_Y_GB( + long groupId, long userId, int year, int groupBy, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByG_UID_Y_GB(groupId, userId, year, groupBy, start, + end, orderByComparator, retrieveFromCache); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_UID_Y_GB_First( + long groupId, long userId, int year, int groupBy, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_UID_Y_GB_First(groupId, userId, year, groupBy, + orderByComparator); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_UID_Y_GB_First( + long groupId, long userId, int year, int groupBy, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByG_UID_Y_GB_First(groupId, userId, year, groupBy, + orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_UID_Y_GB_Last( + long groupId, long userId, int year, int groupBy, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_UID_Y_GB_Last(groupId, userId, year, groupBy, + orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_UID_Y_GB_Last( + long groupId, long userId, int year, int groupBy, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByG_UID_Y_GB_Last(groupId, userId, year, groupBy, + orderByComparator); + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public static OpencpsDossierStatisticMgt[] findByG_UID_Y_GB_PrevAndNext( + long dossierStatisticMgtId, long groupId, long userId, int year, + int groupBy, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_UID_Y_GB_PrevAndNext(dossierStatisticMgtId, + groupId, userId, year, groupBy, orderByComparator); + } + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + */ + public static void removeByG_UID_Y_GB(long groupId, long userId, int year, + int groupBy) { + getPersistence().removeByG_UID_Y_GB(groupId, userId, year, groupBy); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + public static int countByG_UID_Y_GB(long groupId, long userId, int year, + int groupBy) { + return getPersistence().countByG_UID_Y_GB(groupId, userId, year, groupBy); + } + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? or throws a {@link NoSuchOpencpsDossierStatisticMgtException} if it could not be found. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_M_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_M_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy); + } + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? or returns null if it could not be found. Uses the finder cache. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_M_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy) { + return getPersistence() + .fetchByG_M_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy); + } + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_M_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy, boolean retrieveFromCache) { + return getPersistence() + .fetchByG_M_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy, retrieveFromCache); + } + + /** + * Removes the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the opencps dossier statistic mgt that was removed + */ + public static OpencpsDossierStatisticMgt removeByG_M_Y_G_D_GB( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .removeByG_M_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + public static int countByG_M_Y_G_D_GB(long groupId, int month, int year, + String govAgencyCode, String domainCode, int groupBy) { + return getPersistence() + .countByG_M_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy); + } + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + public static List findByG_NM_Y_GB( + long groupId, int month, int year, int groupBy) { + return getPersistence().findByG_NM_Y_GB(groupId, month, year, groupBy); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public static List findByG_NM_Y_GB( + long groupId, int month, int year, int groupBy, int start, int end) { + return getPersistence() + .findByG_NM_Y_GB(groupId, month, year, groupBy, start, end); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_NM_Y_GB( + long groupId, int month, int year, int groupBy, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByG_NM_Y_GB(groupId, month, year, groupBy, start, end, + orderByComparator); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_NM_Y_GB( + long groupId, int month, int year, int groupBy, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByG_NM_Y_GB(groupId, month, year, groupBy, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_NM_Y_GB_First( + long groupId, int month, int year, int groupBy, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_NM_Y_GB_First(groupId, month, year, groupBy, + orderByComparator); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_NM_Y_GB_First( + long groupId, int month, int year, int groupBy, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByG_NM_Y_GB_First(groupId, month, year, groupBy, + orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_NM_Y_GB_Last( + long groupId, int month, int year, int groupBy, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_NM_Y_GB_Last(groupId, month, year, groupBy, + orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_NM_Y_GB_Last( + long groupId, int month, int year, int groupBy, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByG_NM_Y_GB_Last(groupId, month, year, groupBy, + orderByComparator); + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public static OpencpsDossierStatisticMgt[] findByG_NM_Y_GB_PrevAndNext( + long dossierStatisticMgtId, long groupId, int month, int year, + int groupBy, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_NM_Y_GB_PrevAndNext(dossierStatisticMgtId, groupId, + month, year, groupBy, orderByComparator); + } + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + */ + public static void removeByG_NM_Y_GB(long groupId, int month, int year, + int groupBy) { + getPersistence().removeByG_NM_Y_GB(groupId, month, year, groupBy); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + public static int countByG_NM_Y_GB(long groupId, int month, int year, + int groupBy) { + return getPersistence().countByG_NM_Y_GB(groupId, month, year, groupBy); + } + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO_GB( + long groupId, int year, int groupBy) { + return getPersistence().findByG_Y_REPO_GB(groupId, year, groupBy); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO_GB( + long groupId, int year, int groupBy, int start, int end) { + return getPersistence() + .findByG_Y_REPO_GB(groupId, year, groupBy, start, end); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO_GB( + long groupId, int year, int groupBy, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByG_Y_REPO_GB(groupId, year, groupBy, start, end, + orderByComparator); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO_GB( + long groupId, int year, int groupBy, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByG_Y_REPO_GB(groupId, year, groupBy, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_Y_REPO_GB_First( + long groupId, int year, int groupBy, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_Y_REPO_GB_First(groupId, year, groupBy, + orderByComparator); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_Y_REPO_GB_First( + long groupId, int year, int groupBy, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByG_Y_REPO_GB_First(groupId, year, groupBy, + orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_Y_REPO_GB_Last( + long groupId, int year, int groupBy, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_Y_REPO_GB_Last(groupId, year, groupBy, + orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_Y_REPO_GB_Last( + long groupId, int year, int groupBy, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByG_Y_REPO_GB_Last(groupId, year, groupBy, + orderByComparator); + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public static OpencpsDossierStatisticMgt[] findByG_Y_REPO_GB_PrevAndNext( + long dossierStatisticMgtId, long groupId, int year, int groupBy, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_Y_REPO_GB_PrevAndNext(dossierStatisticMgtId, + groupId, year, groupBy, orderByComparator); + } + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and year = any ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO_GB( + long groupId, int[] years, int groupBy) { + return getPersistence().findByG_Y_REPO_GB(groupId, years, groupBy); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and year = any ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO_GB( + long groupId, int[] years, int groupBy, int start, int end) { + return getPersistence() + .findByG_Y_REPO_GB(groupId, years, groupBy, start, end); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = any ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO_GB( + long groupId, int[] years, int groupBy, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByG_Y_REPO_GB(groupId, years, groupBy, start, end, + orderByComparator); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?, optionally using the finder cache. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_Y_REPO_GB( + long groupId, int[] years, int groupBy, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByG_Y_REPO_GB(groupId, years, groupBy, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + */ + public static void removeByG_Y_REPO_GB(long groupId, int year, int groupBy) { + getPersistence().removeByG_Y_REPO_GB(groupId, year, groupBy); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + public static int countByG_Y_REPO_GB(long groupId, int year, int groupBy) { + return getPersistence().countByG_Y_REPO_GB(groupId, year, groupBy); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and year = any ? and groupBy = ?. + * + * @param groupId the group ID + * @param years the years + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + public static int countByG_Y_REPO_GB(long groupId, int[] years, int groupBy) { + return getPersistence().countByG_Y_REPO_GB(groupId, years, groupBy); + } + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + public static List findByG_NM_Y_G_D_GB( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy) { + return getPersistence() + .findByG_NM_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + public static List findByG_NM_Y_G_D_GB( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy, int start, int end) { + return getPersistence() + .findByG_NM_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy, start, end); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_NM_Y_G_D_GB( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByG_NM_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + public static List findByG_NM_Y_G_D_GB( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByG_NM_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy, start, end, orderByComparator, + retrieveFromCache); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_NM_Y_G_D_GB_First( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_NM_Y_G_D_GB_First(groupId, month, year, + govAgencyCode, domainCode, groupBy, orderByComparator); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_NM_Y_G_D_GB_First( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByG_NM_Y_G_D_GB_First(groupId, month, year, + govAgencyCode, domainCode, groupBy, orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt findByG_NM_Y_G_D_GB_Last( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_NM_Y_G_D_GB_Last(groupId, month, year, + govAgencyCode, domainCode, groupBy, orderByComparator); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + public static OpencpsDossierStatisticMgt fetchByG_NM_Y_G_D_GB_Last( + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByG_NM_Y_G_D_GB_Last(groupId, month, year, + govAgencyCode, domainCode, groupBy, orderByComparator); + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public static OpencpsDossierStatisticMgt[] findByG_NM_Y_G_D_GB_PrevAndNext( + long dossierStatisticMgtId, long groupId, int month, int year, + String govAgencyCode, String domainCode, int groupBy, + OrderByComparator orderByComparator) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence() + .findByG_NM_Y_G_D_GB_PrevAndNext(dossierStatisticMgtId, + groupId, month, year, govAgencyCode, domainCode, groupBy, + orderByComparator); + } + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + */ + public static void removeByG_NM_Y_G_D_GB(long groupId, int month, int year, + String govAgencyCode, String domainCode, int groupBy) { + getPersistence() + .removeByG_NM_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + public static int countByG_NM_Y_G_D_GB(long groupId, int month, int year, + String govAgencyCode, String domainCode, int groupBy) { + return getPersistence() + .countByG_NM_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy); + } + + /** + * Caches the opencps dossier statistic mgt in the entity cache if it is enabled. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + */ + public static void cacheResult( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + getPersistence().cacheResult(opencpsDossierStatisticMgt); + } + + /** + * Caches the opencps dossier statistic mgts in the entity cache if it is enabled. + * + * @param opencpsDossierStatisticMgts the opencps dossier statistic mgts + */ + public static void cacheResult( + List opencpsDossierStatisticMgts) { + getPersistence().cacheResult(opencpsDossierStatisticMgts); + } + + /** + * Creates a new opencps dossier statistic mgt with the primary key. Does not add the opencps dossier statistic mgt to the database. + * + * @param dossierStatisticMgtId the primary key for the new opencps dossier statistic mgt + * @return the new opencps dossier statistic mgt + */ + public static OpencpsDossierStatisticMgt create(long dossierStatisticMgtId) { + return getPersistence().create(dossierStatisticMgtId); + } + + /** + * Removes the opencps dossier statistic mgt with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was removed + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public static OpencpsDossierStatisticMgt remove(long dossierStatisticMgtId) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence().remove(dossierStatisticMgtId); + } + + public static OpencpsDossierStatisticMgt updateImpl( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + return getPersistence().updateImpl(opencpsDossierStatisticMgt); + } + + /** + * Returns the opencps dossier statistic mgt with the primary key or throws a {@link NoSuchOpencpsDossierStatisticMgtException} if it could not be found. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + public static OpencpsDossierStatisticMgt findByPrimaryKey( + long dossierStatisticMgtId) + throws org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException { + return getPersistence().findByPrimaryKey(dossierStatisticMgtId); + } + + /** + * Returns the opencps dossier statistic mgt with the primary key or returns null if it could not be found. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt, or null if a opencps dossier statistic mgt with the primary key could not be found + */ + public static OpencpsDossierStatisticMgt fetchByPrimaryKey( + long dossierStatisticMgtId) { + return getPersistence().fetchByPrimaryKey(dossierStatisticMgtId); + } + + public static java.util.Map fetchByPrimaryKeys( + java.util.Set primaryKeys) { + return getPersistence().fetchByPrimaryKeys(primaryKeys); + } + + /** + * Returns all the opencps dossier statistic mgts. + * + * @return the opencps dossier statistic mgts + */ + public static List findAll() { + return getPersistence().findAll(); + } + + /** + * Returns a range of all the opencps dossier statistic mgts. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of opencps dossier statistic mgts + */ + public static List findAll(int start, int end) { + return getPersistence().findAll(start, end); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of opencps dossier statistic mgts + */ + public static List findAll(int start, int end, + OrderByComparator orderByComparator) { + return getPersistence().findAll(start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of opencps dossier statistic mgts + */ + public static List findAll(int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findAll(start, end, orderByComparator, retrieveFromCache); + } + + /** + * Removes all the opencps dossier statistic mgts from the database. + */ + public static void removeAll() { + getPersistence().removeAll(); + } + + /** + * Returns the number of opencps dossier statistic mgts. + * + * @return the number of opencps dossier statistic mgts + */ + public static int countAll() { + return getPersistence().countAll(); + } + + public static java.util.Set getBadColumnNames() { + return getPersistence().getBadColumnNames(); + } + + public static OpencpsDossierStatisticMgtPersistence getPersistence() { + return _serviceTracker.getService(); + } + + private static ServiceTracker _serviceTracker; + + static { + Bundle bundle = FrameworkUtil.getBundle(OpencpsDossierStatisticMgtPersistence.class); + + ServiceTracker serviceTracker = + new ServiceTracker(bundle.getBundleContext(), + OpencpsDossierStatisticMgtPersistence.class, null); + + serviceTracker.open(); + + _serviceTracker = serviceTracker; + } +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-service/service.xml b/modules/backend-statistic-service/backend-statistic-service-service/service.xml index dba27b0e51..cf5ecb0299 100644 --- a/modules/backend-statistic-service/backend-statistic-service-service/service.xml +++ b/modules/backend-statistic-service/backend-statistic-service-service/service.xml @@ -524,4 +524,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/model/impl/OpencpsDossierStatisticMgtBaseImpl.java b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/model/impl/OpencpsDossierStatisticMgtBaseImpl.java new file mode 100644 index 0000000000..e8e7a90a18 --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/model/impl/OpencpsDossierStatisticMgtBaseImpl.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import org.opencps.statistic.model.OpencpsDossierStatisticMgt; +import org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalServiceUtil; + +/** + * The extended model base implementation for the OpencpsDossierStatisticMgt service. Represents a row in the "opencps_statistic_mgt" database table, with each column mapped to a property of this class. + * + *

+ * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link OpencpsDossierStatisticMgtImpl}. + *

+ * + * @author khoavu + * @see OpencpsDossierStatisticMgtImpl + * @see OpencpsDossierStatisticMgt + * @generated + */ +@ProviderType +public abstract class OpencpsDossierStatisticMgtBaseImpl + extends OpencpsDossierStatisticMgtModelImpl + implements OpencpsDossierStatisticMgt { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a opencps dossier statistic mgt model instance should use the {@link OpencpsDossierStatisticMgt} interface instead. + */ + @Override + public void persist() { + if (this.isNew()) { + OpencpsDossierStatisticMgtLocalServiceUtil.addOpencpsDossierStatisticMgt(this); + } + else { + OpencpsDossierStatisticMgtLocalServiceUtil.updateOpencpsDossierStatisticMgt(this); + } + } +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/model/impl/OpencpsDossierStatisticMgtCacheModel.java b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/model/impl/OpencpsDossierStatisticMgtCacheModel.java new file mode 100644 index 0000000000..4a982b1cd0 --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/model/impl/OpencpsDossierStatisticMgtCacheModel.java @@ -0,0 +1,466 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.util.HashUtil; +import com.liferay.portal.kernel.util.StringBundler; + +import org.opencps.statistic.model.OpencpsDossierStatisticMgt; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +import java.util.Date; + +/** + * The cache model class for representing OpencpsDossierStatisticMgt in entity cache. + * + * @author khoavu + * @see OpencpsDossierStatisticMgt + * @generated + */ +@ProviderType +public class OpencpsDossierStatisticMgtCacheModel implements CacheModel, + Externalizable { + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof OpencpsDossierStatisticMgtCacheModel)) { + return false; + } + + OpencpsDossierStatisticMgtCacheModel opencpsDossierStatisticMgtCacheModel = + (OpencpsDossierStatisticMgtCacheModel)obj; + + if (dossierStatisticMgtId == opencpsDossierStatisticMgtCacheModel.dossierStatisticMgtId) { + return true; + } + + return false; + } + + @Override + public int hashCode() { + return HashUtil.hash(0, dossierStatisticMgtId); + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(71); + + sb.append("{uuid="); + sb.append(uuid); + sb.append(", dossierStatisticMgtId="); + sb.append(dossierStatisticMgtId); + sb.append(", groupId="); + sb.append(groupId); + sb.append(", userId="); + sb.append(userId); + sb.append(", userName="); + sb.append(userName); + sb.append(", createDate="); + sb.append(createDate); + sb.append(", modifiedDate="); + sb.append(modifiedDate); + sb.append(", month="); + sb.append(month); + sb.append(", year="); + sb.append(year); + sb.append(", totalCount="); + sb.append(totalCount); + sb.append(", processCount="); + sb.append(processCount); + sb.append(", remainingCount="); + sb.append(remainingCount); + sb.append(", receivedCount="); + sb.append(receivedCount); + sb.append(", onlineCount="); + sb.append(onlineCount); + sb.append(", onegateCount="); + sb.append(onegateCount); + sb.append(", releaseCount="); + sb.append(releaseCount); + sb.append(", betimesCount="); + sb.append(betimesCount); + sb.append(", ontimeCount="); + sb.append(ontimeCount); + sb.append(", overtimeCount="); + sb.append(overtimeCount); + sb.append(", doneCount="); + sb.append(doneCount); + sb.append(", releasingCount="); + sb.append(releasingCount); + sb.append(", processingCount="); + sb.append(processingCount); + sb.append(", undueCount="); + sb.append(undueCount); + sb.append(", overdueCount="); + sb.append(overdueCount); + sb.append(", ontimePercentage="); + sb.append(ontimePercentage); + sb.append(", waitingCount="); + sb.append(waitingCount); + sb.append(", govAgencyCode="); + sb.append(govAgencyCode); + sb.append(", govAgencyName="); + sb.append(govAgencyName); + sb.append(", domainCode="); + sb.append(domainCode); + sb.append(", domainName="); + sb.append(domainName); + sb.append(", serviceCode="); + sb.append(serviceCode); + sb.append(", serviceName="); + sb.append(serviceName); + sb.append(", groupBy="); + sb.append(groupBy); + sb.append(", cancelledCount="); + sb.append(cancelledCount); + sb.append(", unresolvedCount="); + sb.append(unresolvedCount); + sb.append("}"); + + return sb.toString(); + } + + @Override + public OpencpsDossierStatisticMgt toEntityModel() { + OpencpsDossierStatisticMgtImpl opencpsDossierStatisticMgtImpl = new OpencpsDossierStatisticMgtImpl(); + + if (uuid == null) { + opencpsDossierStatisticMgtImpl.setUuid(""); + } + else { + opencpsDossierStatisticMgtImpl.setUuid(uuid); + } + + opencpsDossierStatisticMgtImpl.setDossierStatisticMgtId(dossierStatisticMgtId); + opencpsDossierStatisticMgtImpl.setGroupId(groupId); + opencpsDossierStatisticMgtImpl.setUserId(userId); + + if (userName == null) { + opencpsDossierStatisticMgtImpl.setUserName(""); + } + else { + opencpsDossierStatisticMgtImpl.setUserName(userName); + } + + if (createDate == Long.MIN_VALUE) { + opencpsDossierStatisticMgtImpl.setCreateDate(null); + } + else { + opencpsDossierStatisticMgtImpl.setCreateDate(new Date(createDate)); + } + + if (modifiedDate == Long.MIN_VALUE) { + opencpsDossierStatisticMgtImpl.setModifiedDate(null); + } + else { + opencpsDossierStatisticMgtImpl.setModifiedDate(new Date( + modifiedDate)); + } + + opencpsDossierStatisticMgtImpl.setMonth(month); + opencpsDossierStatisticMgtImpl.setYear(year); + opencpsDossierStatisticMgtImpl.setTotalCount(totalCount); + opencpsDossierStatisticMgtImpl.setProcessCount(processCount); + opencpsDossierStatisticMgtImpl.setRemainingCount(remainingCount); + opencpsDossierStatisticMgtImpl.setReceivedCount(receivedCount); + opencpsDossierStatisticMgtImpl.setOnlineCount(onlineCount); + opencpsDossierStatisticMgtImpl.setOnegateCount(onegateCount); + opencpsDossierStatisticMgtImpl.setReleaseCount(releaseCount); + opencpsDossierStatisticMgtImpl.setBetimesCount(betimesCount); + opencpsDossierStatisticMgtImpl.setOntimeCount(ontimeCount); + opencpsDossierStatisticMgtImpl.setOvertimeCount(overtimeCount); + opencpsDossierStatisticMgtImpl.setDoneCount(doneCount); + opencpsDossierStatisticMgtImpl.setReleasingCount(releasingCount); + opencpsDossierStatisticMgtImpl.setProcessingCount(processingCount); + opencpsDossierStatisticMgtImpl.setUndueCount(undueCount); + opencpsDossierStatisticMgtImpl.setOverdueCount(overdueCount); + opencpsDossierStatisticMgtImpl.setOntimePercentage(ontimePercentage); + opencpsDossierStatisticMgtImpl.setWaitingCount(waitingCount); + + if (govAgencyCode == null) { + opencpsDossierStatisticMgtImpl.setGovAgencyCode(""); + } + else { + opencpsDossierStatisticMgtImpl.setGovAgencyCode(govAgencyCode); + } + + if (govAgencyName == null) { + opencpsDossierStatisticMgtImpl.setGovAgencyName(""); + } + else { + opencpsDossierStatisticMgtImpl.setGovAgencyName(govAgencyName); + } + + if (domainCode == null) { + opencpsDossierStatisticMgtImpl.setDomainCode(""); + } + else { + opencpsDossierStatisticMgtImpl.setDomainCode(domainCode); + } + + if (domainName == null) { + opencpsDossierStatisticMgtImpl.setDomainName(""); + } + else { + opencpsDossierStatisticMgtImpl.setDomainName(domainName); + } + + if (serviceCode == null) { + opencpsDossierStatisticMgtImpl.setServiceCode(""); + } + else { + opencpsDossierStatisticMgtImpl.setServiceCode(serviceCode); + } + + if (serviceName == null) { + opencpsDossierStatisticMgtImpl.setServiceName(""); + } + else { + opencpsDossierStatisticMgtImpl.setServiceName(serviceName); + } + + opencpsDossierStatisticMgtImpl.setGroupBy(groupBy); + opencpsDossierStatisticMgtImpl.setCancelledCount(cancelledCount); + opencpsDossierStatisticMgtImpl.setUnresolvedCount(unresolvedCount); + + opencpsDossierStatisticMgtImpl.resetOriginalValues(); + + return opencpsDossierStatisticMgtImpl; + } + + @Override + public void readExternal(ObjectInput objectInput) throws IOException { + uuid = objectInput.readUTF(); + + dossierStatisticMgtId = objectInput.readLong(); + + groupId = objectInput.readLong(); + + userId = objectInput.readLong(); + userName = objectInput.readUTF(); + createDate = objectInput.readLong(); + modifiedDate = objectInput.readLong(); + + month = objectInput.readInt(); + + year = objectInput.readInt(); + + totalCount = objectInput.readInt(); + + processCount = objectInput.readInt(); + + remainingCount = objectInput.readInt(); + + receivedCount = objectInput.readInt(); + + onlineCount = objectInput.readInt(); + + onegateCount = objectInput.readInt(); + + releaseCount = objectInput.readInt(); + + betimesCount = objectInput.readInt(); + + ontimeCount = objectInput.readInt(); + + overtimeCount = objectInput.readInt(); + + doneCount = objectInput.readInt(); + + releasingCount = objectInput.readInt(); + + processingCount = objectInput.readInt(); + + undueCount = objectInput.readInt(); + + overdueCount = objectInput.readInt(); + + ontimePercentage = objectInput.readInt(); + + waitingCount = objectInput.readInt(); + govAgencyCode = objectInput.readUTF(); + govAgencyName = objectInput.readUTF(); + domainCode = objectInput.readUTF(); + domainName = objectInput.readUTF(); + serviceCode = objectInput.readUTF(); + serviceName = objectInput.readUTF(); + + groupBy = objectInput.readInt(); + + cancelledCount = objectInput.readInt(); + + unresolvedCount = objectInput.readInt(); + } + + @Override + public void writeExternal(ObjectOutput objectOutput) + throws IOException { + if (uuid == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(uuid); + } + + objectOutput.writeLong(dossierStatisticMgtId); + + objectOutput.writeLong(groupId); + + objectOutput.writeLong(userId); + + if (userName == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(userName); + } + + objectOutput.writeLong(createDate); + objectOutput.writeLong(modifiedDate); + + objectOutput.writeInt(month); + + objectOutput.writeInt(year); + + objectOutput.writeInt(totalCount); + + objectOutput.writeInt(processCount); + + objectOutput.writeInt(remainingCount); + + objectOutput.writeInt(receivedCount); + + objectOutput.writeInt(onlineCount); + + objectOutput.writeInt(onegateCount); + + objectOutput.writeInt(releaseCount); + + objectOutput.writeInt(betimesCount); + + objectOutput.writeInt(ontimeCount); + + objectOutput.writeInt(overtimeCount); + + objectOutput.writeInt(doneCount); + + objectOutput.writeInt(releasingCount); + + objectOutput.writeInt(processingCount); + + objectOutput.writeInt(undueCount); + + objectOutput.writeInt(overdueCount); + + objectOutput.writeInt(ontimePercentage); + + objectOutput.writeInt(waitingCount); + + if (govAgencyCode == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(govAgencyCode); + } + + if (govAgencyName == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(govAgencyName); + } + + if (domainCode == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(domainCode); + } + + if (domainName == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(domainName); + } + + if (serviceCode == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(serviceCode); + } + + if (serviceName == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(serviceName); + } + + objectOutput.writeInt(groupBy); + + objectOutput.writeInt(cancelledCount); + + objectOutput.writeInt(unresolvedCount); + } + + public String uuid; + public long dossierStatisticMgtId; + public long groupId; + public long userId; + public String userName; + public long createDate; + public long modifiedDate; + public int month; + public int year; + public int totalCount; + public int processCount; + public int remainingCount; + public int receivedCount; + public int onlineCount; + public int onegateCount; + public int releaseCount; + public int betimesCount; + public int ontimeCount; + public int overtimeCount; + public int doneCount; + public int releasingCount; + public int processingCount; + public int undueCount; + public int overdueCount; + public int ontimePercentage; + public int waitingCount; + public String govAgencyCode; + public String govAgencyName; + public String domainCode; + public String domainName; + public String serviceCode; + public String serviceName; + public int groupBy; + public int cancelledCount; + public int unresolvedCount; +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/model/impl/OpencpsDossierStatisticMgtImpl.java b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/model/impl/OpencpsDossierStatisticMgtImpl.java new file mode 100644 index 0000000000..d3e0155dfa --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/model/impl/OpencpsDossierStatisticMgtImpl.java @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.model.impl; + +import aQute.bnd.annotation.ProviderType; + +/** + * The extended model implementation for the OpencpsDossierStatisticMgt service. Represents a row in the "opencps_statistic_mgt" database table, with each column mapped to a property of this class. + * + *

+ * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.statistic.model.OpencpsDossierStatisticMgt} interface. + *

+ * + * @author khoavu + */ +@ProviderType +public class OpencpsDossierStatisticMgtImpl + extends OpencpsDossierStatisticMgtBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a opencps dossier statistic mgt model instance should use the {@link org.opencps.statistic.model.OpencpsDossierStatisticMgt} interface instead. + */ + public OpencpsDossierStatisticMgtImpl() { + } +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/model/impl/OpencpsDossierStatisticMgtModelImpl.java b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/model/impl/OpencpsDossierStatisticMgtModelImpl.java new file mode 100644 index 0000000000..097793554b --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/model/impl/OpencpsDossierStatisticMgtModelImpl.java @@ -0,0 +1,1552 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; +import com.liferay.expando.kernel.util.ExpandoBridgeFactoryUtil; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.model.ModelWrapper; +import com.liferay.portal.kernel.model.User; +import com.liferay.portal.kernel.model.impl.BaseModelImpl; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.service.UserLocalServiceUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; + +import org.opencps.statistic.model.OpencpsDossierStatisticMgt; +import org.opencps.statistic.model.OpencpsDossierStatisticMgtModel; + +import java.io.Serializable; + +import java.sql.Types; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * The base model implementation for the OpencpsDossierStatisticMgt service. Represents a row in the "opencps_statistic_mgt" database table, with each column mapped to a property of this class. + * + *

+ * This implementation and its corresponding interface {@link OpencpsDossierStatisticMgtModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link OpencpsDossierStatisticMgtImpl}. + *

+ * + * @author khoavu + * @see OpencpsDossierStatisticMgtImpl + * @see OpencpsDossierStatisticMgt + * @see OpencpsDossierStatisticMgtModel + * @generated + */ +@ProviderType +public class OpencpsDossierStatisticMgtModelImpl extends BaseModelImpl + implements OpencpsDossierStatisticMgtModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a opencps dossier statistic mgt model instance should use the {@link OpencpsDossierStatisticMgt} interface instead. + */ + public static final String TABLE_NAME = "opencps_statistic_mgt"; + public static final Object[][] TABLE_COLUMNS = { + { "uuid_", Types.VARCHAR }, + { "dossierStatisticMgtId", Types.BIGINT }, + { "groupId", Types.BIGINT }, + { "userId", Types.BIGINT }, + { "userName", Types.VARCHAR }, + { "createDate", Types.TIMESTAMP }, + { "modifiedDate", Types.TIMESTAMP }, + { "month", Types.INTEGER }, + { "year", Types.INTEGER }, + { "totalCount", Types.INTEGER }, + { "processCount", Types.INTEGER }, + { "remainingCount", Types.INTEGER }, + { "receivedCount", Types.INTEGER }, + { "onlineCount", Types.INTEGER }, + { "onegateCount", Types.INTEGER }, + { "releaseCount", Types.INTEGER }, + { "betimesCount", Types.INTEGER }, + { "ontimeCount", Types.INTEGER }, + { "overtimeCount", Types.INTEGER }, + { "doneCount", Types.INTEGER }, + { "releasingCount", Types.INTEGER }, + { "processingCount", Types.INTEGER }, + { "undueCount", Types.INTEGER }, + { "overdueCount", Types.INTEGER }, + { "ontimePercentage", Types.INTEGER }, + { "waitingCount", Types.INTEGER }, + { "govAgencyCode", Types.VARCHAR }, + { "govAgencyName", Types.VARCHAR }, + { "domainCode", Types.VARCHAR }, + { "domainName", Types.VARCHAR }, + { "serviceCode", Types.VARCHAR }, + { "serviceName", Types.VARCHAR }, + { "groupBy", Types.INTEGER }, + { "cancelledCount", Types.INTEGER }, + { "unresolvedCount", Types.INTEGER } + }; + public static final Map TABLE_COLUMNS_MAP = new HashMap(); + + static { + TABLE_COLUMNS_MAP.put("uuid_", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("dossierStatisticMgtId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("groupId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("userId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("userName", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("createDate", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("modifiedDate", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("month", Types.INTEGER); + TABLE_COLUMNS_MAP.put("year", Types.INTEGER); + TABLE_COLUMNS_MAP.put("totalCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("processCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("remainingCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("receivedCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("onlineCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("onegateCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("releaseCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("betimesCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("ontimeCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("overtimeCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("doneCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("releasingCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("processingCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("undueCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("overdueCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("ontimePercentage", Types.INTEGER); + TABLE_COLUMNS_MAP.put("waitingCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("govAgencyCode", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("govAgencyName", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("domainCode", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("domainName", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("serviceCode", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("serviceName", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("groupBy", Types.INTEGER); + TABLE_COLUMNS_MAP.put("cancelledCount", Types.INTEGER); + TABLE_COLUMNS_MAP.put("unresolvedCount", Types.INTEGER); + } + + public static final String TABLE_SQL_CREATE = "create table opencps_statistic_mgt (uuid_ VARCHAR(75) null,dossierStatisticMgtId LONG not null primary key,groupId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,month INTEGER,year INTEGER,totalCount INTEGER,processCount INTEGER,remainingCount INTEGER,receivedCount INTEGER,onlineCount INTEGER,onegateCount INTEGER,releaseCount INTEGER,betimesCount INTEGER,ontimeCount INTEGER,overtimeCount INTEGER,doneCount INTEGER,releasingCount INTEGER,processingCount INTEGER,undueCount INTEGER,overdueCount INTEGER,ontimePercentage INTEGER,waitingCount INTEGER,govAgencyCode VARCHAR(75) null,govAgencyName VARCHAR(75) null,domainCode VARCHAR(75) null,domainName VARCHAR(75) null,serviceCode VARCHAR(75) null,serviceName VARCHAR(75) null,groupBy INTEGER,cancelledCount INTEGER,unresolvedCount INTEGER)"; + public static final String TABLE_SQL_DROP = "drop table opencps_statistic_mgt"; + public static final String ORDER_BY_JPQL = " ORDER BY opencpsDossierStatisticMgt.dossierStatisticMgtId ASC"; + public static final String ORDER_BY_SQL = " ORDER BY opencps_statistic_mgt.dossierStatisticMgtId ASC"; + public static final String DATA_SOURCE = "liferayDataSource"; + public static final String SESSION_FACTORY = "liferaySessionFactory"; + public static final String TX_MANAGER = "liferayTransactionManager"; + public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(StatisticService.backend.statistic.service.service.util.ServiceProps.get( + "value.object.entity.cache.enabled.org.opencps.statistic.model.OpencpsDossierStatisticMgt"), + true); + public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(StatisticService.backend.statistic.service.service.util.ServiceProps.get( + "value.object.finder.cache.enabled.org.opencps.statistic.model.OpencpsDossierStatisticMgt"), + true); + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(StatisticService.backend.statistic.service.service.util.ServiceProps.get( + "value.object.column.bitmask.enabled.org.opencps.statistic.model.OpencpsDossierStatisticMgt"), + true); + public static final long DOMAINCODE_COLUMN_BITMASK = 1L; + public static final long GOVAGENCYCODE_COLUMN_BITMASK = 2L; + public static final long GROUPBY_COLUMN_BITMASK = 4L; + public static final long GROUPID_COLUMN_BITMASK = 8L; + public static final long MONTH_COLUMN_BITMASK = 16L; + public static final long USERID_COLUMN_BITMASK = 32L; + public static final long UUID_COLUMN_BITMASK = 64L; + public static final long YEAR_COLUMN_BITMASK = 128L; + public static final long DOSSIERSTATISTICMGTID_COLUMN_BITMASK = 256L; + public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(StatisticService.backend.statistic.service.service.util.ServiceProps.get( + "lock.expiration.time.org.opencps.statistic.model.OpencpsDossierStatisticMgt")); + + public OpencpsDossierStatisticMgtModelImpl() { + } + + @Override + public long getPrimaryKey() { + return _dossierStatisticMgtId; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setDossierStatisticMgtId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _dossierStatisticMgtId; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Class getModelClass() { + return OpencpsDossierStatisticMgt.class; + } + + @Override + public String getModelClassName() { + return OpencpsDossierStatisticMgt.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("uuid", getUuid()); + attributes.put("dossierStatisticMgtId", getDossierStatisticMgtId()); + attributes.put("groupId", getGroupId()); + attributes.put("userId", getUserId()); + attributes.put("userName", getUserName()); + attributes.put("createDate", getCreateDate()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("month", getMonth()); + attributes.put("year", getYear()); + attributes.put("totalCount", getTotalCount()); + attributes.put("processCount", getProcessCount()); + attributes.put("remainingCount", getRemainingCount()); + attributes.put("receivedCount", getReceivedCount()); + attributes.put("onlineCount", getOnlineCount()); + attributes.put("onegateCount", getOnegateCount()); + attributes.put("releaseCount", getReleaseCount()); + attributes.put("betimesCount", getBetimesCount()); + attributes.put("ontimeCount", getOntimeCount()); + attributes.put("overtimeCount", getOvertimeCount()); + attributes.put("doneCount", getDoneCount()); + attributes.put("releasingCount", getReleasingCount()); + attributes.put("processingCount", getProcessingCount()); + attributes.put("undueCount", getUndueCount()); + attributes.put("overdueCount", getOverdueCount()); + attributes.put("ontimePercentage", getOntimePercentage()); + attributes.put("waitingCount", getWaitingCount()); + attributes.put("govAgencyCode", getGovAgencyCode()); + attributes.put("govAgencyName", getGovAgencyName()); + attributes.put("domainCode", getDomainCode()); + attributes.put("domainName", getDomainName()); + attributes.put("serviceCode", getServiceCode()); + attributes.put("serviceName", getServiceName()); + attributes.put("groupBy", getGroupBy()); + attributes.put("cancelledCount", getCancelledCount()); + attributes.put("unresolvedCount", getUnresolvedCount()); + + attributes.put("entityCacheEnabled", isEntityCacheEnabled()); + attributes.put("finderCacheEnabled", isFinderCacheEnabled()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + String uuid = (String)attributes.get("uuid"); + + if (uuid != null) { + setUuid(uuid); + } + + Long dossierStatisticMgtId = (Long)attributes.get( + "dossierStatisticMgtId"); + + if (dossierStatisticMgtId != null) { + setDossierStatisticMgtId(dossierStatisticMgtId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String userName = (String)attributes.get("userName"); + + if (userName != null) { + setUserName(userName); + } + + Date createDate = (Date)attributes.get("createDate"); + + if (createDate != null) { + setCreateDate(createDate); + } + + Date modifiedDate = (Date)attributes.get("modifiedDate"); + + if (modifiedDate != null) { + setModifiedDate(modifiedDate); + } + + Integer month = (Integer)attributes.get("month"); + + if (month != null) { + setMonth(month); + } + + Integer year = (Integer)attributes.get("year"); + + if (year != null) { + setYear(year); + } + + Integer totalCount = (Integer)attributes.get("totalCount"); + + if (totalCount != null) { + setTotalCount(totalCount); + } + + Integer processCount = (Integer)attributes.get("processCount"); + + if (processCount != null) { + setProcessCount(processCount); + } + + Integer remainingCount = (Integer)attributes.get("remainingCount"); + + if (remainingCount != null) { + setRemainingCount(remainingCount); + } + + Integer receivedCount = (Integer)attributes.get("receivedCount"); + + if (receivedCount != null) { + setReceivedCount(receivedCount); + } + + Integer onlineCount = (Integer)attributes.get("onlineCount"); + + if (onlineCount != null) { + setOnlineCount(onlineCount); + } + + Integer onegateCount = (Integer)attributes.get("onegateCount"); + + if (onegateCount != null) { + setOnegateCount(onegateCount); + } + + Integer releaseCount = (Integer)attributes.get("releaseCount"); + + if (releaseCount != null) { + setReleaseCount(releaseCount); + } + + Integer betimesCount = (Integer)attributes.get("betimesCount"); + + if (betimesCount != null) { + setBetimesCount(betimesCount); + } + + Integer ontimeCount = (Integer)attributes.get("ontimeCount"); + + if (ontimeCount != null) { + setOntimeCount(ontimeCount); + } + + Integer overtimeCount = (Integer)attributes.get("overtimeCount"); + + if (overtimeCount != null) { + setOvertimeCount(overtimeCount); + } + + Integer doneCount = (Integer)attributes.get("doneCount"); + + if (doneCount != null) { + setDoneCount(doneCount); + } + + Integer releasingCount = (Integer)attributes.get("releasingCount"); + + if (releasingCount != null) { + setReleasingCount(releasingCount); + } + + Integer processingCount = (Integer)attributes.get("processingCount"); + + if (processingCount != null) { + setProcessingCount(processingCount); + } + + Integer undueCount = (Integer)attributes.get("undueCount"); + + if (undueCount != null) { + setUndueCount(undueCount); + } + + Integer overdueCount = (Integer)attributes.get("overdueCount"); + + if (overdueCount != null) { + setOverdueCount(overdueCount); + } + + Integer ontimePercentage = (Integer)attributes.get("ontimePercentage"); + + if (ontimePercentage != null) { + setOntimePercentage(ontimePercentage); + } + + Integer waitingCount = (Integer)attributes.get("waitingCount"); + + if (waitingCount != null) { + setWaitingCount(waitingCount); + } + + String govAgencyCode = (String)attributes.get("govAgencyCode"); + + if (govAgencyCode != null) { + setGovAgencyCode(govAgencyCode); + } + + String govAgencyName = (String)attributes.get("govAgencyName"); + + if (govAgencyName != null) { + setGovAgencyName(govAgencyName); + } + + String domainCode = (String)attributes.get("domainCode"); + + if (domainCode != null) { + setDomainCode(domainCode); + } + + String domainName = (String)attributes.get("domainName"); + + if (domainName != null) { + setDomainName(domainName); + } + + String serviceCode = (String)attributes.get("serviceCode"); + + if (serviceCode != null) { + setServiceCode(serviceCode); + } + + String serviceName = (String)attributes.get("serviceName"); + + if (serviceName != null) { + setServiceName(serviceName); + } + + Integer groupBy = (Integer)attributes.get("groupBy"); + + if (groupBy != null) { + setGroupBy(groupBy); + } + + Integer cancelledCount = (Integer)attributes.get("cancelledCount"); + + if (cancelledCount != null) { + setCancelledCount(cancelledCount); + } + + Integer unresolvedCount = (Integer)attributes.get("unresolvedCount"); + + if (unresolvedCount != null) { + setUnresolvedCount(unresolvedCount); + } + } + + @Override + public String getUuid() { + if (_uuid == null) { + return ""; + } + else { + return _uuid; + } + } + + @Override + public void setUuid(String uuid) { + if (_originalUuid == null) { + _originalUuid = _uuid; + } + + _uuid = uuid; + } + + public String getOriginalUuid() { + return GetterUtil.getString(_originalUuid); + } + + @Override + public long getDossierStatisticMgtId() { + return _dossierStatisticMgtId; + } + + @Override + public void setDossierStatisticMgtId(long dossierStatisticMgtId) { + _dossierStatisticMgtId = dossierStatisticMgtId; + } + + @Override + public long getGroupId() { + return _groupId; + } + + @Override + public void setGroupId(long groupId) { + _columnBitmask |= GROUPID_COLUMN_BITMASK; + + if (!_setOriginalGroupId) { + _setOriginalGroupId = true; + + _originalGroupId = _groupId; + } + + _groupId = groupId; + } + + public long getOriginalGroupId() { + return _originalGroupId; + } + + @Override + public long getUserId() { + return _userId; + } + + @Override + public void setUserId(long userId) { + _columnBitmask |= USERID_COLUMN_BITMASK; + + if (!_setOriginalUserId) { + _setOriginalUserId = true; + + _originalUserId = _userId; + } + + _userId = userId; + } + + @Override + public String getUserUuid() { + try { + User user = UserLocalServiceUtil.getUserById(getUserId()); + + return user.getUuid(); + } + catch (PortalException pe) { + return ""; + } + } + + @Override + public void setUserUuid(String userUuid) { + } + + public long getOriginalUserId() { + return _originalUserId; + } + + @Override + public String getUserName() { + if (_userName == null) { + return ""; + } + else { + return _userName; + } + } + + @Override + public void setUserName(String userName) { + _userName = userName; + } + + @Override + public Date getCreateDate() { + return _createDate; + } + + @Override + public void setCreateDate(Date createDate) { + _createDate = createDate; + } + + @Override + public Date getModifiedDate() { + return _modifiedDate; + } + + public boolean hasSetModifiedDate() { + return _setModifiedDate; + } + + @Override + public void setModifiedDate(Date modifiedDate) { + _setModifiedDate = true; + + _modifiedDate = modifiedDate; + } + + @Override + public int getMonth() { + return _month; + } + + @Override + public void setMonth(int month) { + _columnBitmask |= MONTH_COLUMN_BITMASK; + + if (!_setOriginalMonth) { + _setOriginalMonth = true; + + _originalMonth = _month; + } + + _month = month; + } + + public int getOriginalMonth() { + return _originalMonth; + } + + @Override + public int getYear() { + return _year; + } + + @Override + public void setYear(int year) { + _columnBitmask |= YEAR_COLUMN_BITMASK; + + if (!_setOriginalYear) { + _setOriginalYear = true; + + _originalYear = _year; + } + + _year = year; + } + + public int getOriginalYear() { + return _originalYear; + } + + @Override + public int getTotalCount() { + return _totalCount; + } + + @Override + public void setTotalCount(int totalCount) { + _totalCount = totalCount; + } + + @Override + public int getProcessCount() { + return _processCount; + } + + @Override + public void setProcessCount(int processCount) { + _processCount = processCount; + } + + @Override + public int getRemainingCount() { + return _remainingCount; + } + + @Override + public void setRemainingCount(int remainingCount) { + _remainingCount = remainingCount; + } + + @Override + public int getReceivedCount() { + return _receivedCount; + } + + @Override + public void setReceivedCount(int receivedCount) { + _receivedCount = receivedCount; + } + + @Override + public int getOnlineCount() { + return _onlineCount; + } + + @Override + public void setOnlineCount(int onlineCount) { + _onlineCount = onlineCount; + } + + @Override + public int getOnegateCount() { + return _onegateCount; + } + + @Override + public void setOnegateCount(int onegateCount) { + _onegateCount = onegateCount; + } + + @Override + public int getReleaseCount() { + return _releaseCount; + } + + @Override + public void setReleaseCount(int releaseCount) { + _releaseCount = releaseCount; + } + + @Override + public int getBetimesCount() { + return _betimesCount; + } + + @Override + public void setBetimesCount(int betimesCount) { + _betimesCount = betimesCount; + } + + @Override + public int getOntimeCount() { + return _ontimeCount; + } + + @Override + public void setOntimeCount(int ontimeCount) { + _ontimeCount = ontimeCount; + } + + @Override + public int getOvertimeCount() { + return _overtimeCount; + } + + @Override + public void setOvertimeCount(int overtimeCount) { + _overtimeCount = overtimeCount; + } + + @Override + public int getDoneCount() { + return _doneCount; + } + + @Override + public void setDoneCount(int doneCount) { + _doneCount = doneCount; + } + + @Override + public int getReleasingCount() { + return _releasingCount; + } + + @Override + public void setReleasingCount(int releasingCount) { + _releasingCount = releasingCount; + } + + @Override + public int getProcessingCount() { + return _processingCount; + } + + @Override + public void setProcessingCount(int processingCount) { + _processingCount = processingCount; + } + + @Override + public int getUndueCount() { + return _undueCount; + } + + @Override + public void setUndueCount(int undueCount) { + _undueCount = undueCount; + } + + @Override + public int getOverdueCount() { + return _overdueCount; + } + + @Override + public void setOverdueCount(int overdueCount) { + _overdueCount = overdueCount; + } + + @Override + public int getOntimePercentage() { + return _ontimePercentage; + } + + @Override + public void setOntimePercentage(int ontimePercentage) { + _ontimePercentage = ontimePercentage; + } + + @Override + public int getWaitingCount() { + return _waitingCount; + } + + @Override + public void setWaitingCount(int waitingCount) { + _waitingCount = waitingCount; + } + + @Override + public String getGovAgencyCode() { + if (_govAgencyCode == null) { + return ""; + } + else { + return _govAgencyCode; + } + } + + @Override + public void setGovAgencyCode(String govAgencyCode) { + _columnBitmask |= GOVAGENCYCODE_COLUMN_BITMASK; + + if (_originalGovAgencyCode == null) { + _originalGovAgencyCode = _govAgencyCode; + } + + _govAgencyCode = govAgencyCode; + } + + public String getOriginalGovAgencyCode() { + return GetterUtil.getString(_originalGovAgencyCode); + } + + @Override + public String getGovAgencyName() { + if (_govAgencyName == null) { + return ""; + } + else { + return _govAgencyName; + } + } + + @Override + public void setGovAgencyName(String govAgencyName) { + _govAgencyName = govAgencyName; + } + + @Override + public String getDomainCode() { + if (_domainCode == null) { + return ""; + } + else { + return _domainCode; + } + } + + @Override + public void setDomainCode(String domainCode) { + _columnBitmask |= DOMAINCODE_COLUMN_BITMASK; + + if (_originalDomainCode == null) { + _originalDomainCode = _domainCode; + } + + _domainCode = domainCode; + } + + public String getOriginalDomainCode() { + return GetterUtil.getString(_originalDomainCode); + } + + @Override + public String getDomainName() { + if (_domainName == null) { + return ""; + } + else { + return _domainName; + } + } + + @Override + public void setDomainName(String domainName) { + _domainName = domainName; + } + + @Override + public String getServiceCode() { + if (_serviceCode == null) { + return ""; + } + else { + return _serviceCode; + } + } + + @Override + public void setServiceCode(String serviceCode) { + _serviceCode = serviceCode; + } + + @Override + public String getServiceName() { + if (_serviceName == null) { + return ""; + } + else { + return _serviceName; + } + } + + @Override + public void setServiceName(String serviceName) { + _serviceName = serviceName; + } + + @Override + public int getGroupBy() { + return _groupBy; + } + + @Override + public void setGroupBy(int groupBy) { + _columnBitmask |= GROUPBY_COLUMN_BITMASK; + + if (!_setOriginalGroupBy) { + _setOriginalGroupBy = true; + + _originalGroupBy = _groupBy; + } + + _groupBy = groupBy; + } + + public int getOriginalGroupBy() { + return _originalGroupBy; + } + + @Override + public int getCancelledCount() { + return _cancelledCount; + } + + @Override + public void setCancelledCount(int cancelledCount) { + _cancelledCount = cancelledCount; + } + + @Override + public int getUnresolvedCount() { + return _unresolvedCount; + } + + @Override + public void setUnresolvedCount(int unresolvedCount) { + _unresolvedCount = unresolvedCount; + } + + public long getColumnBitmask() { + return _columnBitmask; + } + + @Override + public ExpandoBridge getExpandoBridge() { + return ExpandoBridgeFactoryUtil.getExpandoBridge(0, + OpencpsDossierStatisticMgt.class.getName(), getPrimaryKey()); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + ExpandoBridge expandoBridge = getExpandoBridge(); + + expandoBridge.setAttributes(serviceContext); + } + + @Override + public OpencpsDossierStatisticMgt toEscapedModel() { + if (_escapedModel == null) { + _escapedModel = (OpencpsDossierStatisticMgt)ProxyUtil.newProxyInstance(_classLoader, + _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); + } + + return _escapedModel; + } + + @Override + public Object clone() { + OpencpsDossierStatisticMgtImpl opencpsDossierStatisticMgtImpl = new OpencpsDossierStatisticMgtImpl(); + + opencpsDossierStatisticMgtImpl.setUuid(getUuid()); + opencpsDossierStatisticMgtImpl.setDossierStatisticMgtId(getDossierStatisticMgtId()); + opencpsDossierStatisticMgtImpl.setGroupId(getGroupId()); + opencpsDossierStatisticMgtImpl.setUserId(getUserId()); + opencpsDossierStatisticMgtImpl.setUserName(getUserName()); + opencpsDossierStatisticMgtImpl.setCreateDate(getCreateDate()); + opencpsDossierStatisticMgtImpl.setModifiedDate(getModifiedDate()); + opencpsDossierStatisticMgtImpl.setMonth(getMonth()); + opencpsDossierStatisticMgtImpl.setYear(getYear()); + opencpsDossierStatisticMgtImpl.setTotalCount(getTotalCount()); + opencpsDossierStatisticMgtImpl.setProcessCount(getProcessCount()); + opencpsDossierStatisticMgtImpl.setRemainingCount(getRemainingCount()); + opencpsDossierStatisticMgtImpl.setReceivedCount(getReceivedCount()); + opencpsDossierStatisticMgtImpl.setOnlineCount(getOnlineCount()); + opencpsDossierStatisticMgtImpl.setOnegateCount(getOnegateCount()); + opencpsDossierStatisticMgtImpl.setReleaseCount(getReleaseCount()); + opencpsDossierStatisticMgtImpl.setBetimesCount(getBetimesCount()); + opencpsDossierStatisticMgtImpl.setOntimeCount(getOntimeCount()); + opencpsDossierStatisticMgtImpl.setOvertimeCount(getOvertimeCount()); + opencpsDossierStatisticMgtImpl.setDoneCount(getDoneCount()); + opencpsDossierStatisticMgtImpl.setReleasingCount(getReleasingCount()); + opencpsDossierStatisticMgtImpl.setProcessingCount(getProcessingCount()); + opencpsDossierStatisticMgtImpl.setUndueCount(getUndueCount()); + opencpsDossierStatisticMgtImpl.setOverdueCount(getOverdueCount()); + opencpsDossierStatisticMgtImpl.setOntimePercentage(getOntimePercentage()); + opencpsDossierStatisticMgtImpl.setWaitingCount(getWaitingCount()); + opencpsDossierStatisticMgtImpl.setGovAgencyCode(getGovAgencyCode()); + opencpsDossierStatisticMgtImpl.setGovAgencyName(getGovAgencyName()); + opencpsDossierStatisticMgtImpl.setDomainCode(getDomainCode()); + opencpsDossierStatisticMgtImpl.setDomainName(getDomainName()); + opencpsDossierStatisticMgtImpl.setServiceCode(getServiceCode()); + opencpsDossierStatisticMgtImpl.setServiceName(getServiceName()); + opencpsDossierStatisticMgtImpl.setGroupBy(getGroupBy()); + opencpsDossierStatisticMgtImpl.setCancelledCount(getCancelledCount()); + opencpsDossierStatisticMgtImpl.setUnresolvedCount(getUnresolvedCount()); + + opencpsDossierStatisticMgtImpl.resetOriginalValues(); + + return opencpsDossierStatisticMgtImpl; + } + + @Override + public int compareTo(OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + long primaryKey = opencpsDossierStatisticMgt.getPrimaryKey(); + + if (getPrimaryKey() < primaryKey) { + return -1; + } + else if (getPrimaryKey() > primaryKey) { + return 1; + } + else { + return 0; + } + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof OpencpsDossierStatisticMgt)) { + return false; + } + + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = (OpencpsDossierStatisticMgt)obj; + + long primaryKey = opencpsDossierStatisticMgt.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public boolean isEntityCacheEnabled() { + return ENTITY_CACHE_ENABLED; + } + + @Override + public boolean isFinderCacheEnabled() { + return FINDER_CACHE_ENABLED; + } + + @Override + public void resetOriginalValues() { + OpencpsDossierStatisticMgtModelImpl opencpsDossierStatisticMgtModelImpl = this; + + opencpsDossierStatisticMgtModelImpl._originalUuid = opencpsDossierStatisticMgtModelImpl._uuid; + + opencpsDossierStatisticMgtModelImpl._originalGroupId = opencpsDossierStatisticMgtModelImpl._groupId; + + opencpsDossierStatisticMgtModelImpl._setOriginalGroupId = false; + + opencpsDossierStatisticMgtModelImpl._originalUserId = opencpsDossierStatisticMgtModelImpl._userId; + + opencpsDossierStatisticMgtModelImpl._setOriginalUserId = false; + + opencpsDossierStatisticMgtModelImpl._setModifiedDate = false; + + opencpsDossierStatisticMgtModelImpl._originalMonth = opencpsDossierStatisticMgtModelImpl._month; + + opencpsDossierStatisticMgtModelImpl._setOriginalMonth = false; + + opencpsDossierStatisticMgtModelImpl._originalYear = opencpsDossierStatisticMgtModelImpl._year; + + opencpsDossierStatisticMgtModelImpl._setOriginalYear = false; + + opencpsDossierStatisticMgtModelImpl._originalGovAgencyCode = opencpsDossierStatisticMgtModelImpl._govAgencyCode; + + opencpsDossierStatisticMgtModelImpl._originalDomainCode = opencpsDossierStatisticMgtModelImpl._domainCode; + + opencpsDossierStatisticMgtModelImpl._originalGroupBy = opencpsDossierStatisticMgtModelImpl._groupBy; + + opencpsDossierStatisticMgtModelImpl._setOriginalGroupBy = false; + + opencpsDossierStatisticMgtModelImpl._columnBitmask = 0; + } + + @Override + public CacheModel toCacheModel() { + OpencpsDossierStatisticMgtCacheModel opencpsDossierStatisticMgtCacheModel = + new OpencpsDossierStatisticMgtCacheModel(); + + opencpsDossierStatisticMgtCacheModel.uuid = getUuid(); + + String uuid = opencpsDossierStatisticMgtCacheModel.uuid; + + if ((uuid != null) && (uuid.length() == 0)) { + opencpsDossierStatisticMgtCacheModel.uuid = null; + } + + opencpsDossierStatisticMgtCacheModel.dossierStatisticMgtId = getDossierStatisticMgtId(); + + opencpsDossierStatisticMgtCacheModel.groupId = getGroupId(); + + opencpsDossierStatisticMgtCacheModel.userId = getUserId(); + + opencpsDossierStatisticMgtCacheModel.userName = getUserName(); + + String userName = opencpsDossierStatisticMgtCacheModel.userName; + + if ((userName != null) && (userName.length() == 0)) { + opencpsDossierStatisticMgtCacheModel.userName = null; + } + + Date createDate = getCreateDate(); + + if (createDate != null) { + opencpsDossierStatisticMgtCacheModel.createDate = createDate.getTime(); + } + else { + opencpsDossierStatisticMgtCacheModel.createDate = Long.MIN_VALUE; + } + + Date modifiedDate = getModifiedDate(); + + if (modifiedDate != null) { + opencpsDossierStatisticMgtCacheModel.modifiedDate = modifiedDate.getTime(); + } + else { + opencpsDossierStatisticMgtCacheModel.modifiedDate = Long.MIN_VALUE; + } + + opencpsDossierStatisticMgtCacheModel.month = getMonth(); + + opencpsDossierStatisticMgtCacheModel.year = getYear(); + + opencpsDossierStatisticMgtCacheModel.totalCount = getTotalCount(); + + opencpsDossierStatisticMgtCacheModel.processCount = getProcessCount(); + + opencpsDossierStatisticMgtCacheModel.remainingCount = getRemainingCount(); + + opencpsDossierStatisticMgtCacheModel.receivedCount = getReceivedCount(); + + opencpsDossierStatisticMgtCacheModel.onlineCount = getOnlineCount(); + + opencpsDossierStatisticMgtCacheModel.onegateCount = getOnegateCount(); + + opencpsDossierStatisticMgtCacheModel.releaseCount = getReleaseCount(); + + opencpsDossierStatisticMgtCacheModel.betimesCount = getBetimesCount(); + + opencpsDossierStatisticMgtCacheModel.ontimeCount = getOntimeCount(); + + opencpsDossierStatisticMgtCacheModel.overtimeCount = getOvertimeCount(); + + opencpsDossierStatisticMgtCacheModel.doneCount = getDoneCount(); + + opencpsDossierStatisticMgtCacheModel.releasingCount = getReleasingCount(); + + opencpsDossierStatisticMgtCacheModel.processingCount = getProcessingCount(); + + opencpsDossierStatisticMgtCacheModel.undueCount = getUndueCount(); + + opencpsDossierStatisticMgtCacheModel.overdueCount = getOverdueCount(); + + opencpsDossierStatisticMgtCacheModel.ontimePercentage = getOntimePercentage(); + + opencpsDossierStatisticMgtCacheModel.waitingCount = getWaitingCount(); + + opencpsDossierStatisticMgtCacheModel.govAgencyCode = getGovAgencyCode(); + + String govAgencyCode = opencpsDossierStatisticMgtCacheModel.govAgencyCode; + + if ((govAgencyCode != null) && (govAgencyCode.length() == 0)) { + opencpsDossierStatisticMgtCacheModel.govAgencyCode = null; + } + + opencpsDossierStatisticMgtCacheModel.govAgencyName = getGovAgencyName(); + + String govAgencyName = opencpsDossierStatisticMgtCacheModel.govAgencyName; + + if ((govAgencyName != null) && (govAgencyName.length() == 0)) { + opencpsDossierStatisticMgtCacheModel.govAgencyName = null; + } + + opencpsDossierStatisticMgtCacheModel.domainCode = getDomainCode(); + + String domainCode = opencpsDossierStatisticMgtCacheModel.domainCode; + + if ((domainCode != null) && (domainCode.length() == 0)) { + opencpsDossierStatisticMgtCacheModel.domainCode = null; + } + + opencpsDossierStatisticMgtCacheModel.domainName = getDomainName(); + + String domainName = opencpsDossierStatisticMgtCacheModel.domainName; + + if ((domainName != null) && (domainName.length() == 0)) { + opencpsDossierStatisticMgtCacheModel.domainName = null; + } + + opencpsDossierStatisticMgtCacheModel.serviceCode = getServiceCode(); + + String serviceCode = opencpsDossierStatisticMgtCacheModel.serviceCode; + + if ((serviceCode != null) && (serviceCode.length() == 0)) { + opencpsDossierStatisticMgtCacheModel.serviceCode = null; + } + + opencpsDossierStatisticMgtCacheModel.serviceName = getServiceName(); + + String serviceName = opencpsDossierStatisticMgtCacheModel.serviceName; + + if ((serviceName != null) && (serviceName.length() == 0)) { + opencpsDossierStatisticMgtCacheModel.serviceName = null; + } + + opencpsDossierStatisticMgtCacheModel.groupBy = getGroupBy(); + + opencpsDossierStatisticMgtCacheModel.cancelledCount = getCancelledCount(); + + opencpsDossierStatisticMgtCacheModel.unresolvedCount = getUnresolvedCount(); + + return opencpsDossierStatisticMgtCacheModel; + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(71); + + sb.append("{uuid="); + sb.append(getUuid()); + sb.append(", dossierStatisticMgtId="); + sb.append(getDossierStatisticMgtId()); + sb.append(", groupId="); + sb.append(getGroupId()); + sb.append(", userId="); + sb.append(getUserId()); + sb.append(", userName="); + sb.append(getUserName()); + sb.append(", createDate="); + sb.append(getCreateDate()); + sb.append(", modifiedDate="); + sb.append(getModifiedDate()); + sb.append(", month="); + sb.append(getMonth()); + sb.append(", year="); + sb.append(getYear()); + sb.append(", totalCount="); + sb.append(getTotalCount()); + sb.append(", processCount="); + sb.append(getProcessCount()); + sb.append(", remainingCount="); + sb.append(getRemainingCount()); + sb.append(", receivedCount="); + sb.append(getReceivedCount()); + sb.append(", onlineCount="); + sb.append(getOnlineCount()); + sb.append(", onegateCount="); + sb.append(getOnegateCount()); + sb.append(", releaseCount="); + sb.append(getReleaseCount()); + sb.append(", betimesCount="); + sb.append(getBetimesCount()); + sb.append(", ontimeCount="); + sb.append(getOntimeCount()); + sb.append(", overtimeCount="); + sb.append(getOvertimeCount()); + sb.append(", doneCount="); + sb.append(getDoneCount()); + sb.append(", releasingCount="); + sb.append(getReleasingCount()); + sb.append(", processingCount="); + sb.append(getProcessingCount()); + sb.append(", undueCount="); + sb.append(getUndueCount()); + sb.append(", overdueCount="); + sb.append(getOverdueCount()); + sb.append(", ontimePercentage="); + sb.append(getOntimePercentage()); + sb.append(", waitingCount="); + sb.append(getWaitingCount()); + sb.append(", govAgencyCode="); + sb.append(getGovAgencyCode()); + sb.append(", govAgencyName="); + sb.append(getGovAgencyName()); + sb.append(", domainCode="); + sb.append(getDomainCode()); + sb.append(", domainName="); + sb.append(getDomainName()); + sb.append(", serviceCode="); + sb.append(getServiceCode()); + sb.append(", serviceName="); + sb.append(getServiceName()); + sb.append(", groupBy="); + sb.append(getGroupBy()); + sb.append(", cancelledCount="); + sb.append(getCancelledCount()); + sb.append(", unresolvedCount="); + sb.append(getUnresolvedCount()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(109); + + sb.append(""); + sb.append("org.opencps.statistic.model.OpencpsDossierStatisticMgt"); + sb.append(""); + + sb.append( + "uuid"); + sb.append( + "dossierStatisticMgtId"); + sb.append( + "groupId"); + sb.append( + "userId"); + sb.append( + "userName"); + sb.append( + "createDate"); + sb.append( + "modifiedDate"); + sb.append( + "month"); + sb.append( + "year"); + sb.append( + "totalCount"); + sb.append( + "processCount"); + sb.append( + "remainingCount"); + sb.append( + "receivedCount"); + sb.append( + "onlineCount"); + sb.append( + "onegateCount"); + sb.append( + "releaseCount"); + sb.append( + "betimesCount"); + sb.append( + "ontimeCount"); + sb.append( + "overtimeCount"); + sb.append( + "doneCount"); + sb.append( + "releasingCount"); + sb.append( + "processingCount"); + sb.append( + "undueCount"); + sb.append( + "overdueCount"); + sb.append( + "ontimePercentage"); + sb.append( + "waitingCount"); + sb.append( + "govAgencyCode"); + sb.append( + "govAgencyName"); + sb.append( + "domainCode"); + sb.append( + "domainName"); + sb.append( + "serviceCode"); + sb.append( + "serviceName"); + sb.append( + "groupBy"); + sb.append( + "cancelledCount"); + sb.append( + "unresolvedCount"); + + sb.append(""); + + return sb.toString(); + } + + private static final ClassLoader _classLoader = OpencpsDossierStatisticMgt.class.getClassLoader(); + private static final Class[] _escapedModelInterfaces = new Class[] { + OpencpsDossierStatisticMgt.class, ModelWrapper.class + }; + private String _uuid; + private String _originalUuid; + private long _dossierStatisticMgtId; + private long _groupId; + private long _originalGroupId; + private boolean _setOriginalGroupId; + private long _userId; + private long _originalUserId; + private boolean _setOriginalUserId; + private String _userName; + private Date _createDate; + private Date _modifiedDate; + private boolean _setModifiedDate; + private int _month; + private int _originalMonth; + private boolean _setOriginalMonth; + private int _year; + private int _originalYear; + private boolean _setOriginalYear; + private int _totalCount; + private int _processCount; + private int _remainingCount; + private int _receivedCount; + private int _onlineCount; + private int _onegateCount; + private int _releaseCount; + private int _betimesCount; + private int _ontimeCount; + private int _overtimeCount; + private int _doneCount; + private int _releasingCount; + private int _processingCount; + private int _undueCount; + private int _overdueCount; + private int _ontimePercentage; + private int _waitingCount; + private String _govAgencyCode; + private String _originalGovAgencyCode; + private String _govAgencyName; + private String _domainCode; + private String _originalDomainCode; + private String _domainName; + private String _serviceCode; + private String _serviceName; + private int _groupBy; + private int _originalGroupBy; + private boolean _setOriginalGroupBy; + private int _cancelledCount; + private int _unresolvedCount; + private long _columnBitmask; + private OpencpsDossierStatisticMgt _escapedModel; +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsDossierStatisticLocalServiceBaseImpl.java b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsDossierStatisticLocalServiceBaseImpl.java index 37546e7ff3..c06be5b6a0 100644 --- a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsDossierStatisticLocalServiceBaseImpl.java +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsDossierStatisticLocalServiceBaseImpl.java @@ -54,6 +54,8 @@ import org.opencps.statistic.service.persistence.OpencpsDossierStatisticFinder; import org.opencps.statistic.service.persistence.OpencpsDossierStatisticManualFinder; import org.opencps.statistic.service.persistence.OpencpsDossierStatisticManualPersistence; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticMgtFinder; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticMgtPersistence; import org.opencps.statistic.service.persistence.OpencpsDossierStatisticPersistence; import org.opencps.statistic.service.persistence.OpencpsPersonStatisticFinder; import org.opencps.statistic.service.persistence.OpencpsPersonStatisticPersistence; @@ -561,6 +563,63 @@ public void setOpencpsDossierStatisticManualFinder( this.opencpsDossierStatisticManualFinder = opencpsDossierStatisticManualFinder; } + /** + * Returns the opencps dossier statistic mgt local service. + * + * @return the opencps dossier statistic mgt local service + */ + public org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService getOpencpsDossierStatisticMgtLocalService() { + return opencpsDossierStatisticMgtLocalService; + } + + /** + * Sets the opencps dossier statistic mgt local service. + * + * @param opencpsDossierStatisticMgtLocalService the opencps dossier statistic mgt local service + */ + public void setOpencpsDossierStatisticMgtLocalService( + org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService opencpsDossierStatisticMgtLocalService) { + this.opencpsDossierStatisticMgtLocalService = opencpsDossierStatisticMgtLocalService; + } + + /** + * Returns the opencps dossier statistic mgt persistence. + * + * @return the opencps dossier statistic mgt persistence + */ + public OpencpsDossierStatisticMgtPersistence getOpencpsDossierStatisticMgtPersistence() { + return opencpsDossierStatisticMgtPersistence; + } + + /** + * Sets the opencps dossier statistic mgt persistence. + * + * @param opencpsDossierStatisticMgtPersistence the opencps dossier statistic mgt persistence + */ + public void setOpencpsDossierStatisticMgtPersistence( + OpencpsDossierStatisticMgtPersistence opencpsDossierStatisticMgtPersistence) { + this.opencpsDossierStatisticMgtPersistence = opencpsDossierStatisticMgtPersistence; + } + + /** + * Returns the opencps dossier statistic mgt finder. + * + * @return the opencps dossier statistic mgt finder + */ + public OpencpsDossierStatisticMgtFinder getOpencpsDossierStatisticMgtFinder() { + return opencpsDossierStatisticMgtFinder; + } + + /** + * Sets the opencps dossier statistic mgt finder. + * + * @param opencpsDossierStatisticMgtFinder the opencps dossier statistic mgt finder + */ + public void setOpencpsDossierStatisticMgtFinder( + OpencpsDossierStatisticMgtFinder opencpsDossierStatisticMgtFinder) { + this.opencpsDossierStatisticMgtFinder = opencpsDossierStatisticMgtFinder; + } + /** * Returns the opencps person statistic local service. * @@ -852,6 +911,12 @@ protected void runSQL(String sql) { protected OpencpsDossierStatisticManualPersistence opencpsDossierStatisticManualPersistence; @BeanReference(type = OpencpsDossierStatisticManualFinder.class) protected OpencpsDossierStatisticManualFinder opencpsDossierStatisticManualFinder; + @BeanReference(type = org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService.class) + protected org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService opencpsDossierStatisticMgtLocalService; + @BeanReference(type = OpencpsDossierStatisticMgtPersistence.class) + protected OpencpsDossierStatisticMgtPersistence opencpsDossierStatisticMgtPersistence; + @BeanReference(type = OpencpsDossierStatisticMgtFinder.class) + protected OpencpsDossierStatisticMgtFinder opencpsDossierStatisticMgtFinder; @BeanReference(type = org.opencps.statistic.service.OpencpsPersonStatisticLocalService.class) protected org.opencps.statistic.service.OpencpsPersonStatisticLocalService opencpsPersonStatisticLocalService; @BeanReference(type = OpencpsPersonStatisticPersistence.class) diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsDossierStatisticManualLocalServiceBaseImpl.java b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsDossierStatisticManualLocalServiceBaseImpl.java index 145afa410a..660e6871fb 100644 --- a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsDossierStatisticManualLocalServiceBaseImpl.java +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsDossierStatisticManualLocalServiceBaseImpl.java @@ -54,6 +54,8 @@ import org.opencps.statistic.service.persistence.OpencpsDossierStatisticFinder; import org.opencps.statistic.service.persistence.OpencpsDossierStatisticManualFinder; import org.opencps.statistic.service.persistence.OpencpsDossierStatisticManualPersistence; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticMgtFinder; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticMgtPersistence; import org.opencps.statistic.service.persistence.OpencpsDossierStatisticPersistence; import org.opencps.statistic.service.persistence.OpencpsPersonStatisticFinder; import org.opencps.statistic.service.persistence.OpencpsPersonStatisticPersistence; @@ -565,6 +567,63 @@ public void setOpencpsDossierStatisticManualFinder( this.opencpsDossierStatisticManualFinder = opencpsDossierStatisticManualFinder; } + /** + * Returns the opencps dossier statistic mgt local service. + * + * @return the opencps dossier statistic mgt local service + */ + public org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService getOpencpsDossierStatisticMgtLocalService() { + return opencpsDossierStatisticMgtLocalService; + } + + /** + * Sets the opencps dossier statistic mgt local service. + * + * @param opencpsDossierStatisticMgtLocalService the opencps dossier statistic mgt local service + */ + public void setOpencpsDossierStatisticMgtLocalService( + org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService opencpsDossierStatisticMgtLocalService) { + this.opencpsDossierStatisticMgtLocalService = opencpsDossierStatisticMgtLocalService; + } + + /** + * Returns the opencps dossier statistic mgt persistence. + * + * @return the opencps dossier statistic mgt persistence + */ + public OpencpsDossierStatisticMgtPersistence getOpencpsDossierStatisticMgtPersistence() { + return opencpsDossierStatisticMgtPersistence; + } + + /** + * Sets the opencps dossier statistic mgt persistence. + * + * @param opencpsDossierStatisticMgtPersistence the opencps dossier statistic mgt persistence + */ + public void setOpencpsDossierStatisticMgtPersistence( + OpencpsDossierStatisticMgtPersistence opencpsDossierStatisticMgtPersistence) { + this.opencpsDossierStatisticMgtPersistence = opencpsDossierStatisticMgtPersistence; + } + + /** + * Returns the opencps dossier statistic mgt finder. + * + * @return the opencps dossier statistic mgt finder + */ + public OpencpsDossierStatisticMgtFinder getOpencpsDossierStatisticMgtFinder() { + return opencpsDossierStatisticMgtFinder; + } + + /** + * Sets the opencps dossier statistic mgt finder. + * + * @param opencpsDossierStatisticMgtFinder the opencps dossier statistic mgt finder + */ + public void setOpencpsDossierStatisticMgtFinder( + OpencpsDossierStatisticMgtFinder opencpsDossierStatisticMgtFinder) { + this.opencpsDossierStatisticMgtFinder = opencpsDossierStatisticMgtFinder; + } + /** * Returns the opencps person statistic local service. * @@ -856,6 +915,12 @@ protected void runSQL(String sql) { protected OpencpsDossierStatisticManualPersistence opencpsDossierStatisticManualPersistence; @BeanReference(type = OpencpsDossierStatisticManualFinder.class) protected OpencpsDossierStatisticManualFinder opencpsDossierStatisticManualFinder; + @BeanReference(type = org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService.class) + protected org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService opencpsDossierStatisticMgtLocalService; + @BeanReference(type = OpencpsDossierStatisticMgtPersistence.class) + protected OpencpsDossierStatisticMgtPersistence opencpsDossierStatisticMgtPersistence; + @BeanReference(type = OpencpsDossierStatisticMgtFinder.class) + protected OpencpsDossierStatisticMgtFinder opencpsDossierStatisticMgtFinder; @BeanReference(type = org.opencps.statistic.service.OpencpsPersonStatisticLocalService.class) protected org.opencps.statistic.service.OpencpsPersonStatisticLocalService opencpsPersonStatisticLocalService; @BeanReference(type = OpencpsPersonStatisticPersistence.class) diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsDossierStatisticMgtLocalServiceBaseImpl.java b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsDossierStatisticMgtLocalServiceBaseImpl.java new file mode 100644 index 0000000000..ed92da8e4a --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsDossierStatisticMgtLocalServiceBaseImpl.java @@ -0,0 +1,857 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.service.base; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.dao.db.DB; +import com.liferay.portal.kernel.dao.db.DBManagerUtil; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; +import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.service.BaseLocalServiceImpl; +import com.liferay.portal.kernel.service.PersistedModelLocalServiceRegistry; +import com.liferay.portal.kernel.service.persistence.ClassNamePersistence; +import com.liferay.portal.kernel.service.persistence.UserPersistence; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.PortalUtil; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import org.opencps.statistic.model.OpencpsDossierStatisticMgt; +import org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticFinder; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticManualFinder; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticManualPersistence; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticMgtFinder; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticMgtPersistence; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticPersistence; +import org.opencps.statistic.service.persistence.OpencpsPersonStatisticFinder; +import org.opencps.statistic.service.persistence.OpencpsPersonStatisticPersistence; +import org.opencps.statistic.service.persistence.OpencpsVotingStatisticFinder; +import org.opencps.statistic.service.persistence.OpencpsVotingStatisticPersistence; + +import java.io.Serializable; + +import java.util.List; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the opencps dossier statistic mgt local service. + * + *

+ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.opencps.statistic.service.impl.OpencpsDossierStatisticMgtLocalServiceImpl}. + *

+ * + * @author khoavu + * @see org.opencps.statistic.service.impl.OpencpsDossierStatisticMgtLocalServiceImpl + * @see org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalServiceUtil + * @generated + */ +@ProviderType +public abstract class OpencpsDossierStatisticMgtLocalServiceBaseImpl + extends BaseLocalServiceImpl + implements OpencpsDossierStatisticMgtLocalService, IdentifiableOSGiService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalServiceUtil} to access the opencps dossier statistic mgt local service. + */ + + /** + * Adds the opencps dossier statistic mgt to the database. Also notifies the appropriate model listeners. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was added + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public OpencpsDossierStatisticMgt addOpencpsDossierStatisticMgt( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + opencpsDossierStatisticMgt.setNew(true); + + return opencpsDossierStatisticMgtPersistence.update(opencpsDossierStatisticMgt); + } + + /** + * Creates a new opencps dossier statistic mgt with the primary key. Does not add the opencps dossier statistic mgt to the database. + * + * @param dossierStatisticMgtId the primary key for the new opencps dossier statistic mgt + * @return the new opencps dossier statistic mgt + */ + @Override + @Transactional(enabled = false) + public OpencpsDossierStatisticMgt createOpencpsDossierStatisticMgt( + long dossierStatisticMgtId) { + return opencpsDossierStatisticMgtPersistence.create(dossierStatisticMgtId); + } + + /** + * Deletes the opencps dossier statistic mgt with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was removed + * @throws PortalException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Indexable(type = IndexableType.DELETE) + @Override + public OpencpsDossierStatisticMgt deleteOpencpsDossierStatisticMgt( + long dossierStatisticMgtId) throws PortalException { + return opencpsDossierStatisticMgtPersistence.remove(dossierStatisticMgtId); + } + + /** + * Deletes the opencps dossier statistic mgt from the database. Also notifies the appropriate model listeners. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was removed + */ + @Indexable(type = IndexableType.DELETE) + @Override + public OpencpsDossierStatisticMgt deleteOpencpsDossierStatisticMgt( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + return opencpsDossierStatisticMgtPersistence.remove(opencpsDossierStatisticMgt); + } + + @Override + public DynamicQuery dynamicQuery() { + Class clazz = getClass(); + + return DynamicQueryFactoryUtil.forClass(OpencpsDossierStatisticMgt.class, + clazz.getClassLoader()); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery) { + return opencpsDossierStatisticMgtPersistence.findWithDynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end) { + return opencpsDossierStatisticMgtPersistence.findWithDynamicQuery(dynamicQuery, + start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end, OrderByComparator orderByComparator) { + return opencpsDossierStatisticMgtPersistence.findWithDynamicQuery(dynamicQuery, + start, end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery) { + return opencpsDossierStatisticMgtPersistence.countWithDynamicQuery(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection) { + return opencpsDossierStatisticMgtPersistence.countWithDynamicQuery(dynamicQuery, + projection); + } + + @Override + public OpencpsDossierStatisticMgt fetchOpencpsDossierStatisticMgt( + long dossierStatisticMgtId) { + return opencpsDossierStatisticMgtPersistence.fetchByPrimaryKey(dossierStatisticMgtId); + } + + /** + * Returns the opencps dossier statistic mgt matching the UUID and group. + * + * @param uuid the opencps dossier statistic mgt's UUID + * @param groupId the primary key of the group + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchOpencpsDossierStatisticMgtByUuidAndGroupId( + String uuid, long groupId) { + return opencpsDossierStatisticMgtPersistence.fetchByUUID_G(uuid, groupId); + } + + /** + * Returns the opencps dossier statistic mgt with the primary key. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt + * @throws PortalException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt getOpencpsDossierStatisticMgt( + long dossierStatisticMgtId) throws PortalException { + return opencpsDossierStatisticMgtPersistence.findByPrimaryKey(dossierStatisticMgtId); + } + + @Override + public ActionableDynamicQuery getActionableDynamicQuery() { + ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery(); + + actionableDynamicQuery.setBaseLocalService(opencpsDossierStatisticMgtLocalService); + actionableDynamicQuery.setClassLoader(getClassLoader()); + actionableDynamicQuery.setModelClass(OpencpsDossierStatisticMgt.class); + + actionableDynamicQuery.setPrimaryKeyPropertyName( + "dossierStatisticMgtId"); + + return actionableDynamicQuery; + } + + @Override + public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery(); + + indexableActionableDynamicQuery.setBaseLocalService(opencpsDossierStatisticMgtLocalService); + indexableActionableDynamicQuery.setClassLoader(getClassLoader()); + indexableActionableDynamicQuery.setModelClass(OpencpsDossierStatisticMgt.class); + + indexableActionableDynamicQuery.setPrimaryKeyPropertyName( + "dossierStatisticMgtId"); + + return indexableActionableDynamicQuery; + } + + protected void initActionableDynamicQuery( + ActionableDynamicQuery actionableDynamicQuery) { + actionableDynamicQuery.setBaseLocalService(opencpsDossierStatisticMgtLocalService); + actionableDynamicQuery.setClassLoader(getClassLoader()); + actionableDynamicQuery.setModelClass(OpencpsDossierStatisticMgt.class); + + actionableDynamicQuery.setPrimaryKeyPropertyName( + "dossierStatisticMgtId"); + } + + /** + * @throws PortalException + */ + @Override + public PersistedModel deletePersistedModel(PersistedModel persistedModel) + throws PortalException { + return opencpsDossierStatisticMgtLocalService.deleteOpencpsDossierStatisticMgt((OpencpsDossierStatisticMgt)persistedModel); + } + + @Override + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException { + return opencpsDossierStatisticMgtPersistence.findByPrimaryKey(primaryKeyObj); + } + + /** + * Returns the opencps dossier statistic mgt matching the UUID and group. + * + * @param uuid the opencps dossier statistic mgt's UUID + * @param groupId the primary key of the group + * @return the matching opencps dossier statistic mgt + * @throws PortalException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt getOpencpsDossierStatisticMgtByUuidAndGroupId( + String uuid, long groupId) throws PortalException { + return opencpsDossierStatisticMgtPersistence.findByUUID_G(uuid, groupId); + } + + /** + * Returns a range of all the opencps dossier statistic mgts. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of opencps dossier statistic mgts + */ + @Override + public List getOpencpsDossierStatisticMgts( + int start, int end) { + return opencpsDossierStatisticMgtPersistence.findAll(start, end); + } + + /** + * Returns the number of opencps dossier statistic mgts. + * + * @return the number of opencps dossier statistic mgts + */ + @Override + public int getOpencpsDossierStatisticMgtsCount() { + return opencpsDossierStatisticMgtPersistence.countAll(); + } + + /** + * Updates the opencps dossier statistic mgt in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was updated + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public OpencpsDossierStatisticMgt updateOpencpsDossierStatisticMgt( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + return opencpsDossierStatisticMgtPersistence.update(opencpsDossierStatisticMgt); + } + + /** + * Returns the opencps dossier statistic local service. + * + * @return the opencps dossier statistic local service + */ + public org.opencps.statistic.service.OpencpsDossierStatisticLocalService getOpencpsDossierStatisticLocalService() { + return opencpsDossierStatisticLocalService; + } + + /** + * Sets the opencps dossier statistic local service. + * + * @param opencpsDossierStatisticLocalService the opencps dossier statistic local service + */ + public void setOpencpsDossierStatisticLocalService( + org.opencps.statistic.service.OpencpsDossierStatisticLocalService opencpsDossierStatisticLocalService) { + this.opencpsDossierStatisticLocalService = opencpsDossierStatisticLocalService; + } + + /** + * Returns the opencps dossier statistic persistence. + * + * @return the opencps dossier statistic persistence + */ + public OpencpsDossierStatisticPersistence getOpencpsDossierStatisticPersistence() { + return opencpsDossierStatisticPersistence; + } + + /** + * Sets the opencps dossier statistic persistence. + * + * @param opencpsDossierStatisticPersistence the opencps dossier statistic persistence + */ + public void setOpencpsDossierStatisticPersistence( + OpencpsDossierStatisticPersistence opencpsDossierStatisticPersistence) { + this.opencpsDossierStatisticPersistence = opencpsDossierStatisticPersistence; + } + + /** + * Returns the opencps dossier statistic finder. + * + * @return the opencps dossier statistic finder + */ + public OpencpsDossierStatisticFinder getOpencpsDossierStatisticFinder() { + return opencpsDossierStatisticFinder; + } + + /** + * Sets the opencps dossier statistic finder. + * + * @param opencpsDossierStatisticFinder the opencps dossier statistic finder + */ + public void setOpencpsDossierStatisticFinder( + OpencpsDossierStatisticFinder opencpsDossierStatisticFinder) { + this.opencpsDossierStatisticFinder = opencpsDossierStatisticFinder; + } + + /** + * Returns the opencps dossier statistic manual local service. + * + * @return the opencps dossier statistic manual local service + */ + public org.opencps.statistic.service.OpencpsDossierStatisticManualLocalService getOpencpsDossierStatisticManualLocalService() { + return opencpsDossierStatisticManualLocalService; + } + + /** + * Sets the opencps dossier statistic manual local service. + * + * @param opencpsDossierStatisticManualLocalService the opencps dossier statistic manual local service + */ + public void setOpencpsDossierStatisticManualLocalService( + org.opencps.statistic.service.OpencpsDossierStatisticManualLocalService opencpsDossierStatisticManualLocalService) { + this.opencpsDossierStatisticManualLocalService = opencpsDossierStatisticManualLocalService; + } + + /** + * Returns the opencps dossier statistic manual persistence. + * + * @return the opencps dossier statistic manual persistence + */ + public OpencpsDossierStatisticManualPersistence getOpencpsDossierStatisticManualPersistence() { + return opencpsDossierStatisticManualPersistence; + } + + /** + * Sets the opencps dossier statistic manual persistence. + * + * @param opencpsDossierStatisticManualPersistence the opencps dossier statistic manual persistence + */ + public void setOpencpsDossierStatisticManualPersistence( + OpencpsDossierStatisticManualPersistence opencpsDossierStatisticManualPersistence) { + this.opencpsDossierStatisticManualPersistence = opencpsDossierStatisticManualPersistence; + } + + /** + * Returns the opencps dossier statistic manual finder. + * + * @return the opencps dossier statistic manual finder + */ + public OpencpsDossierStatisticManualFinder getOpencpsDossierStatisticManualFinder() { + return opencpsDossierStatisticManualFinder; + } + + /** + * Sets the opencps dossier statistic manual finder. + * + * @param opencpsDossierStatisticManualFinder the opencps dossier statistic manual finder + */ + public void setOpencpsDossierStatisticManualFinder( + OpencpsDossierStatisticManualFinder opencpsDossierStatisticManualFinder) { + this.opencpsDossierStatisticManualFinder = opencpsDossierStatisticManualFinder; + } + + /** + * Returns the opencps dossier statistic mgt local service. + * + * @return the opencps dossier statistic mgt local service + */ + public OpencpsDossierStatisticMgtLocalService getOpencpsDossierStatisticMgtLocalService() { + return opencpsDossierStatisticMgtLocalService; + } + + /** + * Sets the opencps dossier statistic mgt local service. + * + * @param opencpsDossierStatisticMgtLocalService the opencps dossier statistic mgt local service + */ + public void setOpencpsDossierStatisticMgtLocalService( + OpencpsDossierStatisticMgtLocalService opencpsDossierStatisticMgtLocalService) { + this.opencpsDossierStatisticMgtLocalService = opencpsDossierStatisticMgtLocalService; + } + + /** + * Returns the opencps dossier statistic mgt persistence. + * + * @return the opencps dossier statistic mgt persistence + */ + public OpencpsDossierStatisticMgtPersistence getOpencpsDossierStatisticMgtPersistence() { + return opencpsDossierStatisticMgtPersistence; + } + + /** + * Sets the opencps dossier statistic mgt persistence. + * + * @param opencpsDossierStatisticMgtPersistence the opencps dossier statistic mgt persistence + */ + public void setOpencpsDossierStatisticMgtPersistence( + OpencpsDossierStatisticMgtPersistence opencpsDossierStatisticMgtPersistence) { + this.opencpsDossierStatisticMgtPersistence = opencpsDossierStatisticMgtPersistence; + } + + /** + * Returns the opencps dossier statistic mgt finder. + * + * @return the opencps dossier statistic mgt finder + */ + public OpencpsDossierStatisticMgtFinder getOpencpsDossierStatisticMgtFinder() { + return opencpsDossierStatisticMgtFinder; + } + + /** + * Sets the opencps dossier statistic mgt finder. + * + * @param opencpsDossierStatisticMgtFinder the opencps dossier statistic mgt finder + */ + public void setOpencpsDossierStatisticMgtFinder( + OpencpsDossierStatisticMgtFinder opencpsDossierStatisticMgtFinder) { + this.opencpsDossierStatisticMgtFinder = opencpsDossierStatisticMgtFinder; + } + + /** + * Returns the opencps person statistic local service. + * + * @return the opencps person statistic local service + */ + public org.opencps.statistic.service.OpencpsPersonStatisticLocalService getOpencpsPersonStatisticLocalService() { + return opencpsPersonStatisticLocalService; + } + + /** + * Sets the opencps person statistic local service. + * + * @param opencpsPersonStatisticLocalService the opencps person statistic local service + */ + public void setOpencpsPersonStatisticLocalService( + org.opencps.statistic.service.OpencpsPersonStatisticLocalService opencpsPersonStatisticLocalService) { + this.opencpsPersonStatisticLocalService = opencpsPersonStatisticLocalService; + } + + /** + * Returns the opencps person statistic persistence. + * + * @return the opencps person statistic persistence + */ + public OpencpsPersonStatisticPersistence getOpencpsPersonStatisticPersistence() { + return opencpsPersonStatisticPersistence; + } + + /** + * Sets the opencps person statistic persistence. + * + * @param opencpsPersonStatisticPersistence the opencps person statistic persistence + */ + public void setOpencpsPersonStatisticPersistence( + OpencpsPersonStatisticPersistence opencpsPersonStatisticPersistence) { + this.opencpsPersonStatisticPersistence = opencpsPersonStatisticPersistence; + } + + /** + * Returns the opencps person statistic finder. + * + * @return the opencps person statistic finder + */ + public OpencpsPersonStatisticFinder getOpencpsPersonStatisticFinder() { + return opencpsPersonStatisticFinder; + } + + /** + * Sets the opencps person statistic finder. + * + * @param opencpsPersonStatisticFinder the opencps person statistic finder + */ + public void setOpencpsPersonStatisticFinder( + OpencpsPersonStatisticFinder opencpsPersonStatisticFinder) { + this.opencpsPersonStatisticFinder = opencpsPersonStatisticFinder; + } + + /** + * Returns the opencps voting statistic local service. + * + * @return the opencps voting statistic local service + */ + public org.opencps.statistic.service.OpencpsVotingStatisticLocalService getOpencpsVotingStatisticLocalService() { + return opencpsVotingStatisticLocalService; + } + + /** + * Sets the opencps voting statistic local service. + * + * @param opencpsVotingStatisticLocalService the opencps voting statistic local service + */ + public void setOpencpsVotingStatisticLocalService( + org.opencps.statistic.service.OpencpsVotingStatisticLocalService opencpsVotingStatisticLocalService) { + this.opencpsVotingStatisticLocalService = opencpsVotingStatisticLocalService; + } + + /** + * Returns the opencps voting statistic persistence. + * + * @return the opencps voting statistic persistence + */ + public OpencpsVotingStatisticPersistence getOpencpsVotingStatisticPersistence() { + return opencpsVotingStatisticPersistence; + } + + /** + * Sets the opencps voting statistic persistence. + * + * @param opencpsVotingStatisticPersistence the opencps voting statistic persistence + */ + public void setOpencpsVotingStatisticPersistence( + OpencpsVotingStatisticPersistence opencpsVotingStatisticPersistence) { + this.opencpsVotingStatisticPersistence = opencpsVotingStatisticPersistence; + } + + /** + * Returns the opencps voting statistic finder. + * + * @return the opencps voting statistic finder + */ + public OpencpsVotingStatisticFinder getOpencpsVotingStatisticFinder() { + return opencpsVotingStatisticFinder; + } + + /** + * Sets the opencps voting statistic finder. + * + * @param opencpsVotingStatisticFinder the opencps voting statistic finder + */ + public void setOpencpsVotingStatisticFinder( + OpencpsVotingStatisticFinder opencpsVotingStatisticFinder) { + this.opencpsVotingStatisticFinder = opencpsVotingStatisticFinder; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.kernel.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the class name local service. + * + * @return the class name local service + */ + public com.liferay.portal.kernel.service.ClassNameLocalService getClassNameLocalService() { + return classNameLocalService; + } + + /** + * Sets the class name local service. + * + * @param classNameLocalService the class name local service + */ + public void setClassNameLocalService( + com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService) { + this.classNameLocalService = classNameLocalService; + } + + /** + * Returns the class name persistence. + * + * @return the class name persistence + */ + public ClassNamePersistence getClassNamePersistence() { + return classNamePersistence; + } + + /** + * Sets the class name persistence. + * + * @param classNamePersistence the class name persistence + */ + public void setClassNamePersistence( + ClassNamePersistence classNamePersistence) { + this.classNamePersistence = classNamePersistence; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.kernel.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.kernel.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.kernel.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + persistedModelLocalServiceRegistry.register("org.opencps.statistic.model.OpencpsDossierStatisticMgt", + opencpsDossierStatisticMgtLocalService); + } + + public void destroy() { + persistedModelLocalServiceRegistry.unregister( + "org.opencps.statistic.model.OpencpsDossierStatisticMgt"); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + @Override + public String getOSGiServiceIdentifier() { + return OpencpsDossierStatisticMgtLocalService.class.getName(); + } + + protected Class getModelClass() { + return OpencpsDossierStatisticMgt.class; + } + + protected String getModelClassName() { + return OpencpsDossierStatisticMgt.class.getName(); + } + + /** + * Performs a SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) { + try { + DataSource dataSource = opencpsDossierStatisticMgtPersistence.getDataSource(); + + DB db = DBManagerUtil.getDB(); + + sql = db.buildSQL(sql); + sql = PortalUtil.transformSQL(sql); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = org.opencps.statistic.service.OpencpsDossierStatisticLocalService.class) + protected org.opencps.statistic.service.OpencpsDossierStatisticLocalService opencpsDossierStatisticLocalService; + @BeanReference(type = OpencpsDossierStatisticPersistence.class) + protected OpencpsDossierStatisticPersistence opencpsDossierStatisticPersistence; + @BeanReference(type = OpencpsDossierStatisticFinder.class) + protected OpencpsDossierStatisticFinder opencpsDossierStatisticFinder; + @BeanReference(type = org.opencps.statistic.service.OpencpsDossierStatisticManualLocalService.class) + protected org.opencps.statistic.service.OpencpsDossierStatisticManualLocalService opencpsDossierStatisticManualLocalService; + @BeanReference(type = OpencpsDossierStatisticManualPersistence.class) + protected OpencpsDossierStatisticManualPersistence opencpsDossierStatisticManualPersistence; + @BeanReference(type = OpencpsDossierStatisticManualFinder.class) + protected OpencpsDossierStatisticManualFinder opencpsDossierStatisticManualFinder; + @BeanReference(type = OpencpsDossierStatisticMgtLocalService.class) + protected OpencpsDossierStatisticMgtLocalService opencpsDossierStatisticMgtLocalService; + @BeanReference(type = OpencpsDossierStatisticMgtPersistence.class) + protected OpencpsDossierStatisticMgtPersistence opencpsDossierStatisticMgtPersistence; + @BeanReference(type = OpencpsDossierStatisticMgtFinder.class) + protected OpencpsDossierStatisticMgtFinder opencpsDossierStatisticMgtFinder; + @BeanReference(type = org.opencps.statistic.service.OpencpsPersonStatisticLocalService.class) + protected org.opencps.statistic.service.OpencpsPersonStatisticLocalService opencpsPersonStatisticLocalService; + @BeanReference(type = OpencpsPersonStatisticPersistence.class) + protected OpencpsPersonStatisticPersistence opencpsPersonStatisticPersistence; + @BeanReference(type = OpencpsPersonStatisticFinder.class) + protected OpencpsPersonStatisticFinder opencpsPersonStatisticFinder; + @BeanReference(type = org.opencps.statistic.service.OpencpsVotingStatisticLocalService.class) + protected org.opencps.statistic.service.OpencpsVotingStatisticLocalService opencpsVotingStatisticLocalService; + @BeanReference(type = OpencpsVotingStatisticPersistence.class) + protected OpencpsVotingStatisticPersistence opencpsVotingStatisticPersistence; + @BeanReference(type = OpencpsVotingStatisticFinder.class) + protected OpencpsVotingStatisticFinder opencpsVotingStatisticFinder; + @ServiceReference(type = com.liferay.counter.kernel.service.CounterLocalService.class) + protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService; + @ServiceReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class) + protected com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService; + @ServiceReference(type = ClassNamePersistence.class) + protected ClassNamePersistence classNamePersistence; + @ServiceReference(type = com.liferay.portal.kernel.service.ResourceLocalService.class) + protected com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService; + @ServiceReference(type = com.liferay.portal.kernel.service.UserLocalService.class) + protected com.liferay.portal.kernel.service.UserLocalService userLocalService; + @ServiceReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + @ServiceReference(type = PersistedModelLocalServiceRegistry.class) + protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry; +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsPersonStatisticLocalServiceBaseImpl.java b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsPersonStatisticLocalServiceBaseImpl.java index 8445ecddd1..9979f57935 100644 --- a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsPersonStatisticLocalServiceBaseImpl.java +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsPersonStatisticLocalServiceBaseImpl.java @@ -54,6 +54,8 @@ import org.opencps.statistic.service.persistence.OpencpsDossierStatisticFinder; import org.opencps.statistic.service.persistence.OpencpsDossierStatisticManualFinder; import org.opencps.statistic.service.persistence.OpencpsDossierStatisticManualPersistence; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticMgtFinder; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticMgtPersistence; import org.opencps.statistic.service.persistence.OpencpsDossierStatisticPersistence; import org.opencps.statistic.service.persistence.OpencpsPersonStatisticFinder; import org.opencps.statistic.service.persistence.OpencpsPersonStatisticPersistence; @@ -561,6 +563,63 @@ public void setOpencpsDossierStatisticManualFinder( this.opencpsDossierStatisticManualFinder = opencpsDossierStatisticManualFinder; } + /** + * Returns the opencps dossier statistic mgt local service. + * + * @return the opencps dossier statistic mgt local service + */ + public org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService getOpencpsDossierStatisticMgtLocalService() { + return opencpsDossierStatisticMgtLocalService; + } + + /** + * Sets the opencps dossier statistic mgt local service. + * + * @param opencpsDossierStatisticMgtLocalService the opencps dossier statistic mgt local service + */ + public void setOpencpsDossierStatisticMgtLocalService( + org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService opencpsDossierStatisticMgtLocalService) { + this.opencpsDossierStatisticMgtLocalService = opencpsDossierStatisticMgtLocalService; + } + + /** + * Returns the opencps dossier statistic mgt persistence. + * + * @return the opencps dossier statistic mgt persistence + */ + public OpencpsDossierStatisticMgtPersistence getOpencpsDossierStatisticMgtPersistence() { + return opencpsDossierStatisticMgtPersistence; + } + + /** + * Sets the opencps dossier statistic mgt persistence. + * + * @param opencpsDossierStatisticMgtPersistence the opencps dossier statistic mgt persistence + */ + public void setOpencpsDossierStatisticMgtPersistence( + OpencpsDossierStatisticMgtPersistence opencpsDossierStatisticMgtPersistence) { + this.opencpsDossierStatisticMgtPersistence = opencpsDossierStatisticMgtPersistence; + } + + /** + * Returns the opencps dossier statistic mgt finder. + * + * @return the opencps dossier statistic mgt finder + */ + public OpencpsDossierStatisticMgtFinder getOpencpsDossierStatisticMgtFinder() { + return opencpsDossierStatisticMgtFinder; + } + + /** + * Sets the opencps dossier statistic mgt finder. + * + * @param opencpsDossierStatisticMgtFinder the opencps dossier statistic mgt finder + */ + public void setOpencpsDossierStatisticMgtFinder( + OpencpsDossierStatisticMgtFinder opencpsDossierStatisticMgtFinder) { + this.opencpsDossierStatisticMgtFinder = opencpsDossierStatisticMgtFinder; + } + /** * Returns the opencps person statistic local service. * @@ -852,6 +911,12 @@ protected void runSQL(String sql) { protected OpencpsDossierStatisticManualPersistence opencpsDossierStatisticManualPersistence; @BeanReference(type = OpencpsDossierStatisticManualFinder.class) protected OpencpsDossierStatisticManualFinder opencpsDossierStatisticManualFinder; + @BeanReference(type = org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService.class) + protected org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService opencpsDossierStatisticMgtLocalService; + @BeanReference(type = OpencpsDossierStatisticMgtPersistence.class) + protected OpencpsDossierStatisticMgtPersistence opencpsDossierStatisticMgtPersistence; + @BeanReference(type = OpencpsDossierStatisticMgtFinder.class) + protected OpencpsDossierStatisticMgtFinder opencpsDossierStatisticMgtFinder; @BeanReference(type = OpencpsPersonStatisticLocalService.class) protected OpencpsPersonStatisticLocalService opencpsPersonStatisticLocalService; @BeanReference(type = OpencpsPersonStatisticPersistence.class) diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsVotingStatisticLocalServiceBaseImpl.java b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsVotingStatisticLocalServiceBaseImpl.java index 9761e33427..985d259217 100644 --- a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsVotingStatisticLocalServiceBaseImpl.java +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/base/OpencpsVotingStatisticLocalServiceBaseImpl.java @@ -54,6 +54,8 @@ import org.opencps.statistic.service.persistence.OpencpsDossierStatisticFinder; import org.opencps.statistic.service.persistence.OpencpsDossierStatisticManualFinder; import org.opencps.statistic.service.persistence.OpencpsDossierStatisticManualPersistence; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticMgtFinder; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticMgtPersistence; import org.opencps.statistic.service.persistence.OpencpsDossierStatisticPersistence; import org.opencps.statistic.service.persistence.OpencpsPersonStatisticFinder; import org.opencps.statistic.service.persistence.OpencpsPersonStatisticPersistence; @@ -561,6 +563,63 @@ public void setOpencpsDossierStatisticManualFinder( this.opencpsDossierStatisticManualFinder = opencpsDossierStatisticManualFinder; } + /** + * Returns the opencps dossier statistic mgt local service. + * + * @return the opencps dossier statistic mgt local service + */ + public org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService getOpencpsDossierStatisticMgtLocalService() { + return opencpsDossierStatisticMgtLocalService; + } + + /** + * Sets the opencps dossier statistic mgt local service. + * + * @param opencpsDossierStatisticMgtLocalService the opencps dossier statistic mgt local service + */ + public void setOpencpsDossierStatisticMgtLocalService( + org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService opencpsDossierStatisticMgtLocalService) { + this.opencpsDossierStatisticMgtLocalService = opencpsDossierStatisticMgtLocalService; + } + + /** + * Returns the opencps dossier statistic mgt persistence. + * + * @return the opencps dossier statistic mgt persistence + */ + public OpencpsDossierStatisticMgtPersistence getOpencpsDossierStatisticMgtPersistence() { + return opencpsDossierStatisticMgtPersistence; + } + + /** + * Sets the opencps dossier statistic mgt persistence. + * + * @param opencpsDossierStatisticMgtPersistence the opencps dossier statistic mgt persistence + */ + public void setOpencpsDossierStatisticMgtPersistence( + OpencpsDossierStatisticMgtPersistence opencpsDossierStatisticMgtPersistence) { + this.opencpsDossierStatisticMgtPersistence = opencpsDossierStatisticMgtPersistence; + } + + /** + * Returns the opencps dossier statistic mgt finder. + * + * @return the opencps dossier statistic mgt finder + */ + public OpencpsDossierStatisticMgtFinder getOpencpsDossierStatisticMgtFinder() { + return opencpsDossierStatisticMgtFinder; + } + + /** + * Sets the opencps dossier statistic mgt finder. + * + * @param opencpsDossierStatisticMgtFinder the opencps dossier statistic mgt finder + */ + public void setOpencpsDossierStatisticMgtFinder( + OpencpsDossierStatisticMgtFinder opencpsDossierStatisticMgtFinder) { + this.opencpsDossierStatisticMgtFinder = opencpsDossierStatisticMgtFinder; + } + /** * Returns the opencps person statistic local service. * @@ -852,6 +911,12 @@ protected void runSQL(String sql) { protected OpencpsDossierStatisticManualPersistence opencpsDossierStatisticManualPersistence; @BeanReference(type = OpencpsDossierStatisticManualFinder.class) protected OpencpsDossierStatisticManualFinder opencpsDossierStatisticManualFinder; + @BeanReference(type = org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService.class) + protected org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService opencpsDossierStatisticMgtLocalService; + @BeanReference(type = OpencpsDossierStatisticMgtPersistence.class) + protected OpencpsDossierStatisticMgtPersistence opencpsDossierStatisticMgtPersistence; + @BeanReference(type = OpencpsDossierStatisticMgtFinder.class) + protected OpencpsDossierStatisticMgtFinder opencpsDossierStatisticMgtFinder; @BeanReference(type = org.opencps.statistic.service.OpencpsPersonStatisticLocalService.class) protected org.opencps.statistic.service.OpencpsPersonStatisticLocalService opencpsPersonStatisticLocalService; @BeanReference(type = OpencpsPersonStatisticPersistence.class) diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/impl/OpencpsDossierStatisticMgtLocalServiceImpl.java b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/impl/OpencpsDossierStatisticMgtLocalServiceImpl.java new file mode 100644 index 0000000000..d3b4ea1532 --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/impl/OpencpsDossierStatisticMgtLocalServiceImpl.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.service.impl; + +import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; + +import java.util.Date; +import java.util.List; + +import org.opencps.statistic.model.OpencpsDossierStatistic; +import org.opencps.statistic.model.OpencpsDossierStatisticMgt; +import org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalServiceUtil; +import org.opencps.statistic.service.base.OpencpsDossierStatisticMgtLocalServiceBaseImpl; + +/** + * The implementation of the opencps dossier statistic mgt local service. + * + *

+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalService} interface. + * + *

+ * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. + *

+ * + * @author khoavu + * @see OpencpsDossierStatisticMgtLocalServiceBaseImpl + * @see org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalServiceUtil + */ +public class OpencpsDossierStatisticMgtLocalServiceImpl + extends OpencpsDossierStatisticMgtLocalServiceBaseImpl { + + public OpencpsDossierStatisticMgt checkContains(long groupId, int month, int year, String govAgencyCode, String domainCode) { + return opencpsDossierStatisticMgtFinder.checkContains(groupId, month, year, govAgencyCode, domainCode); + } + + public OpencpsDossierStatisticMgt checkContainGroupBy(long groupId, int month, int year, String govAgencyCode, String domainCode, int groupBy) { + return opencpsDossierStatisticMgtFinder.checkContainsGroupBy(groupId, month, year, govAgencyCode, domainCode, groupBy); + } + + public void updateBatchStatisticMgt(List dossierDataObjs) throws PortalException, SystemException { + long startTime = System.currentTimeMillis(); + for (JSONObject dossierObj : dossierDataObjs) { + long groupId = dossierObj.has("groupId") ? dossierObj.getLong("groupId") : 0l; + long userId = -1; + String userName = "ADM"; + + int month = dossierObj.has("month") ? dossierObj.getInt("month") : 0; + int year = dossierObj.has("year") ? dossierObj.getInt("year") : 0; + int totalCount = dossierObj.has("totalCount") ? dossierObj.getInt("totalCount") : 0; + int processCount = dossierObj.has("processCount") ? dossierObj.getInt("processCount") : 0; + int remainingCount = dossierObj.has("remainingCount") ? dossierObj.getInt("remainingCount") : 0; + int receivedCount = dossierObj.has("receivedCount") ? dossierObj.getInt("receivedCount") : 0; + int onlineCount = dossierObj.has("onlineCount") ? dossierObj.getInt("onlineCount") : 0; + int releaseCount = dossierObj.has("releaseCount") ? dossierObj.getInt("releaseCount") : 0; + int betimesCount = dossierObj.has("betimesCount") ? dossierObj.getInt("betimesCount") : 0; + int ontimeCount = dossierObj.has("ontimeCount") ? dossierObj.getInt("ontimeCount") : 0; + int overtimeCount = dossierObj.has("overtimeCount") ? dossierObj.getInt("overtimeCount") : 0; + int doneCount = dossierObj.has("doneCount") ? dossierObj.getInt("doneCount") : 0; + int releasingCount = dossierObj.has("releasingCount") ? dossierObj.getInt("releasingCount") : 0; + int processingCount = dossierObj.has("processingCount") ? dossierObj.getInt("processingCount") : 0; + int undueCount = dossierObj.has("undueCount") ? dossierObj.getInt("undueCount") : 0; + int overdueCount = dossierObj.has("overdueCount") ? dossierObj.getInt("overdueCount") : 0; + int ontimePercentage = dossierObj.has("ontimePercentage") ? dossierObj.getInt("ontimePercentage") : 0; + int waitingCount = dossierObj.has("waitingCount") ? dossierObj.getInt("waitingCount") : 0; + String govAgencyCode = dossierObj.has("govAgencyCode") ? dossierObj.getString("govAgencyCode") : StringPool.BLANK; + String govAgencyName = dossierObj.has("govAgencyName") ? dossierObj.getString("govAgencyName") : StringPool.BLANK; + String domainCode = dossierObj.has("domainCode") ? dossierObj.getString("domainCode") : StringPool.BLANK; + String domainName = dossierObj.has("domainName") ? dossierObj.getString("domainName") : StringPool.BLANK; + String serviceCode = dossierObj.has("serviceCode") ? dossierObj.getString("serviceCode") : StringPool.BLANK; + String serviceName = dossierObj.has("serrviceName") ? dossierObj.getString("serrviceName") : StringPool.BLANK; + int onegateCount = dossierObj.has("onegateCount") ? dossierObj.getInt("onegateCount") : 0; + int groupBy = dossierObj.has("groupBy") ? dossierObj.getInt("groupBy") : 0; + int cancelledCount = dossierObj.has("cancelledCount") ? dossierObj.getInt("cancelledCount") : 0; + int unresolvedCount = dossierObj.has("unresolvedCount") ? dossierObj.getInt("unresolvedCount") : 0; + //Check record exit + OpencpsDossierStatisticMgt dossierStatisticMgt = OpencpsDossierStatisticMgtLocalServiceUtil.checkContainGroupBy(groupId, month, year, govAgencyCode, domainCode, groupBy); + Date now = new Date(); + long dossierStatisticMgtId; + if (dossierStatisticMgt == null) { + dossierStatisticMgtId = counterLocalService.increment(OpencpsDossierStatisticMgt.class.getName()); + dossierStatisticMgt = opencpsDossierStatisticMgtPersistence.create(dossierStatisticMgtId); + dossierStatisticMgt.setCreateDate(now); + dossierStatisticMgt.setModifiedDate(now); + dossierStatisticMgt.setGroupId(groupId); + dossierStatisticMgt.setUserId(userId); + dossierStatisticMgt.setUserName(userName); + dossierStatisticMgt.setMonth(month); + dossierStatisticMgt.setYear(year); + dossierStatisticMgt.setTotalCount(totalCount); + dossierStatisticMgt.setProcessCount(processCount); + dossierStatisticMgt.setRemainingCount(remainingCount); + dossierStatisticMgt.setReceivedCount(receivedCount); + dossierStatisticMgt.setOnlineCount(onlineCount); + dossierStatisticMgt.setReleaseCount(releaseCount); + dossierStatisticMgt.setBetimesCount(betimesCount); + dossierStatisticMgt.setOntimeCount(ontimeCount); + dossierStatisticMgt.setOvertimeCount(overtimeCount); + dossierStatisticMgt.setDoneCount(doneCount); + dossierStatisticMgt.setReleasingCount(releasingCount); + dossierStatisticMgt.setProcessingCount(processingCount); + dossierStatisticMgt.setUndueCount(undueCount); + dossierStatisticMgt.setOverdueCount(overdueCount); + dossierStatisticMgt.setOntimePercentage(ontimePercentage); + dossierStatisticMgt.setWaitingCount(waitingCount); + dossierStatisticMgt.setGovAgencyCode(govAgencyCode); + dossierStatisticMgt.setGovAgencyName(govAgencyName); + dossierStatisticMgt.setDomainCode(domainCode); + dossierStatisticMgt.setDomainName(domainName); + dossierStatisticMgt.setServiceCode(serviceCode); + dossierStatisticMgt.setServiceName(serviceName); + dossierStatisticMgt.setGroupBy(groupBy); + dossierStatisticMgt.setUnresolvedCount(unresolvedCount); + dossierStatisticMgt.setCancelledCount(cancelledCount); + } else { + dossierStatisticMgt.setModifiedDate(now); + dossierStatisticMgt.setMonth(month); + dossierStatisticMgt.setYear(year); + dossierStatisticMgt.setTotalCount(totalCount); + dossierStatisticMgt.setProcessCount(processCount); + dossierStatisticMgt.setRemainingCount(remainingCount); + dossierStatisticMgt.setReceivedCount(receivedCount); + dossierStatisticMgt.setOnlineCount(onlineCount); + dossierStatisticMgt.setReleaseCount(releaseCount); + dossierStatisticMgt.setBetimesCount(betimesCount); + dossierStatisticMgt.setOntimeCount(ontimeCount); + dossierStatisticMgt.setOvertimeCount(overtimeCount); + dossierStatisticMgt.setDoneCount(doneCount); + dossierStatisticMgt.setReleasingCount(releasingCount); + dossierStatisticMgt.setProcessingCount(processingCount); + dossierStatisticMgt.setUndueCount(undueCount); + dossierStatisticMgt.setOverdueCount(overdueCount); + dossierStatisticMgt.setOntimePercentage(ontimePercentage); + dossierStatisticMgt.setWaitingCount(waitingCount); + dossierStatisticMgt.setOnegateCount(onegateCount); + dossierStatisticMgt.setGovAgencyCode(govAgencyCode); + dossierStatisticMgt.setGovAgencyName(govAgencyName); + dossierStatisticMgt.setDomainCode(domainCode); + dossierStatisticMgt.setDomainName(domainName); + dossierStatisticMgt.setServiceCode(serviceCode); + dossierStatisticMgt.setServiceName(serviceName); + dossierStatisticMgt.setGroupBy(groupBy); + dossierStatisticMgt.setUnresolvedCount(unresolvedCount); + dossierStatisticMgt.setCancelledCount(cancelledCount); + } + + int ontimePercent = 100; + if (releaseCount > 0) { + ontimePercent = (betimesCount + ontimeCount) * 100 / releaseCount; + } + + dossierStatisticMgt.setOntimePercentage(ontimePercent); + opencpsDossierStatisticMgtPersistence.update(dossierStatisticMgt); + + } + long endTime = System.currentTimeMillis(); + _log.debug("UPDATE BATCH DOSSIER STATISTIC MGT: " + (endTime - startTime) / 1000.0); + } + + public List findByG_NM_Y(long groupId, int month, int year) { + return opencpsDossierStatisticMgtPersistence.findByG_NM_Y(groupId, month, year); + } + + public List findByG_Y_ARR(long groupId, int[] yearArr) { + return opencpsDossierStatisticMgtPersistence.findByG_Y_REPO(groupId, yearArr); + } + + public List findByG_NM_Y_GB(long groupId, int month, int year, int groupBy) { + return opencpsDossierStatisticMgtPersistence.findByG_NM_Y_GB(groupId, month, year, groupBy); + } + + public List findByG_Y_ARR_GB(long groupId, int[] yearArr, int groupBy) { + return opencpsDossierStatisticMgtPersistence.findByG_Y_REPO_GB(groupId, yearArr, groupBy); + } + + public List findByG_NM_Y_G_D_GB(long groupId, int month, int year, String govAgencyCode, String domainCode, int groupBy){ + return opencpsDossierStatisticMgtPersistence.findByG_NM_Y_G_D_GB(groupId, month, year, govAgencyCode, domainCode, groupBy); + } + + public List searchDossierStatistic(long groupId, int month, int year, String domainCode, + String govAgencyCode, int groupBy, int start, int end){ + try { + return opencpsDossierStatisticMgtFinder.searchByDomainAgencyGroupBy(groupId, month, year, domainCode, govAgencyCode, groupBy, start, end); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + private Log _log = LogFactoryUtil.getLog(OpencpsDossierStatisticMgtLocalServiceImpl.class); + + + + +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/persistence/impl/OpencpsDossierStatisticFinderImpl.java b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/persistence/impl/OpencpsDossierStatisticFinderImpl.java index b67643d6c1..b960df32e2 100644 --- a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/persistence/impl/OpencpsDossierStatisticFinderImpl.java +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/persistence/impl/OpencpsDossierStatisticFinderImpl.java @@ -7,6 +7,7 @@ import com.liferay.portal.kernel.dao.orm.SQLQuery; import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.StringUtil; @@ -560,6 +561,7 @@ public List searchByDomainAgencySystem(long groupId, in try { session = openSession(); + String sql = _customSQL.get(getClass(), SEARCH_DOSSIER_STATISTIC_SYSTEM); // LOG.info(sql); diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/persistence/impl/OpencpsDossierStatisticMgtFinderBaseImpl.java b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/persistence/impl/OpencpsDossierStatisticMgtFinderBaseImpl.java new file mode 100644 index 0000000000..e9bc5b6ef7 --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/persistence/impl/OpencpsDossierStatisticMgtFinderBaseImpl.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.service.persistence.impl; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl; + +import org.opencps.statistic.model.OpencpsDossierStatisticMgt; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticMgtPersistence; + +import java.lang.reflect.Field; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +/** + * @author khoavu + * @generated + */ +public class OpencpsDossierStatisticMgtFinderBaseImpl + extends BasePersistenceImpl { + public OpencpsDossierStatisticMgtFinderBaseImpl() { + setModelClass(OpencpsDossierStatisticMgt.class); + + try { + Field field = BasePersistenceImpl.class.getDeclaredField( + "_dbColumnNames"); + + field.setAccessible(true); + + Map dbColumnNames = new HashMap(); + + dbColumnNames.put("uuid", "uuid_"); + + field.set(this, dbColumnNames); + } + catch (Exception e) { + if (_log.isDebugEnabled()) { + _log.debug(e, e); + } + } + } + + @Override + public Set getBadColumnNames() { + return getOpencpsDossierStatisticMgtPersistence().getBadColumnNames(); + } + + /** + * Returns the opencps dossier statistic mgt persistence. + * + * @return the opencps dossier statistic mgt persistence + */ + public OpencpsDossierStatisticMgtPersistence getOpencpsDossierStatisticMgtPersistence() { + return opencpsDossierStatisticMgtPersistence; + } + + /** + * Sets the opencps dossier statistic mgt persistence. + * + * @param opencpsDossierStatisticMgtPersistence the opencps dossier statistic mgt persistence + */ + public void setOpencpsDossierStatisticMgtPersistence( + OpencpsDossierStatisticMgtPersistence opencpsDossierStatisticMgtPersistence) { + this.opencpsDossierStatisticMgtPersistence = opencpsDossierStatisticMgtPersistence; + } + + @BeanReference(type = OpencpsDossierStatisticMgtPersistence.class) + protected OpencpsDossierStatisticMgtPersistence opencpsDossierStatisticMgtPersistence; + private static final Log _log = LogFactoryUtil.getLog(OpencpsDossierStatisticMgtFinderBaseImpl.class); +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/persistence/impl/OpencpsDossierStatisticMgtFinderImpl.java b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/persistence/impl/OpencpsDossierStatisticMgtFinderImpl.java new file mode 100644 index 0000000000..dce7022fc3 --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/persistence/impl/OpencpsDossierStatisticMgtFinderImpl.java @@ -0,0 +1,276 @@ +package org.opencps.statistic.service.persistence.impl; + +import com.liferay.petra.string.StringPool; +import com.liferay.portal.dao.orm.custom.sql.CustomSQL; +import com.liferay.portal.kernel.dao.orm.QueryPos; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.dao.orm.SQLQuery; +import com.liferay.portal.kernel.dao.orm.Session; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import java.util.List; + +import org.opencps.statistic.model.OpencpsDossierStatistic; +import org.opencps.statistic.model.OpencpsDossierStatisticMgt; +import org.opencps.statistic.model.impl.OpencpsDossierStatisticImpl; +import org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtImpl; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticFinder; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticMgtFinder; + +public class OpencpsDossierStatisticMgtFinderImpl extends OpencpsDossierStatisticMgtFinderBaseImpl + implements OpencpsDossierStatisticMgtFinder{ + + private static Log _log = LogFactoryUtil.getLog(OpencpsDossierStatisticMgtFinderImpl.class); + + private static final String SEARCH_DOSSIER_STATISTIC_MGT = OpencpsDossierStatisticMgtFinder.class.getName() + + ".searchStatisicMgt"; + private static final String SEARCH_DOSSIER_STATISTIC_MGT_GB = OpencpsDossierStatisticMgtFinder.class.getName() + + ".searchStatisicMgtGroupBy"; + + private static final String TOTAL = "total"; + + private static final String CONDITION_DOMAIN = "(opencps_statistic_mgt.domainCode = ?) AND"; + private static final String CONDITION_DOMAIN_REPLACE = "(opencps_statistic_mgt.domainCode IS NULL) AND"; + private static final String CONDITION_GOV_AGENCY = "(opencps_statistic_mgt.govAgencyCode = ?) AND"; + private static final String CONDITION_GOV_AGENCY_REPLACE = "(opencps_statistic_mgt.govAgencyCode IS NULL) AND"; + private static final String CONDITION_MONTH = "(opencps_statistic_mgt.month = ?) AND"; + private static final String CONDITION_MONTH_REPLACE = "(opencps_statistic_mgt.month != 0) AND"; + private static final String CONDITION_YEAR = "(opencps_statistic_mgt.year = ?) AND"; + private static final String CONDITION_YEAR_REPLACE = "(opencps_statistic_mgt.year != 0) AND"; + + public static final int ALL_MONTH = -1; + + public OpencpsDossierStatisticMgt checkContains(long groupId, int month, int year, String govAgencyCode, String domainCode) { + Session session = null; + + try { + + session = openSession(); + + String sql = _customSQL.get(getClass(), SEARCH_DOSSIER_STATISTIC_MGT); + + + if (Validator.isNull(domainCode)) { + sql = StringUtil.replace(sql, CONDITION_DOMAIN, CONDITION_DOMAIN_REPLACE); + } + + if (Validator.isNull(govAgencyCode)) { + sql = StringUtil.replace(sql, CONDITION_GOV_AGENCY, CONDITION_GOV_AGENCY_REPLACE); + } + + //LOG.info(sql); + + SQLQuery q = session.createSQLQuery(sql); + + q.setCacheable(true); + q.addEntity("OpencpsDossierStatisticMgt", OpencpsDossierStatisticMgtImpl.class); + + QueryPos qPos = QueryPos.getInstance(q); + + /* add month parameter */ + + qPos.add(month); + + /* add year parameter */ + qPos.add(year); + + /* add domain parameter */ + if (Validator.isNotNull(domainCode)) { + qPos.add(domainCode); + } + + /* add govAgency parameter */ + if (Validator.isNotNull(govAgencyCode)) { + qPos.add(govAgencyCode); + } + + /* add groupId */ + qPos.add(groupId); + + List ls = (List) QueryUtil.list(q, getDialect(), + 0, 1); + + if (ls != null && ls.size() > 0) { + return ls.get(0); + } + + + } catch (Exception e) { + _log.error(e.getMessage()); + try { + throw new SystemException(e); + } catch (SystemException se) { + _log.error(e.getMessage()); + } + } finally { + closeSession(session); + } + + return null; + } + + public OpencpsDossierStatisticMgt checkContainsGroupBy(long groupId, int month, int year, String govAgencyCode, String domainCode, int groupBy) { + Session session = null; + + try { + + session = openSession(); + + String sql = _customSQL.get(getClass(), SEARCH_DOSSIER_STATISTIC_MGT_GB); + + + if (Validator.isNull(domainCode)) { + sql = StringUtil.replace(sql, CONDITION_DOMAIN, CONDITION_DOMAIN_REPLACE); + } + + if (Validator.isNull(govAgencyCode)) { + sql = StringUtil.replace(sql, CONDITION_GOV_AGENCY, CONDITION_GOV_AGENCY_REPLACE); + } + + //LOG.info(sql); + + SQLQuery q = session.createSQLQuery(sql); + + q.setCacheable(true); + q.addEntity("OpencpsDossierStatisticMgt", OpencpsDossierStatisticMgtImpl.class); + + QueryPos qPos = QueryPos.getInstance(q); + + /* add month parameter */ + + qPos.add(month); + + /* add year parameter */ + qPos.add(year); + + /* add domain parameter */ + if (Validator.isNotNull(domainCode)) { + qPos.add(domainCode); + } + + /* add govAgency parameter */ + if (Validator.isNotNull(govAgencyCode)) { + qPos.add(govAgencyCode); + } + + /* add groupId */ + qPos.add(groupId); + + /* add groupBy - thong ke cho gov: 1, domain: 2, service: 3 */ + qPos.add(groupBy); + + List ls = (List) QueryUtil.list(q, getDialect(), + 0, 1); + + if (ls != null && ls.size() > 0) { + return ls.get(0); + } + + + } catch (Exception e) { + _log.error(e.getMessage()); + try { + throw new SystemException(e); + } catch (SystemException se) { + _log.error(e.getMessage()); + } + } finally { + closeSession(session); + } + + return null; + } + + @SuppressWarnings("unchecked") + public List searchByDomainAgencyGroupBy(long groupId, int month, int year, String domainCode, + String govAgencyCode, int groupBy, int start, int end) { + Session session = null; + + try { + session = openSession(); + String sql = _customSQL.get(getClass(), SEARCH_DOSSIER_STATISTIC_MGT_GB); + + // LOG.info(sql); + + if (month == ALL_MONTH) { + sql = StringUtil.replace(sql, CONDITION_MONTH, StringPool.BLANK); + } + + /* remove year */ + if (year == ALL_MONTH) { + sql = StringUtil.replace(sql, CONDITION_YEAR, StringPool.BLANK); + } + + if (Validator.isNull(domainCode)) { + sql = StringUtil.replace(sql, CONDITION_DOMAIN, StringPool.BLANK); + } else if (domainCode.contentEquals(TOTAL)){ + sql = StringUtil.replace(sql, CONDITION_DOMAIN, CONDITION_DOMAIN_REPLACE); + } + + if (Validator.isNull(govAgencyCode)) { + sql = StringUtil.replace(sql, CONDITION_GOV_AGENCY, StringPool.BLANK); + } else if (govAgencyCode.contentEquals(TOTAL)){ + sql = StringUtil.replace(sql, CONDITION_GOV_AGENCY,CONDITION_GOV_AGENCY_REPLACE); + } + + + SQLQuery q = session.createSQLQuery(sql); + + _log.debug(q); + q.setCacheable(true); + q.addEntity("OpencpsDossierStatisticMgt", OpencpsDossierStatisticMgtImpl.class); + + QueryPos qPos = QueryPos.getInstance(q); + + /* add month parameter */ + + if (month != ALL_MONTH) { + qPos.add(month); + } + + /* add year parameter */ + if (year != ALL_MONTH) { + qPos.add(year); + } + + /* add domain parameter */ + if (Validator.isNotNull(domainCode) && !domainCode.contentEquals(TOTAL)) { + qPos.add(domainCode); + } + + /* add govAgency parameter */ + if (Validator.isNotNull(govAgencyCode) && !govAgencyCode.contentEquals(TOTAL)) { + qPos.add(govAgencyCode); + } + + /* add groupId */ + qPos.add(groupId); + + /* add groupBy */ + qPos.add(groupBy); + + return (List) QueryUtil.list(q, getDialect(), start, end); + } catch (Exception e) { + _log.error(e.getMessage()); + try { + throw new SystemException(e); + } catch (SystemException se) { + _log.error(e.getMessage()); + } + } finally { + closeSession(session); + } + + return null; + } + + + @ServiceReference(type = CustomSQL.class) + private CustomSQL _customSQL; +} diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/persistence/impl/OpencpsDossierStatisticMgtPersistenceImpl.java b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/persistence/impl/OpencpsDossierStatisticMgtPersistenceImpl.java new file mode 100644 index 0000000000..bdaf98d00c --- /dev/null +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/java/org/opencps/statistic/service/persistence/impl/OpencpsDossierStatisticMgtPersistenceImpl.java @@ -0,0 +1,7668 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.statistic.service.persistence.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.EntityCache; +import com.liferay.portal.kernel.dao.orm.FinderCache; +import com.liferay.portal.kernel.dao.orm.FinderPath; +import com.liferay.portal.kernel.dao.orm.Query; +import com.liferay.portal.kernel.dao.orm.QueryPos; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.dao.orm.Session; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.service.ServiceContextThreadLocal; +import com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl; +import com.liferay.portal.kernel.util.ArrayUtil; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.SetUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.kernel.uuid.PortalUUIDUtil; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import org.opencps.statistic.exception.NoSuchOpencpsDossierStatisticMgtException; +import org.opencps.statistic.model.OpencpsDossierStatisticMgt; +import org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtImpl; +import org.opencps.statistic.model.impl.OpencpsDossierStatisticMgtModelImpl; +import org.opencps.statistic.service.persistence.OpencpsDossierStatisticMgtPersistence; + +import java.io.Serializable; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationHandler; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * The persistence implementation for the opencps dossier statistic mgt service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author khoavu + * @see OpencpsDossierStatisticMgtPersistence + * @see org.opencps.statistic.service.persistence.OpencpsDossierStatisticMgtUtil + * @generated + */ +@ProviderType +public class OpencpsDossierStatisticMgtPersistenceImpl + extends BasePersistenceImpl + implements OpencpsDossierStatisticMgtPersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link OpencpsDossierStatisticMgtUtil} to access the opencps dossier statistic mgt persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + public static final String FINDER_CLASS_NAME_ENTITY = OpencpsDossierStatisticMgtImpl.class.getName(); + public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List1"; + public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List2"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", + new String[0]); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid", + new String[] { + String.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid", + new String[] { String.class.getName() }, + OpencpsDossierStatisticMgtModelImpl.UUID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByUuid", new String[] { String.class.getName() }); + + /** + * Returns all the opencps dossier statistic mgts where uuid = ?. + * + * @param uuid the uuid + * @return the matching opencps dossier statistic mgts + */ + @Override + public List findByUuid(String uuid) { + return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + @Override + public List findByUuid(String uuid, int start, + int end) { + return findByUuid(uuid, start, end, null); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByUuid(String uuid, int start, + int end, OrderByComparator orderByComparator) { + return findByUuid(uuid, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByUuid(String uuid, int start, + int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID; + finderArgs = new Object[] { uuid }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID; + finderArgs = new Object[] { uuid, start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : list) { + if (!Objects.equals(uuid, + opencpsDossierStatisticMgt.getUuid())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(3 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByUuid_First(String uuid, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByUuid_First(uuid, + orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByUuid_First(String uuid, + OrderByComparator orderByComparator) { + List list = findByUuid(uuid, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByUuid_Last(String uuid, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByUuid_Last(uuid, + orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByUuid_Last(String uuid, + OrderByComparator orderByComparator) { + int count = countByUuid(uuid); + + if (count == 0) { + return null; + } + + List list = findByUuid(uuid, count - 1, + count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where uuid = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt[] findByUuid_PrevAndNext( + long dossierStatisticMgtId, String uuid, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = findByPrimaryKey(dossierStatisticMgtId); + + Session session = null; + + try { + session = openSession(); + + OpencpsDossierStatisticMgt[] array = new OpencpsDossierStatisticMgtImpl[3]; + + array[0] = getByUuid_PrevAndNext(session, + opencpsDossierStatisticMgt, uuid, orderByComparator, true); + + array[1] = opencpsDossierStatisticMgt; + + array[2] = getByUuid_PrevAndNext(session, + opencpsDossierStatisticMgt, uuid, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected OpencpsDossierStatisticMgt getByUuid_PrevAndNext( + Session session, OpencpsDossierStatisticMgt opencpsDossierStatisticMgt, + String uuid, + OrderByComparator orderByComparator, + boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(opencpsDossierStatisticMgt); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the opencps dossier statistic mgts where uuid = ? from the database. + * + * @param uuid the uuid + */ + @Override + public void removeByUuid(String uuid) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : findByUuid( + uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(opencpsDossierStatisticMgt); + } + } + + /** + * Returns the number of opencps dossier statistic mgts where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching opencps dossier statistic mgts + */ + @Override + public int countByUuid(String uuid) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID; + + Object[] finderArgs = new Object[] { uuid }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_UUID_UUID_1 = "opencpsDossierStatisticMgt.uuid IS NULL"; + private static final String _FINDER_COLUMN_UUID_UUID_2 = "opencpsDossierStatisticMgt.uuid = ?"; + private static final String _FINDER_COLUMN_UUID_UUID_3 = "(opencpsDossierStatisticMgt.uuid IS NULL OR opencpsDossierStatisticMgt.uuid = '')"; + public static final FinderPath FINDER_PATH_FETCH_BY_UUID_G = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, FINDER_CLASS_NAME_ENTITY, + "fetchByUUID_G", + new String[] { String.class.getName(), Long.class.getName() }, + OpencpsDossierStatisticMgtModelImpl.UUID_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.GROUPID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_UUID_G = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByUUID_G", + new String[] { String.class.getName(), Long.class.getName() }); + + /** + * Returns the opencps dossier statistic mgt where uuid = ? and groupId = ? or throws a {@link NoSuchOpencpsDossierStatisticMgtException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByUUID_G(String uuid, long groupId) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByUUID_G(uuid, + groupId); + + if (opencpsDossierStatisticMgt == null) { + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append(", groupId="); + msg.append(groupId); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + return opencpsDossierStatisticMgt; + } + + /** + * Returns the opencps dossier statistic mgt where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByUUID_G(String uuid, long groupId) { + return fetchByUUID_G(uuid, groupId, true); + } + + /** + * Returns the opencps dossier statistic mgt where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByUUID_G(String uuid, long groupId, + boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { uuid, groupId }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_UUID_G, + finderArgs, this); + } + + if (result instanceof OpencpsDossierStatisticMgt) { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = (OpencpsDossierStatisticMgt)result; + + if (!Objects.equals(uuid, opencpsDossierStatisticMgt.getUuid()) || + (groupId != opencpsDossierStatisticMgt.getGroupId())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_G_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_G_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_G_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(groupId); + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, + finderArgs, list); + } + else { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = list.get(0); + + result = opencpsDossierStatisticMgt; + + cacheResult(opencpsDossierStatisticMgt); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (OpencpsDossierStatisticMgt)result; + } + } + + /** + * Removes the opencps dossier statistic mgt where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the opencps dossier statistic mgt that was removed + */ + @Override + public OpencpsDossierStatisticMgt removeByUUID_G(String uuid, long groupId) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = findByUUID_G(uuid, + groupId); + + return remove(opencpsDossierStatisticMgt); + } + + /** + * Returns the number of opencps dossier statistic mgts where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching opencps dossier statistic mgts + */ + @Override + public int countByUUID_G(String uuid, long groupId) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; + + Object[] finderArgs = new Object[] { uuid, groupId }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_G_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_G_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_G_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(groupId); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_UUID_G_UUID_1 = "opencpsDossierStatisticMgt.uuid IS NULL AND "; + private static final String _FINDER_COLUMN_UUID_G_UUID_2 = "opencpsDossierStatisticMgt.uuid = ? AND "; + private static final String _FINDER_COLUMN_UUID_G_UUID_3 = "(opencpsDossierStatisticMgt.uuid IS NULL OR opencpsDossierStatisticMgt.uuid = '') AND "; + private static final String _FINDER_COLUMN_UUID_G_GROUPID_2 = "opencpsDossierStatisticMgt.groupId = ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_UID_Y = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_UID_Y", + new String[] { + Long.class.getName(), Long.class.getName(), + Integer.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_UID_Y = + new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_UID_Y", + new String[] { + Long.class.getName(), Long.class.getName(), + Integer.class.getName() + }, + OpencpsDossierStatisticMgtModelImpl.GROUPID_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.USERID_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.YEAR_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_G_UID_Y = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByG_UID_Y", + new String[] { + Long.class.getName(), Long.class.getName(), + Integer.class.getName() + }); + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @return the matching opencps dossier statistic mgts + */ + @Override + public List findByG_UID_Y(long groupId, + long userId, int year) { + return findByG_UID_Y(groupId, userId, year, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_UID_Y(long groupId, + long userId, int year, int start, int end) { + return findByG_UID_Y(groupId, userId, year, start, end, null); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_UID_Y(long groupId, + long userId, int year, int start, int end, + OrderByComparator orderByComparator) { + return findByG_UID_Y(groupId, userId, year, start, end, + orderByComparator, true); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_UID_Y(long groupId, + long userId, int year, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_UID_Y; + finderArgs = new Object[] { groupId, userId, year }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_UID_Y; + finderArgs = new Object[] { + groupId, userId, year, + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : list) { + if ((groupId != opencpsDossierStatisticMgt.getGroupId()) || + (userId != opencpsDossierStatisticMgt.getUserId()) || + (year != opencpsDossierStatisticMgt.getYear())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_UID_Y_GROUPID_2); + + query.append(_FINDER_COLUMN_G_UID_Y_USERID_2); + + query.append(_FINDER_COLUMN_G_UID_Y_YEAR_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(userId); + + qPos.add(year); + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_UID_Y_First(long groupId, + long userId, int year, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_UID_Y_First(groupId, + userId, year, orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", userId="); + msg.append(userId); + + msg.append(", year="); + msg.append(year); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_UID_Y_First(long groupId, + long userId, int year, + OrderByComparator orderByComparator) { + List list = findByG_UID_Y(groupId, userId, + year, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_UID_Y_Last(long groupId, + long userId, int year, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_UID_Y_Last(groupId, + userId, year, orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", userId="); + msg.append(userId); + + msg.append(", year="); + msg.append(year); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_UID_Y_Last(long groupId, + long userId, int year, + OrderByComparator orderByComparator) { + int count = countByG_UID_Y(groupId, userId, year); + + if (count == 0) { + return null; + } + + List list = findByG_UID_Y(groupId, userId, + year, count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt[] findByG_UID_Y_PrevAndNext( + long dossierStatisticMgtId, long groupId, long userId, int year, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = findByPrimaryKey(dossierStatisticMgtId); + + Session session = null; + + try { + session = openSession(); + + OpencpsDossierStatisticMgt[] array = new OpencpsDossierStatisticMgtImpl[3]; + + array[0] = getByG_UID_Y_PrevAndNext(session, + opencpsDossierStatisticMgt, groupId, userId, year, + orderByComparator, true); + + array[1] = opencpsDossierStatisticMgt; + + array[2] = getByG_UID_Y_PrevAndNext(session, + opencpsDossierStatisticMgt, groupId, userId, year, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected OpencpsDossierStatisticMgt getByG_UID_Y_PrevAndNext( + Session session, OpencpsDossierStatisticMgt opencpsDossierStatisticMgt, + long groupId, long userId, int year, + OrderByComparator orderByComparator, + boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_UID_Y_GROUPID_2); + + query.append(_FINDER_COLUMN_G_UID_Y_USERID_2); + + query.append(_FINDER_COLUMN_G_UID_Y_YEAR_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(userId); + + qPos.add(year); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(opencpsDossierStatisticMgt); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? from the database. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + */ + @Override + public void removeByG_UID_Y(long groupId, long userId, int year) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : findByG_UID_Y( + groupId, userId, year, QueryUtil.ALL_POS, QueryUtil.ALL_POS, + null)) { + remove(opencpsDossierStatisticMgt); + } + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and userId = ? and year = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @return the number of matching opencps dossier statistic mgts + */ + @Override + public int countByG_UID_Y(long groupId, long userId, int year) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_G_UID_Y; + + Object[] finderArgs = new Object[] { groupId, userId, year }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_UID_Y_GROUPID_2); + + query.append(_FINDER_COLUMN_G_UID_Y_USERID_2); + + query.append(_FINDER_COLUMN_G_UID_Y_YEAR_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(userId); + + qPos.add(year); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_G_UID_Y_GROUPID_2 = "opencpsDossierStatisticMgt.groupId = ? AND "; + private static final String _FINDER_COLUMN_G_UID_Y_USERID_2 = "opencpsDossierStatisticMgt.userId = ? AND "; + private static final String _FINDER_COLUMN_G_UID_Y_YEAR_2 = "opencpsDossierStatisticMgt.year = ?"; + public static final FinderPath FINDER_PATH_FETCH_BY_G_M_Y_G_D = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, FINDER_CLASS_NAME_ENTITY, + "fetchByG_M_Y_G_D", + new String[] { + Long.class.getName(), Integer.class.getName(), + Integer.class.getName(), String.class.getName(), + String.class.getName() + }, + OpencpsDossierStatisticMgtModelImpl.GROUPID_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.MONTH_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.YEAR_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.GOVAGENCYCODE_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.DOMAINCODE_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_G_M_Y_G_D = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByG_M_Y_G_D", + new String[] { + Long.class.getName(), Integer.class.getName(), + Integer.class.getName(), String.class.getName(), + String.class.getName() + }); + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? or throws a {@link NoSuchOpencpsDossierStatisticMgtException} if it could not be found. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @return the matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_M_Y_G_D(long groupId, int month, + int year, String govAgencyCode, String domainCode) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_M_Y_G_D(groupId, + month, year, govAgencyCode, domainCode); + + if (opencpsDossierStatisticMgt == null) { + StringBundler msg = new StringBundler(12); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", month="); + msg.append(month); + + msg.append(", year="); + msg.append(year); + + msg.append(", govAgencyCode="); + msg.append(govAgencyCode); + + msg.append(", domainCode="); + msg.append(domainCode); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + return opencpsDossierStatisticMgt; + } + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? or returns null if it could not be found. Uses the finder cache. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_M_Y_G_D(long groupId, int month, + int year, String govAgencyCode, String domainCode) { + return fetchByG_M_Y_G_D(groupId, month, year, govAgencyCode, + domainCode, true); + } + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_M_Y_G_D(long groupId, int month, + int year, String govAgencyCode, String domainCode, + boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { + groupId, month, year, govAgencyCode, domainCode + }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_G_M_Y_G_D, + finderArgs, this); + } + + if (result instanceof OpencpsDossierStatisticMgt) { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = (OpencpsDossierStatisticMgt)result; + + if ((groupId != opencpsDossierStatisticMgt.getGroupId()) || + (month != opencpsDossierStatisticMgt.getMonth()) || + (year != opencpsDossierStatisticMgt.getYear()) || + !Objects.equals(govAgencyCode, + opencpsDossierStatisticMgt.getGovAgencyCode()) || + !Objects.equals(domainCode, + opencpsDossierStatisticMgt.getDomainCode())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(7); + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GROUPID_2); + + query.append(_FINDER_COLUMN_G_M_Y_G_D_MONTH_2); + + query.append(_FINDER_COLUMN_G_M_Y_G_D_YEAR_2); + + boolean bindGovAgencyCode = false; + + if (govAgencyCode == null) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_GOVAGENCYCODE_1); + } + else if (govAgencyCode.equals("")) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_GOVAGENCYCODE_3); + } + else { + bindGovAgencyCode = true; + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GOVAGENCYCODE_2); + } + + boolean bindDomainCode = false; + + if (domainCode == null) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_DOMAINCODE_1); + } + else if (domainCode.equals("")) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_DOMAINCODE_3); + } + else { + bindDomainCode = true; + + query.append(_FINDER_COLUMN_G_M_Y_G_D_DOMAINCODE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(month); + + qPos.add(year); + + if (bindGovAgencyCode) { + qPos.add(govAgencyCode); + } + + if (bindDomainCode) { + qPos.add(domainCode); + } + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_G_M_Y_G_D, + finderArgs, list); + } + else { + if (list.size() > 1) { + Collections.sort(list, Collections.reverseOrder()); + + if (_log.isWarnEnabled()) { + _log.warn( + "OpencpsDossierStatisticMgtPersistenceImpl.fetchByG_M_Y_G_D(long, int, int, String, String, boolean) with parameters (" + + StringUtil.merge(finderArgs) + + ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); + } + } + + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = list.get(0); + + result = opencpsDossierStatisticMgt; + + cacheResult(opencpsDossierStatisticMgt); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_G_M_Y_G_D, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (OpencpsDossierStatisticMgt)result; + } + } + + /** + * Removes the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @return the opencps dossier statistic mgt that was removed + */ + @Override + public OpencpsDossierStatisticMgt removeByG_M_Y_G_D(long groupId, + int month, int year, String govAgencyCode, String domainCode) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = findByG_M_Y_G_D(groupId, + month, year, govAgencyCode, domainCode); + + return remove(opencpsDossierStatisticMgt); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @return the number of matching opencps dossier statistic mgts + */ + @Override + public int countByG_M_Y_G_D(long groupId, int month, int year, + String govAgencyCode, String domainCode) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_G_M_Y_G_D; + + Object[] finderArgs = new Object[] { + groupId, month, year, govAgencyCode, domainCode + }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(6); + + query.append(_SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GROUPID_2); + + query.append(_FINDER_COLUMN_G_M_Y_G_D_MONTH_2); + + query.append(_FINDER_COLUMN_G_M_Y_G_D_YEAR_2); + + boolean bindGovAgencyCode = false; + + if (govAgencyCode == null) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_GOVAGENCYCODE_1); + } + else if (govAgencyCode.equals("")) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_GOVAGENCYCODE_3); + } + else { + bindGovAgencyCode = true; + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GOVAGENCYCODE_2); + } + + boolean bindDomainCode = false; + + if (domainCode == null) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_DOMAINCODE_1); + } + else if (domainCode.equals("")) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_DOMAINCODE_3); + } + else { + bindDomainCode = true; + + query.append(_FINDER_COLUMN_G_M_Y_G_D_DOMAINCODE_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(month); + + qPos.add(year); + + if (bindGovAgencyCode) { + qPos.add(govAgencyCode); + } + + if (bindDomainCode) { + qPos.add(domainCode); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_G_M_Y_G_D_GROUPID_2 = "opencpsDossierStatisticMgt.groupId = ? AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_MONTH_2 = "opencpsDossierStatisticMgt.month = ? AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_YEAR_2 = "opencpsDossierStatisticMgt.year = ? AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_GOVAGENCYCODE_1 = "opencpsDossierStatisticMgt.govAgencyCode IS NULL AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_GOVAGENCYCODE_2 = "opencpsDossierStatisticMgt.govAgencyCode = ? AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_GOVAGENCYCODE_3 = "(opencpsDossierStatisticMgt.govAgencyCode IS NULL OR opencpsDossierStatisticMgt.govAgencyCode = '') AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_DOMAINCODE_1 = "opencpsDossierStatisticMgt.domainCode IS NULL"; + private static final String _FINDER_COLUMN_G_M_Y_G_D_DOMAINCODE_2 = "opencpsDossierStatisticMgt.domainCode = ?"; + private static final String _FINDER_COLUMN_G_M_Y_G_D_DOMAINCODE_3 = "(opencpsDossierStatisticMgt.domainCode IS NULL OR opencpsDossierStatisticMgt.domainCode = '')"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_NM_Y = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_NM_Y", + new String[] { + Long.class.getName(), Integer.class.getName(), + Integer.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_NM_Y = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + Long.class, FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "countByG_NM_Y", + new String[] { + Long.class.getName(), Integer.class.getName(), + Integer.class.getName() + }); + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @return the matching opencps dossier statistic mgts + */ + @Override + public List findByG_NM_Y(long groupId, + int month, int year) { + return findByG_NM_Y(groupId, month, year, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_NM_Y(long groupId, + int month, int year, int start, int end) { + return findByG_NM_Y(groupId, month, year, start, end, null); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_NM_Y(long groupId, + int month, int year, int start, int end, + OrderByComparator orderByComparator) { + return findByG_NM_Y(groupId, month, year, start, end, + orderByComparator, true); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_NM_Y(long groupId, + int month, int year, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_NM_Y; + finderArgs = new Object[] { + groupId, month, year, + + start, end, orderByComparator + }; + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : list) { + if ((groupId != opencpsDossierStatisticMgt.getGroupId()) || + (month == opencpsDossierStatisticMgt.getMonth()) || + (year != opencpsDossierStatisticMgt.getYear())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_NM_Y_GROUPID_2); + + query.append(_FINDER_COLUMN_G_NM_Y_MONTH_2); + + query.append(_FINDER_COLUMN_G_NM_Y_YEAR_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(month); + + qPos.add(year); + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_NM_Y_First(long groupId, + int month, int year, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_NM_Y_First(groupId, + month, year, orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", month="); + msg.append(month); + + msg.append(", year="); + msg.append(year); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_NM_Y_First(long groupId, + int month, int year, + OrderByComparator orderByComparator) { + List list = findByG_NM_Y(groupId, month, + year, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_NM_Y_Last(long groupId, + int month, int year, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_NM_Y_Last(groupId, + month, year, orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", month="); + msg.append(month); + + msg.append(", year="); + msg.append(year); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_NM_Y_Last(long groupId, + int month, int year, + OrderByComparator orderByComparator) { + int count = countByG_NM_Y(groupId, month, year); + + if (count == 0) { + return null; + } + + List list = findByG_NM_Y(groupId, month, + year, count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param month the month + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt[] findByG_NM_Y_PrevAndNext( + long dossierStatisticMgtId, long groupId, int month, int year, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = findByPrimaryKey(dossierStatisticMgtId); + + Session session = null; + + try { + session = openSession(); + + OpencpsDossierStatisticMgt[] array = new OpencpsDossierStatisticMgtImpl[3]; + + array[0] = getByG_NM_Y_PrevAndNext(session, + opencpsDossierStatisticMgt, groupId, month, year, + orderByComparator, true); + + array[1] = opencpsDossierStatisticMgt; + + array[2] = getByG_NM_Y_PrevAndNext(session, + opencpsDossierStatisticMgt, groupId, month, year, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected OpencpsDossierStatisticMgt getByG_NM_Y_PrevAndNext( + Session session, OpencpsDossierStatisticMgt opencpsDossierStatisticMgt, + long groupId, int month, int year, + OrderByComparator orderByComparator, + boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_NM_Y_GROUPID_2); + + query.append(_FINDER_COLUMN_G_NM_Y_MONTH_2); + + query.append(_FINDER_COLUMN_G_NM_Y_YEAR_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(month); + + qPos.add(year); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(opencpsDossierStatisticMgt); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + */ + @Override + public void removeByG_NM_Y(long groupId, int month, int year) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : findByG_NM_Y( + groupId, month, year, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(opencpsDossierStatisticMgt); + } + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @return the number of matching opencps dossier statistic mgts + */ + @Override + public int countByG_NM_Y(long groupId, int month, int year) { + FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_NM_Y; + + Object[] finderArgs = new Object[] { groupId, month, year }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_NM_Y_GROUPID_2); + + query.append(_FINDER_COLUMN_G_NM_Y_MONTH_2); + + query.append(_FINDER_COLUMN_G_NM_Y_YEAR_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(month); + + qPos.add(year); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_G_NM_Y_GROUPID_2 = "opencpsDossierStatisticMgt.groupId = ? AND "; + private static final String _FINDER_COLUMN_G_NM_Y_MONTH_2 = "opencpsDossierStatisticMgt.month != ? AND "; + private static final String _FINDER_COLUMN_G_NM_Y_YEAR_2 = "opencpsDossierStatisticMgt.year = ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_Y_REPO = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_Y_REPO", + new String[] { + Long.class.getName(), Integer.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_Y_REPO = + new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_Y_REPO", + new String[] { Long.class.getName(), Integer.class.getName() }, + OpencpsDossierStatisticMgtModelImpl.GROUPID_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.YEAR_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_G_Y_REPO = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByG_Y_REPO", + new String[] { Long.class.getName(), Integer.class.getName() }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_Y_REPO = + new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + Long.class, FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "countByG_Y_REPO", + new String[] { Long.class.getName(), Integer.class.getName() }); + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @return the matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO(long groupId, + int year) { + return findByG_Y_REPO(groupId, year, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO(long groupId, + int year, int start, int end) { + return findByG_Y_REPO(groupId, year, start, end, null); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO(long groupId, + int year, int start, int end, + OrderByComparator orderByComparator) { + return findByG_Y_REPO(groupId, year, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO(long groupId, + int year, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_Y_REPO; + finderArgs = new Object[] { groupId, year }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_Y_REPO; + finderArgs = new Object[] { + groupId, year, + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : list) { + if ((groupId != opencpsDossierStatisticMgt.getGroupId()) || + (year != opencpsDossierStatisticMgt.getYear())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_Y_REPO_GROUPID_2); + + query.append(_FINDER_COLUMN_G_Y_REPO_YEAR_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(year); + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_Y_REPO_First(long groupId, + int year, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_Y_REPO_First(groupId, + year, orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", year="); + msg.append(year); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_Y_REPO_First(long groupId, + int year, + OrderByComparator orderByComparator) { + List list = findByG_Y_REPO(groupId, year, + 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_Y_REPO_Last(long groupId, + int year, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_Y_REPO_Last(groupId, + year, orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", year="); + msg.append(year); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_Y_REPO_Last(long groupId, + int year, + OrderByComparator orderByComparator) { + int count = countByG_Y_REPO(groupId, year); + + if (count == 0) { + return null; + } + + List list = findByG_Y_REPO(groupId, year, + count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and year = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param year the year + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt[] findByG_Y_REPO_PrevAndNext( + long dossierStatisticMgtId, long groupId, int year, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = findByPrimaryKey(dossierStatisticMgtId); + + Session session = null; + + try { + session = openSession(); + + OpencpsDossierStatisticMgt[] array = new OpencpsDossierStatisticMgtImpl[3]; + + array[0] = getByG_Y_REPO_PrevAndNext(session, + opencpsDossierStatisticMgt, groupId, year, + orderByComparator, true); + + array[1] = opencpsDossierStatisticMgt; + + array[2] = getByG_Y_REPO_PrevAndNext(session, + opencpsDossierStatisticMgt, groupId, year, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected OpencpsDossierStatisticMgt getByG_Y_REPO_PrevAndNext( + Session session, OpencpsDossierStatisticMgt opencpsDossierStatisticMgt, + long groupId, int year, + OrderByComparator orderByComparator, + boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_Y_REPO_GROUPID_2); + + query.append(_FINDER_COLUMN_G_Y_REPO_YEAR_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(year); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(opencpsDossierStatisticMgt); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and year = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @return the matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO(long groupId, + int[] years) { + return findByG_Y_REPO(groupId, years, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and year = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO(long groupId, + int[] years, int start, int end) { + return findByG_Y_REPO(groupId, years, start, end, null); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO(long groupId, + int[] years, int start, int end, + OrderByComparator orderByComparator) { + return findByG_Y_REPO(groupId, years, start, end, orderByComparator, + true); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ?, optionally using the finder cache. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO(long groupId, + int[] years, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + if (years == null) { + years = new int[0]; + } + else if (years.length > 1) { + years = ArrayUtil.unique(years); + + Arrays.sort(years); + } + + if (years.length == 1) { + return findByG_Y_REPO(groupId, years[0], start, end, + orderByComparator); + } + + boolean pagination = true; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderArgs = new Object[] { groupId, StringUtil.merge(years) }; + } + else { + finderArgs = new Object[] { + groupId, StringUtil.merge(years), + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_Y_REPO, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : list) { + if ((groupId != opencpsDossierStatisticMgt.getGroupId()) || + !ArrayUtil.contains(years, + opencpsDossierStatisticMgt.getYear())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = new StringBundler(); + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_Y_REPO_GROUPID_2); + + if (years.length > 0) { + query.append("("); + + query.append(_FINDER_COLUMN_G_Y_REPO_YEAR_7); + + query.append(StringUtil.merge(years)); + + query.append(")"); + + query.append(")"); + } + + query.setStringAt(removeConjunction(query.stringAt(query.index() - + 1)), query.index() - 1); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + finderCache.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_Y_REPO, + finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_Y_REPO, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and year = ? from the database. + * + * @param groupId the group ID + * @param year the year + */ + @Override + public void removeByG_Y_REPO(long groupId, int year) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : findByG_Y_REPO( + groupId, year, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(opencpsDossierStatisticMgt); + } + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and year = ?. + * + * @param groupId the group ID + * @param year the year + * @return the number of matching opencps dossier statistic mgts + */ + @Override + public int countByG_Y_REPO(long groupId, int year) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_G_Y_REPO; + + Object[] finderArgs = new Object[] { groupId, year }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_Y_REPO_GROUPID_2); + + query.append(_FINDER_COLUMN_G_Y_REPO_YEAR_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(year); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and year = any ?. + * + * @param groupId the group ID + * @param years the years + * @return the number of matching opencps dossier statistic mgts + */ + @Override + public int countByG_Y_REPO(long groupId, int[] years) { + if (years == null) { + years = new int[0]; + } + else if (years.length > 1) { + years = ArrayUtil.unique(years); + + Arrays.sort(years); + } + + Object[] finderArgs = new Object[] { groupId, StringUtil.merge(years) }; + + Long count = (Long)finderCache.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_Y_REPO, + finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(); + + query.append(_SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_Y_REPO_GROUPID_2); + + if (years.length > 0) { + query.append("("); + + query.append(_FINDER_COLUMN_G_Y_REPO_YEAR_7); + + query.append(StringUtil.merge(years)); + + query.append(")"); + + query.append(")"); + } + + query.setStringAt(removeConjunction(query.stringAt(query.index() - + 1)), query.index() - 1); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_Y_REPO, + finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_Y_REPO, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_G_Y_REPO_GROUPID_2 = "opencpsDossierStatisticMgt.groupId = ? AND "; + private static final String _FINDER_COLUMN_G_Y_REPO_YEAR_2 = "opencpsDossierStatisticMgt.year = ?"; + private static final String _FINDER_COLUMN_G_Y_REPO_YEAR_7 = "opencpsDossierStatisticMgt.year IN ("; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_UID_Y_GB = + new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_UID_Y_GB", + new String[] { + Long.class.getName(), Long.class.getName(), + Integer.class.getName(), Integer.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_UID_Y_GB = + new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_UID_Y_GB", + new String[] { + Long.class.getName(), Long.class.getName(), + Integer.class.getName(), Integer.class.getName() + }, + OpencpsDossierStatisticMgtModelImpl.GROUPID_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.USERID_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.YEAR_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.GROUPBY_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_G_UID_Y_GB = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByG_UID_Y_GB", + new String[] { + Long.class.getName(), Long.class.getName(), + Integer.class.getName(), Integer.class.getName() + }); + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + @Override + public List findByG_UID_Y_GB(long groupId, + long userId, int year, int groupBy) { + return findByG_UID_Y_GB(groupId, userId, year, groupBy, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_UID_Y_GB(long groupId, + long userId, int year, int groupBy, int start, int end) { + return findByG_UID_Y_GB(groupId, userId, year, groupBy, start, end, null); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_UID_Y_GB(long groupId, + long userId, int year, int groupBy, int start, int end, + OrderByComparator orderByComparator) { + return findByG_UID_Y_GB(groupId, userId, year, groupBy, start, end, + orderByComparator, true); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_UID_Y_GB(long groupId, + long userId, int year, int groupBy, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_UID_Y_GB; + finderArgs = new Object[] { groupId, userId, year, groupBy }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_UID_Y_GB; + finderArgs = new Object[] { + groupId, userId, year, groupBy, + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : list) { + if ((groupId != opencpsDossierStatisticMgt.getGroupId()) || + (userId != opencpsDossierStatisticMgt.getUserId()) || + (year != opencpsDossierStatisticMgt.getYear()) || + (groupBy != opencpsDossierStatisticMgt.getGroupBy())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(6); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_UID_Y_GB_GROUPID_2); + + query.append(_FINDER_COLUMN_G_UID_Y_GB_USERID_2); + + query.append(_FINDER_COLUMN_G_UID_Y_GB_YEAR_2); + + query.append(_FINDER_COLUMN_G_UID_Y_GB_GROUPBY_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(userId); + + qPos.add(year); + + qPos.add(groupBy); + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_UID_Y_GB_First(long groupId, + long userId, int year, int groupBy, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_UID_Y_GB_First(groupId, + userId, year, groupBy, orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(10); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", userId="); + msg.append(userId); + + msg.append(", year="); + msg.append(year); + + msg.append(", groupBy="); + msg.append(groupBy); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_UID_Y_GB_First(long groupId, + long userId, int year, int groupBy, + OrderByComparator orderByComparator) { + List list = findByG_UID_Y_GB(groupId, + userId, year, groupBy, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_UID_Y_GB_Last(long groupId, + long userId, int year, int groupBy, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_UID_Y_GB_Last(groupId, + userId, year, groupBy, orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(10); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", userId="); + msg.append(userId); + + msg.append(", year="); + msg.append(year); + + msg.append(", groupBy="); + msg.append(groupBy); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_UID_Y_GB_Last(long groupId, + long userId, int year, int groupBy, + OrderByComparator orderByComparator) { + int count = countByG_UID_Y_GB(groupId, userId, year, groupBy); + + if (count == 0) { + return null; + } + + List list = findByG_UID_Y_GB(groupId, + userId, year, groupBy, count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt[] findByG_UID_Y_GB_PrevAndNext( + long dossierStatisticMgtId, long groupId, long userId, int year, + int groupBy, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = findByPrimaryKey(dossierStatisticMgtId); + + Session session = null; + + try { + session = openSession(); + + OpencpsDossierStatisticMgt[] array = new OpencpsDossierStatisticMgtImpl[3]; + + array[0] = getByG_UID_Y_GB_PrevAndNext(session, + opencpsDossierStatisticMgt, groupId, userId, year, groupBy, + orderByComparator, true); + + array[1] = opencpsDossierStatisticMgt; + + array[2] = getByG_UID_Y_GB_PrevAndNext(session, + opencpsDossierStatisticMgt, groupId, userId, year, groupBy, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected OpencpsDossierStatisticMgt getByG_UID_Y_GB_PrevAndNext( + Session session, OpencpsDossierStatisticMgt opencpsDossierStatisticMgt, + long groupId, long userId, int year, int groupBy, + OrderByComparator orderByComparator, + boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(7 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(6); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_UID_Y_GB_GROUPID_2); + + query.append(_FINDER_COLUMN_G_UID_Y_GB_USERID_2); + + query.append(_FINDER_COLUMN_G_UID_Y_GB_YEAR_2); + + query.append(_FINDER_COLUMN_G_UID_Y_GB_GROUPBY_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(userId); + + qPos.add(year); + + qPos.add(groupBy); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(opencpsDossierStatisticMgt); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + */ + @Override + public void removeByG_UID_Y_GB(long groupId, long userId, int year, + int groupBy) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : findByG_UID_Y_GB( + groupId, userId, year, groupBy, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(opencpsDossierStatisticMgt); + } + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and userId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param userId the user ID + * @param year the year + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + @Override + public int countByG_UID_Y_GB(long groupId, long userId, int year, + int groupBy) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_G_UID_Y_GB; + + Object[] finderArgs = new Object[] { groupId, userId, year, groupBy }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(5); + + query.append(_SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_UID_Y_GB_GROUPID_2); + + query.append(_FINDER_COLUMN_G_UID_Y_GB_USERID_2); + + query.append(_FINDER_COLUMN_G_UID_Y_GB_YEAR_2); + + query.append(_FINDER_COLUMN_G_UID_Y_GB_GROUPBY_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(userId); + + qPos.add(year); + + qPos.add(groupBy); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_G_UID_Y_GB_GROUPID_2 = "opencpsDossierStatisticMgt.groupId = ? AND "; + private static final String _FINDER_COLUMN_G_UID_Y_GB_USERID_2 = "opencpsDossierStatisticMgt.userId = ? AND "; + private static final String _FINDER_COLUMN_G_UID_Y_GB_YEAR_2 = "opencpsDossierStatisticMgt.year = ? AND "; + private static final String _FINDER_COLUMN_G_UID_Y_GB_GROUPBY_2 = "opencpsDossierStatisticMgt.groupBy = ?"; + public static final FinderPath FINDER_PATH_FETCH_BY_G_M_Y_G_D_GB = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, FINDER_CLASS_NAME_ENTITY, + "fetchByG_M_Y_G_D_GB", + new String[] { + Long.class.getName(), Integer.class.getName(), + Integer.class.getName(), String.class.getName(), + String.class.getName(), Integer.class.getName() + }, + OpencpsDossierStatisticMgtModelImpl.GROUPID_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.MONTH_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.YEAR_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.GOVAGENCYCODE_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.DOMAINCODE_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.GROUPBY_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_G_M_Y_G_D_GB = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByG_M_Y_G_D_GB", + new String[] { + Long.class.getName(), Integer.class.getName(), + Integer.class.getName(), String.class.getName(), + String.class.getName(), Integer.class.getName() + }); + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? or throws a {@link NoSuchOpencpsDossierStatisticMgtException} if it could not be found. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_M_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy) throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_M_Y_G_D_GB(groupId, + month, year, govAgencyCode, domainCode, groupBy); + + if (opencpsDossierStatisticMgt == null) { + StringBundler msg = new StringBundler(14); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", month="); + msg.append(month); + + msg.append(", year="); + msg.append(year); + + msg.append(", govAgencyCode="); + msg.append(govAgencyCode); + + msg.append(", domainCode="); + msg.append(domainCode); + + msg.append(", groupBy="); + msg.append(groupBy); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + return opencpsDossierStatisticMgt; + } + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? or returns null if it could not be found. Uses the finder cache. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_M_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy) { + return fetchByG_M_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy, true); + } + + /** + * Returns the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_M_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy, boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { + groupId, month, year, govAgencyCode, domainCode, groupBy + }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_G_M_Y_G_D_GB, + finderArgs, this); + } + + if (result instanceof OpencpsDossierStatisticMgt) { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = (OpencpsDossierStatisticMgt)result; + + if ((groupId != opencpsDossierStatisticMgt.getGroupId()) || + (month != opencpsDossierStatisticMgt.getMonth()) || + (year != opencpsDossierStatisticMgt.getYear()) || + !Objects.equals(govAgencyCode, + opencpsDossierStatisticMgt.getGovAgencyCode()) || + !Objects.equals(domainCode, + opencpsDossierStatisticMgt.getDomainCode()) || + (groupBy != opencpsDossierStatisticMgt.getGroupBy())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(8); + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_GROUPID_2); + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_MONTH_2); + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_YEAR_2); + + boolean bindGovAgencyCode = false; + + if (govAgencyCode == null) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_GOVAGENCYCODE_1); + } + else if (govAgencyCode.equals("")) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_GOVAGENCYCODE_3); + } + else { + bindGovAgencyCode = true; + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_GOVAGENCYCODE_2); + } + + boolean bindDomainCode = false; + + if (domainCode == null) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_DOMAINCODE_1); + } + else if (domainCode.equals("")) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_DOMAINCODE_3); + } + else { + bindDomainCode = true; + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_DOMAINCODE_2); + } + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_GROUPBY_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(month); + + qPos.add(year); + + if (bindGovAgencyCode) { + qPos.add(govAgencyCode); + } + + if (bindDomainCode) { + qPos.add(domainCode); + } + + qPos.add(groupBy); + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_G_M_Y_G_D_GB, + finderArgs, list); + } + else { + if (list.size() > 1) { + Collections.sort(list, Collections.reverseOrder()); + + if (_log.isWarnEnabled()) { + _log.warn( + "OpencpsDossierStatisticMgtPersistenceImpl.fetchByG_M_Y_G_D_GB(long, int, int, String, String, int, boolean) with parameters (" + + StringUtil.merge(finderArgs) + + ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); + } + } + + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = list.get(0); + + result = opencpsDossierStatisticMgt; + + cacheResult(opencpsDossierStatisticMgt); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_G_M_Y_G_D_GB, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (OpencpsDossierStatisticMgt)result; + } + } + + /** + * Removes the opencps dossier statistic mgt where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the opencps dossier statistic mgt that was removed + */ + @Override + public OpencpsDossierStatisticMgt removeByG_M_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy) throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = findByG_M_Y_G_D_GB(groupId, + month, year, govAgencyCode, domainCode, groupBy); + + return remove(opencpsDossierStatisticMgt); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month = ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + @Override + public int countByG_M_Y_G_D_GB(long groupId, int month, int year, + String govAgencyCode, String domainCode, int groupBy) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_G_M_Y_G_D_GB; + + Object[] finderArgs = new Object[] { + groupId, month, year, govAgencyCode, domainCode, groupBy + }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(7); + + query.append(_SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_GROUPID_2); + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_MONTH_2); + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_YEAR_2); + + boolean bindGovAgencyCode = false; + + if (govAgencyCode == null) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_GOVAGENCYCODE_1); + } + else if (govAgencyCode.equals("")) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_GOVAGENCYCODE_3); + } + else { + bindGovAgencyCode = true; + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_GOVAGENCYCODE_2); + } + + boolean bindDomainCode = false; + + if (domainCode == null) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_DOMAINCODE_1); + } + else if (domainCode.equals("")) { + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_DOMAINCODE_3); + } + else { + bindDomainCode = true; + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_DOMAINCODE_2); + } + + query.append(_FINDER_COLUMN_G_M_Y_G_D_GB_GROUPBY_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(month); + + qPos.add(year); + + if (bindGovAgencyCode) { + qPos.add(govAgencyCode); + } + + if (bindDomainCode) { + qPos.add(domainCode); + } + + qPos.add(groupBy); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_G_M_Y_G_D_GB_GROUPID_2 = "opencpsDossierStatisticMgt.groupId = ? AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_GB_MONTH_2 = "opencpsDossierStatisticMgt.month = ? AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_GB_YEAR_2 = "opencpsDossierStatisticMgt.year = ? AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_GB_GOVAGENCYCODE_1 = "opencpsDossierStatisticMgt.govAgencyCode IS NULL AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_GB_GOVAGENCYCODE_2 = "opencpsDossierStatisticMgt.govAgencyCode = ? AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_GB_GOVAGENCYCODE_3 = "(opencpsDossierStatisticMgt.govAgencyCode IS NULL OR opencpsDossierStatisticMgt.govAgencyCode = '') AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_GB_DOMAINCODE_1 = "opencpsDossierStatisticMgt.domainCode IS NULL AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_GB_DOMAINCODE_2 = "opencpsDossierStatisticMgt.domainCode = ? AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_GB_DOMAINCODE_3 = "(opencpsDossierStatisticMgt.domainCode IS NULL OR opencpsDossierStatisticMgt.domainCode = '') AND "; + private static final String _FINDER_COLUMN_G_M_Y_G_D_GB_GROUPBY_2 = "opencpsDossierStatisticMgt.groupBy = ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_NM_Y_GB = + new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_NM_Y_GB", + new String[] { + Long.class.getName(), Integer.class.getName(), + Integer.class.getName(), Integer.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_NM_Y_GB = + new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + Long.class, FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "countByG_NM_Y_GB", + new String[] { + Long.class.getName(), Integer.class.getName(), + Integer.class.getName(), Integer.class.getName() + }); + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + @Override + public List findByG_NM_Y_GB(long groupId, + int month, int year, int groupBy) { + return findByG_NM_Y_GB(groupId, month, year, groupBy, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_NM_Y_GB(long groupId, + int month, int year, int groupBy, int start, int end) { + return findByG_NM_Y_GB(groupId, month, year, groupBy, start, end, null); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_NM_Y_GB(long groupId, + int month, int year, int groupBy, int start, int end, + OrderByComparator orderByComparator) { + return findByG_NM_Y_GB(groupId, month, year, groupBy, start, end, + orderByComparator, true); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_NM_Y_GB(long groupId, + int month, int year, int groupBy, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_NM_Y_GB; + finderArgs = new Object[] { + groupId, month, year, groupBy, + + start, end, orderByComparator + }; + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : list) { + if ((groupId != opencpsDossierStatisticMgt.getGroupId()) || + (month == opencpsDossierStatisticMgt.getMonth()) || + (year != opencpsDossierStatisticMgt.getYear()) || + (groupBy != opencpsDossierStatisticMgt.getGroupBy())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(6); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_NM_Y_GB_GROUPID_2); + + query.append(_FINDER_COLUMN_G_NM_Y_GB_MONTH_2); + + query.append(_FINDER_COLUMN_G_NM_Y_GB_YEAR_2); + + query.append(_FINDER_COLUMN_G_NM_Y_GB_GROUPBY_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(month); + + qPos.add(year); + + qPos.add(groupBy); + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_NM_Y_GB_First(long groupId, + int month, int year, int groupBy, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_NM_Y_GB_First(groupId, + month, year, groupBy, orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(10); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", month="); + msg.append(month); + + msg.append(", year="); + msg.append(year); + + msg.append(", groupBy="); + msg.append(groupBy); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_NM_Y_GB_First(long groupId, + int month, int year, int groupBy, + OrderByComparator orderByComparator) { + List list = findByG_NM_Y_GB(groupId, month, + year, groupBy, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_NM_Y_GB_Last(long groupId, + int month, int year, int groupBy, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_NM_Y_GB_Last(groupId, + month, year, groupBy, orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(10); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", month="); + msg.append(month); + + msg.append(", year="); + msg.append(year); + + msg.append(", groupBy="); + msg.append(groupBy); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_NM_Y_GB_Last(long groupId, + int month, int year, int groupBy, + OrderByComparator orderByComparator) { + int count = countByG_NM_Y_GB(groupId, month, year, groupBy); + + if (count == 0) { + return null; + } + + List list = findByG_NM_Y_GB(groupId, month, + year, groupBy, count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt[] findByG_NM_Y_GB_PrevAndNext( + long dossierStatisticMgtId, long groupId, int month, int year, + int groupBy, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = findByPrimaryKey(dossierStatisticMgtId); + + Session session = null; + + try { + session = openSession(); + + OpencpsDossierStatisticMgt[] array = new OpencpsDossierStatisticMgtImpl[3]; + + array[0] = getByG_NM_Y_GB_PrevAndNext(session, + opencpsDossierStatisticMgt, groupId, month, year, groupBy, + orderByComparator, true); + + array[1] = opencpsDossierStatisticMgt; + + array[2] = getByG_NM_Y_GB_PrevAndNext(session, + opencpsDossierStatisticMgt, groupId, month, year, groupBy, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected OpencpsDossierStatisticMgt getByG_NM_Y_GB_PrevAndNext( + Session session, OpencpsDossierStatisticMgt opencpsDossierStatisticMgt, + long groupId, int month, int year, int groupBy, + OrderByComparator orderByComparator, + boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(7 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(6); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_NM_Y_GB_GROUPID_2); + + query.append(_FINDER_COLUMN_G_NM_Y_GB_MONTH_2); + + query.append(_FINDER_COLUMN_G_NM_Y_GB_YEAR_2); + + query.append(_FINDER_COLUMN_G_NM_Y_GB_GROUPBY_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(month); + + qPos.add(year); + + qPos.add(groupBy); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(opencpsDossierStatisticMgt); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + */ + @Override + public void removeByG_NM_Y_GB(long groupId, int month, int year, int groupBy) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : findByG_NM_Y_GB( + groupId, month, year, groupBy, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(opencpsDossierStatisticMgt); + } + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + @Override + public int countByG_NM_Y_GB(long groupId, int month, int year, int groupBy) { + FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_NM_Y_GB; + + Object[] finderArgs = new Object[] { groupId, month, year, groupBy }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(5); + + query.append(_SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_NM_Y_GB_GROUPID_2); + + query.append(_FINDER_COLUMN_G_NM_Y_GB_MONTH_2); + + query.append(_FINDER_COLUMN_G_NM_Y_GB_YEAR_2); + + query.append(_FINDER_COLUMN_G_NM_Y_GB_GROUPBY_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(month); + + qPos.add(year); + + qPos.add(groupBy); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_G_NM_Y_GB_GROUPID_2 = "opencpsDossierStatisticMgt.groupId = ? AND "; + private static final String _FINDER_COLUMN_G_NM_Y_GB_MONTH_2 = "opencpsDossierStatisticMgt.month != ? AND "; + private static final String _FINDER_COLUMN_G_NM_Y_GB_YEAR_2 = "opencpsDossierStatisticMgt.year = ? AND "; + private static final String _FINDER_COLUMN_G_NM_Y_GB_GROUPBY_2 = "opencpsDossierStatisticMgt.groupBy = ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_Y_REPO_GB = + new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_Y_REPO_GB", + new String[] { + Long.class.getName(), Integer.class.getName(), + Integer.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_Y_REPO_GB = + new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByG_Y_REPO_GB", + new String[] { + Long.class.getName(), Integer.class.getName(), + Integer.class.getName() + }, + OpencpsDossierStatisticMgtModelImpl.GROUPID_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.YEAR_COLUMN_BITMASK | + OpencpsDossierStatisticMgtModelImpl.GROUPBY_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_G_Y_REPO_GB = new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByG_Y_REPO_GB", + new String[] { + Long.class.getName(), Integer.class.getName(), + Integer.class.getName() + }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_Y_REPO_GB = + new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + Long.class, FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "countByG_Y_REPO_GB", + new String[] { + Long.class.getName(), Integer.class.getName(), + Integer.class.getName() + }); + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO_GB(long groupId, + int year, int groupBy) { + return findByG_Y_REPO_GB(groupId, year, groupBy, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO_GB(long groupId, + int year, int groupBy, int start, int end) { + return findByG_Y_REPO_GB(groupId, year, groupBy, start, end, null); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO_GB(long groupId, + int year, int groupBy, int start, int end, + OrderByComparator orderByComparator) { + return findByG_Y_REPO_GB(groupId, year, groupBy, start, end, + orderByComparator, true); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO_GB(long groupId, + int year, int groupBy, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_Y_REPO_GB; + finderArgs = new Object[] { groupId, year, groupBy }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_Y_REPO_GB; + finderArgs = new Object[] { + groupId, year, groupBy, + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : list) { + if ((groupId != opencpsDossierStatisticMgt.getGroupId()) || + (year != opencpsDossierStatisticMgt.getYear()) || + (groupBy != opencpsDossierStatisticMgt.getGroupBy())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_GROUPID_2); + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_YEAR_2); + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_GROUPBY_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(year); + + qPos.add(groupBy); + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_Y_REPO_GB_First(long groupId, + int year, int groupBy, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_Y_REPO_GB_First(groupId, + year, groupBy, orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", year="); + msg.append(year); + + msg.append(", groupBy="); + msg.append(groupBy); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_Y_REPO_GB_First(long groupId, + int year, int groupBy, + OrderByComparator orderByComparator) { + List list = findByG_Y_REPO_GB(groupId, + year, groupBy, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_Y_REPO_GB_Last(long groupId, + int year, int groupBy, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_Y_REPO_GB_Last(groupId, + year, groupBy, orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", year="); + msg.append(year); + + msg.append(", groupBy="); + msg.append(groupBy); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_Y_REPO_GB_Last(long groupId, + int year, int groupBy, + OrderByComparator orderByComparator) { + int count = countByG_Y_REPO_GB(groupId, year, groupBy); + + if (count == 0) { + return null; + } + + List list = findByG_Y_REPO_GB(groupId, + year, groupBy, count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and year = ? and groupBy = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt[] findByG_Y_REPO_GB_PrevAndNext( + long dossierStatisticMgtId, long groupId, int year, int groupBy, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = findByPrimaryKey(dossierStatisticMgtId); + + Session session = null; + + try { + session = openSession(); + + OpencpsDossierStatisticMgt[] array = new OpencpsDossierStatisticMgtImpl[3]; + + array[0] = getByG_Y_REPO_GB_PrevAndNext(session, + opencpsDossierStatisticMgt, groupId, year, groupBy, + orderByComparator, true); + + array[1] = opencpsDossierStatisticMgt; + + array[2] = getByG_Y_REPO_GB_PrevAndNext(session, + opencpsDossierStatisticMgt, groupId, year, groupBy, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected OpencpsDossierStatisticMgt getByG_Y_REPO_GB_PrevAndNext( + Session session, OpencpsDossierStatisticMgt opencpsDossierStatisticMgt, + long groupId, int year, int groupBy, + OrderByComparator orderByComparator, + boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(6 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(5); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_GROUPID_2); + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_YEAR_2); + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_GROUPBY_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(year); + + qPos.add(groupBy); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(opencpsDossierStatisticMgt); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and year = any ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO_GB(long groupId, + int[] years, int groupBy) { + return findByG_Y_REPO_GB(groupId, years, groupBy, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and year = any ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO_GB(long groupId, + int[] years, int groupBy, int start, int end) { + return findByG_Y_REPO_GB(groupId, years, groupBy, start, end, null); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = any ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param years the years + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO_GB(long groupId, + int[] years, int groupBy, int start, int end, + OrderByComparator orderByComparator) { + return findByG_Y_REPO_GB(groupId, years, groupBy, start, end, + orderByComparator, true); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?, optionally using the finder cache. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_Y_REPO_GB(long groupId, + int[] years, int groupBy, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + if (years == null) { + years = new int[0]; + } + else if (years.length > 1) { + years = ArrayUtil.unique(years); + + Arrays.sort(years); + } + + if (years.length == 1) { + return findByG_Y_REPO_GB(groupId, years[0], groupBy, start, end, + orderByComparator); + } + + boolean pagination = true; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderArgs = new Object[] { groupId, StringUtil.merge(years), groupBy }; + } + else { + finderArgs = new Object[] { + groupId, StringUtil.merge(years), groupBy, + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_Y_REPO_GB, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : list) { + if ((groupId != opencpsDossierStatisticMgt.getGroupId()) || + !ArrayUtil.contains(years, + opencpsDossierStatisticMgt.getYear()) || + (groupBy != opencpsDossierStatisticMgt.getGroupBy())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = new StringBundler(); + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_GROUPID_2); + + if (years.length > 0) { + query.append("("); + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_YEAR_7); + + query.append(StringUtil.merge(years)); + + query.append(")"); + + query.append(")"); + + query.append(WHERE_AND); + } + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_GROUPBY_2); + + query.setStringAt(removeConjunction(query.stringAt(query.index() - + 1)), query.index() - 1); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(groupBy); + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + finderCache.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_Y_REPO_GB, + finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_G_Y_REPO_GB, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + */ + @Override + public void removeByG_Y_REPO_GB(long groupId, int year, int groupBy) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : findByG_Y_REPO_GB( + groupId, year, groupBy, QueryUtil.ALL_POS, QueryUtil.ALL_POS, + null)) { + remove(opencpsDossierStatisticMgt); + } + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and year = ? and groupBy = ?. + * + * @param groupId the group ID + * @param year the year + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + @Override + public int countByG_Y_REPO_GB(long groupId, int year, int groupBy) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_G_Y_REPO_GB; + + Object[] finderArgs = new Object[] { groupId, year, groupBy }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_GROUPID_2); + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_YEAR_2); + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_GROUPBY_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(year); + + qPos.add(groupBy); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and year = any ? and groupBy = ?. + * + * @param groupId the group ID + * @param years the years + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + @Override + public int countByG_Y_REPO_GB(long groupId, int[] years, int groupBy) { + if (years == null) { + years = new int[0]; + } + else if (years.length > 1) { + years = ArrayUtil.unique(years); + + Arrays.sort(years); + } + + Object[] finderArgs = new Object[] { + groupId, StringUtil.merge(years), groupBy + }; + + Long count = (Long)finderCache.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_Y_REPO_GB, + finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(); + + query.append(_SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_GROUPID_2); + + if (years.length > 0) { + query.append("("); + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_YEAR_7); + + query.append(StringUtil.merge(years)); + + query.append(")"); + + query.append(")"); + + query.append(WHERE_AND); + } + + query.append(_FINDER_COLUMN_G_Y_REPO_GB_GROUPBY_2); + + query.setStringAt(removeConjunction(query.stringAt(query.index() - + 1)), query.index() - 1); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(groupBy); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_Y_REPO_GB, + finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_Y_REPO_GB, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_G_Y_REPO_GB_GROUPID_2 = "opencpsDossierStatisticMgt.groupId = ? AND "; + private static final String _FINDER_COLUMN_G_Y_REPO_GB_YEAR_2 = "opencpsDossierStatisticMgt.year = ? AND "; + private static final String _FINDER_COLUMN_G_Y_REPO_GB_YEAR_7 = "opencpsDossierStatisticMgt.year IN ("; + private static final String _FINDER_COLUMN_G_Y_REPO_GB_GROUPBY_2 = "opencpsDossierStatisticMgt.groupBy = ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_G_NM_Y_G_D_GB = + new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByG_NM_Y_G_D_GB", + new String[] { + Long.class.getName(), Integer.class.getName(), + Integer.class.getName(), String.class.getName(), + String.class.getName(), Integer.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_NM_Y_G_D_GB = + new FinderPath(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtModelImpl.FINDER_CACHE_ENABLED, + Long.class, FINDER_CLASS_NAME_LIST_WITH_PAGINATION, + "countByG_NM_Y_G_D_GB", + new String[] { + Long.class.getName(), Integer.class.getName(), + Integer.class.getName(), String.class.getName(), + String.class.getName(), Integer.class.getName() + }); + + /** + * Returns all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the matching opencps dossier statistic mgts + */ + @Override + public List findByG_NM_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy) { + return findByG_NM_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_NM_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy, int start, int end) { + return findByG_NM_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy, start, end, null); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_NM_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy, int start, int end, + OrderByComparator orderByComparator) { + return findByG_NM_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching opencps dossier statistic mgts + */ + @Override + public List findByG_NM_Y_G_D_GB(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_G_NM_Y_G_D_GB; + finderArgs = new Object[] { + groupId, month, year, govAgencyCode, domainCode, groupBy, + + start, end, orderByComparator + }; + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : list) { + if ((groupId != opencpsDossierStatisticMgt.getGroupId()) || + (month == opencpsDossierStatisticMgt.getMonth()) || + (year != opencpsDossierStatisticMgt.getYear()) || + !Objects.equals(govAgencyCode, + opencpsDossierStatisticMgt.getGovAgencyCode()) || + !Objects.equals(domainCode, + opencpsDossierStatisticMgt.getDomainCode()) || + (groupBy != opencpsDossierStatisticMgt.getGroupBy())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(8 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(8); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GROUPID_2); + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_MONTH_2); + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_YEAR_2); + + boolean bindGovAgencyCode = false; + + if (govAgencyCode == null) { + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GOVAGENCYCODE_1); + } + else if (govAgencyCode.equals("")) { + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GOVAGENCYCODE_3); + } + else { + bindGovAgencyCode = true; + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GOVAGENCYCODE_2); + } + + boolean bindDomainCode = false; + + if (domainCode == null) { + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_DOMAINCODE_1); + } + else if (domainCode.equals("")) { + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_DOMAINCODE_3); + } + else { + bindDomainCode = true; + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_DOMAINCODE_2); + } + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GROUPBY_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(month); + + qPos.add(year); + + if (bindGovAgencyCode) { + qPos.add(govAgencyCode); + } + + if (bindDomainCode) { + qPos.add(domainCode); + } + + qPos.add(groupBy); + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_NM_Y_G_D_GB_First(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_NM_Y_G_D_GB_First(groupId, + month, year, govAgencyCode, domainCode, groupBy, + orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(14); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", month="); + msg.append(month); + + msg.append(", year="); + msg.append(year); + + msg.append(", govAgencyCode="); + msg.append(govAgencyCode); + + msg.append(", domainCode="); + msg.append(domainCode); + + msg.append(", groupBy="); + msg.append(groupBy); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the first opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_NM_Y_G_D_GB_First(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy, + OrderByComparator orderByComparator) { + List list = findByG_NM_Y_G_D_GB(groupId, + month, year, govAgencyCode, domainCode, groupBy, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByG_NM_Y_G_D_GB_Last(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByG_NM_Y_G_D_GB_Last(groupId, + month, year, govAgencyCode, domainCode, groupBy, + orderByComparator); + + if (opencpsDossierStatisticMgt != null) { + return opencpsDossierStatisticMgt; + } + + StringBundler msg = new StringBundler(14); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", month="); + msg.append(month); + + msg.append(", year="); + msg.append(year); + + msg.append(", govAgencyCode="); + msg.append(govAgencyCode); + + msg.append(", domainCode="); + msg.append(domainCode); + + msg.append(", groupBy="); + msg.append(groupBy); + + msg.append("}"); + + throw new NoSuchOpencpsDossierStatisticMgtException(msg.toString()); + } + + /** + * Returns the last opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching opencps dossier statistic mgt, or null if a matching opencps dossier statistic mgt could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByG_NM_Y_G_D_GB_Last(long groupId, + int month, int year, String govAgencyCode, String domainCode, + int groupBy, + OrderByComparator orderByComparator) { + int count = countByG_NM_Y_G_D_GB(groupId, month, year, govAgencyCode, + domainCode, groupBy); + + if (count == 0) { + return null; + } + + List list = findByG_NM_Y_G_D_GB(groupId, + month, year, govAgencyCode, domainCode, groupBy, count - 1, + count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the opencps dossier statistic mgts before and after the current opencps dossier statistic mgt in the ordered set where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param dossierStatisticMgtId the primary key of the current opencps dossier statistic mgt + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt[] findByG_NM_Y_G_D_GB_PrevAndNext( + long dossierStatisticMgtId, long groupId, int month, int year, + String govAgencyCode, String domainCode, int groupBy, + OrderByComparator orderByComparator) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = findByPrimaryKey(dossierStatisticMgtId); + + Session session = null; + + try { + session = openSession(); + + OpencpsDossierStatisticMgt[] array = new OpencpsDossierStatisticMgtImpl[3]; + + array[0] = getByG_NM_Y_G_D_GB_PrevAndNext(session, + opencpsDossierStatisticMgt, groupId, month, year, + govAgencyCode, domainCode, groupBy, orderByComparator, true); + + array[1] = opencpsDossierStatisticMgt; + + array[2] = getByG_NM_Y_G_D_GB_PrevAndNext(session, + opencpsDossierStatisticMgt, groupId, month, year, + govAgencyCode, domainCode, groupBy, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected OpencpsDossierStatisticMgt getByG_NM_Y_G_D_GB_PrevAndNext( + Session session, OpencpsDossierStatisticMgt opencpsDossierStatisticMgt, + long groupId, int month, int year, String govAgencyCode, + String domainCode, int groupBy, + OrderByComparator orderByComparator, + boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(9 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(8); + } + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GROUPID_2); + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_MONTH_2); + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_YEAR_2); + + boolean bindGovAgencyCode = false; + + if (govAgencyCode == null) { + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GOVAGENCYCODE_1); + } + else if (govAgencyCode.equals("")) { + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GOVAGENCYCODE_3); + } + else { + bindGovAgencyCode = true; + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GOVAGENCYCODE_2); + } + + boolean bindDomainCode = false; + + if (domainCode == null) { + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_DOMAINCODE_1); + } + else if (domainCode.equals("")) { + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_DOMAINCODE_3); + } + else { + bindDomainCode = true; + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_DOMAINCODE_2); + } + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GROUPBY_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(month); + + qPos.add(year); + + if (bindGovAgencyCode) { + qPos.add(govAgencyCode); + } + + if (bindDomainCode) { + qPos.add(domainCode); + } + + qPos.add(groupBy); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(opencpsDossierStatisticMgt); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ? from the database. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + */ + @Override + public void removeByG_NM_Y_G_D_GB(long groupId, int month, int year, + String govAgencyCode, String domainCode, int groupBy) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : findByG_NM_Y_G_D_GB( + groupId, month, year, govAgencyCode, domainCode, groupBy, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(opencpsDossierStatisticMgt); + } + } + + /** + * Returns the number of opencps dossier statistic mgts where groupId = ? and month ≠ ? and year = ? and govAgencyCode = ? and domainCode = ? and groupBy = ?. + * + * @param groupId the group ID + * @param month the month + * @param year the year + * @param govAgencyCode the gov agency code + * @param domainCode the domain code + * @param groupBy the group by + * @return the number of matching opencps dossier statistic mgts + */ + @Override + public int countByG_NM_Y_G_D_GB(long groupId, int month, int year, + String govAgencyCode, String domainCode, int groupBy) { + FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_NM_Y_G_D_GB; + + Object[] finderArgs = new Object[] { + groupId, month, year, govAgencyCode, domainCode, groupBy + }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(7); + + query.append(_SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT_WHERE); + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GROUPID_2); + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_MONTH_2); + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_YEAR_2); + + boolean bindGovAgencyCode = false; + + if (govAgencyCode == null) { + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GOVAGENCYCODE_1); + } + else if (govAgencyCode.equals("")) { + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GOVAGENCYCODE_3); + } + else { + bindGovAgencyCode = true; + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GOVAGENCYCODE_2); + } + + boolean bindDomainCode = false; + + if (domainCode == null) { + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_DOMAINCODE_1); + } + else if (domainCode.equals("")) { + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_DOMAINCODE_3); + } + else { + bindDomainCode = true; + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_DOMAINCODE_2); + } + + query.append(_FINDER_COLUMN_G_NM_Y_G_D_GB_GROUPBY_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + qPos.add(month); + + qPos.add(year); + + if (bindGovAgencyCode) { + qPos.add(govAgencyCode); + } + + if (bindDomainCode) { + qPos.add(domainCode); + } + + qPos.add(groupBy); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_G_NM_Y_G_D_GB_GROUPID_2 = "opencpsDossierStatisticMgt.groupId = ? AND "; + private static final String _FINDER_COLUMN_G_NM_Y_G_D_GB_MONTH_2 = "opencpsDossierStatisticMgt.month != ? AND "; + private static final String _FINDER_COLUMN_G_NM_Y_G_D_GB_YEAR_2 = "opencpsDossierStatisticMgt.year = ? AND "; + private static final String _FINDER_COLUMN_G_NM_Y_G_D_GB_GOVAGENCYCODE_1 = "opencpsDossierStatisticMgt.govAgencyCode IS NULL AND "; + private static final String _FINDER_COLUMN_G_NM_Y_G_D_GB_GOVAGENCYCODE_2 = "opencpsDossierStatisticMgt.govAgencyCode = ? AND "; + private static final String _FINDER_COLUMN_G_NM_Y_G_D_GB_GOVAGENCYCODE_3 = "(opencpsDossierStatisticMgt.govAgencyCode IS NULL OR opencpsDossierStatisticMgt.govAgencyCode = '') AND "; + private static final String _FINDER_COLUMN_G_NM_Y_G_D_GB_DOMAINCODE_1 = "opencpsDossierStatisticMgt.domainCode IS NULL AND "; + private static final String _FINDER_COLUMN_G_NM_Y_G_D_GB_DOMAINCODE_2 = "opencpsDossierStatisticMgt.domainCode = ? AND "; + private static final String _FINDER_COLUMN_G_NM_Y_G_D_GB_DOMAINCODE_3 = "(opencpsDossierStatisticMgt.domainCode IS NULL OR opencpsDossierStatisticMgt.domainCode = '') AND "; + private static final String _FINDER_COLUMN_G_NM_Y_G_D_GB_GROUPBY_2 = "opencpsDossierStatisticMgt.groupBy = ?"; + + public OpencpsDossierStatisticMgtPersistenceImpl() { + setModelClass(OpencpsDossierStatisticMgt.class); + + try { + Field field = BasePersistenceImpl.class.getDeclaredField( + "_dbColumnNames"); + + field.setAccessible(true); + + Map dbColumnNames = new HashMap(); + + dbColumnNames.put("uuid", "uuid_"); + + field.set(this, dbColumnNames); + } + catch (Exception e) { + if (_log.isDebugEnabled()) { + _log.debug(e, e); + } + } + } + + /** + * Caches the opencps dossier statistic mgt in the entity cache if it is enabled. + * + * @param opencpsDossierStatisticMgt the opencps dossier statistic mgt + */ + @Override + public void cacheResult( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + entityCache.putResult(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + opencpsDossierStatisticMgt.getPrimaryKey(), + opencpsDossierStatisticMgt); + + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, + new Object[] { + opencpsDossierStatisticMgt.getUuid(), + opencpsDossierStatisticMgt.getGroupId() + }, opencpsDossierStatisticMgt); + + finderCache.putResult(FINDER_PATH_FETCH_BY_G_M_Y_G_D, + new Object[] { + opencpsDossierStatisticMgt.getGroupId(), + opencpsDossierStatisticMgt.getMonth(), + opencpsDossierStatisticMgt.getYear(), + opencpsDossierStatisticMgt.getGovAgencyCode(), + opencpsDossierStatisticMgt.getDomainCode() + }, opencpsDossierStatisticMgt); + + finderCache.putResult(FINDER_PATH_FETCH_BY_G_M_Y_G_D_GB, + new Object[] { + opencpsDossierStatisticMgt.getGroupId(), + opencpsDossierStatisticMgt.getMonth(), + opencpsDossierStatisticMgt.getYear(), + opencpsDossierStatisticMgt.getGovAgencyCode(), + opencpsDossierStatisticMgt.getDomainCode(), + opencpsDossierStatisticMgt.getGroupBy() + }, opencpsDossierStatisticMgt); + + opencpsDossierStatisticMgt.resetOriginalValues(); + } + + /** + * Caches the opencps dossier statistic mgts in the entity cache if it is enabled. + * + * @param opencpsDossierStatisticMgts the opencps dossier statistic mgts + */ + @Override + public void cacheResult( + List opencpsDossierStatisticMgts) { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : opencpsDossierStatisticMgts) { + if (entityCache.getResult( + OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + opencpsDossierStatisticMgt.getPrimaryKey()) == null) { + cacheResult(opencpsDossierStatisticMgt); + } + else { + opencpsDossierStatisticMgt.resetOriginalValues(); + } + } + } + + /** + * Clears the cache for all opencps dossier statistic mgts. + * + *

+ * The {@link EntityCache} and {@link FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache() { + entityCache.clearCache(OpencpsDossierStatisticMgtImpl.class); + + finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + /** + * Clears the cache for the opencps dossier statistic mgt. + * + *

+ * The {@link EntityCache} and {@link FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + entityCache.removeResult(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + opencpsDossierStatisticMgt.getPrimaryKey()); + + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + clearUniqueFindersCache((OpencpsDossierStatisticMgtModelImpl)opencpsDossierStatisticMgt, + true); + } + + @Override + public void clearCache( + List opencpsDossierStatisticMgts) { + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : opencpsDossierStatisticMgts) { + entityCache.removeResult(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + opencpsDossierStatisticMgt.getPrimaryKey()); + + clearUniqueFindersCache((OpencpsDossierStatisticMgtModelImpl)opencpsDossierStatisticMgt, + true); + } + } + + protected void cacheUniqueFindersCache( + OpencpsDossierStatisticMgtModelImpl opencpsDossierStatisticMgtModelImpl) { + Object[] args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getUuid(), + opencpsDossierStatisticMgtModelImpl.getGroupId() + }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, + Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, + opencpsDossierStatisticMgtModelImpl, false); + + args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getGroupId(), + opencpsDossierStatisticMgtModelImpl.getMonth(), + opencpsDossierStatisticMgtModelImpl.getYear(), + opencpsDossierStatisticMgtModelImpl.getGovAgencyCode(), + opencpsDossierStatisticMgtModelImpl.getDomainCode() + }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_G_M_Y_G_D, args, + Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_G_M_Y_G_D, args, + opencpsDossierStatisticMgtModelImpl, false); + + args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getGroupId(), + opencpsDossierStatisticMgtModelImpl.getMonth(), + opencpsDossierStatisticMgtModelImpl.getYear(), + opencpsDossierStatisticMgtModelImpl.getGovAgencyCode(), + opencpsDossierStatisticMgtModelImpl.getDomainCode(), + opencpsDossierStatisticMgtModelImpl.getGroupBy() + }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_G_M_Y_G_D_GB, args, + Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_G_M_Y_G_D_GB, args, + opencpsDossierStatisticMgtModelImpl, false); + } + + protected void clearUniqueFindersCache( + OpencpsDossierStatisticMgtModelImpl opencpsDossierStatisticMgtModelImpl, + boolean clearCurrent) { + if (clearCurrent) { + Object[] args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getUuid(), + opencpsDossierStatisticMgtModelImpl.getGroupId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); + } + + if ((opencpsDossierStatisticMgtModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getOriginalUuid(), + opencpsDossierStatisticMgtModelImpl.getOriginalGroupId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); + } + + if (clearCurrent) { + Object[] args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getGroupId(), + opencpsDossierStatisticMgtModelImpl.getMonth(), + opencpsDossierStatisticMgtModelImpl.getYear(), + opencpsDossierStatisticMgtModelImpl.getGovAgencyCode(), + opencpsDossierStatisticMgtModelImpl.getDomainCode() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_M_Y_G_D, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_G_M_Y_G_D, args); + } + + if ((opencpsDossierStatisticMgtModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_G_M_Y_G_D.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getOriginalGroupId(), + opencpsDossierStatisticMgtModelImpl.getOriginalMonth(), + opencpsDossierStatisticMgtModelImpl.getOriginalYear(), + opencpsDossierStatisticMgtModelImpl.getOriginalGovAgencyCode(), + opencpsDossierStatisticMgtModelImpl.getOriginalDomainCode() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_M_Y_G_D, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_G_M_Y_G_D, args); + } + + if (clearCurrent) { + Object[] args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getGroupId(), + opencpsDossierStatisticMgtModelImpl.getMonth(), + opencpsDossierStatisticMgtModelImpl.getYear(), + opencpsDossierStatisticMgtModelImpl.getGovAgencyCode(), + opencpsDossierStatisticMgtModelImpl.getDomainCode(), + opencpsDossierStatisticMgtModelImpl.getGroupBy() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_M_Y_G_D_GB, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_G_M_Y_G_D_GB, args); + } + + if ((opencpsDossierStatisticMgtModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_G_M_Y_G_D_GB.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getOriginalGroupId(), + opencpsDossierStatisticMgtModelImpl.getOriginalMonth(), + opencpsDossierStatisticMgtModelImpl.getOriginalYear(), + opencpsDossierStatisticMgtModelImpl.getOriginalGovAgencyCode(), + opencpsDossierStatisticMgtModelImpl.getOriginalDomainCode(), + opencpsDossierStatisticMgtModelImpl.getOriginalGroupBy() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_M_Y_G_D_GB, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_G_M_Y_G_D_GB, args); + } + } + + /** + * Creates a new opencps dossier statistic mgt with the primary key. Does not add the opencps dossier statistic mgt to the database. + * + * @param dossierStatisticMgtId the primary key for the new opencps dossier statistic mgt + * @return the new opencps dossier statistic mgt + */ + @Override + public OpencpsDossierStatisticMgt create(long dossierStatisticMgtId) { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = new OpencpsDossierStatisticMgtImpl(); + + opencpsDossierStatisticMgt.setNew(true); + opencpsDossierStatisticMgt.setPrimaryKey(dossierStatisticMgtId); + + String uuid = PortalUUIDUtil.generate(); + + opencpsDossierStatisticMgt.setUuid(uuid); + + return opencpsDossierStatisticMgt; + } + + /** + * Removes the opencps dossier statistic mgt with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was removed + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt remove(long dossierStatisticMgtId) + throws NoSuchOpencpsDossierStatisticMgtException { + return remove((Serializable)dossierStatisticMgtId); + } + + /** + * Removes the opencps dossier statistic mgt with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param primaryKey the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt that was removed + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt remove(Serializable primaryKey) + throws NoSuchOpencpsDossierStatisticMgtException { + Session session = null; + + try { + session = openSession(); + + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = (OpencpsDossierStatisticMgt)session.get(OpencpsDossierStatisticMgtImpl.class, + primaryKey); + + if (opencpsDossierStatisticMgt == null) { + if (_log.isDebugEnabled()) { + _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchOpencpsDossierStatisticMgtException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return remove(opencpsDossierStatisticMgt); + } + catch (NoSuchOpencpsDossierStatisticMgtException nsee) { + throw nsee; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + @Override + protected OpencpsDossierStatisticMgt removeImpl( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + Session session = null; + + try { + session = openSession(); + + if (!session.contains(opencpsDossierStatisticMgt)) { + opencpsDossierStatisticMgt = (OpencpsDossierStatisticMgt)session.get(OpencpsDossierStatisticMgtImpl.class, + opencpsDossierStatisticMgt.getPrimaryKeyObj()); + } + + if (opencpsDossierStatisticMgt != null) { + session.delete(opencpsDossierStatisticMgt); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + if (opencpsDossierStatisticMgt != null) { + clearCache(opencpsDossierStatisticMgt); + } + + return opencpsDossierStatisticMgt; + } + + @Override + public OpencpsDossierStatisticMgt updateImpl( + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt) { + boolean isNew = opencpsDossierStatisticMgt.isNew(); + + if (!(opencpsDossierStatisticMgt instanceof OpencpsDossierStatisticMgtModelImpl)) { + InvocationHandler invocationHandler = null; + + if (ProxyUtil.isProxyClass(opencpsDossierStatisticMgt.getClass())) { + invocationHandler = ProxyUtil.getInvocationHandler(opencpsDossierStatisticMgt); + + throw new IllegalArgumentException( + "Implement ModelWrapper in opencpsDossierStatisticMgt proxy " + + invocationHandler.getClass()); + } + + throw new IllegalArgumentException( + "Implement ModelWrapper in custom OpencpsDossierStatisticMgt implementation " + + opencpsDossierStatisticMgt.getClass()); + } + + OpencpsDossierStatisticMgtModelImpl opencpsDossierStatisticMgtModelImpl = (OpencpsDossierStatisticMgtModelImpl)opencpsDossierStatisticMgt; + + if (Validator.isNull(opencpsDossierStatisticMgt.getUuid())) { + String uuid = PortalUUIDUtil.generate(); + + opencpsDossierStatisticMgt.setUuid(uuid); + } + + ServiceContext serviceContext = ServiceContextThreadLocal.getServiceContext(); + + Date now = new Date(); + + if (isNew && (opencpsDossierStatisticMgt.getCreateDate() == null)) { + if (serviceContext == null) { + opencpsDossierStatisticMgt.setCreateDate(now); + } + else { + opencpsDossierStatisticMgt.setCreateDate(serviceContext.getCreateDate( + now)); + } + } + + if (!opencpsDossierStatisticMgtModelImpl.hasSetModifiedDate()) { + if (serviceContext == null) { + opencpsDossierStatisticMgt.setModifiedDate(now); + } + else { + opencpsDossierStatisticMgt.setModifiedDate(serviceContext.getModifiedDate( + now)); + } + } + + Session session = null; + + try { + session = openSession(); + + if (opencpsDossierStatisticMgt.isNew()) { + session.save(opencpsDossierStatisticMgt); + + opencpsDossierStatisticMgt.setNew(false); + } + else { + opencpsDossierStatisticMgt = (OpencpsDossierStatisticMgt)session.merge(opencpsDossierStatisticMgt); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + + if (!OpencpsDossierStatisticMgtModelImpl.COLUMN_BITMASK_ENABLED) { + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + else + if (isNew) { + Object[] args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getUuid() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + + args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getGroupId(), + opencpsDossierStatisticMgtModelImpl.getUserId(), + opencpsDossierStatisticMgtModelImpl.getYear() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_UID_Y, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_UID_Y, + args); + + args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getGroupId(), + opencpsDossierStatisticMgtModelImpl.getYear() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_Y_REPO, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_Y_REPO, + args); + + args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getGroupId(), + opencpsDossierStatisticMgtModelImpl.getUserId(), + opencpsDossierStatisticMgtModelImpl.getYear(), + opencpsDossierStatisticMgtModelImpl.getGroupBy() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_UID_Y_GB, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_UID_Y_GB, + args); + + args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getGroupId(), + opencpsDossierStatisticMgtModelImpl.getYear(), + opencpsDossierStatisticMgtModelImpl.getGroupBy() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_Y_REPO_GB, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_Y_REPO_GB, + args); + + finderCache.removeResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL, + FINDER_ARGS_EMPTY); + } + + else { + if ((opencpsDossierStatisticMgtModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getOriginalUuid() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + + args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getUuid() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + } + + if ((opencpsDossierStatisticMgtModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_UID_Y.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getOriginalGroupId(), + opencpsDossierStatisticMgtModelImpl.getOriginalUserId(), + opencpsDossierStatisticMgtModelImpl.getOriginalYear() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_UID_Y, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_UID_Y, + args); + + args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getGroupId(), + opencpsDossierStatisticMgtModelImpl.getUserId(), + opencpsDossierStatisticMgtModelImpl.getYear() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_UID_Y, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_UID_Y, + args); + } + + if ((opencpsDossierStatisticMgtModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_Y_REPO.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getOriginalGroupId(), + opencpsDossierStatisticMgtModelImpl.getOriginalYear() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_Y_REPO, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_Y_REPO, + args); + + args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getGroupId(), + opencpsDossierStatisticMgtModelImpl.getYear() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_Y_REPO, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_Y_REPO, + args); + } + + if ((opencpsDossierStatisticMgtModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_UID_Y_GB.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getOriginalGroupId(), + opencpsDossierStatisticMgtModelImpl.getOriginalUserId(), + opencpsDossierStatisticMgtModelImpl.getOriginalYear(), + opencpsDossierStatisticMgtModelImpl.getOriginalGroupBy() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_UID_Y_GB, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_UID_Y_GB, + args); + + args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getGroupId(), + opencpsDossierStatisticMgtModelImpl.getUserId(), + opencpsDossierStatisticMgtModelImpl.getYear(), + opencpsDossierStatisticMgtModelImpl.getGroupBy() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_UID_Y_GB, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_UID_Y_GB, + args); + } + + if ((opencpsDossierStatisticMgtModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_Y_REPO_GB.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getOriginalGroupId(), + opencpsDossierStatisticMgtModelImpl.getOriginalYear(), + opencpsDossierStatisticMgtModelImpl.getOriginalGroupBy() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_Y_REPO_GB, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_Y_REPO_GB, + args); + + args = new Object[] { + opencpsDossierStatisticMgtModelImpl.getGroupId(), + opencpsDossierStatisticMgtModelImpl.getYear(), + opencpsDossierStatisticMgtModelImpl.getGroupBy() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_G_Y_REPO_GB, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_G_Y_REPO_GB, + args); + } + } + + entityCache.putResult(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, + opencpsDossierStatisticMgt.getPrimaryKey(), + opencpsDossierStatisticMgt, false); + + clearUniqueFindersCache(opencpsDossierStatisticMgtModelImpl, false); + cacheUniqueFindersCache(opencpsDossierStatisticMgtModelImpl); + + opencpsDossierStatisticMgt.resetOriginalValues(); + + return opencpsDossierStatisticMgt; + } + + /** + * Returns the opencps dossier statistic mgt with the primary key or throws a {@link com.liferay.portal.kernel.exception.NoSuchModelException} if it could not be found. + * + * @param primaryKey the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByPrimaryKey(Serializable primaryKey) + throws NoSuchOpencpsDossierStatisticMgtException { + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByPrimaryKey(primaryKey); + + if (opencpsDossierStatisticMgt == null) { + if (_log.isDebugEnabled()) { + _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchOpencpsDossierStatisticMgtException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return opencpsDossierStatisticMgt; + } + + /** + * Returns the opencps dossier statistic mgt with the primary key or throws a {@link NoSuchOpencpsDossierStatisticMgtException} if it could not be found. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt + * @throws NoSuchOpencpsDossierStatisticMgtException if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt findByPrimaryKey( + long dossierStatisticMgtId) + throws NoSuchOpencpsDossierStatisticMgtException { + return findByPrimaryKey((Serializable)dossierStatisticMgtId); + } + + /** + * Returns the opencps dossier statistic mgt with the primary key or returns null if it could not be found. + * + * @param primaryKey the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt, or null if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByPrimaryKey(Serializable primaryKey) { + Serializable serializable = entityCache.getResult(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, primaryKey); + + if (serializable == nullModel) { + return null; + } + + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = (OpencpsDossierStatisticMgt)serializable; + + if (opencpsDossierStatisticMgt == null) { + Session session = null; + + try { + session = openSession(); + + opencpsDossierStatisticMgt = (OpencpsDossierStatisticMgt)session.get(OpencpsDossierStatisticMgtImpl.class, + primaryKey); + + if (opencpsDossierStatisticMgt != null) { + cacheResult(opencpsDossierStatisticMgt); + } + else { + entityCache.putResult(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, primaryKey, + nullModel); + } + } + catch (Exception e) { + entityCache.removeResult(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, primaryKey); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return opencpsDossierStatisticMgt; + } + + /** + * Returns the opencps dossier statistic mgt with the primary key or returns null if it could not be found. + * + * @param dossierStatisticMgtId the primary key of the opencps dossier statistic mgt + * @return the opencps dossier statistic mgt, or null if a opencps dossier statistic mgt with the primary key could not be found + */ + @Override + public OpencpsDossierStatisticMgt fetchByPrimaryKey( + long dossierStatisticMgtId) { + return fetchByPrimaryKey((Serializable)dossierStatisticMgtId); + } + + @Override + public Map fetchByPrimaryKeys( + Set primaryKeys) { + if (primaryKeys.isEmpty()) { + return Collections.emptyMap(); + } + + Map map = new HashMap(); + + if (primaryKeys.size() == 1) { + Iterator iterator = primaryKeys.iterator(); + + Serializable primaryKey = iterator.next(); + + OpencpsDossierStatisticMgt opencpsDossierStatisticMgt = fetchByPrimaryKey(primaryKey); + + if (opencpsDossierStatisticMgt != null) { + map.put(primaryKey, opencpsDossierStatisticMgt); + } + + return map; + } + + Set uncachedPrimaryKeys = null; + + for (Serializable primaryKey : primaryKeys) { + Serializable serializable = entityCache.getResult(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, primaryKey); + + if (serializable != nullModel) { + if (serializable == null) { + if (uncachedPrimaryKeys == null) { + uncachedPrimaryKeys = new HashSet(); + } + + uncachedPrimaryKeys.add(primaryKey); + } + else { + map.put(primaryKey, (OpencpsDossierStatisticMgt)serializable); + } + } + } + + if (uncachedPrimaryKeys == null) { + return map; + } + + StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) + + 1); + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE_PKS_IN); + + for (Serializable primaryKey : uncachedPrimaryKeys) { + query.append((long)primaryKey); + + query.append(","); + } + + query.setIndex(query.index() - 1); + + query.append(")"); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : (List)q.list()) { + map.put(opencpsDossierStatisticMgt.getPrimaryKeyObj(), + opencpsDossierStatisticMgt); + + cacheResult(opencpsDossierStatisticMgt); + + uncachedPrimaryKeys.remove(opencpsDossierStatisticMgt.getPrimaryKeyObj()); + } + + for (Serializable primaryKey : uncachedPrimaryKeys) { + entityCache.putResult(OpencpsDossierStatisticMgtModelImpl.ENTITY_CACHE_ENABLED, + OpencpsDossierStatisticMgtImpl.class, primaryKey, nullModel); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + return map; + } + + /** + * Returns all the opencps dossier statistic mgts. + * + * @return the opencps dossier statistic mgts + */ + @Override + public List findAll() { + return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the opencps dossier statistic mgts. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @return the range of opencps dossier statistic mgts + */ + @Override + public List findAll(int start, int end) { + return findAll(start, end, null); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of opencps dossier statistic mgts + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator) { + return findAll(start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the opencps dossier statistic mgts. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link OpencpsDossierStatisticMgtModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of opencps dossier statistic mgts + * @param end the upper bound of the range of opencps dossier statistic mgts (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of opencps dossier statistic mgts + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL; + finderArgs = FINDER_ARGS_EMPTY; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL; + finderArgs = new Object[] { start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + } + + if (list == null) { + StringBundler query = null; + String sql = null; + + if (orderByComparator != null) { + query = new StringBundler(2 + + (orderByComparator.getOrderByFields().length * 2)); + + query.append(_SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT); + + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + + sql = query.toString(); + } + else { + sql = _SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT; + + if (pagination) { + sql = sql.concat(OpencpsDossierStatisticMgtModelImpl.ORDER_BY_JPQL); + } + } + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + if (!pagination) { + list = (List)QueryUtil.list(q, + getDialect(), start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, + getDialect(), start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Removes all the opencps dossier statistic mgts from the database. + * + */ + @Override + public void removeAll() { + for (OpencpsDossierStatisticMgt opencpsDossierStatisticMgt : findAll()) { + remove(opencpsDossierStatisticMgt); + } + } + + /** + * Returns the number of opencps dossier statistic mgts. + * + * @return the number of opencps dossier statistic mgts + */ + @Override + public int countAll() { + Long count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, this); + + if (count == null) { + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(_SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY, + count); + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + @Override + public Set getBadColumnNames() { + return _badColumnNames; + } + + @Override + protected Map getTableColumnsMap() { + return OpencpsDossierStatisticMgtModelImpl.TABLE_COLUMNS_MAP; + } + + /** + * Initializes the opencps dossier statistic mgt persistence. + */ + public void afterPropertiesSet() { + } + + public void destroy() { + entityCache.removeCache(OpencpsDossierStatisticMgtImpl.class.getName()); + finderCache.removeCache(FINDER_CLASS_NAME_ENTITY); + finderCache.removeCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + @ServiceReference(type = EntityCache.class) + protected EntityCache entityCache; + @ServiceReference(type = FinderCache.class) + protected FinderCache finderCache; + private static final String _SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT = "SELECT opencpsDossierStatisticMgt FROM OpencpsDossierStatisticMgt opencpsDossierStatisticMgt"; + private static final String _SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE_PKS_IN = + "SELECT opencpsDossierStatisticMgt FROM OpencpsDossierStatisticMgt opencpsDossierStatisticMgt WHERE dossierStatisticMgtId IN ("; + private static final String _SQL_SELECT_OPENCPSDOSSIERSTATISTICMGT_WHERE = "SELECT opencpsDossierStatisticMgt FROM OpencpsDossierStatisticMgt opencpsDossierStatisticMgt WHERE "; + private static final String _SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT = "SELECT COUNT(opencpsDossierStatisticMgt) FROM OpencpsDossierStatisticMgt opencpsDossierStatisticMgt"; + private static final String _SQL_COUNT_OPENCPSDOSSIERSTATISTICMGT_WHERE = "SELECT COUNT(opencpsDossierStatisticMgt) FROM OpencpsDossierStatisticMgt opencpsDossierStatisticMgt WHERE "; + private static final String _ORDER_BY_ENTITY_ALIAS = "opencpsDossierStatisticMgt."; + private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No OpencpsDossierStatisticMgt exists with the primary key "; + private static final String _NO_SUCH_ENTITY_WITH_KEY = "No OpencpsDossierStatisticMgt exists with the key {"; + private static final Log _log = LogFactoryUtil.getLog(OpencpsDossierStatisticMgtPersistenceImpl.class); + private static final Set _badColumnNames = SetUtil.fromArray(new String[] { + "uuid" + }); +} \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/custom-sql/default.xml b/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/custom-sql/default.xml index caa8529748..012c64734a 100644 --- a/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/custom-sql/default.xml +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/custom-sql/default.xml @@ -155,5 +155,32 @@ (opencps_statistic.year = ?) ]]> + + + + + + \ No newline at end of file diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/module-hbm.xml b/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/module-hbm.xml index 55310ce402..cd970f0045 100644 --- a/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/module-hbm.xml +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/module-hbm.xml @@ -4,6 +4,7 @@ + @@ -118,6 +119,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/portlet-model-hints.xml b/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/portlet-model-hints.xml index 5356d16998..b64f27a39b 100644 --- a/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/portlet-model-hints.xml +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/portlet-model-hints.xml @@ -133,6 +133,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/spring/module-spring.xml b/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/spring/module-spring.xml index 9066580c60..85cbd5803d 100644 --- a/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/spring/module-spring.xml +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/spring/module-spring.xml @@ -13,6 +13,9 @@ + + + diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/sql/indexes.sql b/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/sql/indexes.sql index a3d325e335..78a8f2be59 100644 --- a/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/sql/indexes.sql +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/sql/indexes.sql @@ -34,6 +34,12 @@ create index IX_92F320F7 on opencps_statistic_manual (groupId, userId, year); create index IX_20BED492 on opencps_statistic_manual (uuid_[$COLUMN_LENGTH:75$], companyId); create unique index IX_2AB75794 on opencps_statistic_manual (uuid_[$COLUMN_LENGTH:75$], groupId); +create index IX_51229356 on opencps_statistic_mgt (groupId, month, year, govAgencyCode[$COLUMN_LENGTH:75$], domainCode[$COLUMN_LENGTH:75$], groupBy); +create index IX_D6AC5AC1 on opencps_statistic_mgt (groupId, month, year, groupBy); +create index IX_4F81843F on opencps_statistic_mgt (groupId, userId, year, groupBy); +create index IX_75D67BB9 on opencps_statistic_mgt (groupId, year, groupBy); +create unique index IX_3CCC2204 on opencps_statistic_mgt (uuid_[$COLUMN_LENGTH:75$], groupId); + create index IX_728E9BFE on opencps_voting_statistic (companyId, groupId, month, year); create index IX_FB6F8193 on opencps_voting_statistic (groupId, domainCode[$COLUMN_LENGTH:255$], month, year); create index IX_4CB1A625 on opencps_voting_statistic (groupId, month, year, govAgencyCode[$COLUMN_LENGTH:255$], domainCode[$COLUMN_LENGTH:255$], votingCode[$COLUMN_LENGTH:255$]); diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/sql/tables.sql b/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/sql/tables.sql index 134960b6ef..2f51637ce7 100644 --- a/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/sql/tables.sql +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/META-INF/sql/tables.sql @@ -134,6 +134,44 @@ create table opencps_statistic_manual ( fromViaPostalCount INTEGER ); +create table opencps_statistic_mgt ( + uuid_ VARCHAR(75) null, + dossierStatisticMgtId LONG not null primary key, + groupId LONG, + userId LONG, + userName VARCHAR(75) null, + createDate DATE null, + modifiedDate DATE null, + month INTEGER, + year INTEGER, + totalCount INTEGER, + processCount INTEGER, + remainingCount INTEGER, + receivedCount INTEGER, + onlineCount INTEGER, + onegateCount INTEGER, + releaseCount INTEGER, + betimesCount INTEGER, + ontimeCount INTEGER, + overtimeCount INTEGER, + doneCount INTEGER, + releasingCount INTEGER, + processingCount INTEGER, + undueCount INTEGER, + overdueCount INTEGER, + ontimePercentage INTEGER, + waitingCount INTEGER, + govAgencyCode VARCHAR(75) null, + govAgencyName VARCHAR(75) null, + domainCode VARCHAR(75) null, + domainName VARCHAR(75) null, + serviceCode VARCHAR(75) null, + serviceName VARCHAR(75) null, + groupBy INTEGER, + cancelledCount INTEGER, + unresolvedCount INTEGER +); + create table opencps_voting_statistic ( uuid_ VARCHAR(75) null, votingStatisticId LONG not null primary key, diff --git a/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/service.properties b/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/service.properties index 55c9f97dac..37a84578ad 100644 --- a/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/service.properties +++ b/modules/backend-statistic-service/backend-statistic-service-service/src/main/resources/service.properties @@ -13,5 +13,5 @@ ## build.namespace=statistic - build.number=1209 - build.date=1622177208675 \ No newline at end of file + build.number=1237 + build.date=1623386788191 \ No newline at end of file diff --git a/modules/backend-statisticmgt/build.gradle b/modules/backend-statisticmgt/build.gradle index d2b3398193..fde5851573 100644 --- a/modules/backend-statisticmgt/build.gradle +++ b/modules/backend-statisticmgt/build.gradle @@ -21,6 +21,9 @@ dependencies { compile group: 'org.apache.cxf', name: 'cxf-rt-rs-client', version: '3.0.3' compileOnly project(":modules:backend-usermgt:backend-usermgt-api") compileOnly project(":modules:backend-usermgt:backend-usermgt-service") + compileOnly project(":modules:backend-statistic-service:backend-statistic-service-api") + compileOnly project(":modules:backend-auth") + compile project(":modules:backend-bundlemgt") //compile project(":modules:backend-exportmgt") // Use JUnit test framework diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/application/StatisticApplication.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/application/StatisticApplication.java index 976dd02b7d..d560bfce9b 100644 --- a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/application/StatisticApplication.java +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/application/StatisticApplication.java @@ -1,5 +1,8 @@ package org.opencps.backend.statisticmgt.application; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONObject; import com.liferay.portal.kernel.model.Company; import com.liferay.portal.kernel.model.User; @@ -16,6 +19,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.BeanParam; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.POST; @@ -30,6 +34,10 @@ import org.opencps.backend.statisticmgt.context.LocaleContextProvider; import org.opencps.backend.statisticmgt.context.ServiceContextProvider; import org.opencps.backend.statisticmgt.context.UserContextProvider; +import org.opencps.backend.statisticmgt.dto.DossierStatisticMgtFinderService; +import org.opencps.backend.statisticmgt.dto.DossierStatisticMgtFinderServiceImpl; +import org.opencps.backend.statisticmgt.dto.DossierStatisticMgtResponse; +import org.opencps.backend.statisticmgt.dto.DossierStatisticMgtSearchModel; import org.opencps.backend.statisticmgt.util.ActionUtil; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; @@ -43,6 +51,7 @@ JaxrsWhiteboardConstants.JAX_RS_NAME + "=OpenCPS.statistic" }, service = Application.class) public class StatisticApplication extends Application { + public Set getSingletons() { Set singletons = new HashSet<>(); @@ -207,7 +216,20 @@ public Response exportGroupCountDossier(@Context HttpServletRequest request, @Co return Response.status(HttpURLConnection.HTTP_NO_CONTENT).build(); } } - + + @GET + @Path("/dossier/report") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public Response getReport(@Context HttpServletRequest request, @Context HttpServletResponse response, + @Context HttpHeaders header, @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, @BeanParam DossierStatisticMgtSearchModel query){ + + DossierStatisticMgtResponse doMgtResponse = ActionUtil.searchDossierStatistic(query); + ResponseBuilder responseBuilder = Response.ok(doMgtResponse); + return responseBuilder.build(); + } + @Context private UriInfo uriInfo; diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/constant/PropKeys.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/constant/PropKeys.java index 2fb0f5c0e6..43769e2f81 100644 --- a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/constant/PropKeys.java +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/constant/PropKeys.java @@ -141,6 +141,14 @@ public class PropKeys { public static final String STATISTIC_DOSSIER_VOTING_TOTAL_LIST = "statistic.dossier.voting.total_list"; + //type 22 + + public static final String STATISTIC_DOSSIER_WAITING_TOTAL_COUNT = "statistic.dossier.waiting.total_count"; + + public static final String STATISTIC_DOSSIER_WAITING_GROUP_TOTAL_COUNT = "statistic.dossier.waiting.group.total_count"; + + public static final String STATISTIC_DOSSIER_WAITING_TOTAL_LIST = "statistic.dossier.waiting.total_list"; + //other diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/constant/PropValues.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/constant/PropValues.java index f2b1c7144e..6432f0ed59 100644 --- a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/constant/PropValues.java +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/constant/PropValues.java @@ -196,6 +196,17 @@ public class PropValues { public static final String STATISTIC_DOSSIER_VOTING_TOTAL_LIST = PropUtil .getQueryProperty(PropKeys.STATISTIC_DOSSIER_VOTING_TOTAL_LIST); + + //type 22 + public static final String STATISTIC_DOSSIER_WAITING_TOTAL_COUNT = PropUtil + .getQueryProperty(PropKeys.STATISTIC_DOSSIER_WAITING_TOTAL_COUNT); + + public static final String STATISTIC_DOSSIER_WAITING_GROUP_TOTAL_COUNT = PropUtil + .getQueryProperty(PropKeys.STATISTIC_DOSSIER_WAITING_GROUP_TOTAL_COUNT); + + public static final String STATISTIC_DOSSIER_WAITING_TOTAL_LIST = PropUtil + .getQueryProperty(PropKeys.STATISTIC_DOSSIER_WAITING_TOTAL_LIST); + // other public static final int CONFIG_DOSSIER_STATISTIC_SIZE_LIST = GetterUtil .getInteger(PropUtil.getConfigProperty(PropKeys.CONFIG_DOSSIER_STATISTIC_SIZE_LIST)); diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtData.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtData.java new file mode 100644 index 0000000000..281ce29192 --- /dev/null +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtData.java @@ -0,0 +1,210 @@ +package org.opencps.backend.statisticmgt.dto; + +public class DossierStatisticMgtData { + + private long groupId; + private int betimesCount = 0; + private int doneCount = 0; + private String govAgencyCode; + private String govAgencyName; + private String domainCode; + private String domainName; + private String serviceCode; + private String serviceName; + private int onegateCount = 0; + private int onlineCount = 0; + private int ontimeCount = 0; + private int overdueCount = 0; + private int overtimeCount = 0; + private int processingCount = 0; + private int receivedCount = 0; + private int releaseCount = 0; + private int releasingCount = 0; + private int remainingCount = 0; + private int totalCount = 0; + private int undueCount = 0; + private int month = 0; + private int year = 0; + private int waitingCount = 0; + private int processCount = 0; + private int ontimePercentage = 0; + private int groupBy; + private int cancelledCount = 0; + private int unresolvedCount = 0; + public int getBetimesCount() { + return betimesCount; + } + public void setBetimesCount(int betimesCount) { + this.betimesCount = betimesCount; + } + public int getDoneCount() { + return doneCount; + } + public void setDoneCount(int doneCount) { + this.doneCount = doneCount; + } + public String getGovAgencyCode() { + return govAgencyCode; + } + public void setGovAgencyCode(String govAgencyCode) { + this.govAgencyCode = govAgencyCode; + } + public String getGovAgencyName() { + return govAgencyName; + } + public void setGovAgencyName(String govAgencyName) { + this.govAgencyName = govAgencyName; + } + public String getDomainCode() { + return domainCode; + } + public void setDomainCode(String domainCode) { + this.domainCode = domainCode; + } + public String getDomainName() { + return domainName; + } + public void setDomainName(String domainName) { + this.domainName = domainName; + } + public String getServiceCode() { + return serviceCode; + } + public void setServiceCode(String serviceCode) { + this.serviceCode = serviceCode; + } + public String getServiceName() { + return serviceName; + } + public void setServiceName(String serviceName) { + this.serviceName = serviceName; + } + public int getOnegateCount() { + return onegateCount; + } + public void setOnegateCount(int onegateCount) { + this.onegateCount = onegateCount; + } + public int getOnlineCount() { + return onlineCount; + } + public void setOnlineCount(int onlineCount) { + this.onlineCount = onlineCount; + } + public int getOntimeCount() { + return ontimeCount; + } + public void setOntimeCount(int ontimeCount) { + this.ontimeCount = ontimeCount; + } + public int getOverdueCount() { + return overdueCount; + } + public void setOverdueCount(int overdueCount) { + this.overdueCount = overdueCount; + } + public int getOvertimeCount() { + return overtimeCount; + } + public void setOvertimeCount(int overtimeCount) { + this.overtimeCount = overtimeCount; + } + public int getProcessingCount() { + return processingCount; + } + public void setProcessingCount(int processingCount) { + this.processingCount = processingCount; + } + public int getReceivedCount() { + return receivedCount; + } + public void setReceivedCount(int receivedCount) { + this.receivedCount = receivedCount; + } + public int getReleaseCount() { + return releaseCount; + } + public void setReleaseCount(int releaseCount) { + this.releaseCount = releaseCount; + } + public int getReleasingCount() { + return releasingCount; + } + public void setReleasingCount(int releasingCount) { + this.releasingCount = releasingCount; + } + public int getRemainingCount() { + return remainingCount; + } + public void setRemainingCount(int remainingCount) { + this.remainingCount = remainingCount; + } + public int getTotalCount() { + return totalCount; + } + public void setTotalCount(int totalCount) { + this.totalCount = totalCount; + } + public int getUndueCount() { + return undueCount; + } + public void setUndueCount(int undueCount) { + this.undueCount = undueCount; + } + public int getMonth() { + return month; + } + public void setMonth(int month) { + this.month = month; + } + public int getYear() { + return year; + } + public void setYear(int year) { + this.year = year; + } + public int getWaitingCount() { + return waitingCount; + } + public void setWaitingCount(int waitingCount) { + this.waitingCount = waitingCount; + } + public int getProcessCount() { + return processCount; + } + public void setProcessCount(int processCount) { + this.processCount = processCount; + } + public int getOntimePercentage() { + return ontimePercentage; + } + public void setOntimePercentage(int ontimePercentage) { + this.ontimePercentage = ontimePercentage; + } + public long getGroupId() { + return groupId; + } + public void setGroupId(long groupId) { + this.groupId = groupId; + } + public int getGroupBy() { + return groupBy; + } + public void setGroupBy(int groupBy) { + this.groupBy = groupBy; + } + public int getCancelledCount() { + return cancelledCount; + } + public void setCancelledCount(int cancelledCount) { + this.cancelledCount = cancelledCount; + } + public int getUnresolvedCount() { + return unresolvedCount; + } + public void setUnresolvedCount(int unresolvedCount) { + this.unresolvedCount = unresolvedCount; + } + + +} diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtFinderService.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtFinderService.java new file mode 100644 index 0000000000..0bd17d19ff --- /dev/null +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtFinderService.java @@ -0,0 +1,9 @@ +package org.opencps.backend.statisticmgt.dto; + +import com.liferay.portal.kernel.exception.PortalException; + + +public interface DossierStatisticMgtFinderService { + public DossierStatisticMgtResponse finderDossierStatisticMgt(DossierStatisticMgtRequest dossierStatisticMgtRequest) throws PortalException; + +} diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtFinderServiceImpl.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtFinderServiceImpl.java new file mode 100644 index 0000000000..8c6d752953 --- /dev/null +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtFinderServiceImpl.java @@ -0,0 +1,25 @@ +package org.opencps.backend.statisticmgt.dto; + +import com.liferay.portal.kernel.exception.PortalException; + +import java.util.List; + +import org.opencps.backend.statisticmgt.util.ConvertUtil; +import org.opencps.statistic.model.OpencpsDossierStatisticMgt; +import org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalServiceUtil; + +public class DossierStatisticMgtFinderServiceImpl implements DossierStatisticMgtFinderService{ + + @Override + public DossierStatisticMgtResponse finderDossierStatisticMgt(DossierStatisticMgtRequest dossierStatisticMgtRequest) + throws PortalException { + + List listDossierStatisticMgts = OpencpsDossierStatisticMgtLocalServiceUtil.searchDossierStatistic(dossierStatisticMgtRequest.getGroupId(), dossierStatisticMgtRequest.getMonth(), + dossierStatisticMgtRequest.getYear(), dossierStatisticMgtRequest.getDomainCode(), + dossierStatisticMgtRequest.getGovAgencyCode(), dossierStatisticMgtRequest.getGroupBy(), + dossierStatisticMgtRequest.getStart(), dossierStatisticMgtRequest.getEnd()); + + return ConvertUtil.getDossierStatisticMgtResponse().convert(listDossierStatisticMgts); + } + +} diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtRequest.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtRequest.java new file mode 100644 index 0000000000..578b540a2e --- /dev/null +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtRequest.java @@ -0,0 +1,64 @@ +package org.opencps.backend.statisticmgt.dto; + +public class DossierStatisticMgtRequest { + + private String govAgencyCode; + private String domainCode; + private int month; + private int year; + private long groupId; + private int start; + private int end; + private int groupBy; + public String getGovAgencyCode() { + return govAgencyCode; + } + public void setGovAgencyCode(String govAgencyCode) { + this.govAgencyCode = govAgencyCode; + } + + public String getDomainCode() { + return domainCode; + } + public void setDomainCode(String domainCode) { + this.domainCode = domainCode; + } + public int getMonth() { + return month; + } + public void setMonth(int month) { + this.month = month; + } + public int getYear() { + return year; + } + public void setYear(int year) { + this.year = year; + } + public long getGroupId() { + return groupId; + } + public void setGroupId(long groupId) { + this.groupId = groupId; + } + public int getStart() { + return start; + } + public void setStart(int start) { + this.start = start; + } + public int getEnd() { + return end; + } + public void setEnd(int end) { + this.end = end; + } + public int getGroupBy() { + return groupBy; + } + public void setGroupBy(int groupBy) { + this.groupBy = groupBy; + } + + +} diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtResponse.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtResponse.java new file mode 100644 index 0000000000..3aa61a1bfd --- /dev/null +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtResponse.java @@ -0,0 +1,43 @@ +package org.opencps.backend.statisticmgt.dto; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlRootElement(name = "data") +public class DossierStatisticMgtResponse { + + private int total; + private String agency; + @XmlElement(name = "data") + private List dossierStatisticMgtData; + public int getTotal() { + return total; + } + public void setTotal(int total) { + this.total = total; + } + public String getAgency() { + return agency; + } + public void setAgency(String agency) { + this.agency = agency; + } + public List getDossierStatisticMgtData() { + if (dossierStatisticMgtData == null) { + dossierStatisticMgtData = new ArrayList(); + } + return this.dossierStatisticMgtData; + } + + public void setDossierStatisticMgtData(List dossierStatisticMgtData) { + this.dossierStatisticMgtData = dossierStatisticMgtData; + } + + +} diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtSearchModel.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtSearchModel.java new file mode 100644 index 0000000000..74512e8cac --- /dev/null +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtSearchModel.java @@ -0,0 +1,84 @@ +package org.opencps.backend.statisticmgt.dto; + +import javax.ws.rs.DefaultValue; +import javax.ws.rs.QueryParam; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "month", "year", "domainCode", "govAgencyCode", "groupBy", "start", "end", "groupId"}) +@XmlRootElement(name = "DossierStatisticMgtSearchModel") +public class DossierStatisticMgtSearchModel { + + @QueryParam("month") + @DefaultValue("-1") + protected int month; + @QueryParam("year") + protected int year; + @QueryParam("domainCode") + protected String domainCode; + @QueryParam("govAgencyCode") + protected String govAgencyCode; + @QueryParam("groupBy") + protected int groupBy; + @QueryParam("start") + protected int start; + @QueryParam("end") + protected int end; + @QueryParam("groupId") + protected long groupId; + public int getMonth() { + return month; + } + public void setMonth(int month) { + this.month = month; + } + public int getYear() { + return year; + } + public void setYear(int year) { + this.year = year; + } + public String getDomainCode() { + return domainCode; + } + public void setDomainCode(String domainCode) { + this.domainCode = domainCode; + } + public String getGovAgencyCode() { + return govAgencyCode; + } + public void setGovAgencyCode(String govAgencyCode) { + this.govAgencyCode = govAgencyCode; + } + public int getGroupBy() { + return groupBy; + } + public void setGroupBy(int groupBy) { + this.groupBy = groupBy; + } + public long getGroupId() { + return groupId; + } + public void setGroupId(long groupId) { + this.groupId = groupId; + } + public int getStart() { + return start; + } + public void setStart(int start) { + this.start = start; + } + public int getEnd() { + return end; + } + public void setEnd(int end) { + this.end = end; + } + + + +} diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtkey.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtkey.java new file mode 100644 index 0000000000..768b2278d8 --- /dev/null +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/dto/DossierStatisticMgtkey.java @@ -0,0 +1,33 @@ +package org.opencps.backend.statisticmgt.dto; + +public class DossierStatisticMgtkey { + private String govAgencyCode; + private String domainCode; + private int year; + private int groupBy; + public String getGovAgencyCode() { + return govAgencyCode; + } + public void setGovAgencyCode(String govAgencyCode) { + this.govAgencyCode = govAgencyCode; + } + public String getDomainCode() { + return domainCode; + } + public void setDomainCode(String domainCode) { + this.domainCode = domainCode; + } + public int getYear() { + return year; + } + public void setYear(int year) { + this.year = year; + } + public int getGroupBy() { + return groupBy; + } + public void setGroupBy(int groupBy) { + this.groupBy = groupBy; + } + +} diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/engine/DossierStatisticMgtDataEngine.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/engine/DossierStatisticMgtDataEngine.java new file mode 100644 index 0000000000..6b8026567c --- /dev/null +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/engine/DossierStatisticMgtDataEngine.java @@ -0,0 +1,736 @@ +package org.opencps.backend.statisticmgt.engine; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.json.JSONArray; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.messaging.BaseMessageListener; +import com.liferay.portal.kernel.messaging.DestinationNames; +import com.liferay.portal.kernel.messaging.Message; +import com.liferay.portal.kernel.model.Company; +import com.liferay.portal.kernel.model.Group; +import com.liferay.portal.kernel.module.framework.ModuleServiceLifecycle; +import com.liferay.portal.kernel.scheduler.SchedulerEngineHelper; +import com.liferay.portal.kernel.scheduler.SchedulerEntryImpl; +import com.liferay.portal.kernel.scheduler.SchedulerException; +import com.liferay.portal.kernel.scheduler.StorageType; +import com.liferay.portal.kernel.scheduler.StorageTypeAware; +import com.liferay.portal.kernel.scheduler.TimeUnit; +import com.liferay.portal.kernel.scheduler.Trigger; +import com.liferay.portal.kernel.scheduler.TriggerFactory; +import com.liferay.portal.kernel.service.CompanyLocalServiceUtil; +import com.liferay.portal.kernel.service.GroupLocalServiceUtil; +import com.liferay.portal.kernel.util.PropsKeys; +import com.liferay.portal.kernel.util.PropsUtil; +import com.liferay.portal.kernel.util.Validator; + +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.opencps.backend.statisticmgt.constant.Constants; +import org.opencps.backend.statisticmgt.dto.DossierStatisticMgtData; +import org.opencps.backend.statisticmgt.util.ActionUtil; +import org.opencps.kernel.scheduler.StorageTypeAwareSchedulerEntryImpl; +import org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalServiceUtil; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Deactivate; +import org.osgi.service.component.annotations.Modified; +import org.osgi.service.component.annotations.Reference; + +@Component(immediate = true, service = DossierStatisticMgtDataEngine.class) +public class DossierStatisticMgtDataEngine extends BaseMessageListener { + + private volatile boolean isRunningDossier = false; + private static boolean RECACULATOR_STATISTIC_LAST_YEAR = Validator + .isNotNull(PropsUtil.get("org.opencps.statistic.recaculator")) + ? Boolean.valueOf(PropsUtil.get("org.opencps.statistic.recaculator")) + : false; + + private static final Boolean CALCULATE_DOSSIER_STATISTIC_ENABLE = Validator.isNotNull(PropsUtil.get("org.opencps.statistic.enable")) + ? Boolean.valueOf(PropsUtil.get("org.opencps.statistic.enable")) : false; + + private static int TIME_STATISTIC = Validator.isNotNull(PropsUtil.get("opencps.statistic.dossier.time")) + ? Integer.valueOf(PropsUtil.get("opencps.statistic.dossier.time")) :45; + + //Start time config + private static int HOUR_STATISTIC = Validator.isNotNull(PropsUtil.get("opencps.statistic.dossier.hour")) + ? Integer.valueOf(PropsUtil.get("opencps.statistic.dossier.hour")) :-1; + private static int MINUTE_STATISTIC = Validator.isNotNull(PropsUtil.get("opencps.statistic.dossier.minute")) + ? Integer.valueOf(PropsUtil.get("opencps.statistic.dossier.minute")) :-1; + private static int SECOND_STATISTIC = Validator.isNotNull(PropsUtil.get("opencps.statistic.dossier.second")) + ? Integer.valueOf(PropsUtil.get("opencps.statistic.dossier.second")) :-1; + + private static long GROUPID_DVC = Validator.isNotNull(PropsUtil.get("opencps.statistic.groupId.dvc")) + ? Integer.valueOf(PropsUtil.get("opencps.statistic.groupId.dvc")) :-1; + private static int GROUP_TYPE_SITE = 1; + + protected Log _log = LogFactoryUtil.getLog(DossierStatisticMgtDataEngine.class); + + @Override + protected void doReceive(Message message) throws Exception { + + _log.debug("START STATISTIC MGT DOSSIER: " + isRunningDossier); + if (!isRunningDossier && CALCULATE_DOSSIER_STATISTIC_ENABLE && GROUPID_DVC != -1) { + isRunningDossier = true; + } else { + return; + } + long startTime = System.currentTimeMillis(); + Date nowLog = new Date(); + try { + + Company company = CompanyLocalServiceUtil.getCompanyByMx(PropsUtil.get(PropsKeys.COMPANY_DEFAULT_WEB_ID)); + + List groups = GroupLocalServiceUtil.getCompanyGroups(company.getCompanyId(), QueryUtil.ALL_POS, + QueryUtil.ALL_POS); + + List sites = new ArrayList(); + + // Danh sách du lieu thong ke theo cac thang + Map>> calculateDataDomainsByMonth = new HashMap<>(); + Map>> calculateDataGovsByMonth = new HashMap<>(); + + // Danh sach du lieu thong ke theo nam + Map>> calculateDataDomainsByYear = new HashMap<>(); + Map>> calculateDataGovsByYear = new HashMap<>(); + + for (Group group : groups) { + if (group.getType() == GROUP_TYPE_SITE && group.isSite() && group.getGroupId() != GROUPID_DVC) { + sites.add(group); + } + } + _log.debug("List size: " + JSONFactoryUtil.looseSerialize(sites)); + + + for (Group site : sites) { + + int monthCurrent = LocalDate.now().getMonthValue(); + int yearCurrent = LocalDate.now().getYear(); + Map mapFlagCurrent = new HashMap<>(); + + /** START : Tổng hợp thống kê dữ liệu theo tháng và update vào db **/ + // Du lieu thong ke theo thang : linh vuc, don vi nam hien tai + Map> calculateDataDomainByMonth = new HashMap<>(); + Map> calculateDataGovByMonth = new HashMap<>(); + + for (int month = 1; month <= monthCurrent; month++) { + boolean flagStatistic = true; + if (month <= monthCurrent) { + if (flagStatistic) { + try { + // thong ke ho so thang + processDossierDataByMonth(site.getGroupId(), month, yearCurrent, calculateDataDomainByMonth, calculateDataGovByMonth); + calculateDataDomainsByMonth.put(yearCurrent, calculateDataDomainByMonth); + calculateDataGovsByMonth.put(yearCurrent, calculateDataGovByMonth); + } catch (Exception e) { + _log.debug(e); + } + } + mapFlagCurrent.put(month, flagStatistic); + } + } + + int lastYear = LocalDate.now().getYear() - 1; + boolean flagLastYear = false; + Map mapFlagPrev = new HashMap<>(); + + // Du lieu thong ke theo thang: nam truoc + Map> calculateLastDataDomainByMonth = new HashMap<>(); + Map> calculateLastDataGovByMonth = new HashMap<>(); + for (int lastMonth = 1; lastMonth <= 12; lastMonth++) { + if (RECACULATOR_STATISTIC_LAST_YEAR) { + flagLastYear = true; + } + if (flagLastYear) { + try { + // Du lieu tong hop theo thang + processDossierDataByMonth(site.getGroupId(), lastMonth, lastYear, calculateLastDataDomainByMonth, calculateLastDataGovByMonth); + calculateDataDomainsByMonth.put(lastYear, calculateLastDataDomainByMonth); + calculateDataGovsByMonth.put(lastYear, calculateLastDataGovByMonth); + } catch (Exception e) { + _log.debug(e); + } + } + mapFlagPrev.put(lastMonth, flagLastYear); + } + + // Tong hop cho nam hien tai + List lstDossierDataObjs = new ArrayList(); + for (int month = 1; month <= monthCurrent; month++) { + if (mapFlagCurrent.get(month)) { + if (calculateDataDomainsByMonth.get(yearCurrent) != null + && calculateDataDomainsByMonth.get(yearCurrent).get(month) != null) { + lstDossierDataObjs.addAll(convertStatisticDataList(calculateDataDomainByMonth.get(month))); + } + } + } + for (int month = 1; month <= monthCurrent; month++) { + if (mapFlagCurrent.get(month)) { + if (calculateDataGovsByMonth.get(yearCurrent) != null + && calculateDataGovsByMonth.get(yearCurrent).get(month) != null) { + lstDossierDataObjs.addAll(convertStatisticDataList(calculateDataGovByMonth.get(month))); + } + } + } + + // Tong hop cho nam cu + if(RECACULATOR_STATISTIC_LAST_YEAR) { + for (int lastMonth = 1; lastMonth <= 12; lastMonth++) { + if (mapFlagPrev.get(lastMonth)) { + if (calculateDataDomainsByMonth.get(lastYear) != null + && calculateDataDomainsByMonth.get(lastYear).get(lastMonth) != null) { + lstDossierDataObjs + .addAll(convertStatisticDataList(calculateDataDomainsByMonth.get(lastYear).get(lastMonth))); + } + } + } + for (int lastMonth = 1; lastMonth <= 12; lastMonth++) { + if (mapFlagPrev.get(lastMonth)) { + if (calculateDataGovsByMonth.get(lastYear) != null + && calculateDataGovsByMonth.get(lastYear).get(lastMonth) != null) { + lstDossierDataObjs + .addAll(convertStatisticDataList(calculateDataGovsByMonth.get(lastYear).get(lastMonth))); + } + } + } + } + + // update du lieu cac thang vao db + if(Validator.isNotNull(lstDossierDataObjs) && lstDossierDataObjs.size() > 0) { + _log.debug("Statistic data month :" + JSONFactoryUtil.looseSerialize(lstDossierDataObjs)); + updateStatistic(lstDossierDataObjs); + } + + /** END : Tổng hợp thống kê dữ liệu theo tháng và update vào db **/ + + /*****************************************************************/ + + /** START : Tổng hợp dữ liệu thống kê theo nam va update vào db **/ + + Map> calculateDataDomainByYear = new HashMap<>(); + Map> calculateDataGovByYear = new HashMap<>(); + Map> calculateLastDataDomainByYear = new HashMap<>(); + Map> calculateLastDataGovByYear = new HashMap<>(); + + // tong hop du lieu ho so nam + + // Du lieu nam hien tai + processDossierDataByYear(site.getGroupId(), yearCurrent, calculateDataDomainByYear, calculateDataGovByYear); + calculateDataDomainsByYear.put(yearCurrent, calculateDataDomainByYear); + calculateDataGovsByYear.put(yearCurrent, calculateDataGovByYear); + + // Du lieu nam truoc + processDossierDataByYear(site.getGroupId(), lastYear, calculateLastDataDomainByYear, calculateLastDataGovByYear); + calculateDataDomainsByYear.put(lastYear, calculateLastDataDomainByYear); + calculateDataGovsByYear.put(lastYear, calculateLastDataGovByYear); + + List lstDossierDataObjYears = new ArrayList(); + + // Tong hop cho nam hien tai + if (calculateDataDomainsByYear.get(yearCurrent) != null + && calculateDataDomainsByYear.get(yearCurrent).get(0) != null) { + lstDossierDataObjYears.addAll(convertStatisticDataList(calculateDataDomainsByYear.get(yearCurrent).get(0))); + } + + if (calculateDataGovsByYear.get(yearCurrent) != null + && calculateDataGovsByYear.get(yearCurrent).get(0) != null) { + lstDossierDataObjYears.addAll(convertStatisticDataList(calculateDataGovsByYear.get(yearCurrent).get(0))); + } + + // Tong hop cho nam cu + if (calculateDataDomainsByYear.get(lastYear) != null + && calculateDataDomainsByYear.get(lastYear).get(0) != null) { + lstDossierDataObjYears.addAll(convertStatisticDataList(calculateDataDomainsByYear.get(lastYear).get(0))); + } + + if (calculateDataGovsByYear.get(lastYear) != null + && calculateDataGovsByYear.get(lastYear).get(0) != null) { + lstDossierDataObjYears.addAll(convertStatisticDataList(calculateDataGovsByYear.get(lastYear).get(0))); + } + + // tinh ban ghi nam + if(Validator.isNotNull(lstDossierDataObjYears) && lstDossierDataObjYears.size() > 0) { + _log.debug("Statistic Data year :" + JSONFactoryUtil.looseSerialize(lstDossierDataObjYears)); + updateStatistic(lstDossierDataObjYears); + } + + /** END : Tổng hợp dữ liệu thống kê theo nam va update vào db **/ + } + + } catch (Exception e) { + _log.error(e); + } + _log.info("END TRACE LOG STATISTICS MGT TIME: " + nowLog); + _log.info("STATISTICS MGT END TIME: " + (System.currentTimeMillis() - startTime) + " ms");; + + isRunningDossier = false; + + } + + private void processDossierDataByMonth(long groupId, int month, int year, + Map> calculateDataDomain, + Map> calculateDataGov) { + + Date firstDay = getFirstDay(month, year); + Date lastDay = getLastDay(month, year); + long fromDate = firstDay.getTime(); + long toDate = lastDay.getTime(); + Map statisticDataByDomainCode = new HashMap(); + Map statisticDataByGovAgencyCode = new HashMap(); + + JSONObject jsonDataByDomainCode = ActionUtil.getDossierStatistic(groupId, -1, fromDate, toDate, null, null, null, + null, null, null, "domainCode", null, null, 20, Constants.GROUP_COUNT); + _log.debug("Du lieu thong ke thang theo linh vuc :" + JSONFactoryUtil.looseSerialize(jsonDataByDomainCode)); + if (jsonDataByDomainCode != null && jsonDataByDomainCode.getInt(Constants.TOTAL) > 0) { + fetchStatisticData(groupId, statisticDataByDomainCode, jsonDataByDomainCode, month, year, false); + calculateDataDomain.put(month, statisticDataByDomainCode); + } + + JSONObject jsonDataByGovAgencyCode = ActionUtil.getDossierStatistic(groupId, -1, fromDate, toDate, null, null, null, + null, null, null, "govAgencyCode", null, null, 20, Constants.GROUP_COUNT); + _log.debug("Du lieu thong ke thang theo don vi :" + JSONFactoryUtil.looseSerialize(jsonDataByGovAgencyCode)); + if (jsonDataByGovAgencyCode != null && jsonDataByGovAgencyCode.getInt(Constants.TOTAL) > 0) { + fetchStatisticData(groupId, statisticDataByGovAgencyCode, jsonDataByGovAgencyCode, month, year, true); + calculateDataGov.put(month, statisticDataByGovAgencyCode); + } + + } + + private void processDossierDataByYear(long groupId, int year, + Map> calculateDataDomain, + Map> calculateDataGov) { + + Date firstDay = getFirstDay(1, year); + Date lastDay = getLastDay(12, year); + long fromDate = firstDay.getTime(); + long toDate = lastDay.getTime(); + Map statisticDataByDomainCode = new HashMap(); + Map statisticDataByGovAgencyCode = new HashMap(); + + JSONObject jsonDataByDomainCode = ActionUtil.getDossierStatistic(groupId, -1, fromDate, toDate, null, null, null, + null, null, null, "domainCode", null, null, 20, Constants.GROUP_COUNT); + _log.debug("Du lieu thong ke nam theo linh vuc :" + JSONFactoryUtil.looseSerialize(jsonDataByDomainCode)); + if (jsonDataByDomainCode != null && jsonDataByDomainCode.getInt(Constants.TOTAL) > 0) { + fetchStatisticData(groupId, statisticDataByDomainCode, jsonDataByDomainCode, 0, year, false); + calculateDataDomain.put(0, statisticDataByDomainCode); + } + + JSONObject jsonDataByGovAgencyCode = ActionUtil.getDossierStatistic(groupId, -1, fromDate, toDate, null, null, null, + null, null, null, "govAgencyCode", null, null, 20, Constants.GROUP_COUNT); + _log.debug("Du lieu thong ke nam theo don vi :" + JSONFactoryUtil.looseSerialize(jsonDataByGovAgencyCode)); + if (jsonDataByGovAgencyCode != null && jsonDataByGovAgencyCode.getInt(Constants.TOTAL) > 0) { + fetchStatisticData(groupId, statisticDataByGovAgencyCode, jsonDataByGovAgencyCode, 0, year, true); + calculateDataGov.put(0, statisticDataByGovAgencyCode); + } + + } + + private static Date getFirstDay(int month, int year) { + Calendar cal = Calendar.getInstance(); + cal.set(Calendar.MONTH, month - 1); + cal.set(Calendar.YEAR, year); + // Set calendar first of month + cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH)); + cal.set(Calendar.HOUR_OF_DAY, cal.getActualMinimum(Calendar.HOUR_OF_DAY)); + cal.set(Calendar.MINUTE, cal.getActualMinimum(Calendar.MINUTE)); + cal.set(Calendar.SECOND, cal.getActualMinimum(Calendar.SECOND)); + return cal.getTime(); + } + + private static Date getLastDay(int month, int year) { + Calendar cal = Calendar.getInstance(); + cal.set(Calendar.MONTH, month - 1); + cal.set(Calendar.YEAR, year); + // Set calendar first of month + cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH)); + cal.set(Calendar.HOUR_OF_DAY, cal.getActualMaximum(Calendar.HOUR_OF_DAY)); + cal.set(Calendar.MINUTE, cal.getActualMaximum(Calendar.MINUTE)); + cal.set(Calendar.SECOND, cal.getActualMaximum(Calendar.SECOND)); + return cal.getTime(); + } + + private void fetchStatisticData(long groupId, Map statisticData, + JSONObject jsonObjectData, int month, int year, boolean isCaculateByGov) { + + JSONArray data = jsonObjectData.getJSONArray(Constants.DATA); + if (isCaculateByGov) { + if (data != null && data.length() > 0) { + for (int i = 0; i < data.length(); i++) { + JSONObject jsonObject = data.getJSONObject(i); + + String govAgencyCode = jsonObject.getString("govAgencyCode"); + String govAgencyName = jsonObject.getString("govAgencyName"); + String domainCode = jsonObject.getString("domainCode"); + String domainName = jsonObject.getString("domainName"); + String serviceCode = jsonObject.getString("serviceCode"); + String serviceName = jsonObject.getString("serviceName"); + + int betimesCount = jsonObject.getInt("betimesCount"); + int doneCount = jsonObject.getInt("doneCount"); + int onegateCount = jsonObject.getInt("onegateCount"); + int onlineCount = jsonObject.getInt("onlineCount"); + int ontimeCount = jsonObject.getInt("ontimeCount"); + int ontimePercentage = jsonObject.getInt("ontimePercentage"); + int overdueCount = jsonObject.getInt("overdueCount"); + int overtimeCount = jsonObject.getInt("overtimeCount"); + // DuanTV: process (tong xu ly) = total + int processCount = jsonObject.getInt("totalCount"); + int processingCount = jsonObject.getInt("processingCount"); + int receivedCount = jsonObject.getInt("receivedCount"); + int releaseCount = jsonObject.getInt("releaseCount"); + int releasingCount = jsonObject.getInt("releasingCount"); + int remainingCount = jsonObject.getInt("remainingCount"); + int totalCount = jsonObject.getInt("totalCount"); + int undueCount = jsonObject.getInt("undueCount"); + int waitingCount = jsonObject.getInt("waitingCount"); + + // DuanTV :Thêm vào trước, hiện để mặc định là 0, khi nào cần thì xử lý lại + int unresolvedCount = 0; + int cancelledCount = 0; + + String type1 = groupId + "@all"; + DossierStatisticMgtData dataType1 = new DossierStatisticMgtData(); + + if (statisticData.containsKey(type1)) { + dataType1 = statisticData.get(type1); + } + + String type2 = groupId + "@" + govAgencyCode; + DossierStatisticMgtData dataType2 = new DossierStatisticMgtData(); + + if (statisticData.containsKey(type2)) { + dataType2 = statisticData.get(type2); + } + + if (Validator.isNull(govAgencyCode)) { + + dataType1.setGroupId(groupId); + dataType1.setGovAgencyCode(StringPool.BLANK); + dataType1.setGovAgencyName(StringPool.BLANK); + dataType1.setBetimesCount(betimesCount); + dataType1.setDomainCode(domainCode); + dataType1.setDomainName(domainName); + dataType1.setDoneCount(doneCount); + dataType1.setMonth(month); + dataType1.setYear(year); + dataType1.setOnegateCount(onegateCount); + dataType1.setOnlineCount(onlineCount); + dataType1.setOntimeCount(ontimeCount); + dataType1.setOntimePercentage(ontimePercentage); + dataType1.setOverdueCount(overdueCount); + dataType1.setOvertimeCount(overtimeCount); + dataType1.setProcessCount(processCount); + dataType1.setProcessingCount(processingCount); + dataType1.setReceivedCount(receivedCount); + dataType1.setReleaseCount(releaseCount); + dataType1.setReleasingCount(releasingCount); + dataType1.setRemainingCount(remainingCount); + dataType1.setServiceCode(serviceCode); + dataType1.setServiceName(serviceName); + dataType1.setTotalCount(totalCount); + dataType1.setUndueCount(undueCount); + dataType1.setWaitingCount(waitingCount); + dataType1.setGroupBy(1); + dataType1.setUnresolvedCount(unresolvedCount); + dataType1.setCancelledCount(cancelledCount); + + statisticData.put(type1, dataType1); + } else { + + dataType2.setGroupId(groupId); + dataType2.setGovAgencyCode(govAgencyCode); + dataType2.setGovAgencyName(govAgencyName); + dataType2.setBetimesCount(betimesCount); + dataType2.setDomainCode(domainCode); + dataType2.setDomainName(domainName); + dataType2.setDoneCount(doneCount); + dataType2.setMonth(month); + dataType2.setYear(year); + dataType2.setOnegateCount(onegateCount); + dataType2.setOnlineCount(onlineCount); + dataType2.setOntimeCount(ontimeCount); + dataType2.setOntimePercentage(ontimePercentage); + dataType2.setOverdueCount(overdueCount); + dataType2.setOvertimeCount(overtimeCount); + dataType2.setProcessCount(processCount); + dataType2.setProcessingCount(processingCount); + dataType2.setReceivedCount(receivedCount); + dataType2.setReleaseCount(releaseCount); + dataType2.setReleasingCount(releasingCount); + dataType2.setRemainingCount(remainingCount); + dataType2.setServiceCode(serviceCode); + dataType2.setServiceName(serviceName); + dataType2.setTotalCount(totalCount); + dataType2.setUndueCount(undueCount); + dataType2.setWaitingCount(waitingCount); + dataType2.setGroupBy(1); + dataType2.setUnresolvedCount(unresolvedCount); + dataType2.setCancelledCount(cancelledCount); + + statisticData.put(type2, dataType2); + } + } + + } + + }else { + + if (data != null && data.length() > 0) { + for (int i = 0; i < data.length(); i++) { + JSONObject jsonObject = data.getJSONObject(i); + + String govAgencyCode = jsonObject.getString("govAgencyCode"); + String govAgencyName = jsonObject.getString("govAgencyName"); + String domainCode = jsonObject.getString("domainCode"); + String domainName = jsonObject.getString("domainName"); + String serviceCode = jsonObject.getString("serviceCode"); + String serviceName = jsonObject.getString("serviceName"); + + int betimesCount = jsonObject.getInt("betimesCount"); + int doneCount = jsonObject.getInt("doneCount"); + int onegateCount = jsonObject.getInt("onegateCount"); + int onlineCount = jsonObject.getInt("onlineCount"); + int ontimeCount = jsonObject.getInt("ontimeCount"); + int ontimePercentage = jsonObject.getInt("ontimePercentage"); + int overdueCount = jsonObject.getInt("overdueCount"); + int overtimeCount = jsonObject.getInt("overtimeCount"); + + //process = total + int processCount = jsonObject.getInt("processCount"); + + int processingCount = jsonObject.getInt("processingCount"); + int receivedCount = jsonObject.getInt("receivedCount"); + int releaseCount = jsonObject.getInt("releaseCount"); + int releasingCount = jsonObject.getInt("releasingCount"); + int remainingCount = jsonObject.getInt("remainingCount"); + int totalCount = jsonObject.getInt("totalCount"); + int undueCount = jsonObject.getInt("undueCount"); + int waitingCount = jsonObject.getInt("waitingCount"); + + // DuanTV :Thêm vào trước, hiện để mặc định là 0, khi nào cần thì xử lý lại + int unresolvedCount = 0; + int cancelledCount = 0; + + String type3 = "all@" + groupId; + DossierStatisticMgtData dataType3 = new DossierStatisticMgtData(); + + if (statisticData.containsKey(type3)) { + dataType3 = statisticData.get(type3); + } + + String type4 = domainCode + "@" + groupId; + DossierStatisticMgtData dataType4 = new DossierStatisticMgtData(); + + if (statisticData.containsKey(type4)) { + dataType4 = statisticData.get(type4); + } + + if (Validator.isNull(domainCode)) { + + dataType3.setGroupId(groupId); + dataType3.setGovAgencyCode(govAgencyCode); + dataType3.setGovAgencyName(govAgencyName); + dataType3.setBetimesCount(betimesCount); + dataType3.setDomainCode(StringPool.BLANK); + dataType3.setDomainName(StringPool.BLANK); + dataType3.setDoneCount(doneCount); + dataType3.setMonth(month); + dataType3.setYear(year); + dataType3.setOnegateCount(onegateCount); + dataType3.setOnlineCount(onlineCount); + dataType3.setOntimeCount(ontimeCount); + dataType3.setOntimePercentage(ontimePercentage); + dataType3.setOverdueCount(overdueCount); + dataType3.setOvertimeCount(overtimeCount); + dataType3.setProcessCount(processCount); + dataType3.setProcessingCount(processingCount); + dataType3.setReceivedCount(receivedCount); + dataType3.setReleaseCount(releaseCount); + dataType3.setReleasingCount(releasingCount); + dataType3.setRemainingCount(remainingCount); + dataType3.setServiceCode(serviceCode); + dataType3.setServiceName(serviceName); + dataType3.setTotalCount(totalCount); + dataType3.setUndueCount(undueCount); + dataType3.setWaitingCount(waitingCount); + dataType3.setGroupBy(2); + dataType3.setUnresolvedCount(unresolvedCount); + dataType3.setCancelledCount(cancelledCount); + + statisticData.put(type3, dataType3); + } else { + + dataType4.setGroupId(groupId); + dataType4.setGovAgencyCode(govAgencyCode); + dataType4.setGovAgencyName(govAgencyName); + dataType4.setBetimesCount(betimesCount); + dataType4.setDomainCode(domainCode); + dataType4.setDomainName(domainName); + dataType4.setDoneCount(doneCount); + dataType4.setMonth(month); + dataType4.setYear(year); + dataType4.setOnegateCount(onegateCount); + dataType4.setOnlineCount(onlineCount); + dataType4.setOntimeCount(ontimeCount); + dataType4.setOntimePercentage(ontimePercentage); + dataType4.setOverdueCount(overdueCount); + dataType4.setOvertimeCount(overtimeCount); + dataType4.setProcessCount(processCount); + dataType4.setProcessingCount(processingCount); + dataType4.setReceivedCount(receivedCount); + dataType4.setReleaseCount(releaseCount); + dataType4.setReleasingCount(releasingCount); + dataType4.setRemainingCount(remainingCount); + dataType4.setServiceCode(serviceCode); + dataType4.setServiceName(serviceName); + dataType4.setTotalCount(totalCount); + dataType4.setUndueCount(undueCount); + dataType4.setWaitingCount(waitingCount); + dataType4.setGroupBy(2); + dataType4.setCancelledCount(cancelledCount); + dataType4.setUnresolvedCount(unresolvedCount); + + statisticData.put(type4, dataType4); + } + } + + } + } + } + + private List convertStatisticDataList(Map statisticData) { + List lstDossierDataObjs = new ArrayList(); + for (Map.Entry me : statisticData.entrySet()) { + + DossierStatisticMgtData payload = (DossierStatisticMgtData) me.getValue(); + ObjectMapper mapper = new ObjectMapper(); + try { + JSONObject dossierDataObj = JSONFactoryUtil.createJSONObject(mapper.writeValueAsString(payload)); + lstDossierDataObjs.add(dossierDataObj); + } catch (Exception e) { + _log.error(e); + } + } + return lstDossierDataObjs; + } + + + + private void updateStatistic(List dossierDataObjs) { + try { + OpencpsDossierStatisticMgtLocalServiceUtil.updateBatchStatisticMgt(dossierDataObjs); + } catch (SystemException e) { + _log.debug(e); + } catch (PortalException e) { + _log.debug(e); + } + } + + + + @Activate + @Modified + protected void activate(Map properties) throws SchedulerException { + String listenerClass = getClass().getName(); + // Create startDate + Calendar cal = Calendar.getInstance(); + LocalDate now = LocalDate.now(); + int year = now.getYear(); + int month = now.getMonthValue(); + int day = now.getDayOfMonth(); + if (HOUR_STATISTIC != -1 && MINUTE_STATISTIC != -1 && SECOND_STATISTIC != -1) { + cal.set(year, month-1, day, HOUR_STATISTIC, MINUTE_STATISTIC, SECOND_STATISTIC); + }else { + cal.set(year, month-1, day); + } + Date startDate = cal.getTime(); + + Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, startDate, null, + TIME_STATISTIC, TimeUnit.MINUTE); + + _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger); + _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED); + +// _schedulerEntryImpl.setTrigger(jobTrigger); + + if (_initialized) { + deactivate(); + } + + _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH); + _initialized = true; + } + + @Deactivate + protected void deactivate() { + if (_initialized) { + try { + _schedulerEngineHelper.unschedule(_schedulerEntryImpl, getStorageType()); + } catch (SchedulerException se) { + if (_log.isWarnEnabled()) { + _log.warn("Unable to unschedule trigger", se); + } + } + + _schedulerEngineHelper.unregister(this); + } + _initialized = false; + } + + /** + * getStorageType: Utility method to get the storage type from the scheduler entry wrapper. + * @return StorageType The storage type to use. + */ + protected StorageType getStorageType() { + if (_schedulerEntryImpl instanceof StorageTypeAware) { + return ((StorageTypeAware) _schedulerEntryImpl).getStorageType(); + } + + return StorageType.PERSISTED; + } + + /** + * setModuleServiceLifecycle: So this requires some explanation... + * + * OSGi will start a component once all of it's dependencies are satisfied. However, there + * are times where you want to hold off until the portal is completely ready to go. + * + * This reference declaration is waiting for the ModuleServiceLifecycle's PORTAL_INITIALIZED + * component which will not be available until, surprise surprise, the portal has finished + * initializing. + * + * With this reference, this component activation waits until portal initialization has completed. + * @param moduleServiceLifecycle + */ + @Reference(target = ModuleServiceLifecycle.PORTAL_INITIALIZED, unbind = "-") + protected void setModuleServiceLifecycle(ModuleServiceLifecycle moduleServiceLifecycle) { + } + + @Reference(unbind = "-") + protected void setTriggerFactory(TriggerFactory triggerFactory) { + _triggerFactory = triggerFactory; + } + + @Reference(unbind = "-") + protected void setSchedulerEngineHelper(SchedulerEngineHelper schedulerEngineHelper) { + _schedulerEngineHelper = schedulerEngineHelper; + } + + private SchedulerEngineHelper _schedulerEngineHelper; + private TriggerFactory _triggerFactory; + private volatile boolean _initialized; + private SchedulerEntryImpl _schedulerEntryImpl = null; + +} diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/process/QueryProcessFactory.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/process/QueryProcessFactory.java index 76b6352296..0b914b953f 100644 --- a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/process/QueryProcessFactory.java +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/process/QueryProcessFactory.java @@ -84,6 +84,10 @@ public JSONObject getDossierStatistic21(long groupId, long userId, String fromDa String[] domainCodes, String[] govAgencyCodes, String[] serviceCodes, String[] dossierStatus, String groupBy, int start, int end, String sqlTemplate, int type, String subType); + public JSONObject getDossierStatistic22(long groupId, long userId, String fromDate, String toDate, int[] originalities, + String[] domainCodes, String[] govAgencyCodes, String[] serviceCodes, String[] dossierStatus, + String groupBy, int start, int end, String sqlTemplate, int type, String subType); + } diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/processimpl/QueryProcessFactoryImpl.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/processimpl/QueryProcessFactoryImpl.java index 1bfac1de4e..0575af95aa 100644 --- a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/processimpl/QueryProcessFactoryImpl.java +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/processimpl/QueryProcessFactoryImpl.java @@ -1560,7 +1560,7 @@ public QuerySchema getQuerySchema14(long groupId, String fromDate, String toDate } else { sql = sql.replace("AND t1.receiveDate < {toDate}", StringPool.BLANK); } - + if (domainCodes != null && domainCodes.length > 0) { String paramsDomainCodes = ParamUtil.generalTextParam(domainCodes); sql = sql.replace("{domainCode}", paramsDomainCodes); @@ -1840,7 +1840,6 @@ public QuerySchema getQuerySchema16(long groupId, String fromDate, String toDate } else { sql = sql.replace("AND t1.receiveDate < {toDate}", StringPool.BLANK); } - if (domainCodes != null && domainCodes.length > 0) { String paramsDomainCodes = ParamUtil.generalTextParam(domainCodes); sql = sql.replace("{domainCode}", paramsDomainCodes); @@ -2656,4 +2655,174 @@ public QuerySchema getQuerySchema21(long groupId, String fromDate, String toDate return new QuerySchema(sql, sqlTemplate, type, subtype, columns); } + @Override + public JSONObject getDossierStatistic22(long groupId, long userId, String fromDate, String toDate, int[] originalities, + String[] domainCodes, String[] govAgencyCodes, String[] serviceCodes, + String[] dossierStatus, String groupBy, int start, int end, + String sqlTemplate, int type, String subType) { + JSONObject result = StatisticUtil.createResponseSchema(groupId, fromDate, toDate, originalities, domainCodes, + govAgencyCodes, serviceCodes, dossierStatus, type, subType); + QuerySchema schema = getQuerySchema22(groupId, fromDate, toDate, originalities, domainCodes, govAgencyCodes, + serviceCodes, dossierStatus, groupBy, start, end, sqlTemplate, type, subType); + _log.debug("schema: " + schema.getSql()); + _log.debug("subType: " + subType); + if (schema == null || Validator.isNull(schema.getSql())) { + return result; + } + + if (subType.equals(Constants.COUNT)) { + int total = QueryUtil.getCount(schema.getSql(), userId, groupId); + result.put(Constants.TOTAL, total); + } else if (subType.equals(Constants.GROUP_COUNT)) { + JSONArray data = QueryUtil.getData(schema.getSql(), schema.getColumnMap()); + long total = 0; + if (data != null) { + for (int i = 0; i < data.length(); i++) { + total += data.getJSONObject(i).getInt(Constants.COUNT); + } + } + result.put(Constants.TOTAL, total); + result.put(Constants.DATA, data); + } else if (subType.equals(Constants.LIST)) { + + JSONArray data = QueryUtil.getData(schema.getSql(), schema.getColumnMap()); + sqlTemplate = QueryUtil.getSQLQueryTemplate(type, Constants.COUNT); + schema = getQuerySchema22(groupId, fromDate, toDate, originalities, domainCodes, govAgencyCodes, + serviceCodes, dossierStatus, groupBy, start, end, sqlTemplate, type, Constants.COUNT); + int total = QueryUtil.getCount(schema.getSql(), userId, groupId); + + result.put(Constants.TOTAL, total); + + result.put(Constants.DATA, data); + } else if (subType.equals(Constants.ROW_TOTAL)) { + _log.info("schema.getColumnMap(): " + schema.getColumnMap()); + JSONArray data = QueryUtil.getData(schema.getSql(), schema.getColumnMap()); + + long total = 0; + if (data != null) { + JSONObject totalObj = JSONFactoryUtil.createJSONObject(); + for (int i = 0; i < data.length(); i++) { + JSONObject tmp = data.getJSONObject(i); + Iterator keys = tmp.keys(); + while (keys.hasNext()) { + String key = keys.next(); + if (key.equalsIgnoreCase("govAgencyCode") || key.equalsIgnoreCase("domainCode") + || key.equalsIgnoreCase("serviceCode")) { + + totalObj.put(key, StringPool.BLANK); + } else { + + int value = 0; + if (totalObj.has(key)) { + value = totalObj.getInt(key); + } + value += tmp.getInt(key); + + totalObj.put(key, value); + } + } + + total += tmp.getInt(Constants.TOTAL_COUNT); + } + data.put(totalObj); + + } + result.put(Constants.TOTAL, total); + result.put(Constants.DATA, data); + } + + return result; + } + + public QuerySchema getQuerySchema22(long groupId, String fromDate, String toDate, int[] originalities, + String[] domainCodes, String[] govAgencyCodes, String[] serviceCodes, String[] dossierStatus, + String groupBy, int start, int end, String sqlTemplate, int type, String subtype) { + + int[] pageAndSize = QueryUtil.getPageAndSize(start, end); + + start = pageAndSize[0]; + + int size = pageAndSize[1]; + + String sql = sqlTemplate; + + if (Validator.isNotNull(groupBy)) { + + if (groupBy.equalsIgnoreCase("govAgencyCode")) { + sql = sql.replace("{groupBy}", "t1.govAgencyCode"); + sql = sql.replace("t2.domainName[String]", "t1.govAgencyName[String]"); + sql = sql.replace("t2.domainCode[String]", "t1.govAgencyCode[String]"); + } else if (groupBy.equalsIgnoreCase("serviceCode")) { + sql = sql.replace("{groupBy}", "t1.serviceCode"); + sql = sql.replace("t2.domainName[String]", "t2.serviceName[String]"); + sql = sql.replace("t2.domainCode[String]", "t2.serviceCode[String]"); + } else { + sql = sql.replace("{groupBy}", "t2.domainCode"); + } + + } else { + sql = sql.replace("{groupBy}", "t2.domainCode"); + } + + LinkedHashMap> columns = QueryUtil.getDataColumnMap(sql); + + Pattern pattern = Pattern.compile("(\\[([a-z]+|[A-Z]+)\\])", Pattern.CASE_INSENSITIVE); + + Matcher matcher = pattern.matcher(sql); + + String dataType = StringPool.BLANK; + + while (matcher.find()) { + dataType = matcher.group(); + sql = sql.replace(dataType, StringPool.BLANK); + } + sql = sql.replace("{groupId}", String.valueOf(groupId)); + sql = sql.replace("{start}", String.valueOf(start)); + sql = sql.replace("{size}", String.valueOf(size)); + + if (domainCodes != null && domainCodes.length > 0) { + String paramsDomainCodes = ParamUtil.generalTextParam(domainCodes); + sql = sql.replace("{domainCode}", paramsDomainCodes); + } else { + sql = sql.replace("AND t2.domainCode IN ({domainCode})", StringPool.BLANK); + } + if (govAgencyCodes != null && govAgencyCodes.length > 0) { + String paramsGovAgencyCodes = ParamUtil.generalTextParam(govAgencyCodes); + sql = sql.replace("{govAgencyCode}", paramsGovAgencyCodes); + } else { + sql = sql.replace("AND t1.govAgencyCode IN ({govAgencyCode})", StringPool.BLANK); + } + if (serviceCodes != null && serviceCodes.length > 0) { + String paramsServiceCodes = ParamUtil.generalTextParam(serviceCodes); + sql = sql.replace("{serviceCode}", paramsServiceCodes); + } else { + sql = sql.replace("AND t1.serviceCode IN ({serviceCode})", StringPool.BLANK); + } + if (Validator.isNotNull(dossierStatus) && dossierStatus.length > 0) { + String params = ParamUtil.generalTextParam(dossierStatus); + sql = sql.replace("{dossierStatus}", params); + } else { + sql = sql.replace("AND t1.dossierStatus IN ({dossierStatus})", StringPool.BLANK); + } + if (Validator.isNotNull(fromDate)) { + sql = sql.replace("{fromDate}", ParamUtil.generalTextParam(fromDate)); + } else { + sql = sql.replace("AND t1.receiveDate >= {fromDate}", StringPool.BLANK); + } + if (Validator.isNotNull(toDate)) { + sql = sql.replace("{toDate}", ParamUtil.generalTextParam(toDate)); + } else { + sql = sql.replace("AND t1.receiveDate < {toDate}", StringPool.BLANK); + } + if (originalities != null && originalities.length > 0) { + String paramsOriginalities = ParamUtil.generalTextParam(originalities); + sql = sql.replace("{originality}", paramsOriginalities); + } else { + sql = sql.replace("AND t1.originality = {originality}", StringPool.BLANK); + } + _log.debug("generateQuerySchema2: " + sql); + + return new QuerySchema(sql, sqlTemplate, type, subtype, columns); + } + } diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/util/ActionUtil.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/util/ActionUtil.java index 038648b1a4..9f462d723c 100644 --- a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/util/ActionUtil.java +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/util/ActionUtil.java @@ -1,6 +1,8 @@ package org.opencps.backend.statisticmgt.util; import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.json.JSONArray; import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONObject; @@ -14,10 +16,19 @@ import java.util.HashMap; import java.util.List; +import javax.ws.rs.core.CacheControl; + import org.opencps.backend.statisticmgt.constant.Constants; import org.opencps.backend.statisticmgt.constant.PropValues; +import org.opencps.backend.statisticmgt.dto.DossierStatisticMgtFinderService; +import org.opencps.backend.statisticmgt.dto.DossierStatisticMgtFinderServiceImpl; +import org.opencps.backend.statisticmgt.dto.DossierStatisticMgtRequest; +import org.opencps.backend.statisticmgt.dto.DossierStatisticMgtResponse; +import org.opencps.backend.statisticmgt.dto.DossierStatisticMgtSearchModel; import org.opencps.backend.statisticmgt.processimpl.QueryProcessFactoryImpl; import org.opencps.bundlemgt.classloader.util.ClassLoaderFactoryUtil; +import org.opencps.statistic.model.OpencpsDossierStatisticMgt; +import org.opencps.statistic.service.OpencpsDossierStatisticMgtLocalServiceUtil; import org.opencps.usermgt.model.Employee; import org.opencps.usermgt.service.EmployeeLocalServiceUtil; @@ -29,6 +40,8 @@ public class ActionUtil { private static Log _log = LogFactoryUtil.getLog(ActionUtil.class); + private static DossierStatisticMgtFinderService dossierStatisticMgtFinderService = new DossierStatisticMgtFinderServiceImpl(); + public static String exportDossierStatistic(long groupId, long userId, long fromDate, long toDate, String originalities, String domainCode, String govAgencyCode, String serviceCode, String dossierStatus, Integer day, String groupBy, Integer start, Integer end, int type, String subType) { @@ -346,6 +359,8 @@ public static JSONObject getDossierStatistic(long groupId, long userId, long fro } else { sqlTemplate = sqlTemplate.replace("{scopeEmpl}", "''"); } + }else { + sqlTemplate = sqlTemplate.replace("{scopeEmpl}", "''"); } if (Validator.isNull(sqlTemplate)) { return StatisticUtil.createResponseSchema(groupId, strFromDate, strToDate, @@ -558,6 +573,12 @@ public static JSONObject getDossierStatistic(long groupId, long userId, long fro ParamUtil.getArrayParams(originalities, 0), ParamUtil.getArrayParams(domainCode), ParamUtil.getArrayParams(govAgencyCode), ParamUtil.getArrayParams(serviceCode), ParamUtil.getArrayParams(dossierStatus), groupBy, start, end, sqlTemplate, type, subType); + }else if(type == 22){ + + return factory.getDossierStatistic22(groupId, userId, strFromDate, strToDate, + ParamUtil.getArrayParams(originalities, 0), ParamUtil.getArrayParams(domainCode), + ParamUtil.getArrayParams(govAgencyCode), ParamUtil.getArrayParams(serviceCode), + ParamUtil.getArrayParams(dossierStatus), groupBy, start, end, sqlTemplate, type, subType); } else { return StatisticUtil.createResponseSchema(groupId, strFromDate, strToDate, ParamUtil.getArrayParams(originalities, 0), ParamUtil.getArrayParams(domainCode), @@ -573,5 +594,52 @@ public static JSONObject getDossierStatistic(long groupId, long userId, long fro } } + + + public static DossierStatisticMgtResponse searchDossierStatistic(DossierStatisticMgtSearchModel query) { + + CacheControl cc = new CacheControl(); + cc.setMaxAge(60); + cc.setPrivate(true); + System.out.println(JSONFactoryUtil.looseSerialize(query)); + + int start = query.getStart(); + int end = query.getEnd(); + int month = query.getMonth(); + int year = query.getYear(); + String govAgencyCode = query.getGovAgencyCode(); + String domainCode = query.getDomainCode(); + long groupId = query.getGroupId(); + int groupBy = query.getGroupBy(); + + if (start == 0) + start = -1; + + if (end == 0) + end = -1; + + DossierStatisticMgtResponse dossierStatisticMgtResponse = null; + DossierStatisticMgtRequest dossierStatisticMgtRequest = new DossierStatisticMgtRequest(); + dossierStatisticMgtRequest.setDomainCode(domainCode); + dossierStatisticMgtRequest.setGovAgencyCode(govAgencyCode); + dossierStatisticMgtRequest.setGroupBy(groupBy); + dossierStatisticMgtRequest.setGroupId(groupId); + dossierStatisticMgtRequest.setMonth(month); + dossierStatisticMgtRequest.setYear(year); + dossierStatisticMgtRequest.setStart(start); + dossierStatisticMgtRequest.setEnd(end); + _log.info(JSONFactoryUtil.looseSerialize(dossierStatisticMgtRequest)); + + try { + dossierStatisticMgtResponse = dossierStatisticMgtFinderService.finderDossierStatisticMgt(dossierStatisticMgtRequest); + _log.info(JSONFactoryUtil.looseSerialize(dossierStatisticMgtResponse)); + return dossierStatisticMgtResponse; + } catch (PortalException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + + return null; + } } diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/util/ConvertUtil.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/util/ConvertUtil.java new file mode 100644 index 0000000000..19b2f52993 --- /dev/null +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/util/ConvertUtil.java @@ -0,0 +1,73 @@ +package org.opencps.backend.statisticmgt.util; + +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; + +import java.util.ArrayList; +import java.util.List; + +import org.opencps.backend.statisticmgt.dto.DossierStatisticMgtData; +import org.opencps.backend.statisticmgt.dto.DossierStatisticMgtResponse; +import org.opencps.statistic.model.OpencpsDossierStatisticMgt; +import org.springframework.core.convert.converter.Converter; + +public class ConvertUtil { + + private static Log _log = LogFactoryUtil.getLog(ConvertUtil.class); + + public static Converter, DossierStatisticMgtResponse> getDossierStatisticMgtResponse() { + try { + return (source) -> { + + DossierStatisticMgtResponse dossierStatisticMgtResponse = new DossierStatisticMgtResponse(); + + dossierStatisticMgtResponse.setTotal(source.size()); + + List dossierStatisticMgtDatas = new ArrayList<>(); + + for (OpencpsDossierStatisticMgt dossierStatistic : source) { + + + DossierStatisticMgtData dossierStatisticMgtData = new DossierStatisticMgtData(); + + dossierStatisticMgtData.setGroupId(dossierStatistic.getGroupId()); + dossierStatisticMgtData.setMonth(dossierStatistic.getMonth()); + dossierStatisticMgtData.setYear(dossierStatistic.getYear()); + dossierStatisticMgtData.setTotalCount(dossierStatistic.getTotalCount()); + dossierStatisticMgtData.setProcessCount(dossierStatistic.getProcessCount()); + dossierStatisticMgtData.setRemainingCount(dossierStatistic.getRemainingCount()); + dossierStatisticMgtData.setReceivedCount(dossierStatistic.getReceivedCount()); + dossierStatisticMgtData.setOnlineCount(dossierStatistic.getOnlineCount()); + dossierStatisticMgtData.setReleaseCount(dossierStatistic.getReleaseCount()); + dossierStatisticMgtData.setBetimesCount(dossierStatistic.getBetimesCount()); + dossierStatisticMgtData.setOntimeCount(dossierStatistic.getOntimeCount()); + dossierStatisticMgtData.setOvertimeCount(dossierStatistic.getOvertimeCount()); + dossierStatisticMgtData.setWaitingCount(dossierStatistic.getWaitingCount()); + dossierStatisticMgtData.setDoneCount(dossierStatistic.getDoneCount()); + dossierStatisticMgtData.setReleasingCount(dossierStatistic.getReleasingCount()); + dossierStatisticMgtData.setProcessingCount(dossierStatistic.getProcessingCount()); + dossierStatisticMgtData.setUndueCount(dossierStatistic.getUndueCount()); + dossierStatisticMgtData.setOverdueCount(dossierStatistic.getOverdueCount()); + dossierStatisticMgtData.setOntimePercentage(dossierStatistic.getOntimePercentage()); + dossierStatisticMgtData.setGovAgencyCode(dossierStatistic.getGovAgencyCode()); + dossierStatisticMgtData.setGovAgencyName(dossierStatistic.getGovAgencyName()); + dossierStatisticMgtData.setDomainCode(dossierStatistic.getDomainCode()); + dossierStatisticMgtData.setDomainName(dossierStatistic.getDomainName()); + dossierStatisticMgtData.setServiceCode(dossierStatistic.getServiceCode()); + dossierStatisticMgtData.setServiceName(dossierStatistic.getServiceName()); + dossierStatisticMgtData.setOnegateCount(dossierStatistic.getOnegateCount()); + dossierStatisticMgtData.setGroupBy(dossierStatistic.getGroupBy()); + + dossierStatisticMgtDatas.add(dossierStatisticMgtData); + } + + dossierStatisticMgtResponse.setDossierStatisticMgtData(dossierStatisticMgtDatas); + + return dossierStatisticMgtResponse; + }; + } catch (Exception e) { + _log.error(e); + } + return null; + } +} diff --git a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/util/QueryUtil.java b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/util/QueryUtil.java index 27837423fa..524723c272 100644 --- a/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/util/QueryUtil.java +++ b/modules/backend-statisticmgt/src/main/java/org/opencps/backend/statisticmgt/util/QueryUtil.java @@ -103,7 +103,9 @@ public static enum QueryType { STATISTIC_DOSSIER_DASHBROAD_TOTAL_COUNT(20), - STATISTIC_DOSSIER_VOTING_TOTAL_LIST(21); + STATISTIC_DOSSIER_VOTING_TOTAL_LIST(21), + + STATISTIC_DOSSIER_WAITING_TOTAL_LIST(22); private QueryType(int type) { this.type = type; @@ -281,6 +283,12 @@ private QueryType(int type) { this.sqlSearchTemplate = PropValues.STATISTIC_DOSSIER_VOTING_TOTAL_LIST; break; + case 22: + this.sqlCountTemplate = PropValues.STATISTIC_DOSSIER_WAITING_TOTAL_COUNT; + this.sqlGroupTemplate = PropValues.STATISTIC_DOSSIER_WAITING_GROUP_TOTAL_COUNT; + this.sqlSearchTemplate = PropValues.STATISTIC_DOSSIER_WAITING_TOTAL_LIST; + break; + default: this.sqlCountTemplate = StringPool.BLANK; @@ -363,6 +371,8 @@ public static int getCount(String sql, long userId, long groupId) { } else { sql = sql.replace("{scopeEmpl}", "''"); } + }else { + sql = sql.replace("{scopeEmpl}", "''"); } try (PreparedStatement pst = ConnectionUtil._getConnection().prepareStatement(sql)) { diff --git a/modules/backend-statisticmgt/src/main/resources/query.properties b/modules/backend-statisticmgt/src/main/resources/query.properties index 93c1591bbe..cbc6c8ddad 100644 --- a/modules/backend-statisticmgt/src/main/resources/query.properties +++ b/modules/backend-statisticmgt/src/main/resources/query.properties @@ -5,7 +5,7 @@ statistic.dossier.receiving_offline.total_count=SELECT COUNT(*) count[Integer] F statistic.dossier.receiving_offline.group.total_count=SELECT t2.domainName[String], t2.domainCode[String], COUNT(*) count[Integer] FROM opencps_dossier t1 INNER JOIN opencps_serviceinfo t2 ON t1.serviceCode=t2.serviceCode WHERE t1.dossierStatus is not null and t1.groupId = {groupId} AND t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND (t1.originality = 3 or (t1.originality = 2 and t1.online_=0)) AND t2.groupId = {groupId} AND t2.domainCode IN ({domainCode}) AND t1.govAgencyCode IN ({govAgencyCode}) AND t1.serviceCode IN ({serviceCode}) AND t1.dossierStatus IN ({dossierStatus}) and if ({scopeEmpl} <> '' and {scopeEmpl} is not null,t1.govAgencyCode in ({scopeEmpl}),1) GROUP BY {groupBy}; -statistic.dossier.receiving_offline.list_dossier=SELECT t1.serviceCode[String],t1.serviceName[String],t1.govAgencyCode[String],t1.govAgencyName[String],t1.applicantName[String],t1.applicantIdType[String],t1.applicantIdNo[String],t1.address[String],t1.cityName[String],t1.districtName[String],t1.wardName[String],t1.dossierNo[String],t1.contactEmail[String],t1.contactTelNo[String],t1.delegateName[String],t1.delegateTelNo[String],t1.delegateEmail[String],t1.delegateAddress[String],t1.processDate[Date],t1.submitDate[Date],t1.receiveDate[Date],t1.dueDate[Date],t1.extendDate[Date],t1.releaseDate[Date],t1.finishDate[Date],t1.cancellingDate[Date],t1.correcttingDate[Date],t1.dossierStatus[String],t1.dossierStatusText[String],t1.dossierSubStatus[String],t1.dossierSubStatusText[String],t1.dossierName[String],t1.dossierId[Long],t2.domainCode[String],t2.domainName[String] FROM opencps_dossier t1 INNER JOIN opencps_serviceinfo t2 ON t1.serviceCode=t2.serviceCode WHERE t1.dossierStatus is not null and t1.groupId = {groupId} AND t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND (t1.originality = 3 or (t1.originality = 2 and t1.online_=0)) AND t2.groupId = {groupId} AND t2.domainCode IN ({domainCode}) AND t1.govAgencyCode IN ({govAgencyCode}) AND t1.serviceCode IN ({serviceCode}) AND t1.dossierStatus IN ({dossierStatus}) and if ({scopeEmpl} <> '' and {scopeEmpl} is not null,t1.govAgencyCode in ({scopeEmpl}),1) LIMIT {start},{size}; +statistic.dossier.receiving_offline.list_dossier=SELECT t1.serviceCode[String],t1.serviceName[String],t1.govAgencyCode[String],t1.govAgencyName[String],t1.applicantName[String],t1.applicantIdType[String],t1.applicantIdNo[String],t1.address[String],t1.cityName[String],t1.districtName[String],t1.wardName[String],t1.dossierNo[String],t1.contactEmail[String],t1.contactTelNo[String],t1.delegateName[String],t1.delegateTelNo[String],t1.delegateEmail[String],t1.delegateAddress[String],t1.processDate[Date],t1.submitDate[Date],t1.receiveDate[Date],t1.dueDate[Date],t1.extendDate[Date],t1.releaseDate[Date],t1.finishDate[Date],t1.cancellingDate[Date],t1.correcttingDate[Date],t1.dossierStatus[String],t1.dossierStatusText[String],t1.dossierSubStatus[String],t1.dossierSubStatusText[String],t1.dossierName[String],t1.dossierId[Long],t2.domainCode[String],t2.domainName[String] FROM opencps_dossier t1 INNER JOIN opencps_serviceinfo t2 ON t1.serviceCode=t2.serviceCode WHERE t1.dossierStatus is not null and t1.groupId = {groupId} AND t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND (t1.originality = 3 or (t1.originality = 2 and t1.online_=0)) AND t2.groupId = {groupId} AND t2.domainCode IN ({domainCode}) AND t1.govAgencyCode IN ({govAgencyCode}) AND t1.serviceCode IN ({serviceCode}) AND t1.dossierStatus IN ({dossierStatus}) and if ({scopeEmpl} <> '' and {scopeEmpl} is not null,t1.govAgencyCode in ({scopeEmpl}),1) order by t1.counter LIMIT {start},{size}; # type = 3 @@ -15,7 +15,7 @@ statistic.dossier.receiving_online.total_count=SELECT COUNT(*) count[Integer] FR statistic.dossier.receiving_online.group.total_count=SELECT t2.domainName[String], t2.domainCode[String], COUNT(*) count[Integer] FROM opencps_dossier t1 INNER JOIN opencps_serviceinfo t2 ON t1.serviceCode=t2.serviceCode WHERE t1.dossierStatus is not null and t1.groupId = {groupId} AND t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.originality = 2 and t1.online_=1 AND t2.groupId = {groupId} AND t2.domainCode IN ({domainCode}) AND t1.govAgencyCode IN ({govAgencyCode}) AND t1.serviceCode IN ({serviceCode}) AND t1.dossierStatus IN ({dossierStatus}) and if ({scopeEmpl} <> '' and {scopeEmpl} is not null,t1.govAgencyCode in ({scopeEmpl}),1) GROUP BY {groupBy}; -statistic.dossier.receiving_online.list_dossier=SELECT t1.serviceCode[String],t1.serviceName[String],t1.govAgencyCode[String],t1.govAgencyName[String],t1.applicantName[String],t1.applicantIdType[String],t1.applicantIdNo[String],t1.address[String],t1.cityName[String],t1.districtName[String],t1.wardName[String],t1.dossierNo[String],t1.contactEmail[String],t1.contactTelNo[String],t1.delegateName[String],t1.delegateTelNo[String],t1.delegateEmail[String],t1.delegateAddress[String],t1.processDate[Date],t1.submitDate[Date],t1.receiveDate[Date],t1.dueDate[Date],t1.extendDate[Date],t1.releaseDate[Date],t1.finishDate[Date],t1.cancellingDate[Date],t1.correcttingDate[Date],t1.dossierStatus[String],t1.dossierStatusText[String],t1.dossierSubStatus[String],t1.dossierSubStatusText[String],t1.dossierName[String],t1.dossierId[Long],t2.domainCode[String],t2.domainName[String] FROM opencps_dossier t1 INNER JOIN opencps_serviceinfo t2 ON t1.serviceCode=t2.serviceCode WHERE t1.dossierStatus is not null and t1.groupId = {groupId} AND t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.originality = 2 and t1.online_=1 AND t2.groupId = {groupId} AND t2.domainCode IN ({domainCode}) AND t1.govAgencyCode IN ({govAgencyCode}) AND t1.serviceCode IN ({serviceCode}) AND t1.dossierStatus IN ({dossierStatus}) and if ({scopeEmpl} <> '' and {scopeEmpl} is not null,t1.govAgencyCode in ({scopeEmpl}),1) LIMIT {start},{size}; +statistic.dossier.receiving_online.list_dossier=SELECT t1.serviceCode[String],t1.serviceName[String],t1.govAgencyCode[String],t1.govAgencyName[String],t1.applicantName[String],t1.applicantIdType[String],t1.applicantIdNo[String],t1.address[String],t1.cityName[String],t1.districtName[String],t1.wardName[String],t1.dossierNo[String],t1.contactEmail[String],t1.contactTelNo[String],t1.delegateName[String],t1.delegateTelNo[String],t1.delegateEmail[String],t1.delegateAddress[String],t1.processDate[Date],t1.submitDate[Date],t1.receiveDate[Date],t1.dueDate[Date],t1.extendDate[Date],t1.releaseDate[Date],t1.finishDate[Date],t1.cancellingDate[Date],t1.correcttingDate[Date],t1.dossierStatus[String],t1.dossierStatusText[String],t1.dossierSubStatus[String],t1.dossierSubStatusText[String],t1.dossierName[String],t1.dossierId[Long],t2.domainCode[String],t2.domainName[String] FROM opencps_dossier t1 INNER JOIN opencps_serviceinfo t2 ON t1.serviceCode=t2.serviceCode WHERE t1.dossierStatus is not null and t1.groupId = {groupId} AND t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.originality = 2 and t1.online_=1 AND t2.groupId = {groupId} AND t2.domainCode IN ({domainCode}) AND t1.govAgencyCode IN ({govAgencyCode}) AND t1.serviceCode IN ({serviceCode}) AND t1.dossierStatus IN ({dossierStatus}) and if ({scopeEmpl} <> '' and {scopeEmpl} is not null,t1.govAgencyCode in ({scopeEmpl}),1) order by t1.counter LIMIT {start},{size}; # type = 5 statistic.dossier.released.total_count=SELECT COUNT(*) count[Integer] FROM opencps_dossier t1 INNER JOIN opencps_serviceinfo t2 ON t1.serviceCode = t2.serviceCode WHERE t1.dossierStatus is not null and t1.groupId = {groupId} AND t1.releaseDate IS NOT NULL AND t1.finishDate >= {fromDate} AND t1.finishDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.originality IN (2,3) AND t1.finishDate IS NOT NULL AND t1.dossierStatus = {dossierStatus} AND t2.groupId = {groupId} AND t2.domainCode IN ({domainCode}) AND t1.govAgencyCode IN ({govAgencyCode}) AND t1.serviceCode IN ({serviceCode}) and if ({scopeEmpl} <> '' and {scopeEmpl} is not null,t1.govAgencyCode in ({scopeEmpl}),1); @@ -129,7 +129,7 @@ statistic.dossier.peding.total_list=SELECT t1.serviceCode[String],t1.serviceName statistic.dossier.dashbroad.total_count= -statistic.dossier.dashbroad.group.total_count=SELECT t1.govAgencyCode[String], t1.govAgencyName[String], sum(1) totalCount[Integer], sum(case when t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') then 1 else 0 end) receivedCount[Integer], sum(case when t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND (t1.originality=3 or (t1.originality=2 and t1.online_=0)) then 1 else 0 end) onegateCount[Integer], sum(case when t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.originality=2 and t1.online_=1 then 1 else 0 end) onlineCount[Integer] , sum(case when t1.receiveDate < {fromDate} AND (t1.releaseDate is not null AND t1.releaseDate >= {fromDate} OR t1.releaseDate is null) then 1 else 0 end) remainingCount[Integer] , sum(case when t1.releaseDate >= {fromDate} AND t1.releaseDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.releaseDate is not null AND t1.originality IN (2,3) then 1 else 0 end) releaseCount[Integer] , sum(case when t1.releaseDate >= {fromDate} AND t1.releaseDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.releaseDate is not null AND t1.originality IN (2,3) AND date_format(t1.releaseDate,'%Y-%m-%d') > date_format(t1.dueDate,'%Y-%m-%d') and t1.dueDate is not null then 1 else 0 end) overtimeCount[Integer] , sum(case when t1.releaseDate >= {fromDate} AND t1.releaseDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.releaseDate is not null AND t1.originality in (2,3) AND date_format(t1.releaseDate,'%Y-%m-%d') < date_format(t1.dueDate,'%Y-%m-%d') and t1.dueDate is not null then 1 else 0 end) betimesCount[Integer] , sum(case when t1.releaseDate >= {fromDate} AND t1.releaseDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.releaseDate is not null AND t1.originality in (2,3) AND (date_format(t1.releaseDate,'%Y-%m-%d') = date_format(t1.dueDate,'%Y-%m-%d') or t1.dueDate is null) then 1 else 0 end) ontimeCount[Integer] , sum(case when t1.releaseDate >= {fromDate} AND t1.releaseDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.releaseDate is not null AND t1.finishDate is not null AND t1.originality in (2,3) then 1 else 0 end) doneCount[Integer], sum(case when t1.releaseDate >= {fromDate} AND t1.releaseDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.releaseDate is not null AND t1.finishDate is null AND t1.originality in (2,3) then 1 else 0 end) releasingCount[Integer], sum(case when t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND (t1.releaseDate is null OR (t1.releaseDate is not null AND t1.releaseDate > date_format({toDate},'%Y-%m-%d 23:59:59'))) AND t1.originality in (2,3) then 1 else 0 end) processingCount[Integer], sum(case when t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND (t1.dueDate > date_format({toDate},'%Y-%m-%d 23:59:59') or t1.dueDate is null or t1.lockState = 'PAUSE') and(t1.releaseDate is null OR (t1.releaseDate is not null AND t1.releaseDate > date_format({toDate},'%Y-%m-%d 23:59:59'))) AND t1.originality in (2,3) then 1 else 0 end) undueCount[Integer], sum(case when t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.dueDate <= date_format({toDate},'%Y-%m-%d 23:59:59') and t1.dueDate is not null and t1.lockState is null and (t1.releaseDate is null OR (t1.releaseDate is not null AND t1.releaseDate > date_format({toDate},'%Y-%m-%d 23:59:59'))) AND t1.originality in (2,3) then 1 else 0 end) overdueCount[Integer] FROM opencps_dossier t1 INNER JOIN opencps_serviceinfo t2 ON t1.serviceCode = t2.serviceCode WHERE t1.dossierStatus is not null and t1.originality in (2,3) AND ((t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59')) OR (t1.receiveDate < {fromDate} AND (t1.releaseDate is not null AND t1.releaseDate >= {fromDate} OR t1.releaseDate is null))) AND t1.groupId = {groupId} AND t2.domainCode IN ({domainCode}) AND t1.govAgencyCode IN ({govAgencyCode}) AND t1.serviceCode IN ({serviceCode}) AND t1.dossierStatus IN ({dossierStatus}) AND t2.groupId = {groupId} and if ({scopeEmpl} <> '' and {scopeEmpl} is not null,t1.govAgencyCode in ({scopeEmpl}),1) GROUP BY {groupBy}; +statistic.dossier.dashbroad.group.total_count=SELECT t1.govAgencyCode[String], t1.govAgencyName[String], sum(1) totalCount[Integer], sum(case when t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') then 1 else 0 end) receivedCount[Integer], sum(case when t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND (t1.originality=3 or (t1.originality=2 and t1.online_=0)) then 1 else 0 end) onegateCount[Integer], sum(case when t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.originality=2 and t1.online_=1 then 1 else 0 end) onlineCount[Integer] , sum(case when t1.receiveDate < {fromDate} AND (t1.releaseDate is not null AND t1.releaseDate >= {fromDate} OR t1.releaseDate is null) then 1 else 0 end) remainingCount[Integer] , sum(case when t1.releaseDate >= {fromDate} AND t1.releaseDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.releaseDate is not null AND t1.originality IN (2,3) then 1 else 0 end) releaseCount[Integer] , sum(case when t1.releaseDate >= {fromDate} AND t1.releaseDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.releaseDate is not null AND t1.originality IN (2,3) AND date_format(t1.releaseDate,'%Y-%m-%d') > date_format(t1.dueDate,'%Y-%m-%d') and t1.dueDate is not null then 1 else 0 end) overtimeCount[Integer] , sum(case when t1.releaseDate >= {fromDate} AND t1.releaseDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.releaseDate is not null AND t1.originality in (2,3) AND date_format(t1.releaseDate,'%Y-%m-%d') < date_format(t1.dueDate,'%Y-%m-%d') and t1.dueDate is not null then 1 else 0 end) betimesCount[Integer] , sum(case when t1.releaseDate >= {fromDate} AND t1.releaseDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.releaseDate is not null AND t1.originality in (2,3) AND (date_format(t1.releaseDate,'%Y-%m-%d') = date_format(t1.dueDate,'%Y-%m-%d') or t1.dueDate is null) then 1 else 0 end) ontimeCount[Integer] , sum(case when t1.releaseDate >= {fromDate} AND t1.releaseDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.releaseDate is not null AND t1.finishDate is not null AND t1.originality in (2,3) then 1 else 0 end) doneCount[Integer], sum(case when t1.releaseDate >= {fromDate} AND t1.releaseDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.releaseDate is not null AND t1.finishDate is null AND t1.originality in (2,3) then 1 else 0 end) releasingCount[Integer], sum(case when t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND (t1.releaseDate is null OR (t1.releaseDate is not null AND t1.releaseDate > date_format({toDate},'%Y-%m-%d 23:59:59'))) AND t1.originality in (2,3) and t1.lockState is null then 1 else 0 end) processingCount[Integer], sum(case when t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND (t1.dueDate > date_format({toDate},'%Y-%m-%d 23:59:59') or t1.dueDate is null) and (t1.releaseDate is null OR (t1.releaseDate is not null AND t1.releaseDate > date_format({toDate},'%Y-%m-%d 23:59:59'))) AND t1.originality in (2,3) and t1.lockState is null then 1 else 0 end) undueCount[Integer], sum(case when t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.dueDate <= date_format({toDate},'%Y-%m-%d 23:59:59') and t1.dueDate is not null and t1.lockState is null and (t1.releaseDate is null OR (t1.releaseDate is not null AND t1.releaseDate > date_format({toDate},'%Y-%m-%d 23:59:59'))) AND t1.originality in (2,3) then 1 else 0 end) overdueCount[Integer], sum(case when t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.originality in (2,3) and t1.lockState ='PAUSE' then 1 else 0 end) waitingCount[Integer] FROM opencps_dossier t1 INNER JOIN opencps_serviceinfo t2 ON t1.serviceCode = t2.serviceCode WHERE t1.dossierStatus is not null and t1.originality in (2,3) AND ((t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59')) OR (t1.receiveDate < {fromDate} AND (t1.releaseDate is not null AND t1.releaseDate >= {fromDate} OR t1.releaseDate is null))) AND t1.groupId = {groupId} AND t2.domainCode IN ({domainCode}) AND t1.govAgencyCode IN ({govAgencyCode}) AND t1.serviceCode IN ({serviceCode}) AND t1.dossierStatus IN ({dossierStatus}) AND t2.groupId = {groupId} and if ({scopeEmpl} <> '' and {scopeEmpl} is not null,t1.govAgencyCode in ({scopeEmpl}),1) GROUP BY {groupBy}; statistic.dossier.dashbroad.total_list= @@ -142,3 +142,11 @@ statistic.dossier.voting.group.total_count=SELECT t2.domainName[String], t2.doma statistic.dossier.voting.row.total_count=select govAgencyCode[String],govAgencyName[String],sum(vote1) as total_vote1[Integer],sum(vote2) as total_vote2[Integer],sum(vote3) as total_vote3[Integer],sum(vote4) as total_vote4[Integer],sum(vote5) as total_vote5[Integer],sum(vote6) as total_vote6[Integer],sum(vote7) as total_vote7[Integer],sum(vote8) as total_vote8[Integer],sum(vote9) as total_vote9[Integer] from (SELECT t1.govAgencyCode, t1.govAgencyName, case when date_format(t1.releaseDate,'%Y-%m-%d') < date_format(t1.dueDate,'%Y-%m-%d') or t1.dueDate is null then 2 when date_format(t1.releaseDate,'%Y-%m-%d') = date_format(t1.dueDate,'%Y-%m-%d') then 1 else 0 end as vote1, case when 1 then 2 else 0 end as vote2, case when tbv.voting1 is not null then tbv.voting1 else 2 end as vote3, case when tbv.voting2 is not null then tbv.voting2 else 2 end as vote4, case when 1 then 2 else 0 end as vote5, case when 1 then 2 else 0 end as vote6,case when tbv.voting3 is not null then tbv.voting3 else 2 end as vote7,case when 1 then 2 else 0 end as vote8,case when 1 then 2 else 0 end as vote9 FROM opencps_dossier t1 INNER JOIN opencps_serviceinfo t2 ON t1.serviceCode = t2.serviceCode left join (select tb1.dossierId as dossierId, tb1.votingCode1 as votingCode1, tb1.voting1 as voting1, tb2.votingCode2 as votingCode2, tb2.voting2 as voting2, tb3.votingCode3 as votingCode3, tb3.voting3 as voting3 from (select b1.classPK as dossierId, b1.votingCode as votingCode1, (case when b2.selected is null or b2.selected = 1 then 2 when b2.selected=2 then 1 when b2.selected=3 then 0 else 2 end) as voting1 from opencps_voting b1 left join opencps_votingresult b2 on b1.votingId = b2.votingId where b1.className='dossier' and b1.votingCode='HS-01' and b1.classPK > 0) tb1 inner join (select b3.classPK as dossierId, b3.votingCode as votingCode2, (case when b4.selected is null or b4.selected = 1 then 2 when b4.selected=2 then 1 when b4.selected=3 then 0 else 2 end) as voting2 from opencps_voting b3 left join opencps_votingresult b4 on b3.votingId = b4.votingId where b3.className='dossier' and b3.votingCode='HS-02'and b3.classPK > 0) tb2 on tb1.dossierId= tb2.dossierId inner join (select b5.classPK as dossierId, b5.votingCode as votingCode3, (case when b6.selected is null or b6.selected = 1 then 2 when b6.selected=2 then 1 when b6.selected=3 then 0 else 2 end) as voting3 from opencps_voting b5 left join opencps_votingresult b6 on b5.votingId = b6.votingId where b5.className='dossier' and b5.votingCode='HS-03' and b5.classPK > 0) tb3 on tb1.dossierId = tb3.dossierId) tbv on t1.dossierId=tbv.dossierId WHERE t1.dossierStatus is not null and t1.groupId = {groupId} AND t1.releaseDate >= {fromDate} AND t1.releaseDate <= date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.originality IN (2,3) AND t1.releaseDate IS NOT NULL AND t2.groupId = {groupId} AND t2.domainCode IN ({domainCode}) and if ({scopeEmpl} <> '' and {scopeEmpl} is not null,t1.govAgencyCode in ({scopeEmpl}),1) LIMIT {start},{size}) bang1 group by govAgencyCode; statistic.dossier.voting.total_list=SELECT t1.serviceCode[String],t1.serviceName[String],t1.govAgencyCode[String],t1.govAgencyName[String],t1.applicantName[String],t1.applicantIdType[String],t1.applicantIdNo[String],t1.address[String],t1.cityName[String],t1.districtName[String],t1.wardName[String],t1.dossierNo[String],t1.contactEmail[String],t1.contactTelNo[String],t1.delegateName[String],t1.delegateTelNo[String],t1.delegateEmail[String],t1.delegateAddress[String],t1.processDate[Date],t1.submitDate[Date],t1.receiveDate[Date],t1.dueDate[Date],t1.extendDate[Date],t1.releaseDate[Date],t1.finishDate[Date],t1.cancellingDate[Date],t1.correcttingDate[Date],t1.dossierStatus[String],t1.dossierStatusText[String],t1.dossierSubStatus[String],t1.dossierSubStatusText[String],t1.dossierName[String],t1.dossierId[Long],t2.domainCode[String],t2.domainName[String], case when date_format(t1.releaseDate,'%Y-%m-%d') < date_format(t1.dueDate,'%Y-%m-%d') or t1.dueDate is null then 2 when date_format(t1.releaseDate,'%Y-%m-%d') = date_format(t1.dueDate,'%Y-%m-%d') then 1 else 0 end as vote1[Integer], case when 1 then 2 else 0 end as vote2[Integer], case when tbv.voting1 is not null then tbv.voting1 else 2 end as vote3[Integer], case when tbv.voting2 is not null then tbv.voting2 else 2 end as vote4[Integer], case when 1 then 2 else 0 end as vote5[Integer], case when 1 then 2 else 0 end as vote6[Integer],case when tbv.voting3 is not null then tbv.voting3 else 2 end as vote7[Integer],case when 1 then 2 else 0 end as vote8[Integer],case when 1 then 2 else 0 end as vote9[Integer] FROM opencps_dossier t1 INNER JOIN opencps_serviceinfo t2 ON t1.serviceCode = t2.serviceCode left join (select tb1.dossierId as dossierId, tb1.votingCode1 as votingCode1, tb1.voting1 as voting1, tb2.votingCode2 as votingCode2, tb2.voting2 as voting2, tb3.votingCode3 as votingCode3, tb3.voting3 as voting3 from (select b1.classPK as dossierId, b1.votingCode as votingCode1, (case when b2.selected is null or b2.selected = 1 then 2 when b2.selected=2 then 1 when b2.selected=3 then 0 else 2 end) as voting1 from opencps_voting b1 left join opencps_votingresult b2 on b1.votingId = b2.votingId where b1.className='dossier' and b1.votingCode='HS-01' and b1.classPK > 0) tb1 inner join (select b3.classPK as dossierId, b3.votingCode as votingCode2, (case when b4.selected is null or b4.selected = 1 then 2 when b4.selected=2 then 1 when b4.selected=3 then 0 else 2 end) as voting2 from opencps_voting b3 left join opencps_votingresult b4 on b3.votingId = b4.votingId where b3.className='dossier' and b3.votingCode='HS-02'and b3.classPK > 0) tb2 on tb1.dossierId= tb2.dossierId inner join (select b5.classPK as dossierId, b5.votingCode as votingCode3, (case when b6.selected is null or b6.selected = 1 then 2 when b6.selected=2 then 1 when b6.selected=3 then 0 else 2 end) as voting3 from opencps_voting b5 left join opencps_votingresult b6 on b5.votingId = b6.votingId where b5.className='dossier' and b5.votingCode='HS-03' and b5.classPK > 0) tb3 on tb1.dossierId = tb3.dossierId) tbv on t1.dossierId=tbv.dossierId WHERE t1.dossierStatus is not null and t1.groupId = {groupId} AND t1.releaseDate >= {fromDate} AND t1.releaseDate <= date_format({toDate},'%Y-%m-%d 23:59:59') AND t1.originality IN (2,3) AND t1.releaseDate IS NOT NULL AND t2.groupId = {groupId} AND t2.domainCode IN ({domainCode}) and if ({scopeEmpl} <> '' and {scopeEmpl} is not null,t1.govAgencyCode in ({scopeEmpl}),1) LIMIT {start},{size}; + +#type = 22 + +statistic.dossier.waiting.total_count=SELECT COUNT(*) count[Integer] FROM opencps_dossier t1 INNER JOIN opencps_serviceinfo t2 ON t1.serviceCode = t2.serviceCode WHERE t1.dossierStatus is not null and t1.groupId = {groupId} AND t1.originality IN (2,3) AND t1.releaseDate IS NULL AND t1.dossierStatus IN ({dossierStatus}) AND t2.groupId = {groupId} AND t2.domainCode IN ({domainCode}) AND t1.govAgencyCode IN ({govAgencyCode}) AND t1.serviceCode IN ({serviceCode}) AND ((t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59')) OR (t1.receiveDate < {fromDate} AND (t1.releaseDate is not null AND t1.releaseDate >= {fromDate} OR t1.releaseDate is null))) and t1.lockState ='PAUSE' and if ({scopeEmpl} <> '' and {scopeEmpl} is not null,t1.govAgencyCode in ({scopeEmpl}),1); + +statistic.dossier.waiting.group.total_count=SELECT t2.domainName[String], t2.domainCode[String], COUNT(*) count[Integer] FROM opencps_dossier t1 INNER JOIN opencps_serviceinfo t2 ON t1.serviceCode = t2.serviceCode WHERE t1.dossierStatus is not null and t1.groupId = {groupId} AND t1.originality IN (2,3) AND t1.releaseDate IS NULL AND t1.dossierStatus IN ({dossierStatus}) AND t2.groupId = {groupId} AND t2.domainCode IN ({domainCode}) AND t1.govAgencyCode IN ({govAgencyCode}) AND t1.serviceCode IN ({serviceCode}) AND ((t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59')) OR (t1.receiveDate < {fromDate} AND (t1.releaseDate is not null AND t1.releaseDate >= {fromDate} OR t1.releaseDate is null))) and t1.lockState ='PAUSE' and if ({scopeEmpl} <> '' and {scopeEmpl} is not null,t1.govAgencyCode in ({scopeEmpl}),1) GROUP BY {groupBy}; + +statistic.dossier.waiting.total_list=SELECT t1.serviceCode[String],t1.serviceName[String],t1.govAgencyCode[String],t1.govAgencyName[String],t1.applicantName[String],t1.applicantIdType[String],t1.applicantIdNo[String],t1.address[String],t1.cityName[String],t1.districtName[String],t1.wardName[String],t1.dossierNo[String],t1.contactEmail[String],t1.contactTelNo[String],t1.delegateName[String],t1.delegateTelNo[String],t1.delegateEmail[String],t1.delegateAddress[String],t1.processDate[Date],t1.submitDate[Date],t1.receiveDate[Date],t1.dueDate[Date],t1.extendDate[Date],t1.releaseDate[Date],t1.finishDate[Date],t1.cancellingDate[Date],t1.correcttingDate[Date],t1.dossierStatus[String],t1.dossierStatusText[String],t1.dossierSubStatus[String],t1.dossierSubStatusText[String],t1.dossierName[String],t1.dossierId[Long],t2.domainCode[String],t2.domainName[String] FROM opencps_dossier t1 INNER JOIN opencps_serviceinfo t2 ON t1.serviceCode = t2.serviceCode WHERE t1.dossierStatus is not null and t1.groupId = {groupId} AND t1.originality IN (2,3) AND t1.releaseDate IS NULL AND t1.dossierStatus IN ({dossierStatus}) AND t2.groupId = {groupId} AND t2.domainCode IN ({domainCode}) AND t1.govAgencyCode IN ({govAgencyCode}) AND t1.serviceCode IN ({serviceCode}) AND ((t1.receiveDate >= {fromDate} AND t1.receiveDate < date_format({toDate},'%Y-%m-%d 23:59:59')) OR (t1.receiveDate < {fromDate} AND (t1.releaseDate is not null AND t1.releaseDate >= {fromDate} OR t1.releaseDate is null))) and t1.lockState ='PAUSE' and if ({scopeEmpl} <> '' and {scopeEmpl} is not null,t1.govAgencyCode in ({scopeEmpl}),1) LIMIT {start},{size}; \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/bnd.bnd b/modules/backend-synctracking/backend-synctracking-api/bnd.bnd index 8322d24407..43200cbdc2 100644 --- a/modules/backend-synctracking/backend-synctracking-api/bnd.bnd +++ b/modules/backend-synctracking/backend-synctracking-api/bnd.bnd @@ -6,5 +6,4 @@ Export-Package:\ org.opencps.synctracking.model,\ org.opencps.synctracking.service,\ org.opencps.synctracking.service.persistence --check: EXPORTS -includeresource: META-INF/service.xml=../backend-synctracking-service/service.xml \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/build.gradle b/modules/backend-synctracking/backend-synctracking-api/build.gradle index 45608059dc..299901a3f5 100644 --- a/modules/backend-synctracking/backend-synctracking-api/build.gradle +++ b/modules/backend-synctracking/backend-synctracking-api/build.gradle @@ -3,11 +3,7 @@ dependencies { compileOnly group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0" compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "3.0.0" compileOnly group: "org.osgi", name: "org.osgi.core", version: "6.0.0" - - compileOnly group: "javax.portlet", name: "portlet-api", version: "3.0.0" - compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1" + compile group: 'org.apache.cxf', name: 'cxf-rt-frontend-jaxws', version: '3.0.3' - compile group: 'org.apache.cxf', name: 'cxf-rt-frontend-jaxrs', version: '3.0.3' - compile group: 'org.apache.cxf', name: 'cxf-rt-transports-http', version: '3.0.3' compile group: 'org.apache.cxf', name: 'cxf-rt-rs-client', version: '3.0.3' } \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/exception/NoSuchDossierTaxException.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/exception/NoSuchDossierTaxException.java new file mode 100644 index 0000000000..f2c8a4e0f6 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/exception/NoSuchDossierTaxException.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ +package org.opencps.synctracking.exception; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.exception.NoSuchModelException; + +/** + * @author Brian Wing Shun Chan + */ +@ProviderType +public class NoSuchDossierTaxException extends NoSuchModelException { + + public NoSuchDossierTaxException() { + } + + public NoSuchDossierTaxException(String msg) { + super(msg); + } + + public NoSuchDossierTaxException(String msg, Throwable cause) { + super(msg, cause); + } + + public NoSuchDossierTaxException(Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTax.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTax.java new file mode 100644 index 0000000000..268ee16676 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTax.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.annotation.ImplementationClassName; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.util.Accessor; + +/** + * The extended model interface for the DossierTax service. Represents a row in the "opencps_dossier_tax" database table, with each column mapped to a property of this class. + * + * @author duongnt + * @see DossierTaxModel + * @see org.opencps.synctracking.model.impl.DossierTaxImpl + * @see org.opencps.synctracking.model.impl.DossierTaxModelImpl + * @generated + */ +@ImplementationClassName("org.opencps.synctracking.model.impl.DossierTaxImpl") +@ProviderType +public interface DossierTax extends DossierTaxModel, PersistedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this interface directly. Add methods to {@link org.opencps.synctracking.model.impl.DossierTaxImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + public static final Accessor TAX_ID_ACCESSOR = new Accessor() { + @Override + public Long get(DossierTax dossierTax) { + return dossierTax.getTaxId(); + } + + @Override + public Class getAttributeClass() { + return Long.class; + } + + @Override + public Class getTypeClass() { + return DossierTax.class; + } + }; +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxInput.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxInput.java new file mode 100644 index 0000000000..2157693886 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxInput.java @@ -0,0 +1,34 @@ +package org.opencps.synctracking.model; + +import javax.ws.rs.QueryParam; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "DossierTaxInput") +public class DossierTaxInput { + public Long groupId; + public Long dossierId; + public String dossierNo; + public String maSoThue; + public String soQuyetDinh; + public String ngayQuyetDinh; + public String tenTieuMuc; + public Integer soTien; + + public String hoTenNguoiNopTien; + public String soCmtNguoiNopTien; + public String diaChiNguoiNopTien; + public String tinhNguoiNopTien; + public String huyenNguoiNopTien; + public String xaNguoiNopTien; + public String thoiGianThanhToan; + public String soTienNop; + public String noiDungThanhToan; + public Integer trangThaiThanhToan; + public String fileChungTu; + public String ngayThueTraThongBao; + public String ngayTraThongBao; + public String ngayNhanBienLai; + public String statusTBT; + public String statusCTT; + +} diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxModel.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxModel.java new file mode 100644 index 0000000000..73221000cc --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxModel.java @@ -0,0 +1,588 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; + +import com.liferay.portal.kernel.bean.AutoEscape; +import com.liferay.portal.kernel.model.BaseModel; +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.model.GroupedModel; +import com.liferay.portal.kernel.model.ShardedModel; +import com.liferay.portal.kernel.model.StagedAuditedModel; +import com.liferay.portal.kernel.service.ServiceContext; + +import java.io.Serializable; + +import java.util.Date; + +/** + * The base model interface for the DossierTax service. Represents a row in the "opencps_dossier_tax" database table, with each column mapped to a property of this class. + * + *

+ * This interface and its corresponding implementation {@link org.opencps.synctracking.model.impl.DossierTaxModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link org.opencps.synctracking.model.impl.DossierTaxImpl}. + *

+ * + * @author duongnt + * @see DossierTax + * @see org.opencps.synctracking.model.impl.DossierTaxImpl + * @see org.opencps.synctracking.model.impl.DossierTaxModelImpl + * @generated + */ +@ProviderType +public interface DossierTaxModel extends BaseModel, GroupedModel, + ShardedModel, StagedAuditedModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. All methods that expect a dossier tax model instance should use the {@link DossierTax} interface instead. + */ + + /** + * Returns the primary key of this dossier tax. + * + * @return the primary key of this dossier tax + */ + public long getPrimaryKey(); + + /** + * Sets the primary key of this dossier tax. + * + * @param primaryKey the primary key of this dossier tax + */ + public void setPrimaryKey(long primaryKey); + + /** + * Returns the uuid of this dossier tax. + * + * @return the uuid of this dossier tax + */ + @AutoEscape + @Override + public String getUuid(); + + /** + * Sets the uuid of this dossier tax. + * + * @param uuid the uuid of this dossier tax + */ + @Override + public void setUuid(String uuid); + + /** + * Returns the tax ID of this dossier tax. + * + * @return the tax ID of this dossier tax + */ + public long getTaxId(); + + /** + * Sets the tax ID of this dossier tax. + * + * @param taxId the tax ID of this dossier tax + */ + public void setTaxId(long taxId); + + /** + * Returns the company ID of this dossier tax. + * + * @return the company ID of this dossier tax + */ + @Override + public long getCompanyId(); + + /** + * Sets the company ID of this dossier tax. + * + * @param companyId the company ID of this dossier tax + */ + @Override + public void setCompanyId(long companyId); + + /** + * Returns the group ID of this dossier tax. + * + * @return the group ID of this dossier tax + */ + @Override + public long getGroupId(); + + /** + * Sets the group ID of this dossier tax. + * + * @param groupId the group ID of this dossier tax + */ + @Override + public void setGroupId(long groupId); + + /** + * Returns the user ID of this dossier tax. + * + * @return the user ID of this dossier tax + */ + @Override + public long getUserId(); + + /** + * Sets the user ID of this dossier tax. + * + * @param userId the user ID of this dossier tax + */ + @Override + public void setUserId(long userId); + + /** + * Returns the user uuid of this dossier tax. + * + * @return the user uuid of this dossier tax + */ + @Override + public String getUserUuid(); + + /** + * Sets the user uuid of this dossier tax. + * + * @param userUuid the user uuid of this dossier tax + */ + @Override + public void setUserUuid(String userUuid); + + /** + * Returns the user name of this dossier tax. + * + * @return the user name of this dossier tax + */ + @AutoEscape + @Override + public String getUserName(); + + /** + * Sets the user name of this dossier tax. + * + * @param userName the user name of this dossier tax + */ + @Override + public void setUserName(String userName); + + /** + * Returns the create date of this dossier tax. + * + * @return the create date of this dossier tax + */ + @Override + public Date getCreateDate(); + + /** + * Sets the create date of this dossier tax. + * + * @param createDate the create date of this dossier tax + */ + @Override + public void setCreateDate(Date createDate); + + /** + * Returns the modified date of this dossier tax. + * + * @return the modified date of this dossier tax + */ + @Override + public Date getModifiedDate(); + + /** + * Sets the modified date of this dossier tax. + * + * @param modifiedDate the modified date of this dossier tax + */ + @Override + public void setModifiedDate(Date modifiedDate); + + /** + * Returns the dossier no of this dossier tax. + * + * @return the dossier no of this dossier tax + */ + @AutoEscape + public String getDossierNo(); + + /** + * Sets the dossier no of this dossier tax. + * + * @param dossierNo the dossier no of this dossier tax + */ + public void setDossierNo(String dossierNo); + + /** + * Returns the ma so thue of this dossier tax. + * + * @return the ma so thue of this dossier tax + */ + @AutoEscape + public String getMaSoThue(); + + /** + * Sets the ma so thue of this dossier tax. + * + * @param maSoThue the ma so thue of this dossier tax + */ + public void setMaSoThue(String maSoThue); + + /** + * Returns the so quyet dinh of this dossier tax. + * + * @return the so quyet dinh of this dossier tax + */ + @AutoEscape + public String getSoQuyetDinh(); + + /** + * Sets the so quyet dinh of this dossier tax. + * + * @param soQuyetDinh the so quyet dinh of this dossier tax + */ + public void setSoQuyetDinh(String soQuyetDinh); + + /** + * Returns the ngay quyet dinh of this dossier tax. + * + * @return the ngay quyet dinh of this dossier tax + */ + public Date getNgayQuyetDinh(); + + /** + * Sets the ngay quyet dinh of this dossier tax. + * + * @param ngayQuyetDinh the ngay quyet dinh of this dossier tax + */ + public void setNgayQuyetDinh(Date ngayQuyetDinh); + + /** + * Returns the ten tieu muc of this dossier tax. + * + * @return the ten tieu muc of this dossier tax + */ + @AutoEscape + public String getTenTieuMuc(); + + /** + * Sets the ten tieu muc of this dossier tax. + * + * @param tenTieuMuc the ten tieu muc of this dossier tax + */ + public void setTenTieuMuc(String tenTieuMuc); + + /** + * Returns the so tien of this dossier tax. + * + * @return the so tien of this dossier tax + */ + public int getSoTien(); + + /** + * Sets the so tien of this dossier tax. + * + * @param soTien the so tien of this dossier tax + */ + public void setSoTien(int soTien); + + /** + * Returns the ho ten nguoi nop tien of this dossier tax. + * + * @return the ho ten nguoi nop tien of this dossier tax + */ + @AutoEscape + public String getHoTenNguoiNopTien(); + + /** + * Sets the ho ten nguoi nop tien of this dossier tax. + * + * @param hoTenNguoiNopTien the ho ten nguoi nop tien of this dossier tax + */ + public void setHoTenNguoiNopTien(String hoTenNguoiNopTien); + + /** + * Returns the so cmt nguoi nop tien of this dossier tax. + * + * @return the so cmt nguoi nop tien of this dossier tax + */ + public int getSoCmtNguoiNopTien(); + + /** + * Sets the so cmt nguoi nop tien of this dossier tax. + * + * @param soCmtNguoiNopTien the so cmt nguoi nop tien of this dossier tax + */ + public void setSoCmtNguoiNopTien(int soCmtNguoiNopTien); + + /** + * Returns the dia chi nguoi nop tien of this dossier tax. + * + * @return the dia chi nguoi nop tien of this dossier tax + */ + @AutoEscape + public String getDiaChiNguoiNopTien(); + + /** + * Sets the dia chi nguoi nop tien of this dossier tax. + * + * @param diaChiNguoiNopTien the dia chi nguoi nop tien of this dossier tax + */ + public void setDiaChiNguoiNopTien(String diaChiNguoiNopTien); + + /** + * Returns the tinh nguoi nop tien of this dossier tax. + * + * @return the tinh nguoi nop tien of this dossier tax + */ + @AutoEscape + public String getTinhNguoiNopTien(); + + /** + * Sets the tinh nguoi nop tien of this dossier tax. + * + * @param tinhNguoiNopTien the tinh nguoi nop tien of this dossier tax + */ + public void setTinhNguoiNopTien(String tinhNguoiNopTien); + + /** + * Returns the huyen nguoi nop tien of this dossier tax. + * + * @return the huyen nguoi nop tien of this dossier tax + */ + @AutoEscape + public String getHuyenNguoiNopTien(); + + /** + * Sets the huyen nguoi nop tien of this dossier tax. + * + * @param huyenNguoiNopTien the huyen nguoi nop tien of this dossier tax + */ + public void setHuyenNguoiNopTien(String huyenNguoiNopTien); + + /** + * Returns the xa nguoi nop tien of this dossier tax. + * + * @return the xa nguoi nop tien of this dossier tax + */ + @AutoEscape + public String getXaNguoiNopTien(); + + /** + * Sets the xa nguoi nop tien of this dossier tax. + * + * @param xaNguoiNopTien the xa nguoi nop tien of this dossier tax + */ + public void setXaNguoiNopTien(String xaNguoiNopTien); + + /** + * Returns the thoi gian thanh toan of this dossier tax. + * + * @return the thoi gian thanh toan of this dossier tax + */ + public Date getThoiGianThanhToan(); + + /** + * Sets the thoi gian thanh toan of this dossier tax. + * + * @param thoiGianThanhToan the thoi gian thanh toan of this dossier tax + */ + public void setThoiGianThanhToan(Date thoiGianThanhToan); + + /** + * Returns the so tien nop of this dossier tax. + * + * @return the so tien nop of this dossier tax + */ + public int getSoTienNop(); + + /** + * Sets the so tien nop of this dossier tax. + * + * @param soTienNop the so tien nop of this dossier tax + */ + public void setSoTienNop(int soTienNop); + + /** + * Returns the noi dung thanh toan of this dossier tax. + * + * @return the noi dung thanh toan of this dossier tax + */ + @AutoEscape + public String getNoiDungThanhToan(); + + /** + * Sets the noi dung thanh toan of this dossier tax. + * + * @param noiDungThanhToan the noi dung thanh toan of this dossier tax + */ + public void setNoiDungThanhToan(String noiDungThanhToan); + + /** + * Returns the trang thai thanh toan of this dossier tax. + * + * @return the trang thai thanh toan of this dossier tax + */ + public int getTrangThaiThanhToan(); + + /** + * Sets the trang thai thanh toan of this dossier tax. + * + * @param trangThaiThanhToan the trang thai thanh toan of this dossier tax + */ + public void setTrangThaiThanhToan(int trangThaiThanhToan); + + /** + * Returns the file chung tu of this dossier tax. + * + * @return the file chung tu of this dossier tax + */ + @AutoEscape + public String getFileChungTu(); + + /** + * Sets the file chung tu of this dossier tax. + * + * @param fileChungTu the file chung tu of this dossier tax + */ + public void setFileChungTu(String fileChungTu); + + /** + * Returns the ngay thue tra thong bao of this dossier tax. + * + * @return the ngay thue tra thong bao of this dossier tax + */ + public Date getNgayThueTraThongBao(); + + /** + * Sets the ngay thue tra thong bao of this dossier tax. + * + * @param ngayThueTraThongBao the ngay thue tra thong bao of this dossier tax + */ + public void setNgayThueTraThongBao(Date ngayThueTraThongBao); + + /** + * Returns the ngay tra thong bao of this dossier tax. + * + * @return the ngay tra thong bao of this dossier tax + */ + public Date getNgayTraThongBao(); + + /** + * Sets the ngay tra thong bao of this dossier tax. + * + * @param ngayTraThongBao the ngay tra thong bao of this dossier tax + */ + public void setNgayTraThongBao(Date ngayTraThongBao); + + /** + * Returns the ngay nhan bien lai of this dossier tax. + * + * @return the ngay nhan bien lai of this dossier tax + */ + public Date getNgayNhanBienLai(); + + /** + * Sets the ngay nhan bien lai of this dossier tax. + * + * @param ngayNhanBienLai the ngay nhan bien lai of this dossier tax + */ + public void setNgayNhanBienLai(Date ngayNhanBienLai); + + /** + * Returns the status tbt of this dossier tax. + * + * @return the status tbt of this dossier tax + */ + public int getStatusTBT(); + + /** + * Sets the status tbt of this dossier tax. + * + * @param statusTBT the status tbt of this dossier tax + */ + public void setStatusTBT(int statusTBT); + + /** + * Returns the status ctt of this dossier tax. + * + * @return the status ctt of this dossier tax + */ + public int getStatusCTT(); + + /** + * Sets the status ctt of this dossier tax. + * + * @param statusCTT the status ctt of this dossier tax + */ + public void setStatusCTT(int statusCTT); + + @Override + public boolean isNew(); + + @Override + public void setNew(boolean n); + + @Override + public boolean isCachedModel(); + + @Override + public void setCachedModel(boolean cachedModel); + + @Override + public boolean isEscapedModel(); + + @Override + public Serializable getPrimaryKeyObj(); + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj); + + @Override + public ExpandoBridge getExpandoBridge(); + + @Override + public void setExpandoBridgeAttributes(BaseModel baseModel); + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge); + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext); + + @Override + public Object clone(); + + @Override + public int compareTo(DossierTax dossierTax); + + @Override + public int hashCode(); + + @Override + public CacheModel toCacheModel(); + + @Override + public DossierTax toEscapedModel(); + + @Override + public DossierTax toUnescapedModel(); + + @Override + public String toString(); + + @Override + public String toXmlString(); +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxResponse.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxResponse.java new file mode 100644 index 0000000000..f7dd7d4ebb --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxResponse.java @@ -0,0 +1,12 @@ +package org.opencps.synctracking.model; + +public class DossierTaxResponse { + + public Long dossierId; + public String dossierNo; + public String maSoThue; + public String soQuyetDinh; + public String ngayQuyetDinh; + public String tenTieuMuc; + public Integer soTien; +} diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxSoap.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxSoap.java new file mode 100644 index 0000000000..467f617cd0 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxSoap.java @@ -0,0 +1,388 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.model; + +import aQute.bnd.annotation.ProviderType; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * This class is used by SOAP remote services. + * + * @author duongnt + * @generated + */ +@ProviderType +public class DossierTaxSoap implements Serializable { + public static DossierTaxSoap toSoapModel(DossierTax model) { + DossierTaxSoap soapModel = new DossierTaxSoap(); + + soapModel.setUuid(model.getUuid()); + soapModel.setTaxId(model.getTaxId()); + soapModel.setCompanyId(model.getCompanyId()); + soapModel.setGroupId(model.getGroupId()); + soapModel.setUserId(model.getUserId()); + soapModel.setUserName(model.getUserName()); + soapModel.setCreateDate(model.getCreateDate()); + soapModel.setModifiedDate(model.getModifiedDate()); + soapModel.setDossierNo(model.getDossierNo()); + soapModel.setMaSoThue(model.getMaSoThue()); + soapModel.setSoQuyetDinh(model.getSoQuyetDinh()); + soapModel.setNgayQuyetDinh(model.getNgayQuyetDinh()); + soapModel.setTenTieuMuc(model.getTenTieuMuc()); + soapModel.setSoTien(model.getSoTien()); + soapModel.setHoTenNguoiNopTien(model.getHoTenNguoiNopTien()); + soapModel.setSoCmtNguoiNopTien(model.getSoCmtNguoiNopTien()); + soapModel.setDiaChiNguoiNopTien(model.getDiaChiNguoiNopTien()); + soapModel.setTinhNguoiNopTien(model.getTinhNguoiNopTien()); + soapModel.setHuyenNguoiNopTien(model.getHuyenNguoiNopTien()); + soapModel.setXaNguoiNopTien(model.getXaNguoiNopTien()); + soapModel.setThoiGianThanhToan(model.getThoiGianThanhToan()); + soapModel.setSoTienNop(model.getSoTienNop()); + soapModel.setNoiDungThanhToan(model.getNoiDungThanhToan()); + soapModel.setTrangThaiThanhToan(model.getTrangThaiThanhToan()); + soapModel.setFileChungTu(model.getFileChungTu()); + soapModel.setNgayThueTraThongBao(model.getNgayThueTraThongBao()); + soapModel.setNgayTraThongBao(model.getNgayTraThongBao()); + soapModel.setNgayNhanBienLai(model.getNgayNhanBienLai()); + soapModel.setStatusTBT(model.getStatusTBT()); + soapModel.setStatusCTT(model.getStatusCTT()); + + return soapModel; + } + + public static DossierTaxSoap[] toSoapModels(DossierTax[] models) { + DossierTaxSoap[] soapModels = new DossierTaxSoap[models.length]; + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModel(models[i]); + } + + return soapModels; + } + + public static DossierTaxSoap[][] toSoapModels(DossierTax[][] models) { + DossierTaxSoap[][] soapModels = null; + + if (models.length > 0) { + soapModels = new DossierTaxSoap[models.length][models[0].length]; + } + else { + soapModels = new DossierTaxSoap[0][0]; + } + + for (int i = 0; i < models.length; i++) { + soapModels[i] = toSoapModels(models[i]); + } + + return soapModels; + } + + public static DossierTaxSoap[] toSoapModels(List models) { + List soapModels = new ArrayList(models.size()); + + for (DossierTax model : models) { + soapModels.add(toSoapModel(model)); + } + + return soapModels.toArray(new DossierTaxSoap[soapModels.size()]); + } + + public DossierTaxSoap() { + } + + public long getPrimaryKey() { + return _taxId; + } + + public void setPrimaryKey(long pk) { + setTaxId(pk); + } + + public String getUuid() { + return _uuid; + } + + public void setUuid(String uuid) { + _uuid = uuid; + } + + public long getTaxId() { + return _taxId; + } + + public void setTaxId(long taxId) { + _taxId = taxId; + } + + public long getCompanyId() { + return _companyId; + } + + public void setCompanyId(long companyId) { + _companyId = companyId; + } + + public long getGroupId() { + return _groupId; + } + + public void setGroupId(long groupId) { + _groupId = groupId; + } + + public long getUserId() { + return _userId; + } + + public void setUserId(long userId) { + _userId = userId; + } + + public String getUserName() { + return _userName; + } + + public void setUserName(String userName) { + _userName = userName; + } + + public Date getCreateDate() { + return _createDate; + } + + public void setCreateDate(Date createDate) { + _createDate = createDate; + } + + public Date getModifiedDate() { + return _modifiedDate; + } + + public void setModifiedDate(Date modifiedDate) { + _modifiedDate = modifiedDate; + } + + public String getDossierNo() { + return _dossierNo; + } + + public void setDossierNo(String dossierNo) { + _dossierNo = dossierNo; + } + + public String getMaSoThue() { + return _maSoThue; + } + + public void setMaSoThue(String maSoThue) { + _maSoThue = maSoThue; + } + + public String getSoQuyetDinh() { + return _soQuyetDinh; + } + + public void setSoQuyetDinh(String soQuyetDinh) { + _soQuyetDinh = soQuyetDinh; + } + + public Date getNgayQuyetDinh() { + return _ngayQuyetDinh; + } + + public void setNgayQuyetDinh(Date ngayQuyetDinh) { + _ngayQuyetDinh = ngayQuyetDinh; + } + + public String getTenTieuMuc() { + return _tenTieuMuc; + } + + public void setTenTieuMuc(String tenTieuMuc) { + _tenTieuMuc = tenTieuMuc; + } + + public int getSoTien() { + return _soTien; + } + + public void setSoTien(int soTien) { + _soTien = soTien; + } + + public String getHoTenNguoiNopTien() { + return _hoTenNguoiNopTien; + } + + public void setHoTenNguoiNopTien(String hoTenNguoiNopTien) { + _hoTenNguoiNopTien = hoTenNguoiNopTien; + } + + public int getSoCmtNguoiNopTien() { + return _soCmtNguoiNopTien; + } + + public void setSoCmtNguoiNopTien(int soCmtNguoiNopTien) { + _soCmtNguoiNopTien = soCmtNguoiNopTien; + } + + public String getDiaChiNguoiNopTien() { + return _diaChiNguoiNopTien; + } + + public void setDiaChiNguoiNopTien(String diaChiNguoiNopTien) { + _diaChiNguoiNopTien = diaChiNguoiNopTien; + } + + public String getTinhNguoiNopTien() { + return _tinhNguoiNopTien; + } + + public void setTinhNguoiNopTien(String tinhNguoiNopTien) { + _tinhNguoiNopTien = tinhNguoiNopTien; + } + + public String getHuyenNguoiNopTien() { + return _huyenNguoiNopTien; + } + + public void setHuyenNguoiNopTien(String huyenNguoiNopTien) { + _huyenNguoiNopTien = huyenNguoiNopTien; + } + + public String getXaNguoiNopTien() { + return _xaNguoiNopTien; + } + + public void setXaNguoiNopTien(String xaNguoiNopTien) { + _xaNguoiNopTien = xaNguoiNopTien; + } + + public Date getThoiGianThanhToan() { + return _thoiGianThanhToan; + } + + public void setThoiGianThanhToan(Date thoiGianThanhToan) { + _thoiGianThanhToan = thoiGianThanhToan; + } + + public int getSoTienNop() { + return _soTienNop; + } + + public void setSoTienNop(int soTienNop) { + _soTienNop = soTienNop; + } + + public String getNoiDungThanhToan() { + return _noiDungThanhToan; + } + + public void setNoiDungThanhToan(String noiDungThanhToan) { + _noiDungThanhToan = noiDungThanhToan; + } + + public int getTrangThaiThanhToan() { + return _trangThaiThanhToan; + } + + public void setTrangThaiThanhToan(int trangThaiThanhToan) { + _trangThaiThanhToan = trangThaiThanhToan; + } + + public String getFileChungTu() { + return _fileChungTu; + } + + public void setFileChungTu(String fileChungTu) { + _fileChungTu = fileChungTu; + } + + public Date getNgayThueTraThongBao() { + return _ngayThueTraThongBao; + } + + public void setNgayThueTraThongBao(Date ngayThueTraThongBao) { + _ngayThueTraThongBao = ngayThueTraThongBao; + } + + public Date getNgayTraThongBao() { + return _ngayTraThongBao; + } + + public void setNgayTraThongBao(Date ngayTraThongBao) { + _ngayTraThongBao = ngayTraThongBao; + } + + public Date getNgayNhanBienLai() { + return _ngayNhanBienLai; + } + + public void setNgayNhanBienLai(Date ngayNhanBienLai) { + _ngayNhanBienLai = ngayNhanBienLai; + } + + public int getStatusTBT() { + return _statusTBT; + } + + public void setStatusTBT(int statusTBT) { + _statusTBT = statusTBT; + } + + public int getStatusCTT() { + return _statusCTT; + } + + public void setStatusCTT(int statusCTT) { + _statusCTT = statusCTT; + } + + private String _uuid; + private long _taxId; + private long _companyId; + private long _groupId; + private long _userId; + private String _userName; + private Date _createDate; + private Date _modifiedDate; + private String _dossierNo; + private String _maSoThue; + private String _soQuyetDinh; + private Date _ngayQuyetDinh; + private String _tenTieuMuc; + private int _soTien; + private String _hoTenNguoiNopTien; + private int _soCmtNguoiNopTien; + private String _diaChiNguoiNopTien; + private String _tinhNguoiNopTien; + private String _huyenNguoiNopTien; + private String _xaNguoiNopTien; + private Date _thoiGianThanhToan; + private int _soTienNop; + private String _noiDungThanhToan; + private int _trangThaiThanhToan; + private String _fileChungTu; + private Date _ngayThueTraThongBao; + private Date _ngayTraThongBao; + private Date _ngayNhanBienLai; + private int _statusTBT; + private int _statusCTT; +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxWrapper.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxWrapper.java new file mode 100644 index 0000000000..ff014b5ab6 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/DossierTaxWrapper.java @@ -0,0 +1,1066 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.model; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; + +import com.liferay.exportimport.kernel.lar.StagedModelType; + +import com.liferay.portal.kernel.model.ModelWrapper; +import com.liferay.portal.kernel.service.ServiceContext; + +import java.io.Serializable; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + *

+ * This class is a wrapper for {@link DossierTax}. + *

+ * + * @author duongnt + * @see DossierTax + * @generated + */ +@ProviderType +public class DossierTaxWrapper implements DossierTax, ModelWrapper { + public DossierTaxWrapper(DossierTax dossierTax) { + _dossierTax = dossierTax; + } + + @Override + public Class getModelClass() { + return DossierTax.class; + } + + @Override + public String getModelClassName() { + return DossierTax.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("uuid", getUuid()); + attributes.put("taxId", getTaxId()); + attributes.put("companyId", getCompanyId()); + attributes.put("groupId", getGroupId()); + attributes.put("userId", getUserId()); + attributes.put("userName", getUserName()); + attributes.put("createDate", getCreateDate()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("dossierNo", getDossierNo()); + attributes.put("maSoThue", getMaSoThue()); + attributes.put("soQuyetDinh", getSoQuyetDinh()); + attributes.put("ngayQuyetDinh", getNgayQuyetDinh()); + attributes.put("tenTieuMuc", getTenTieuMuc()); + attributes.put("soTien", getSoTien()); + attributes.put("hoTenNguoiNopTien", getHoTenNguoiNopTien()); + attributes.put("soCmtNguoiNopTien", getSoCmtNguoiNopTien()); + attributes.put("diaChiNguoiNopTien", getDiaChiNguoiNopTien()); + attributes.put("tinhNguoiNopTien", getTinhNguoiNopTien()); + attributes.put("huyenNguoiNopTien", getHuyenNguoiNopTien()); + attributes.put("xaNguoiNopTien", getXaNguoiNopTien()); + attributes.put("thoiGianThanhToan", getThoiGianThanhToan()); + attributes.put("soTienNop", getSoTienNop()); + attributes.put("noiDungThanhToan", getNoiDungThanhToan()); + attributes.put("trangThaiThanhToan", getTrangThaiThanhToan()); + attributes.put("fileChungTu", getFileChungTu()); + attributes.put("ngayThueTraThongBao", getNgayThueTraThongBao()); + attributes.put("ngayTraThongBao", getNgayTraThongBao()); + attributes.put("ngayNhanBienLai", getNgayNhanBienLai()); + attributes.put("statusTBT", getStatusTBT()); + attributes.put("statusCTT", getStatusCTT()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + String uuid = (String)attributes.get("uuid"); + + if (uuid != null) { + setUuid(uuid); + } + + Long taxId = (Long)attributes.get("taxId"); + + if (taxId != null) { + setTaxId(taxId); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String userName = (String)attributes.get("userName"); + + if (userName != null) { + setUserName(userName); + } + + Date createDate = (Date)attributes.get("createDate"); + + if (createDate != null) { + setCreateDate(createDate); + } + + Date modifiedDate = (Date)attributes.get("modifiedDate"); + + if (modifiedDate != null) { + setModifiedDate(modifiedDate); + } + + String dossierNo = (String)attributes.get("dossierNo"); + + if (dossierNo != null) { + setDossierNo(dossierNo); + } + + String maSoThue = (String)attributes.get("maSoThue"); + + if (maSoThue != null) { + setMaSoThue(maSoThue); + } + + String soQuyetDinh = (String)attributes.get("soQuyetDinh"); + + if (soQuyetDinh != null) { + setSoQuyetDinh(soQuyetDinh); + } + + Date ngayQuyetDinh = (Date)attributes.get("ngayQuyetDinh"); + + if (ngayQuyetDinh != null) { + setNgayQuyetDinh(ngayQuyetDinh); + } + + String tenTieuMuc = (String)attributes.get("tenTieuMuc"); + + if (tenTieuMuc != null) { + setTenTieuMuc(tenTieuMuc); + } + + Integer soTien = (Integer)attributes.get("soTien"); + + if (soTien != null) { + setSoTien(soTien); + } + + String hoTenNguoiNopTien = (String)attributes.get("hoTenNguoiNopTien"); + + if (hoTenNguoiNopTien != null) { + setHoTenNguoiNopTien(hoTenNguoiNopTien); + } + + Integer soCmtNguoiNopTien = (Integer)attributes.get("soCmtNguoiNopTien"); + + if (soCmtNguoiNopTien != null) { + setSoCmtNguoiNopTien(soCmtNguoiNopTien); + } + + String diaChiNguoiNopTien = (String)attributes.get("diaChiNguoiNopTien"); + + if (diaChiNguoiNopTien != null) { + setDiaChiNguoiNopTien(diaChiNguoiNopTien); + } + + String tinhNguoiNopTien = (String)attributes.get("tinhNguoiNopTien"); + + if (tinhNguoiNopTien != null) { + setTinhNguoiNopTien(tinhNguoiNopTien); + } + + String huyenNguoiNopTien = (String)attributes.get("huyenNguoiNopTien"); + + if (huyenNguoiNopTien != null) { + setHuyenNguoiNopTien(huyenNguoiNopTien); + } + + String xaNguoiNopTien = (String)attributes.get("xaNguoiNopTien"); + + if (xaNguoiNopTien != null) { + setXaNguoiNopTien(xaNguoiNopTien); + } + + Date thoiGianThanhToan = (Date)attributes.get("thoiGianThanhToan"); + + if (thoiGianThanhToan != null) { + setThoiGianThanhToan(thoiGianThanhToan); + } + + Integer soTienNop = (Integer)attributes.get("soTienNop"); + + if (soTienNop != null) { + setSoTienNop(soTienNop); + } + + String noiDungThanhToan = (String)attributes.get("noiDungThanhToan"); + + if (noiDungThanhToan != null) { + setNoiDungThanhToan(noiDungThanhToan); + } + + Integer trangThaiThanhToan = (Integer)attributes.get( + "trangThaiThanhToan"); + + if (trangThaiThanhToan != null) { + setTrangThaiThanhToan(trangThaiThanhToan); + } + + String fileChungTu = (String)attributes.get("fileChungTu"); + + if (fileChungTu != null) { + setFileChungTu(fileChungTu); + } + + Date ngayThueTraThongBao = (Date)attributes.get("ngayThueTraThongBao"); + + if (ngayThueTraThongBao != null) { + setNgayThueTraThongBao(ngayThueTraThongBao); + } + + Date ngayTraThongBao = (Date)attributes.get("ngayTraThongBao"); + + if (ngayTraThongBao != null) { + setNgayTraThongBao(ngayTraThongBao); + } + + Date ngayNhanBienLai = (Date)attributes.get("ngayNhanBienLai"); + + if (ngayNhanBienLai != null) { + setNgayNhanBienLai(ngayNhanBienLai); + } + + Integer statusTBT = (Integer)attributes.get("statusTBT"); + + if (statusTBT != null) { + setStatusTBT(statusTBT); + } + + Integer statusCTT = (Integer)attributes.get("statusCTT"); + + if (statusCTT != null) { + setStatusCTT(statusCTT); + } + } + + @Override + public Object clone() { + return new DossierTaxWrapper((DossierTax)_dossierTax.clone()); + } + + @Override + public int compareTo(DossierTax dossierTax) { + return _dossierTax.compareTo(dossierTax); + } + + /** + * Returns the company ID of this dossier tax. + * + * @return the company ID of this dossier tax + */ + @Override + public long getCompanyId() { + return _dossierTax.getCompanyId(); + } + + /** + * Returns the create date of this dossier tax. + * + * @return the create date of this dossier tax + */ + @Override + public Date getCreateDate() { + return _dossierTax.getCreateDate(); + } + + /** + * Returns the dia chi nguoi nop tien of this dossier tax. + * + * @return the dia chi nguoi nop tien of this dossier tax + */ + @Override + public String getDiaChiNguoiNopTien() { + return _dossierTax.getDiaChiNguoiNopTien(); + } + + /** + * Returns the dossier no of this dossier tax. + * + * @return the dossier no of this dossier tax + */ + @Override + public String getDossierNo() { + return _dossierTax.getDossierNo(); + } + + @Override + public ExpandoBridge getExpandoBridge() { + return _dossierTax.getExpandoBridge(); + } + + /** + * Returns the file chung tu of this dossier tax. + * + * @return the file chung tu of this dossier tax + */ + @Override + public String getFileChungTu() { + return _dossierTax.getFileChungTu(); + } + + /** + * Returns the group ID of this dossier tax. + * + * @return the group ID of this dossier tax + */ + @Override + public long getGroupId() { + return _dossierTax.getGroupId(); + } + + /** + * Returns the ho ten nguoi nop tien of this dossier tax. + * + * @return the ho ten nguoi nop tien of this dossier tax + */ + @Override + public String getHoTenNguoiNopTien() { + return _dossierTax.getHoTenNguoiNopTien(); + } + + /** + * Returns the huyen nguoi nop tien of this dossier tax. + * + * @return the huyen nguoi nop tien of this dossier tax + */ + @Override + public String getHuyenNguoiNopTien() { + return _dossierTax.getHuyenNguoiNopTien(); + } + + /** + * Returns the ma so thue of this dossier tax. + * + * @return the ma so thue of this dossier tax + */ + @Override + public String getMaSoThue() { + return _dossierTax.getMaSoThue(); + } + + /** + * Returns the modified date of this dossier tax. + * + * @return the modified date of this dossier tax + */ + @Override + public Date getModifiedDate() { + return _dossierTax.getModifiedDate(); + } + + /** + * Returns the ngay nhan bien lai of this dossier tax. + * + * @return the ngay nhan bien lai of this dossier tax + */ + @Override + public Date getNgayNhanBienLai() { + return _dossierTax.getNgayNhanBienLai(); + } + + /** + * Returns the ngay quyet dinh of this dossier tax. + * + * @return the ngay quyet dinh of this dossier tax + */ + @Override + public Date getNgayQuyetDinh() { + return _dossierTax.getNgayQuyetDinh(); + } + + /** + * Returns the ngay thue tra thong bao of this dossier tax. + * + * @return the ngay thue tra thong bao of this dossier tax + */ + @Override + public Date getNgayThueTraThongBao() { + return _dossierTax.getNgayThueTraThongBao(); + } + + /** + * Returns the ngay tra thong bao of this dossier tax. + * + * @return the ngay tra thong bao of this dossier tax + */ + @Override + public Date getNgayTraThongBao() { + return _dossierTax.getNgayTraThongBao(); + } + + /** + * Returns the noi dung thanh toan of this dossier tax. + * + * @return the noi dung thanh toan of this dossier tax + */ + @Override + public String getNoiDungThanhToan() { + return _dossierTax.getNoiDungThanhToan(); + } + + /** + * Returns the primary key of this dossier tax. + * + * @return the primary key of this dossier tax + */ + @Override + public long getPrimaryKey() { + return _dossierTax.getPrimaryKey(); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _dossierTax.getPrimaryKeyObj(); + } + + /** + * Returns the so cmt nguoi nop tien of this dossier tax. + * + * @return the so cmt nguoi nop tien of this dossier tax + */ + @Override + public int getSoCmtNguoiNopTien() { + return _dossierTax.getSoCmtNguoiNopTien(); + } + + /** + * Returns the so quyet dinh of this dossier tax. + * + * @return the so quyet dinh of this dossier tax + */ + @Override + public String getSoQuyetDinh() { + return _dossierTax.getSoQuyetDinh(); + } + + /** + * Returns the so tien of this dossier tax. + * + * @return the so tien of this dossier tax + */ + @Override + public int getSoTien() { + return _dossierTax.getSoTien(); + } + + /** + * Returns the so tien nop of this dossier tax. + * + * @return the so tien nop of this dossier tax + */ + @Override + public int getSoTienNop() { + return _dossierTax.getSoTienNop(); + } + + /** + * Returns the status ctt of this dossier tax. + * + * @return the status ctt of this dossier tax + */ + @Override + public int getStatusCTT() { + return _dossierTax.getStatusCTT(); + } + + /** + * Returns the status tbt of this dossier tax. + * + * @return the status tbt of this dossier tax + */ + @Override + public int getStatusTBT() { + return _dossierTax.getStatusTBT(); + } + + /** + * Returns the tax ID of this dossier tax. + * + * @return the tax ID of this dossier tax + */ + @Override + public long getTaxId() { + return _dossierTax.getTaxId(); + } + + /** + * Returns the ten tieu muc of this dossier tax. + * + * @return the ten tieu muc of this dossier tax + */ + @Override + public String getTenTieuMuc() { + return _dossierTax.getTenTieuMuc(); + } + + /** + * Returns the thoi gian thanh toan of this dossier tax. + * + * @return the thoi gian thanh toan of this dossier tax + */ + @Override + public Date getThoiGianThanhToan() { + return _dossierTax.getThoiGianThanhToan(); + } + + /** + * Returns the tinh nguoi nop tien of this dossier tax. + * + * @return the tinh nguoi nop tien of this dossier tax + */ + @Override + public String getTinhNguoiNopTien() { + return _dossierTax.getTinhNguoiNopTien(); + } + + /** + * Returns the trang thai thanh toan of this dossier tax. + * + * @return the trang thai thanh toan of this dossier tax + */ + @Override + public int getTrangThaiThanhToan() { + return _dossierTax.getTrangThaiThanhToan(); + } + + /** + * Returns the user ID of this dossier tax. + * + * @return the user ID of this dossier tax + */ + @Override + public long getUserId() { + return _dossierTax.getUserId(); + } + + /** + * Returns the user name of this dossier tax. + * + * @return the user name of this dossier tax + */ + @Override + public String getUserName() { + return _dossierTax.getUserName(); + } + + /** + * Returns the user uuid of this dossier tax. + * + * @return the user uuid of this dossier tax + */ + @Override + public String getUserUuid() { + return _dossierTax.getUserUuid(); + } + + /** + * Returns the uuid of this dossier tax. + * + * @return the uuid of this dossier tax + */ + @Override + public String getUuid() { + return _dossierTax.getUuid(); + } + + /** + * Returns the xa nguoi nop tien of this dossier tax. + * + * @return the xa nguoi nop tien of this dossier tax + */ + @Override + public String getXaNguoiNopTien() { + return _dossierTax.getXaNguoiNopTien(); + } + + @Override + public int hashCode() { + return _dossierTax.hashCode(); + } + + @Override + public boolean isCachedModel() { + return _dossierTax.isCachedModel(); + } + + @Override + public boolean isEscapedModel() { + return _dossierTax.isEscapedModel(); + } + + @Override + public boolean isNew() { + return _dossierTax.isNew(); + } + + @Override + public void persist() { + _dossierTax.persist(); + } + + @Override + public void setCachedModel(boolean cachedModel) { + _dossierTax.setCachedModel(cachedModel); + } + + /** + * Sets the company ID of this dossier tax. + * + * @param companyId the company ID of this dossier tax + */ + @Override + public void setCompanyId(long companyId) { + _dossierTax.setCompanyId(companyId); + } + + /** + * Sets the create date of this dossier tax. + * + * @param createDate the create date of this dossier tax + */ + @Override + public void setCreateDate(Date createDate) { + _dossierTax.setCreateDate(createDate); + } + + /** + * Sets the dia chi nguoi nop tien of this dossier tax. + * + * @param diaChiNguoiNopTien the dia chi nguoi nop tien of this dossier tax + */ + @Override + public void setDiaChiNguoiNopTien(String diaChiNguoiNopTien) { + _dossierTax.setDiaChiNguoiNopTien(diaChiNguoiNopTien); + } + + /** + * Sets the dossier no of this dossier tax. + * + * @param dossierNo the dossier no of this dossier tax + */ + @Override + public void setDossierNo(String dossierNo) { + _dossierTax.setDossierNo(dossierNo); + } + + @Override + public void setExpandoBridgeAttributes( + com.liferay.portal.kernel.model.BaseModel baseModel) { + _dossierTax.setExpandoBridgeAttributes(baseModel); + } + + @Override + public void setExpandoBridgeAttributes(ExpandoBridge expandoBridge) { + _dossierTax.setExpandoBridgeAttributes(expandoBridge); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + _dossierTax.setExpandoBridgeAttributes(serviceContext); + } + + /** + * Sets the file chung tu of this dossier tax. + * + * @param fileChungTu the file chung tu of this dossier tax + */ + @Override + public void setFileChungTu(String fileChungTu) { + _dossierTax.setFileChungTu(fileChungTu); + } + + /** + * Sets the group ID of this dossier tax. + * + * @param groupId the group ID of this dossier tax + */ + @Override + public void setGroupId(long groupId) { + _dossierTax.setGroupId(groupId); + } + + /** + * Sets the ho ten nguoi nop tien of this dossier tax. + * + * @param hoTenNguoiNopTien the ho ten nguoi nop tien of this dossier tax + */ + @Override + public void setHoTenNguoiNopTien(String hoTenNguoiNopTien) { + _dossierTax.setHoTenNguoiNopTien(hoTenNguoiNopTien); + } + + /** + * Sets the huyen nguoi nop tien of this dossier tax. + * + * @param huyenNguoiNopTien the huyen nguoi nop tien of this dossier tax + */ + @Override + public void setHuyenNguoiNopTien(String huyenNguoiNopTien) { + _dossierTax.setHuyenNguoiNopTien(huyenNguoiNopTien); + } + + /** + * Sets the ma so thue of this dossier tax. + * + * @param maSoThue the ma so thue of this dossier tax + */ + @Override + public void setMaSoThue(String maSoThue) { + _dossierTax.setMaSoThue(maSoThue); + } + + /** + * Sets the modified date of this dossier tax. + * + * @param modifiedDate the modified date of this dossier tax + */ + @Override + public void setModifiedDate(Date modifiedDate) { + _dossierTax.setModifiedDate(modifiedDate); + } + + @Override + public void setNew(boolean n) { + _dossierTax.setNew(n); + } + + /** + * Sets the ngay nhan bien lai of this dossier tax. + * + * @param ngayNhanBienLai the ngay nhan bien lai of this dossier tax + */ + @Override + public void setNgayNhanBienLai(Date ngayNhanBienLai) { + _dossierTax.setNgayNhanBienLai(ngayNhanBienLai); + } + + /** + * Sets the ngay quyet dinh of this dossier tax. + * + * @param ngayQuyetDinh the ngay quyet dinh of this dossier tax + */ + @Override + public void setNgayQuyetDinh(Date ngayQuyetDinh) { + _dossierTax.setNgayQuyetDinh(ngayQuyetDinh); + } + + /** + * Sets the ngay thue tra thong bao of this dossier tax. + * + * @param ngayThueTraThongBao the ngay thue tra thong bao of this dossier tax + */ + @Override + public void setNgayThueTraThongBao(Date ngayThueTraThongBao) { + _dossierTax.setNgayThueTraThongBao(ngayThueTraThongBao); + } + + /** + * Sets the ngay tra thong bao of this dossier tax. + * + * @param ngayTraThongBao the ngay tra thong bao of this dossier tax + */ + @Override + public void setNgayTraThongBao(Date ngayTraThongBao) { + _dossierTax.setNgayTraThongBao(ngayTraThongBao); + } + + /** + * Sets the noi dung thanh toan of this dossier tax. + * + * @param noiDungThanhToan the noi dung thanh toan of this dossier tax + */ + @Override + public void setNoiDungThanhToan(String noiDungThanhToan) { + _dossierTax.setNoiDungThanhToan(noiDungThanhToan); + } + + /** + * Sets the primary key of this dossier tax. + * + * @param primaryKey the primary key of this dossier tax + */ + @Override + public void setPrimaryKey(long primaryKey) { + _dossierTax.setPrimaryKey(primaryKey); + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + _dossierTax.setPrimaryKeyObj(primaryKeyObj); + } + + /** + * Sets the so cmt nguoi nop tien of this dossier tax. + * + * @param soCmtNguoiNopTien the so cmt nguoi nop tien of this dossier tax + */ + @Override + public void setSoCmtNguoiNopTien(int soCmtNguoiNopTien) { + _dossierTax.setSoCmtNguoiNopTien(soCmtNguoiNopTien); + } + + /** + * Sets the so quyet dinh of this dossier tax. + * + * @param soQuyetDinh the so quyet dinh of this dossier tax + */ + @Override + public void setSoQuyetDinh(String soQuyetDinh) { + _dossierTax.setSoQuyetDinh(soQuyetDinh); + } + + /** + * Sets the so tien of this dossier tax. + * + * @param soTien the so tien of this dossier tax + */ + @Override + public void setSoTien(int soTien) { + _dossierTax.setSoTien(soTien); + } + + /** + * Sets the so tien nop of this dossier tax. + * + * @param soTienNop the so tien nop of this dossier tax + */ + @Override + public void setSoTienNop(int soTienNop) { + _dossierTax.setSoTienNop(soTienNop); + } + + /** + * Sets the status ctt of this dossier tax. + * + * @param statusCTT the status ctt of this dossier tax + */ + @Override + public void setStatusCTT(int statusCTT) { + _dossierTax.setStatusCTT(statusCTT); + } + + /** + * Sets the status tbt of this dossier tax. + * + * @param statusTBT the status tbt of this dossier tax + */ + @Override + public void setStatusTBT(int statusTBT) { + _dossierTax.setStatusTBT(statusTBT); + } + + /** + * Sets the tax ID of this dossier tax. + * + * @param taxId the tax ID of this dossier tax + */ + @Override + public void setTaxId(long taxId) { + _dossierTax.setTaxId(taxId); + } + + /** + * Sets the ten tieu muc of this dossier tax. + * + * @param tenTieuMuc the ten tieu muc of this dossier tax + */ + @Override + public void setTenTieuMuc(String tenTieuMuc) { + _dossierTax.setTenTieuMuc(tenTieuMuc); + } + + /** + * Sets the thoi gian thanh toan of this dossier tax. + * + * @param thoiGianThanhToan the thoi gian thanh toan of this dossier tax + */ + @Override + public void setThoiGianThanhToan(Date thoiGianThanhToan) { + _dossierTax.setThoiGianThanhToan(thoiGianThanhToan); + } + + /** + * Sets the tinh nguoi nop tien of this dossier tax. + * + * @param tinhNguoiNopTien the tinh nguoi nop tien of this dossier tax + */ + @Override + public void setTinhNguoiNopTien(String tinhNguoiNopTien) { + _dossierTax.setTinhNguoiNopTien(tinhNguoiNopTien); + } + + /** + * Sets the trang thai thanh toan of this dossier tax. + * + * @param trangThaiThanhToan the trang thai thanh toan of this dossier tax + */ + @Override + public void setTrangThaiThanhToan(int trangThaiThanhToan) { + _dossierTax.setTrangThaiThanhToan(trangThaiThanhToan); + } + + /** + * Sets the user ID of this dossier tax. + * + * @param userId the user ID of this dossier tax + */ + @Override + public void setUserId(long userId) { + _dossierTax.setUserId(userId); + } + + /** + * Sets the user name of this dossier tax. + * + * @param userName the user name of this dossier tax + */ + @Override + public void setUserName(String userName) { + _dossierTax.setUserName(userName); + } + + /** + * Sets the user uuid of this dossier tax. + * + * @param userUuid the user uuid of this dossier tax + */ + @Override + public void setUserUuid(String userUuid) { + _dossierTax.setUserUuid(userUuid); + } + + /** + * Sets the uuid of this dossier tax. + * + * @param uuid the uuid of this dossier tax + */ + @Override + public void setUuid(String uuid) { + _dossierTax.setUuid(uuid); + } + + /** + * Sets the xa nguoi nop tien of this dossier tax. + * + * @param xaNguoiNopTien the xa nguoi nop tien of this dossier tax + */ + @Override + public void setXaNguoiNopTien(String xaNguoiNopTien) { + _dossierTax.setXaNguoiNopTien(xaNguoiNopTien); + } + + @Override + public com.liferay.portal.kernel.model.CacheModel toCacheModel() { + return _dossierTax.toCacheModel(); + } + + @Override + public DossierTax toEscapedModel() { + return new DossierTaxWrapper(_dossierTax.toEscapedModel()); + } + + @Override + public String toString() { + return _dossierTax.toString(); + } + + @Override + public DossierTax toUnescapedModel() { + return new DossierTaxWrapper(_dossierTax.toUnescapedModel()); + } + + @Override + public String toXmlString() { + return _dossierTax.toXmlString(); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof DossierTaxWrapper)) { + return false; + } + + DossierTaxWrapper dossierTaxWrapper = (DossierTaxWrapper)obj; + + if (Objects.equals(_dossierTax, dossierTaxWrapper._dossierTax)) { + return true; + } + + return false; + } + + @Override + public StagedModelType getStagedModelType() { + return _dossierTax.getStagedModelType(); + } + + @Override + public DossierTax getWrappedModel() { + return _dossierTax; + } + + @Override + public boolean isEntityCacheEnabled() { + return _dossierTax.isEntityCacheEnabled(); + } + + @Override + public boolean isFinderCacheEnabled() { + return _dossierTax.isFinderCacheEnabled(); + } + + @Override + public void resetOriginalValues() { + _dossierTax.resetOriginalValues(); + } + + private final DossierTax _dossierTax; +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTracking.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTracking.java index 319c0053cb..cf85bc8167 100644 --- a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTracking.java +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTracking.java @@ -23,7 +23,7 @@ /** * The extended model interface for the SyncTracking service. Represents a row in the "opencps_synctracking" database table, with each column mapped to a property of this class. * - * @author Brian Wing Shun Chan + * @author duongnt * @see SyncTrackingModel * @see org.opencps.synctracking.model.impl.SyncTrackingImpl * @see org.opencps.synctracking.model.impl.SyncTrackingModelImpl diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingModel.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingModel.java index e7697d630b..49d4824540 100644 --- a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingModel.java +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingModel.java @@ -37,7 +37,7 @@ * This interface and its corresponding implementation {@link org.opencps.synctracking.model.impl.SyncTrackingModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link org.opencps.synctracking.model.impl.SyncTrackingImpl}. *

* - * @author Brian Wing Shun Chan + * @author duongnt * @see SyncTracking * @see org.opencps.synctracking.model.impl.SyncTrackingImpl * @see org.opencps.synctracking.model.impl.SyncTrackingModelImpl diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingQuery.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingQuery.java index 093294f12f..61b92e3079 100644 --- a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingQuery.java +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingQuery.java @@ -16,6 +16,8 @@ public class SyncTrackingQuery { public String toDate; @QueryParam(value = "unit") public String unit; + @QueryParam(value = "serverNo") + public String serverNo; @QueryParam(value = "protocol") public String protocol; @QueryParam(value = "stateSync") diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingSoap.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingSoap.java index 431f9c2414..3a5c83b735 100644 --- a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingSoap.java +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingSoap.java @@ -23,10 +23,9 @@ import java.util.List; /** - * This class is used by SOAP remote services, specifically {@link org.opencps.synctracking.service.http.SyncTrackingServiceSoap}. + * This class is used by SOAP remote services. * - * @author Brian Wing Shun Chan - * @see org.opencps.synctracking.service.http.SyncTrackingServiceSoap + * @author duongnt * @generated */ @ProviderType diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingWrapper.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingWrapper.java index a6f5e22082..345d459772 100644 --- a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingWrapper.java +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/model/SyncTrackingWrapper.java @@ -35,7 +35,7 @@ * This class is a wrapper for {@link SyncTracking}. *

* - * @author Brian Wing Shun Chan + * @author duongnt * @see SyncTracking * @generated */ diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/DossierTaxLocalService.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/DossierTaxLocalService.java new file mode 100644 index 0000000000..8f943ca8e0 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/DossierTaxLocalService.java @@ -0,0 +1,306 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.service; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.exportimport.kernel.lar.PortletDataContext; + +import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.service.BaseLocalService; +import com.liferay.portal.kernel.service.PersistedModelLocalService; +import com.liferay.portal.kernel.transaction.Isolation; +import com.liferay.portal.kernel.transaction.Propagation; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.kernel.util.OrderByComparator; + +import org.opencps.synctracking.model.DossierTax; +import org.opencps.synctracking.model.DossierTaxInput; + +import java.io.Serializable; + +import java.util.List; + +/** + * Provides the local service interface for DossierTax. Methods of this + * service will not have security checks based on the propagated JAAS + * credentials because this service can only be accessed from within the same + * VM. + * + * @author duongnt + * @see DossierTaxLocalServiceUtil + * @see org.opencps.synctracking.service.base.DossierTaxLocalServiceBaseImpl + * @see org.opencps.synctracking.service.impl.DossierTaxLocalServiceImpl + * @generated + */ +@ProviderType +@Transactional(isolation = Isolation.PORTAL, rollbackFor = { + PortalException.class, SystemException.class}) +public interface DossierTaxLocalService extends BaseLocalService, + PersistedModelLocalService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link DossierTaxLocalServiceUtil} to access the dossier tax local service. Add custom service methods to {@link org.opencps.synctracking.service.impl.DossierTaxLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. + */ + + /** + * Adds the dossier tax to the database. Also notifies the appropriate model listeners. + * + * @param dossierTax the dossier tax + * @return the dossier tax that was added + */ + @Indexable(type = IndexableType.REINDEX) + public DossierTax addDossierTax(DossierTax dossierTax); + + /** + * Creates a new dossier tax with the primary key. Does not add the dossier tax to the database. + * + * @param taxId the primary key for the new dossier tax + * @return the new dossier tax + */ + @Transactional(enabled = false) + public DossierTax createDossierTax(long taxId); + + public DossierTax createDossierTaxManual(DossierTaxInput dossierTaxInput); + + /** + * Deletes the dossier tax from the database. Also notifies the appropriate model listeners. + * + * @param dossierTax the dossier tax + * @return the dossier tax that was removed + */ + @Indexable(type = IndexableType.DELETE) + public DossierTax deleteDossierTax(DossierTax dossierTax); + + /** + * Deletes the dossier tax with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax that was removed + * @throws PortalException if a dossier tax with the primary key could not be found + */ + @Indexable(type = IndexableType.DELETE) + public DossierTax deleteDossierTax(long taxId) throws PortalException; + + /** + * @throws PortalException + */ + @Override + public PersistedModel deletePersistedModel(PersistedModel persistedModel) + throws PortalException; + + public DynamicQuery dynamicQuery(); + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery); + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.synctracking.model.impl.DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end); + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.synctracking.model.impl.DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end, OrderByComparator orderByComparator); + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + public long dynamicQueryCount(DynamicQuery dynamicQuery); + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public DossierTax fetchDossierTax(long taxId); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public DossierTax fetchDossierTaxByDMS(String dossierNo, String maSoThue, + String soQuyetDinh); + + /** + * Returns the dossier tax matching the UUID and group. + * + * @param uuid the dossier tax's UUID + * @param groupId the primary key of the group + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public DossierTax fetchDossierTaxByUuidAndGroupId(String uuid, long groupId); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ActionableDynamicQuery getActionableDynamicQuery(); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByDossierIdAndStatusCTT(String dossierNo, + int statuses); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByDossierIdAndStatusTBT(String dossierNo, + int statuses); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByStatusCTT(int statusTBT, int statusCTT, + int start, int end, OrderByComparator orderByComparator); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByStatusTBT(int[] statuses, int start, int end, + OrderByComparator orderByComparator); + + /** + * Returns the dossier tax with the primary key. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax + * @throws PortalException if a dossier tax with the primary key could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public DossierTax getDossierTax(long taxId) throws PortalException; + + /** + * Returns the dossier tax matching the UUID and group. + * + * @param uuid the dossier tax's UUID + * @param groupId the primary key of the group + * @return the matching dossier tax + * @throws PortalException if a matching dossier tax could not be found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public DossierTax getDossierTaxByUuidAndGroupId(String uuid, long groupId) + throws PortalException; + + /** + * Returns a range of all the dossier taxs. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.synctracking.model.impl.DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of dossier taxs + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getDossierTaxs(int start, int end); + + /** + * Returns all the dossier taxs matching the UUID and company. + * + * @param uuid the UUID of the dossier taxs + * @param companyId the primary key of the company + * @return the matching dossier taxs, or an empty list if no matches were found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getDossierTaxsByUuidAndCompanyId(String uuid, + long companyId); + + /** + * Returns a range of dossier taxs matching the UUID and company. + * + * @param uuid the UUID of the dossier taxs + * @param companyId the primary key of the company + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching dossier taxs, or an empty list if no matches were found + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getDossierTaxsByUuidAndCompanyId(String uuid, + long companyId, int start, int end, + OrderByComparator orderByComparator); + + /** + * Returns the number of dossier taxs. + * + * @return the number of dossier taxs + */ + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public int getDossierTaxsCount(); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public ExportActionableDynamicQuery getExportActionableDynamicQuery( + PortletDataContext portletDataContext); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + public String getOSGiServiceIdentifier(); + + @Override + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException; + + /** + * Updates the dossier tax in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param dossierTax the dossier tax + * @return the dossier tax that was updated + */ + @Indexable(type = IndexableType.REINDEX) + public DossierTax updateDossierTax(DossierTax dossierTax); +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/DossierTaxLocalServiceUtil.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/DossierTaxLocalServiceUtil.java new file mode 100644 index 0000000000..9451b0de8f --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/DossierTaxLocalServiceUtil.java @@ -0,0 +1,368 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.service; + +import aQute.bnd.annotation.ProviderType; + +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; + +import org.osgi.util.tracker.ServiceTracker; + +/** + * Provides the local service utility for DossierTax. This utility wraps + * {@link org.opencps.synctracking.service.impl.DossierTaxLocalServiceImpl} and is the + * primary access point for service operations in application layer code running + * on the local server. Methods of this service will not have security checks + * based on the propagated JAAS credentials because this service can only be + * accessed from within the same VM. + * + * @author duongnt + * @see DossierTaxLocalService + * @see org.opencps.synctracking.service.base.DossierTaxLocalServiceBaseImpl + * @see org.opencps.synctracking.service.impl.DossierTaxLocalServiceImpl + * @generated + */ +@ProviderType +public class DossierTaxLocalServiceUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Add custom service methods to {@link org.opencps.synctracking.service.impl.DossierTaxLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. + */ + + /** + * Adds the dossier tax to the database. Also notifies the appropriate model listeners. + * + * @param dossierTax the dossier tax + * @return the dossier tax that was added + */ + public static org.opencps.synctracking.model.DossierTax addDossierTax( + org.opencps.synctracking.model.DossierTax dossierTax) { + return getService().addDossierTax(dossierTax); + } + + /** + * Creates a new dossier tax with the primary key. Does not add the dossier tax to the database. + * + * @param taxId the primary key for the new dossier tax + * @return the new dossier tax + */ + public static org.opencps.synctracking.model.DossierTax createDossierTax( + long taxId) { + return getService().createDossierTax(taxId); + } + + public static org.opencps.synctracking.model.DossierTax createDossierTaxManual( + org.opencps.synctracking.model.DossierTaxInput dossierTaxInput) { + return getService().createDossierTaxManual(dossierTaxInput); + } + + /** + * Deletes the dossier tax from the database. Also notifies the appropriate model listeners. + * + * @param dossierTax the dossier tax + * @return the dossier tax that was removed + */ + public static org.opencps.synctracking.model.DossierTax deleteDossierTax( + org.opencps.synctracking.model.DossierTax dossierTax) { + return getService().deleteDossierTax(dossierTax); + } + + /** + * Deletes the dossier tax with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax that was removed + * @throws PortalException if a dossier tax with the primary key could not be found + */ + public static org.opencps.synctracking.model.DossierTax deleteDossierTax( + long taxId) throws com.liferay.portal.kernel.exception.PortalException { + return getService().deleteDossierTax(taxId); + } + + /** + * @throws PortalException + */ + public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( + com.liferay.portal.kernel.model.PersistedModel persistedModel) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().deletePersistedModel(persistedModel); + } + + public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return getService().dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return getService().dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.synctracking.model.impl.DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) { + return getService().dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.synctracking.model.impl.DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + public static java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return getService() + .dynamicQuery(dynamicQuery, start, end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return getService().dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + public static long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) { + return getService().dynamicQueryCount(dynamicQuery, projection); + } + + public static org.opencps.synctracking.model.DossierTax fetchDossierTax( + long taxId) { + return getService().fetchDossierTax(taxId); + } + + public static org.opencps.synctracking.model.DossierTax fetchDossierTaxByDMS( + String dossierNo, String maSoThue, String soQuyetDinh) { + return getService() + .fetchDossierTaxByDMS(dossierNo, maSoThue, soQuyetDinh); + } + + /** + * Returns the dossier tax matching the UUID and group. + * + * @param uuid the dossier tax's UUID + * @param groupId the primary key of the group + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + public static org.opencps.synctracking.model.DossierTax fetchDossierTaxByUuidAndGroupId( + String uuid, long groupId) { + return getService().fetchDossierTaxByUuidAndGroupId(uuid, groupId); + } + + public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { + return getService().getActionableDynamicQuery(); + } + + public static java.util.List getByDossierIdAndStatusCTT( + String dossierNo, int statuses) { + return getService().getByDossierIdAndStatusCTT(dossierNo, statuses); + } + + public static java.util.List getByDossierIdAndStatusTBT( + String dossierNo, int statuses) { + return getService().getByDossierIdAndStatusTBT(dossierNo, statuses); + } + + public static java.util.List getByStatusCTT( + int statusTBT, int statusCTT, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return getService() + .getByStatusCTT(statusTBT, statusCTT, start, end, + orderByComparator); + } + + public static java.util.List getByStatusTBT( + int[] statuses, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return getService() + .getByStatusTBT(statuses, start, end, orderByComparator); + } + + /** + * Returns the dossier tax with the primary key. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax + * @throws PortalException if a dossier tax with the primary key could not be found + */ + public static org.opencps.synctracking.model.DossierTax getDossierTax( + long taxId) throws com.liferay.portal.kernel.exception.PortalException { + return getService().getDossierTax(taxId); + } + + /** + * Returns the dossier tax matching the UUID and group. + * + * @param uuid the dossier tax's UUID + * @param groupId the primary key of the group + * @return the matching dossier tax + * @throws PortalException if a matching dossier tax could not be found + */ + public static org.opencps.synctracking.model.DossierTax getDossierTaxByUuidAndGroupId( + String uuid, long groupId) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getDossierTaxByUuidAndGroupId(uuid, groupId); + } + + /** + * Returns a range of all the dossier taxs. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.synctracking.model.impl.DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of dossier taxs + */ + public static java.util.List getDossierTaxs( + int start, int end) { + return getService().getDossierTaxs(start, end); + } + + /** + * Returns all the dossier taxs matching the UUID and company. + * + * @param uuid the UUID of the dossier taxs + * @param companyId the primary key of the company + * @return the matching dossier taxs, or an empty list if no matches were found + */ + public static java.util.List getDossierTaxsByUuidAndCompanyId( + String uuid, long companyId) { + return getService().getDossierTaxsByUuidAndCompanyId(uuid, companyId); + } + + /** + * Returns a range of dossier taxs matching the UUID and company. + * + * @param uuid the UUID of the dossier taxs + * @param companyId the primary key of the company + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching dossier taxs, or an empty list if no matches were found + */ + public static java.util.List getDossierTaxsByUuidAndCompanyId( + String uuid, long companyId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return getService() + .getDossierTaxsByUuidAndCompanyId(uuid, companyId, start, + end, orderByComparator); + } + + /** + * Returns the number of dossier taxs. + * + * @return the number of dossier taxs + */ + public static int getDossierTaxsCount() { + return getService().getDossierTaxsCount(); + } + + public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( + com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) { + return getService().getExportActionableDynamicQuery(portletDataContext); + } + + public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + return getService().getIndexableActionableDynamicQuery(); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + public static String getOSGiServiceIdentifier() { + return getService().getOSGiServiceIdentifier(); + } + + public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException { + return getService().getPersistedModel(primaryKeyObj); + } + + /** + * Updates the dossier tax in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param dossierTax the dossier tax + * @return the dossier tax that was updated + */ + public static org.opencps.synctracking.model.DossierTax updateDossierTax( + org.opencps.synctracking.model.DossierTax dossierTax) { + return getService().updateDossierTax(dossierTax); + } + + public static DossierTaxLocalService getService() { + return _serviceTracker.getService(); + } + + private static ServiceTracker _serviceTracker; + + static { + Bundle bundle = FrameworkUtil.getBundle(DossierTaxLocalService.class); + + ServiceTracker serviceTracker = + new ServiceTracker(bundle.getBundleContext(), + DossierTaxLocalService.class, null); + + serviceTracker.open(); + + _serviceTracker = serviceTracker; + } +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/DossierTaxLocalServiceWrapper.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/DossierTaxLocalServiceWrapper.java new file mode 100644 index 0000000000..450ec33896 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/DossierTaxLocalServiceWrapper.java @@ -0,0 +1,386 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.service; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.service.ServiceWrapper; + +/** + * Provides a wrapper for {@link DossierTaxLocalService}. + * + * @author duongnt + * @see DossierTaxLocalService + * @generated + */ +@ProviderType +public class DossierTaxLocalServiceWrapper implements DossierTaxLocalService, + ServiceWrapper { + public DossierTaxLocalServiceWrapper( + DossierTaxLocalService dossierTaxLocalService) { + _dossierTaxLocalService = dossierTaxLocalService; + } + + /** + * Adds the dossier tax to the database. Also notifies the appropriate model listeners. + * + * @param dossierTax the dossier tax + * @return the dossier tax that was added + */ + @Override + public org.opencps.synctracking.model.DossierTax addDossierTax( + org.opencps.synctracking.model.DossierTax dossierTax) { + return _dossierTaxLocalService.addDossierTax(dossierTax); + } + + /** + * Creates a new dossier tax with the primary key. Does not add the dossier tax to the database. + * + * @param taxId the primary key for the new dossier tax + * @return the new dossier tax + */ + @Override + public org.opencps.synctracking.model.DossierTax createDossierTax( + long taxId) { + return _dossierTaxLocalService.createDossierTax(taxId); + } + + @Override + public org.opencps.synctracking.model.DossierTax createDossierTaxManual( + org.opencps.synctracking.model.DossierTaxInput dossierTaxInput) { + return _dossierTaxLocalService.createDossierTaxManual(dossierTaxInput); + } + + /** + * Deletes the dossier tax from the database. Also notifies the appropriate model listeners. + * + * @param dossierTax the dossier tax + * @return the dossier tax that was removed + */ + @Override + public org.opencps.synctracking.model.DossierTax deleteDossierTax( + org.opencps.synctracking.model.DossierTax dossierTax) { + return _dossierTaxLocalService.deleteDossierTax(dossierTax); + } + + /** + * Deletes the dossier tax with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax that was removed + * @throws PortalException if a dossier tax with the primary key could not be found + */ + @Override + public org.opencps.synctracking.model.DossierTax deleteDossierTax( + long taxId) throws com.liferay.portal.kernel.exception.PortalException { + return _dossierTaxLocalService.deleteDossierTax(taxId); + } + + /** + * @throws PortalException + */ + @Override + public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( + com.liferay.portal.kernel.model.PersistedModel persistedModel) + throws com.liferay.portal.kernel.exception.PortalException { + return _dossierTaxLocalService.deletePersistedModel(persistedModel); + } + + @Override + public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { + return _dossierTaxLocalService.dynamicQuery(); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return _dossierTaxLocalService.dynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.synctracking.model.impl.DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end) { + return _dossierTaxLocalService.dynamicQuery(dynamicQuery, start, end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.synctracking.model.impl.DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + @Override + public java.util.List dynamicQuery( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return _dossierTaxLocalService.dynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { + return _dossierTaxLocalService.dynamicQueryCount(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount( + com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, + com.liferay.portal.kernel.dao.orm.Projection projection) { + return _dossierTaxLocalService.dynamicQueryCount(dynamicQuery, + projection); + } + + @Override + public org.opencps.synctracking.model.DossierTax fetchDossierTax(long taxId) { + return _dossierTaxLocalService.fetchDossierTax(taxId); + } + + @Override + public org.opencps.synctracking.model.DossierTax fetchDossierTaxByDMS( + String dossierNo, String maSoThue, String soQuyetDinh) { + return _dossierTaxLocalService.fetchDossierTaxByDMS(dossierNo, + maSoThue, soQuyetDinh); + } + + /** + * Returns the dossier tax matching the UUID and group. + * + * @param uuid the dossier tax's UUID + * @param groupId the primary key of the group + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public org.opencps.synctracking.model.DossierTax fetchDossierTaxByUuidAndGroupId( + String uuid, long groupId) { + return _dossierTaxLocalService.fetchDossierTaxByUuidAndGroupId(uuid, + groupId); + } + + @Override + public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { + return _dossierTaxLocalService.getActionableDynamicQuery(); + } + + @Override + public java.util.List getByDossierIdAndStatusCTT( + String dossierNo, int statuses) { + return _dossierTaxLocalService.getByDossierIdAndStatusCTT(dossierNo, + statuses); + } + + @Override + public java.util.List getByDossierIdAndStatusTBT( + String dossierNo, int statuses) { + return _dossierTaxLocalService.getByDossierIdAndStatusTBT(dossierNo, + statuses); + } + + @Override + public java.util.List getByStatusCTT( + int statusTBT, int statusCTT, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return _dossierTaxLocalService.getByStatusCTT(statusTBT, statusCTT, + start, end, orderByComparator); + } + + @Override + public java.util.List getByStatusTBT( + int[] statuses, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return _dossierTaxLocalService.getByStatusTBT(statuses, start, end, + orderByComparator); + } + + /** + * Returns the dossier tax with the primary key. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax + * @throws PortalException if a dossier tax with the primary key could not be found + */ + @Override + public org.opencps.synctracking.model.DossierTax getDossierTax(long taxId) + throws com.liferay.portal.kernel.exception.PortalException { + return _dossierTaxLocalService.getDossierTax(taxId); + } + + /** + * Returns the dossier tax matching the UUID and group. + * + * @param uuid the dossier tax's UUID + * @param groupId the primary key of the group + * @return the matching dossier tax + * @throws PortalException if a matching dossier tax could not be found + */ + @Override + public org.opencps.synctracking.model.DossierTax getDossierTaxByUuidAndGroupId( + String uuid, long groupId) + throws com.liferay.portal.kernel.exception.PortalException { + return _dossierTaxLocalService.getDossierTaxByUuidAndGroupId(uuid, + groupId); + } + + /** + * Returns a range of all the dossier taxs. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.synctracking.model.impl.DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of dossier taxs + */ + @Override + public java.util.List getDossierTaxs( + int start, int end) { + return _dossierTaxLocalService.getDossierTaxs(start, end); + } + + /** + * Returns all the dossier taxs matching the UUID and company. + * + * @param uuid the UUID of the dossier taxs + * @param companyId the primary key of the company + * @return the matching dossier taxs, or an empty list if no matches were found + */ + @Override + public java.util.List getDossierTaxsByUuidAndCompanyId( + String uuid, long companyId) { + return _dossierTaxLocalService.getDossierTaxsByUuidAndCompanyId(uuid, + companyId); + } + + /** + * Returns a range of dossier taxs matching the UUID and company. + * + * @param uuid the UUID of the dossier taxs + * @param companyId the primary key of the company + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching dossier taxs, or an empty list if no matches were found + */ + @Override + public java.util.List getDossierTaxsByUuidAndCompanyId( + String uuid, long companyId, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) { + return _dossierTaxLocalService.getDossierTaxsByUuidAndCompanyId(uuid, + companyId, start, end, orderByComparator); + } + + /** + * Returns the number of dossier taxs. + * + * @return the number of dossier taxs + */ + @Override + public int getDossierTaxsCount() { + return _dossierTaxLocalService.getDossierTaxsCount(); + } + + @Override + public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( + com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) { + return _dossierTaxLocalService.getExportActionableDynamicQuery(portletDataContext); + } + + @Override + public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + return _dossierTaxLocalService.getIndexableActionableDynamicQuery(); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + @Override + public String getOSGiServiceIdentifier() { + return _dossierTaxLocalService.getOSGiServiceIdentifier(); + } + + @Override + public com.liferay.portal.kernel.model.PersistedModel getPersistedModel( + java.io.Serializable primaryKeyObj) + throws com.liferay.portal.kernel.exception.PortalException { + return _dossierTaxLocalService.getPersistedModel(primaryKeyObj); + } + + /** + * Updates the dossier tax in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param dossierTax the dossier tax + * @return the dossier tax that was updated + */ + @Override + public org.opencps.synctracking.model.DossierTax updateDossierTax( + org.opencps.synctracking.model.DossierTax dossierTax) { + return _dossierTaxLocalService.updateDossierTax(dossierTax); + } + + @Override + public DossierTaxLocalService getWrappedService() { + return _dossierTaxLocalService; + } + + @Override + public void setWrappedService(DossierTaxLocalService dossierTaxLocalService) { + _dossierTaxLocalService = dossierTaxLocalService; + } + + private DossierTaxLocalService _dossierTaxLocalService; +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalService.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalService.java index 0070eb7d88..809842c19d 100644 --- a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalService.java +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalService.java @@ -39,6 +39,7 @@ import org.opencps.synctracking.model.SyncTrackingQuery; import java.io.Serializable; + import java.util.Date; import java.util.List; @@ -48,7 +49,7 @@ * credentials because this service can only be accessed from within the same * VM. * - * @author Brian Wing Shun Chan + * @author duongnt * @see SyncTrackingLocalServiceUtil * @see org.opencps.synctracking.service.base.SyncTrackingLocalServiceBaseImpl * @see org.opencps.synctracking.service.impl.SyncTrackingLocalServiceImpl @@ -64,43 +65,6 @@ public interface SyncTrackingLocalService extends BaseLocalService, * * Never modify or reference this interface directly. Always use {@link SyncTrackingLocalServiceUtil} to access the sync tracking local service. Add custom service methods to {@link org.opencps.synctracking.service.impl.SyncTrackingLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. */ - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public SyncTracking getByDossierNo(long groupId, String dossierNo); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public List getByGroupId(long groupId, int start, int end); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public List getByGroupIdAndApi(long groupId, String api, - int start, int end); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public List getByGroupIdAndDate(long groupId, Date fromDate, - Date toDate, int start, int end); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public List getByGroupIdAndDossierNoAndDate(long groupId, - String dossierNo, Date fromDate, Date toDate, int start, int end); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public List getByGroupIdAndDossierNoAndServiceCodeAndDate( - long groupId, String dossierNo, String serviceCode, Date fromDate, - Date toDate, int start, int end); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public List getByGroupIdAndServiceCodeAndDate(long groupId, - String serviceCode, Date fromDate, Date toDate, int start, int end); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public SyncTracking getByReferenceUid(long groupId, String referenceUid); - - @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) - public List getByReferenceUidAndDate(long groupId, - String referenceUid, Date fromDate, Date toDate, int start, int end); - - public SyncTracking createSyncTrackingManual( - SyncTrackingQuery syncTrackingQuery); /** * Adds the sync tracking to the database. Also notifies the appropriate model listeners. @@ -120,6 +84,9 @@ public SyncTracking createSyncTrackingManual( @Transactional(enabled = false) public SyncTracking createSyncTracking(long trackingId); + public SyncTracking createSyncTrackingManual( + SyncTrackingQuery syncTrackingQuery); + /** * @throws PortalException */ @@ -223,6 +190,44 @@ public SyncTracking fetchSyncTrackingByUuidAndGroupId(String uuid, @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public ActionableDynamicQuery getActionableDynamicQuery(); + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public SyncTracking getByDossierNo(long groupId, String dossierNo); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public SyncTracking getByDossierNoAndProtocol(long groupId, + String dossierNo, String protocol); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByGroupId(long groupId, int start, int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByGroupIdAndApi(long groupId, String api, + int start, int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByGroupIdAndDate(long groupId, Date fromDate, + Date toDate, int start, int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByGroupIdAndDossierNoAndDate(long groupId, + String dossierNo, Date fromDate, Date toDate, int start, int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByGroupIdAndDossierNoAndServiceCodeAndDate( + long groupId, String dossierNo, String serviceCode, Date fromDate, + Date toDate, int start, int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByGroupIdAndServiceCodeAndDate(long groupId, + String serviceCode, Date fromDate, Date toDate, int start, int end); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public SyncTracking getByReferenceUid(long groupId, String referenceUid); + + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getByReferenceUidAndDate(long groupId, + String referenceUid, Date fromDate, Date toDate, int start, int end); + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public ExportActionableDynamicQuery getExportActionableDynamicQuery( PortletDataContext portletDataContext); diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalServiceUtil.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalServiceUtil.java index 22dece58f0..3c9a3f39e8 100644 --- a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalServiceUtil.java +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalServiceUtil.java @@ -29,7 +29,7 @@ * based on the propagated JAAS credentials because this service can only be * accessed from within the same VM. * - * @author Brian Wing Shun Chan + * @author duongnt * @see SyncTrackingLocalService * @see org.opencps.synctracking.service.base.SyncTrackingLocalServiceBaseImpl * @see org.opencps.synctracking.service.impl.SyncTrackingLocalServiceImpl @@ -42,66 +42,7 @@ public class SyncTrackingLocalServiceUtil { * * Never modify this class directly. Add custom service methods to {@link org.opencps.synctracking.service.impl.SyncTrackingLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. */ - public static org.opencps.synctracking.model.SyncTracking getByDossierNo( - long groupId, String dossierNo) { - return getService().getByDossierNo(groupId, dossierNo); - } - - public static java.util.List getByGroupId( - long groupId, int start, int end) { - return getService().getByGroupId(groupId, start, end); - } - - public static java.util.List getByGroupIdAndDate( - long groupId, java.util.Date fromDate, java.util.Date toDate, - int start, int end) { - return getService() - .getByGroupIdAndDate(groupId, fromDate, toDate, start, end); - } - - public static java.util.List getByGroupIdAndDossierNoAndDate( - long groupId, String dossierNo, java.util.Date fromDate, - java.util.Date toDate, int start, int end) { - return getService() - .getByGroupIdAndDossierNoAndDate(groupId, dossierNo, - fromDate, toDate, start, end); - } - - public static java.util.List getByGroupIdAndDossierNoAndServiceCodeAndDate( - long groupId, String dossierNo, String serviceCode, - java.util.Date fromDate, java.util.Date toDate, int start, int end) { - return getService() - .getByGroupIdAndDossierNoAndServiceCodeAndDate(groupId, - dossierNo, serviceCode, fromDate, toDate, start, end); - } - public static java.util.List getByGroupIdAndServiceCodeAndDate( - long groupId, String serviceCode, java.util.Date fromDate, - java.util.Date toDate, int start, int end) { - return getService() - .getByGroupIdAndServiceCodeAndDate(groupId, serviceCode, - fromDate, toDate, start, end); - } - - public static org.opencps.synctracking.model.SyncTracking getByReferenceUid( - long groupId, String referenceUid) { - return getService().getByReferenceUid(groupId, referenceUid); - } - - public static java.util.List getByReferenceUidAndDate( - long groupId, String referenceUid, java.util.Date fromDate, - java.util.Date toDate, int start, int end) { - return getService() - .getByReferenceUidAndDate(groupId, referenceUid, fromDate, - toDate, start, end); - } - - - public static org.opencps.synctracking.model.SyncTracking createSyncTrackingManual( - org.opencps.synctracking.model.SyncTrackingQuery syncTrackingQuery) { - return getService().createSyncTrackingManual(syncTrackingQuery); - } - /** * Adds the sync tracking to the database. Also notifies the appropriate model listeners. * @@ -124,6 +65,11 @@ public static org.opencps.synctracking.model.SyncTracking createSyncTracking( return getService().createSyncTracking(trackingId); } + public static org.opencps.synctracking.model.SyncTracking createSyncTrackingManual( + org.opencps.synctracking.model.SyncTrackingQuery syncTrackingQuery) { + return getService().createSyncTrackingManual(syncTrackingQuery); + } + /** * @throws PortalException */ @@ -256,6 +202,71 @@ public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getAction return getService().getActionableDynamicQuery(); } + public static org.opencps.synctracking.model.SyncTracking getByDossierNo( + long groupId, String dossierNo) { + return getService().getByDossierNo(groupId, dossierNo); + } + + public static org.opencps.synctracking.model.SyncTracking getByDossierNoAndProtocol( + long groupId, String dossierNo, String protocol) { + return getService() + .getByDossierNoAndProtocol(groupId, dossierNo, protocol); + } + + public static java.util.List getByGroupId( + long groupId, int start, int end) { + return getService().getByGroupId(groupId, start, end); + } + + public static java.util.List getByGroupIdAndApi( + long groupId, String api, int start, int end) { + return getService().getByGroupIdAndApi(groupId, api, start, end); + } + + public static java.util.List getByGroupIdAndDate( + long groupId, java.util.Date fromDate, java.util.Date toDate, + int start, int end) { + return getService() + .getByGroupIdAndDate(groupId, fromDate, toDate, start, end); + } + + public static java.util.List getByGroupIdAndDossierNoAndDate( + long groupId, String dossierNo, java.util.Date fromDate, + java.util.Date toDate, int start, int end) { + return getService() + .getByGroupIdAndDossierNoAndDate(groupId, dossierNo, + fromDate, toDate, start, end); + } + + public static java.util.List getByGroupIdAndDossierNoAndServiceCodeAndDate( + long groupId, String dossierNo, String serviceCode, + java.util.Date fromDate, java.util.Date toDate, int start, int end) { + return getService() + .getByGroupIdAndDossierNoAndServiceCodeAndDate(groupId, + dossierNo, serviceCode, fromDate, toDate, start, end); + } + + public static java.util.List getByGroupIdAndServiceCodeAndDate( + long groupId, String serviceCode, java.util.Date fromDate, + java.util.Date toDate, int start, int end) { + return getService() + .getByGroupIdAndServiceCodeAndDate(groupId, serviceCode, + fromDate, toDate, start, end); + } + + public static org.opencps.synctracking.model.SyncTracking getByReferenceUid( + long groupId, String referenceUid) { + return getService().getByReferenceUid(groupId, referenceUid); + } + + public static java.util.List getByReferenceUidAndDate( + long groupId, String referenceUid, java.util.Date fromDate, + java.util.Date toDate, int start, int end) { + return getService() + .getByReferenceUidAndDate(groupId, referenceUid, fromDate, + toDate, start, end); + } + public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) { return getService().getExportActionableDynamicQuery(portletDataContext); diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalServiceWrapper.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalServiceWrapper.java index fa9e536d53..359a791e11 100644 --- a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalServiceWrapper.java +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalServiceWrapper.java @@ -18,16 +18,10 @@ import com.liferay.portal.kernel.service.ServiceWrapper; -import java.util.Date; -import java.util.List; - -import org.opencps.synctracking.model.SyncTracking; -import org.opencps.synctracking.model.SyncTrackingQuery; - /** * Provides a wrapper for {@link SyncTrackingLocalService}. * - * @author Brian Wing Shun Chan + * @author duongnt * @see SyncTrackingLocalService * @generated */ @@ -63,6 +57,12 @@ public org.opencps.synctracking.model.SyncTracking createSyncTracking( return _syncTrackingLocalService.createSyncTracking(trackingId); } + @Override + public org.opencps.synctracking.model.SyncTracking createSyncTrackingManual( + org.opencps.synctracking.model.SyncTrackingQuery syncTrackingQuery) { + return _syncTrackingLocalService.createSyncTrackingManual(syncTrackingQuery); + } + /** * @throws PortalException */ @@ -209,6 +209,78 @@ public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDyn return _syncTrackingLocalService.getActionableDynamicQuery(); } + @Override + public org.opencps.synctracking.model.SyncTracking getByDossierNo( + long groupId, String dossierNo) { + return _syncTrackingLocalService.getByDossierNo(groupId, dossierNo); + } + + @Override + public org.opencps.synctracking.model.SyncTracking getByDossierNoAndProtocol( + long groupId, String dossierNo, String protocol) { + return _syncTrackingLocalService.getByDossierNoAndProtocol(groupId, + dossierNo, protocol); + } + + @Override + public java.util.List getByGroupId( + long groupId, int start, int end) { + return _syncTrackingLocalService.getByGroupId(groupId, start, end); + } + + @Override + public java.util.List getByGroupIdAndApi( + long groupId, String api, int start, int end) { + return _syncTrackingLocalService.getByGroupIdAndApi(groupId, api, + start, end); + } + + @Override + public java.util.List getByGroupIdAndDate( + long groupId, java.util.Date fromDate, java.util.Date toDate, + int start, int end) { + return _syncTrackingLocalService.getByGroupIdAndDate(groupId, fromDate, + toDate, start, end); + } + + @Override + public java.util.List getByGroupIdAndDossierNoAndDate( + long groupId, String dossierNo, java.util.Date fromDate, + java.util.Date toDate, int start, int end) { + return _syncTrackingLocalService.getByGroupIdAndDossierNoAndDate(groupId, + dossierNo, fromDate, toDate, start, end); + } + + @Override + public java.util.List getByGroupIdAndDossierNoAndServiceCodeAndDate( + long groupId, String dossierNo, String serviceCode, + java.util.Date fromDate, java.util.Date toDate, int start, int end) { + return _syncTrackingLocalService.getByGroupIdAndDossierNoAndServiceCodeAndDate(groupId, + dossierNo, serviceCode, fromDate, toDate, start, end); + } + + @Override + public java.util.List getByGroupIdAndServiceCodeAndDate( + long groupId, String serviceCode, java.util.Date fromDate, + java.util.Date toDate, int start, int end) { + return _syncTrackingLocalService.getByGroupIdAndServiceCodeAndDate(groupId, + serviceCode, fromDate, toDate, start, end); + } + + @Override + public org.opencps.synctracking.model.SyncTracking getByReferenceUid( + long groupId, String referenceUid) { + return _syncTrackingLocalService.getByReferenceUid(groupId, referenceUid); + } + + @Override + public java.util.List getByReferenceUidAndDate( + long groupId, String referenceUid, java.util.Date fromDate, + java.util.Date toDate, int start, int end) { + return _syncTrackingLocalService.getByReferenceUidAndDate(groupId, + referenceUid, fromDate, toDate, start, end); + } + @Override public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( com.liferay.exportimport.kernel.lar.PortletDataContext portletDataContext) { @@ -350,68 +422,4 @@ public void setWrappedService( } private SyncTrackingLocalService _syncTrackingLocalService; - - @Override - public SyncTracking getByDossierNo(long groupId, String dossierNo) { - // TODO Auto-generated method stub - return _syncTrackingLocalService.getByDossierNo(groupId, dossierNo); - } - - @Override - public List getByGroupId(long groupId, int start, int end) { - // TODO Auto-generated method stub - return _syncTrackingLocalService.getByGroupId(groupId, start, end); - } - - @Override - public List getByGroupIdAndApi(long groupId, String api, int start, int end) { - // TODO Auto-generated method stub - return _syncTrackingLocalService.getByGroupIdAndApi(groupId, api, start, end); - } - - @Override - public List getByGroupIdAndDate(long groupId, Date fromDate, Date toDate, int start, int end) { - // TODO Auto-generated method stub - return _syncTrackingLocalService.getByGroupIdAndDate(groupId, fromDate, toDate, start, end); - } - - @Override - public List getByGroupIdAndDossierNoAndDate(long groupId, String dossierNo, Date fromDate, - Date toDate, int start, int end) { - // TODO Auto-generated method stub - return _syncTrackingLocalService.getByGroupIdAndDossierNoAndDate(groupId, dossierNo, fromDate, toDate, start, end); - } - - @Override - public List getByGroupIdAndDossierNoAndServiceCodeAndDate(long groupId, String dossierNo, - String serviceCode, Date fromDate, Date toDate, int start, int end) { - // TODO Auto-generated method stub - return _syncTrackingLocalService.getByGroupIdAndDossierNoAndServiceCodeAndDate(groupId, dossierNo, serviceCode, fromDate, toDate, start, end); - } - - @Override - public List getByGroupIdAndServiceCodeAndDate(long groupId, String serviceCode, Date fromDate, - Date toDate, int start, int end) { - // TODO Auto-generated method stub - return _syncTrackingLocalService.getByGroupIdAndServiceCodeAndDate(groupId, serviceCode, fromDate, toDate, start, end); - } - - @Override - public SyncTracking getByReferenceUid(long groupId, String referenceUid) { - // TODO Auto-generated method stub - return _syncTrackingLocalService.getByReferenceUid(groupId, referenceUid); - } - - @Override - public List getByReferenceUidAndDate(long groupId, String referenceUid, Date fromDate, Date toDate, - int start, int end) { - // TODO Auto-generated method stub - return _syncTrackingLocalService.getByReferenceUidAndDate(groupId, referenceUid, fromDate, toDate, start, end); - } - - @Override - public SyncTracking createSyncTrackingManual(SyncTrackingQuery syncTrackingQuery) { - // TODO Auto-generated method stub - return _syncTrackingLocalService.createSyncTrackingManual(syncTrackingQuery); - } } \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingService.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingService.java deleted file mode 100644 index f0b13cdd42..0000000000 --- a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingService.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package org.opencps.synctracking.service; - -import aQute.bnd.annotation.ProviderType; - -import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.jsonwebservice.JSONWebService; -import com.liferay.portal.kernel.security.access.control.AccessControlled; -import com.liferay.portal.kernel.service.BaseService; -import com.liferay.portal.kernel.spring.osgi.OSGiBeanProperties; -import com.liferay.portal.kernel.transaction.Isolation; -import com.liferay.portal.kernel.transaction.Transactional; - -/** - * Provides the remote service interface for SyncTracking. Methods of this - * service are expected to have security checks based on the propagated JAAS - * credentials because this service can be accessed remotely. - * - * @author Brian Wing Shun Chan - * @see SyncTrackingServiceUtil - * @see org.opencps.synctracking.service.base.SyncTrackingServiceBaseImpl - * @see org.opencps.synctracking.service.impl.SyncTrackingServiceImpl - * @generated - */ -@AccessControlled -@JSONWebService -@OSGiBeanProperties(property = { - "json.web.service.context.name=foo", "json.web.service.context.path=SyncTracking"}, service = SyncTrackingService.class) -@ProviderType -@Transactional(isolation = Isolation.PORTAL, rollbackFor = { - PortalException.class, SystemException.class}) -public interface SyncTrackingService extends BaseService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this interface directly. Always use {@link SyncTrackingServiceUtil} to access the sync tracking remote service. Add custom service methods to {@link org.opencps.synctracking.service.impl.SyncTrackingServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. - */ - - /** - * Returns the OSGi service identifier. - * - * @return the OSGi service identifier - */ - public String getOSGiServiceIdentifier(); -} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingServiceUtil.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingServiceUtil.java deleted file mode 100644 index f236303428..0000000000 --- a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingServiceUtil.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package org.opencps.synctracking.service; - -import aQute.bnd.annotation.ProviderType; - -import org.osgi.framework.Bundle; -import org.osgi.framework.FrameworkUtil; - -import org.osgi.util.tracker.ServiceTracker; - -/** - * Provides the remote service utility for SyncTracking. This utility wraps - * {@link org.opencps.synctracking.service.impl.SyncTrackingServiceImpl} and is the - * primary access point for service operations in application layer code running - * on a remote server. Methods of this service are expected to have security - * checks based on the propagated JAAS credentials because this service can be - * accessed remotely. - * - * @author Brian Wing Shun Chan - * @see SyncTrackingService - * @see org.opencps.synctracking.service.base.SyncTrackingServiceBaseImpl - * @see org.opencps.synctracking.service.impl.SyncTrackingServiceImpl - * @generated - */ -@ProviderType -public class SyncTrackingServiceUtil { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify this class directly. Add custom service methods to {@link org.opencps.synctracking.service.impl.SyncTrackingServiceImpl} and rerun ServiceBuilder to regenerate this class. - */ - - /** - * Returns the OSGi service identifier. - * - * @return the OSGi service identifier - */ - public static String getOSGiServiceIdentifier() { - return getService().getOSGiServiceIdentifier(); - } - - public static SyncTrackingService getService() { - return _serviceTracker.getService(); - } - - private static ServiceTracker _serviceTracker; - - static { - Bundle bundle = FrameworkUtil.getBundle(SyncTrackingService.class); - - ServiceTracker serviceTracker = new ServiceTracker(bundle.getBundleContext(), - SyncTrackingService.class, null); - - serviceTracker.open(); - - _serviceTracker = serviceTracker; - } -} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingServiceWrapper.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingServiceWrapper.java deleted file mode 100644 index 773fe192e7..0000000000 --- a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingServiceWrapper.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package org.opencps.synctracking.service; - -import aQute.bnd.annotation.ProviderType; - -import com.liferay.portal.kernel.service.ServiceWrapper; - -/** - * Provides a wrapper for {@link SyncTrackingService}. - * - * @author Brian Wing Shun Chan - * @see SyncTrackingService - * @generated - */ -@ProviderType -public class SyncTrackingServiceWrapper implements SyncTrackingService, - ServiceWrapper { - public SyncTrackingServiceWrapper(SyncTrackingService syncTrackingService) { - _syncTrackingService = syncTrackingService; - } - - /** - * Returns the OSGi service identifier. - * - * @return the OSGi service identifier - */ - @Override - public String getOSGiServiceIdentifier() { - return _syncTrackingService.getOSGiServiceIdentifier(); - } - - @Override - public SyncTrackingService getWrappedService() { - return _syncTrackingService; - } - - @Override - public void setWrappedService(SyncTrackingService syncTrackingService) { - _syncTrackingService = syncTrackingService; - } - - private SyncTrackingService _syncTrackingService; -} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/persistence/DossierTaxPersistence.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/persistence/DossierTaxPersistence.java new file mode 100644 index 0000000000..952a75b4ae --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/persistence/DossierTaxPersistence.java @@ -0,0 +1,1186 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.service.persistence.BasePersistence; + +import org.opencps.synctracking.exception.NoSuchDossierTaxException; +import org.opencps.synctracking.model.DossierTax; + +/** + * The persistence interface for the dossier tax service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author duongnt + * @see org.opencps.synctracking.service.persistence.impl.DossierTaxPersistenceImpl + * @see DossierTaxUtil + * @generated + */ +@ProviderType +public interface DossierTaxPersistence extends BasePersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this interface directly. Always use {@link DossierTaxUtil} to access the dossier tax persistence. Modify service.xml and rerun ServiceBuilder to regenerate this interface. + */ + + /** + * Returns all the dossier taxs where uuid = ?. + * + * @param uuid the uuid + * @return the matching dossier taxs + */ + public java.util.List findByUuid(String uuid); + + /** + * Returns a range of all the dossier taxs where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + public java.util.List findByUuid(String uuid, int start, int end); + + /** + * Returns an ordered range of all the dossier taxs where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + public java.util.List findByUuid(String uuid, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the dossier taxs where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + public java.util.List findByUuid(String uuid, int start, + int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first dossier tax in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public DossierTax findByUuid_First(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Returns the first dossier tax in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByUuid_First(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last dossier tax in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public DossierTax findByUuid_Last(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Returns the last dossier tax in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByUuid_Last(String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where uuid = ?. + * + * @param taxId the primary key of the current dossier tax + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public DossierTax[] findByUuid_PrevAndNext(long taxId, String uuid, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Removes all the dossier taxs where uuid = ? from the database. + * + * @param uuid the uuid + */ + public void removeByUuid(String uuid); + + /** + * Returns the number of dossier taxs where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching dossier taxs + */ + public int countByUuid(String uuid); + + /** + * Returns the dossier tax where uuid = ? and groupId = ? or throws a {@link NoSuchDossierTaxException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public DossierTax findByUUID_G(String uuid, long groupId) + throws NoSuchDossierTaxException; + + /** + * Returns the dossier tax where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByUUID_G(String uuid, long groupId); + + /** + * Returns the dossier tax where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByUUID_G(String uuid, long groupId, + boolean retrieveFromCache); + + /** + * Removes the dossier tax where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the dossier tax that was removed + */ + public DossierTax removeByUUID_G(String uuid, long groupId) + throws NoSuchDossierTaxException; + + /** + * Returns the number of dossier taxs where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching dossier taxs + */ + public int countByUUID_G(String uuid, long groupId); + + /** + * Returns all the dossier taxs where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the matching dossier taxs + */ + public java.util.List findByUuid_C(String uuid, long companyId); + + /** + * Returns a range of all the dossier taxs where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + public java.util.List findByUuid_C(String uuid, long companyId, + int start, int end); + + /** + * Returns an ordered range of all the dossier taxs where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + public java.util.List findByUuid_C(String uuid, long companyId, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the dossier taxs where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + public java.util.List findByUuid_C(String uuid, long companyId, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public DossierTax findByUuid_C_First(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Returns the first dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByUuid_C_First(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public DossierTax findByUuid_C_Last(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Returns the last dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByUuid_C_Last(String uuid, long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param taxId the primary key of the current dossier tax + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public DossierTax[] findByUuid_C_PrevAndNext(long taxId, String uuid, + long companyId, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Removes all the dossier taxs where uuid = ? and companyId = ? from the database. + * + * @param uuid the uuid + * @param companyId the company ID + */ + public void removeByUuid_C(String uuid, long companyId); + + /** + * Returns the number of dossier taxs where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the number of matching dossier taxs + */ + public int countByUuid_C(String uuid, long companyId); + + /** + * Returns the dossier tax where dossierNo = ? and maSoThue = ? and soQuyetDinh = ? or throws a {@link NoSuchDossierTaxException} if it could not be found. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @return the matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public DossierTax findByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh) throws NoSuchDossierTaxException; + + /** + * Returns the dossier tax where dossierNo = ? and maSoThue = ? and soQuyetDinh = ? or returns null if it could not be found. Uses the finder cache. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh); + + /** + * Returns the dossier tax where dossierNo = ? and maSoThue = ? and soQuyetDinh = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh, boolean retrieveFromCache); + + /** + * Removes the dossier tax where dossierNo = ? and maSoThue = ? and soQuyetDinh = ? from the database. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @return the dossier tax that was removed + */ + public DossierTax removeByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh) throws NoSuchDossierTaxException; + + /** + * Returns the number of dossier taxs where dossierNo = ? and maSoThue = ? and soQuyetDinh = ?. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @return the number of matching dossier taxs + */ + public int countByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh); + + /** + * Returns all the dossier taxs where statusTBT = ?. + * + * @param statusTBT the status tbt + * @return the matching dossier taxs + */ + public java.util.List findByF_STATUS_TBT(int statusTBT); + + /** + * Returns a range of all the dossier taxs where statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + public java.util.List findByF_STATUS_TBT(int statusTBT, + int start, int end); + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + public java.util.List findByF_STATUS_TBT(int statusTBT, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + public java.util.List findByF_STATUS_TBT(int statusTBT, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first dossier tax in the ordered set where statusTBT = ?. + * + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public DossierTax findByF_STATUS_TBT_First(int statusTBT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Returns the first dossier tax in the ordered set where statusTBT = ?. + * + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByF_STATUS_TBT_First(int statusTBT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last dossier tax in the ordered set where statusTBT = ?. + * + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public DossierTax findByF_STATUS_TBT_Last(int statusTBT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Returns the last dossier tax in the ordered set where statusTBT = ?. + * + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByF_STATUS_TBT_Last(int statusTBT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where statusTBT = ?. + * + * @param taxId the primary key of the current dossier tax + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public DossierTax[] findByF_STATUS_TBT_PrevAndNext(long taxId, + int statusTBT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Returns all the dossier taxs where statusTBT = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBTs the status tbts + * @return the matching dossier taxs + */ + public java.util.List findByF_STATUS_TBT(int[] statusTBTs); + + /** + * Returns a range of all the dossier taxs where statusTBT = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBTs the status tbts + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + public java.util.List findByF_STATUS_TBT(int[] statusTBTs, + int start, int end); + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBTs the status tbts + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + public java.util.List findByF_STATUS_TBT(int[] statusTBTs, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ?, optionally using the finder cache. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + public java.util.List findByF_STATUS_TBT(int[] statusTBTs, + int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Removes all the dossier taxs where statusTBT = ? from the database. + * + * @param statusTBT the status tbt + */ + public void removeByF_STATUS_TBT(int statusTBT); + + /** + * Returns the number of dossier taxs where statusTBT = ?. + * + * @param statusTBT the status tbt + * @return the number of matching dossier taxs + */ + public int countByF_STATUS_TBT(int statusTBT); + + /** + * Returns the number of dossier taxs where statusTBT = any ?. + * + * @param statusTBTs the status tbts + * @return the number of matching dossier taxs + */ + public int countByF_STATUS_TBT(int[] statusTBTs); + + /** + * Returns all the dossier taxs where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @return the matching dossier taxs + */ + public java.util.List findByF_STATUS_CTT(int statusTBT, + int statusCTT); + + /** + * Returns a range of all the dossier taxs where statusTBT = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + public java.util.List findByF_STATUS_CTT(int statusTBT, + int statusCTT, int start, int end); + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + public java.util.List findByF_STATUS_CTT(int statusTBT, + int statusCTT, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + public java.util.List findByF_STATUS_CTT(int statusTBT, + int statusCTT, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public DossierTax findByF_STATUS_CTT_First(int statusTBT, int statusCTT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Returns the first dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByF_STATUS_CTT_First(int statusTBT, int statusCTT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public DossierTax findByF_STATUS_CTT_Last(int statusTBT, int statusCTT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Returns the last dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByF_STATUS_CTT_Last(int statusTBT, int statusCTT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param taxId the primary key of the current dossier tax + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public DossierTax[] findByF_STATUS_CTT_PrevAndNext(long taxId, + int statusTBT, int statusCTT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Removes all the dossier taxs where statusTBT = ? and statusCTT = ? from the database. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + */ + public void removeByF_STATUS_CTT(int statusTBT, int statusCTT); + + /** + * Returns the number of dossier taxs where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @return the number of matching dossier taxs + */ + public int countByF_STATUS_CTT(int statusTBT, int statusCTT); + + /** + * Returns all the dossier taxs where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @return the matching dossier taxs + */ + public java.util.List findByF_DOSSIER_TBT(String dossierNo, + int statusTBT); + + /** + * Returns a range of all the dossier taxs where dossierNo = ? and statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + public java.util.List findByF_DOSSIER_TBT(String dossierNo, + int statusTBT, int start, int end); + + /** + * Returns an ordered range of all the dossier taxs where dossierNo = ? and statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + public java.util.List findByF_DOSSIER_TBT(String dossierNo, + int statusTBT, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the dossier taxs where dossierNo = ? and statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + public java.util.List findByF_DOSSIER_TBT(String dossierNo, + int statusTBT, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public DossierTax findByF_DOSSIER_TBT_First(String dossierNo, + int statusTBT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Returns the first dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByF_DOSSIER_TBT_First(String dossierNo, + int statusTBT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public DossierTax findByF_DOSSIER_TBT_Last(String dossierNo, int statusTBT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Returns the last dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByF_DOSSIER_TBT_Last(String dossierNo, + int statusTBT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param taxId the primary key of the current dossier tax + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public DossierTax[] findByF_DOSSIER_TBT_PrevAndNext(long taxId, + String dossierNo, int statusTBT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Removes all the dossier taxs where dossierNo = ? and statusTBT = ? from the database. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + */ + public void removeByF_DOSSIER_TBT(String dossierNo, int statusTBT); + + /** + * Returns the number of dossier taxs where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @return the number of matching dossier taxs + */ + public int countByF_DOSSIER_TBT(String dossierNo, int statusTBT); + + /** + * Returns all the dossier taxs where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @return the matching dossier taxs + */ + public java.util.List findByF_DOSSIER_CTT(String dossierNo, + int statusCTT); + + /** + * Returns a range of all the dossier taxs where dossierNo = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + public java.util.List findByF_DOSSIER_CTT(String dossierNo, + int statusCTT, int start, int end); + + /** + * Returns an ordered range of all the dossier taxs where dossierNo = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + public java.util.List findByF_DOSSIER_CTT(String dossierNo, + int statusCTT, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the dossier taxs where dossierNo = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + public java.util.List findByF_DOSSIER_CTT(String dossierNo, + int statusCTT, int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Returns the first dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public DossierTax findByF_DOSSIER_CTT_First(String dossierNo, + int statusCTT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Returns the first dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByF_DOSSIER_CTT_First(String dossierNo, + int statusCTT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the last dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public DossierTax findByF_DOSSIER_CTT_Last(String dossierNo, int statusCTT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Returns the last dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + public DossierTax fetchByF_DOSSIER_CTT_Last(String dossierNo, + int statusCTT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param taxId the primary key of the current dossier tax + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public DossierTax[] findByF_DOSSIER_CTT_PrevAndNext(long taxId, + String dossierNo, int statusCTT, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + throws NoSuchDossierTaxException; + + /** + * Removes all the dossier taxs where dossierNo = ? and statusCTT = ? from the database. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + */ + public void removeByF_DOSSIER_CTT(String dossierNo, int statusCTT); + + /** + * Returns the number of dossier taxs where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @return the number of matching dossier taxs + */ + public int countByF_DOSSIER_CTT(String dossierNo, int statusCTT); + + /** + * Caches the dossier tax in the entity cache if it is enabled. + * + * @param dossierTax the dossier tax + */ + public void cacheResult(DossierTax dossierTax); + + /** + * Caches the dossier taxs in the entity cache if it is enabled. + * + * @param dossierTaxs the dossier taxs + */ + public void cacheResult(java.util.List dossierTaxs); + + /** + * Creates a new dossier tax with the primary key. Does not add the dossier tax to the database. + * + * @param taxId the primary key for the new dossier tax + * @return the new dossier tax + */ + public DossierTax create(long taxId); + + /** + * Removes the dossier tax with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax that was removed + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public DossierTax remove(long taxId) throws NoSuchDossierTaxException; + + public DossierTax updateImpl(DossierTax dossierTax); + + /** + * Returns the dossier tax with the primary key or throws a {@link NoSuchDossierTaxException} if it could not be found. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public DossierTax findByPrimaryKey(long taxId) + throws NoSuchDossierTaxException; + + /** + * Returns the dossier tax with the primary key or returns null if it could not be found. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax, or null if a dossier tax with the primary key could not be found + */ + public DossierTax fetchByPrimaryKey(long taxId); + + @Override + public java.util.Map fetchByPrimaryKeys( + java.util.Set primaryKeys); + + /** + * Returns all the dossier taxs. + * + * @return the dossier taxs + */ + public java.util.List findAll(); + + /** + * Returns a range of all the dossier taxs. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of dossier taxs + */ + public java.util.List findAll(int start, int end); + + /** + * Returns an ordered range of all the dossier taxs. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of dossier taxs + */ + public java.util.List findAll(int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator); + + /** + * Returns an ordered range of all the dossier taxs. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of dossier taxs + */ + public java.util.List findAll(int start, int end, + com.liferay.portal.kernel.util.OrderByComparator orderByComparator, + boolean retrieveFromCache); + + /** + * Removes all the dossier taxs from the database. + */ + public void removeAll(); + + /** + * Returns the number of dossier taxs. + * + * @return the number of dossier taxs + */ + public int countAll(); + + @Override + public java.util.Set getBadColumnNames(); +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/persistence/DossierTaxUtil.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/persistence/DossierTaxUtil.java new file mode 100644 index 0000000000..abdda86f25 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/persistence/DossierTaxUtil.java @@ -0,0 +1,1525 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.service.persistence; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.util.OrderByComparator; + +import org.opencps.synctracking.model.DossierTax; + +import org.osgi.framework.Bundle; +import org.osgi.framework.FrameworkUtil; + +import org.osgi.util.tracker.ServiceTracker; + +import java.util.List; + +/** + * The persistence utility for the dossier tax service. This utility wraps {@link org.opencps.synctracking.service.persistence.impl.DossierTaxPersistenceImpl} and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author duongnt + * @see DossierTaxPersistence + * @see org.opencps.synctracking.service.persistence.impl.DossierTaxPersistenceImpl + * @generated + */ +@ProviderType +public class DossierTaxUtil { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify this class directly. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache() + */ + public static void clearCache() { + getPersistence().clearCache(); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#clearCache(com.liferay.portal.kernel.model.BaseModel) + */ + public static void clearCache(DossierTax dossierTax) { + getPersistence().clearCache(dossierTax); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery) + */ + public static long countWithDynamicQuery(DynamicQuery dynamicQuery) { + return getPersistence().countWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery) { + return getPersistence().findWithDynamicQuery(dynamicQuery); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end) { + return getPersistence().findWithDynamicQuery(dynamicQuery, start, end); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator) + */ + public static List findWithDynamicQuery( + DynamicQuery dynamicQuery, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findWithDynamicQuery(dynamicQuery, start, end, + orderByComparator); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel) + */ + public static DossierTax update(DossierTax dossierTax) { + return getPersistence().update(dossierTax); + } + + /** + * @see com.liferay.portal.kernel.service.persistence.BasePersistence#update(com.liferay.portal.kernel.model.BaseModel, ServiceContext) + */ + public static DossierTax update(DossierTax dossierTax, + ServiceContext serviceContext) { + return getPersistence().update(dossierTax, serviceContext); + } + + /** + * Returns all the dossier taxs where uuid = ?. + * + * @param uuid the uuid + * @return the matching dossier taxs + */ + public static List findByUuid(String uuid) { + return getPersistence().findByUuid(uuid); + } + + /** + * Returns a range of all the dossier taxs where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + public static List findByUuid(String uuid, int start, int end) { + return getPersistence().findByUuid(uuid, start, end); + } + + /** + * Returns an ordered range of all the dossier taxs where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + public static List findByUuid(String uuid, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence().findByUuid(uuid, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the dossier taxs where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + public static List findByUuid(String uuid, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByUuid(uuid, start, end, orderByComparator, + retrieveFromCache); + } + + /** + * Returns the first dossier tax in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public static DossierTax findByUuid_First(String uuid, + OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence().findByUuid_First(uuid, orderByComparator); + } + + /** + * Returns the first dossier tax in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByUuid_First(String uuid, + OrderByComparator orderByComparator) { + return getPersistence().fetchByUuid_First(uuid, orderByComparator); + } + + /** + * Returns the last dossier tax in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public static DossierTax findByUuid_Last(String uuid, + OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence().findByUuid_Last(uuid, orderByComparator); + } + + /** + * Returns the last dossier tax in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByUuid_Last(String uuid, + OrderByComparator orderByComparator) { + return getPersistence().fetchByUuid_Last(uuid, orderByComparator); + } + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where uuid = ?. + * + * @param taxId the primary key of the current dossier tax + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public static DossierTax[] findByUuid_PrevAndNext(long taxId, String uuid, + OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByUuid_PrevAndNext(taxId, uuid, orderByComparator); + } + + /** + * Removes all the dossier taxs where uuid = ? from the database. + * + * @param uuid the uuid + */ + public static void removeByUuid(String uuid) { + getPersistence().removeByUuid(uuid); + } + + /** + * Returns the number of dossier taxs where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching dossier taxs + */ + public static int countByUuid(String uuid) { + return getPersistence().countByUuid(uuid); + } + + /** + * Returns the dossier tax where uuid = ? and groupId = ? or throws a {@link NoSuchDossierTaxException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public static DossierTax findByUUID_G(String uuid, long groupId) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence().findByUUID_G(uuid, groupId); + } + + /** + * Returns the dossier tax where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByUUID_G(String uuid, long groupId) { + return getPersistence().fetchByUUID_G(uuid, groupId); + } + + /** + * Returns the dossier tax where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByUUID_G(String uuid, long groupId, + boolean retrieveFromCache) { + return getPersistence().fetchByUUID_G(uuid, groupId, retrieveFromCache); + } + + /** + * Removes the dossier tax where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the dossier tax that was removed + */ + public static DossierTax removeByUUID_G(String uuid, long groupId) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence().removeByUUID_G(uuid, groupId); + } + + /** + * Returns the number of dossier taxs where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching dossier taxs + */ + public static int countByUUID_G(String uuid, long groupId) { + return getPersistence().countByUUID_G(uuid, groupId); + } + + /** + * Returns all the dossier taxs where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the matching dossier taxs + */ + public static List findByUuid_C(String uuid, long companyId) { + return getPersistence().findByUuid_C(uuid, companyId); + } + + /** + * Returns a range of all the dossier taxs where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + public static List findByUuid_C(String uuid, long companyId, + int start, int end) { + return getPersistence().findByUuid_C(uuid, companyId, start, end); + } + + /** + * Returns an ordered range of all the dossier taxs where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + public static List findByUuid_C(String uuid, long companyId, + int start, int end, OrderByComparator orderByComparator) { + return getPersistence() + .findByUuid_C(uuid, companyId, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the dossier taxs where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + public static List findByUuid_C(String uuid, long companyId, + int start, int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByUuid_C(uuid, companyId, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public static DossierTax findByUuid_C_First(String uuid, long companyId, + OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByUuid_C_First(uuid, companyId, orderByComparator); + } + + /** + * Returns the first dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByUuid_C_First(String uuid, long companyId, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByUuid_C_First(uuid, companyId, orderByComparator); + } + + /** + * Returns the last dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public static DossierTax findByUuid_C_Last(String uuid, long companyId, + OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByUuid_C_Last(uuid, companyId, orderByComparator); + } + + /** + * Returns the last dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByUuid_C_Last(String uuid, long companyId, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByUuid_C_Last(uuid, companyId, orderByComparator); + } + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param taxId the primary key of the current dossier tax + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public static DossierTax[] findByUuid_C_PrevAndNext(long taxId, + String uuid, long companyId, + OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByUuid_C_PrevAndNext(taxId, uuid, companyId, + orderByComparator); + } + + /** + * Removes all the dossier taxs where uuid = ? and companyId = ? from the database. + * + * @param uuid the uuid + * @param companyId the company ID + */ + public static void removeByUuid_C(String uuid, long companyId) { + getPersistence().removeByUuid_C(uuid, companyId); + } + + /** + * Returns the number of dossier taxs where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the number of matching dossier taxs + */ + public static int countByUuid_C(String uuid, long companyId) { + return getPersistence().countByUuid_C(uuid, companyId); + } + + /** + * Returns the dossier tax where dossierNo = ? and maSoThue = ? and soQuyetDinh = ? or throws a {@link NoSuchDossierTaxException} if it could not be found. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @return the matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public static DossierTax findByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence().findByF_DMS(dossierNo, maSoThue, soQuyetDinh); + } + + /** + * Returns the dossier tax where dossierNo = ? and maSoThue = ? and soQuyetDinh = ? or returns null if it could not be found. Uses the finder cache. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh) { + return getPersistence().fetchByF_DMS(dossierNo, maSoThue, soQuyetDinh); + } + + /** + * Returns the dossier tax where dossierNo = ? and maSoThue = ? and soQuyetDinh = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh, boolean retrieveFromCache) { + return getPersistence() + .fetchByF_DMS(dossierNo, maSoThue, soQuyetDinh, + retrieveFromCache); + } + + /** + * Removes the dossier tax where dossierNo = ? and maSoThue = ? and soQuyetDinh = ? from the database. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @return the dossier tax that was removed + */ + public static DossierTax removeByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence().removeByF_DMS(dossierNo, maSoThue, soQuyetDinh); + } + + /** + * Returns the number of dossier taxs where dossierNo = ? and maSoThue = ? and soQuyetDinh = ?. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @return the number of matching dossier taxs + */ + public static int countByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh) { + return getPersistence().countByF_DMS(dossierNo, maSoThue, soQuyetDinh); + } + + /** + * Returns all the dossier taxs where statusTBT = ?. + * + * @param statusTBT the status tbt + * @return the matching dossier taxs + */ + public static List findByF_STATUS_TBT(int statusTBT) { + return getPersistence().findByF_STATUS_TBT(statusTBT); + } + + /** + * Returns a range of all the dossier taxs where statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + public static List findByF_STATUS_TBT(int statusTBT, int start, + int end) { + return getPersistence().findByF_STATUS_TBT(statusTBT, start, end); + } + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + public static List findByF_STATUS_TBT(int statusTBT, int start, + int end, OrderByComparator orderByComparator) { + return getPersistence() + .findByF_STATUS_TBT(statusTBT, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + public static List findByF_STATUS_TBT(int statusTBT, int start, + int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_STATUS_TBT(statusTBT, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first dossier tax in the ordered set where statusTBT = ?. + * + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public static DossierTax findByF_STATUS_TBT_First(int statusTBT, + OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByF_STATUS_TBT_First(statusTBT, orderByComparator); + } + + /** + * Returns the first dossier tax in the ordered set where statusTBT = ?. + * + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByF_STATUS_TBT_First(int statusTBT, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_STATUS_TBT_First(statusTBT, orderByComparator); + } + + /** + * Returns the last dossier tax in the ordered set where statusTBT = ?. + * + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public static DossierTax findByF_STATUS_TBT_Last(int statusTBT, + OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByF_STATUS_TBT_Last(statusTBT, orderByComparator); + } + + /** + * Returns the last dossier tax in the ordered set where statusTBT = ?. + * + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByF_STATUS_TBT_Last(int statusTBT, + OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_STATUS_TBT_Last(statusTBT, orderByComparator); + } + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where statusTBT = ?. + * + * @param taxId the primary key of the current dossier tax + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public static DossierTax[] findByF_STATUS_TBT_PrevAndNext(long taxId, + int statusTBT, OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByF_STATUS_TBT_PrevAndNext(taxId, statusTBT, + orderByComparator); + } + + /** + * Returns all the dossier taxs where statusTBT = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBTs the status tbts + * @return the matching dossier taxs + */ + public static List findByF_STATUS_TBT(int[] statusTBTs) { + return getPersistence().findByF_STATUS_TBT(statusTBTs); + } + + /** + * Returns a range of all the dossier taxs where statusTBT = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBTs the status tbts + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + public static List findByF_STATUS_TBT(int[] statusTBTs, + int start, int end) { + return getPersistence().findByF_STATUS_TBT(statusTBTs, start, end); + } + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBTs the status tbts + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + public static List findByF_STATUS_TBT(int[] statusTBTs, + int start, int end, OrderByComparator orderByComparator) { + return getPersistence() + .findByF_STATUS_TBT(statusTBTs, start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ?, optionally using the finder cache. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + public static List findByF_STATUS_TBT(int[] statusTBTs, + int start, int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_STATUS_TBT(statusTBTs, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Removes all the dossier taxs where statusTBT = ? from the database. + * + * @param statusTBT the status tbt + */ + public static void removeByF_STATUS_TBT(int statusTBT) { + getPersistence().removeByF_STATUS_TBT(statusTBT); + } + + /** + * Returns the number of dossier taxs where statusTBT = ?. + * + * @param statusTBT the status tbt + * @return the number of matching dossier taxs + */ + public static int countByF_STATUS_TBT(int statusTBT) { + return getPersistence().countByF_STATUS_TBT(statusTBT); + } + + /** + * Returns the number of dossier taxs where statusTBT = any ?. + * + * @param statusTBTs the status tbts + * @return the number of matching dossier taxs + */ + public static int countByF_STATUS_TBT(int[] statusTBTs) { + return getPersistence().countByF_STATUS_TBT(statusTBTs); + } + + /** + * Returns all the dossier taxs where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @return the matching dossier taxs + */ + public static List findByF_STATUS_CTT(int statusTBT, + int statusCTT) { + return getPersistence().findByF_STATUS_CTT(statusTBT, statusCTT); + } + + /** + * Returns a range of all the dossier taxs where statusTBT = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + public static List findByF_STATUS_CTT(int statusTBT, + int statusCTT, int start, int end) { + return getPersistence() + .findByF_STATUS_CTT(statusTBT, statusCTT, start, end); + } + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + public static List findByF_STATUS_CTT(int statusTBT, + int statusCTT, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByF_STATUS_CTT(statusTBT, statusCTT, start, end, + orderByComparator); + } + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + public static List findByF_STATUS_CTT(int statusTBT, + int statusCTT, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_STATUS_CTT(statusTBT, statusCTT, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public static DossierTax findByF_STATUS_CTT_First(int statusTBT, + int statusCTT, OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByF_STATUS_CTT_First(statusTBT, statusCTT, + orderByComparator); + } + + /** + * Returns the first dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByF_STATUS_CTT_First(int statusTBT, + int statusCTT, OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_STATUS_CTT_First(statusTBT, statusCTT, + orderByComparator); + } + + /** + * Returns the last dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public static DossierTax findByF_STATUS_CTT_Last(int statusTBT, + int statusCTT, OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByF_STATUS_CTT_Last(statusTBT, statusCTT, + orderByComparator); + } + + /** + * Returns the last dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByF_STATUS_CTT_Last(int statusTBT, + int statusCTT, OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_STATUS_CTT_Last(statusTBT, statusCTT, + orderByComparator); + } + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param taxId the primary key of the current dossier tax + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public static DossierTax[] findByF_STATUS_CTT_PrevAndNext(long taxId, + int statusTBT, int statusCTT, + OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByF_STATUS_CTT_PrevAndNext(taxId, statusTBT, statusCTT, + orderByComparator); + } + + /** + * Removes all the dossier taxs where statusTBT = ? and statusCTT = ? from the database. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + */ + public static void removeByF_STATUS_CTT(int statusTBT, int statusCTT) { + getPersistence().removeByF_STATUS_CTT(statusTBT, statusCTT); + } + + /** + * Returns the number of dossier taxs where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @return the number of matching dossier taxs + */ + public static int countByF_STATUS_CTT(int statusTBT, int statusCTT) { + return getPersistence().countByF_STATUS_CTT(statusTBT, statusCTT); + } + + /** + * Returns all the dossier taxs where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @return the matching dossier taxs + */ + public static List findByF_DOSSIER_TBT(String dossierNo, + int statusTBT) { + return getPersistence().findByF_DOSSIER_TBT(dossierNo, statusTBT); + } + + /** + * Returns a range of all the dossier taxs where dossierNo = ? and statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + public static List findByF_DOSSIER_TBT(String dossierNo, + int statusTBT, int start, int end) { + return getPersistence() + .findByF_DOSSIER_TBT(dossierNo, statusTBT, start, end); + } + + /** + * Returns an ordered range of all the dossier taxs where dossierNo = ? and statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + public static List findByF_DOSSIER_TBT(String dossierNo, + int statusTBT, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByF_DOSSIER_TBT(dossierNo, statusTBT, start, end, + orderByComparator); + } + + /** + * Returns an ordered range of all the dossier taxs where dossierNo = ? and statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + public static List findByF_DOSSIER_TBT(String dossierNo, + int statusTBT, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_DOSSIER_TBT(dossierNo, statusTBT, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public static DossierTax findByF_DOSSIER_TBT_First(String dossierNo, + int statusTBT, OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByF_DOSSIER_TBT_First(dossierNo, statusTBT, + orderByComparator); + } + + /** + * Returns the first dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByF_DOSSIER_TBT_First(String dossierNo, + int statusTBT, OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_DOSSIER_TBT_First(dossierNo, statusTBT, + orderByComparator); + } + + /** + * Returns the last dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public static DossierTax findByF_DOSSIER_TBT_Last(String dossierNo, + int statusTBT, OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByF_DOSSIER_TBT_Last(dossierNo, statusTBT, + orderByComparator); + } + + /** + * Returns the last dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByF_DOSSIER_TBT_Last(String dossierNo, + int statusTBT, OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_DOSSIER_TBT_Last(dossierNo, statusTBT, + orderByComparator); + } + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param taxId the primary key of the current dossier tax + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public static DossierTax[] findByF_DOSSIER_TBT_PrevAndNext(long taxId, + String dossierNo, int statusTBT, + OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByF_DOSSIER_TBT_PrevAndNext(taxId, dossierNo, + statusTBT, orderByComparator); + } + + /** + * Removes all the dossier taxs where dossierNo = ? and statusTBT = ? from the database. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + */ + public static void removeByF_DOSSIER_TBT(String dossierNo, int statusTBT) { + getPersistence().removeByF_DOSSIER_TBT(dossierNo, statusTBT); + } + + /** + * Returns the number of dossier taxs where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @return the number of matching dossier taxs + */ + public static int countByF_DOSSIER_TBT(String dossierNo, int statusTBT) { + return getPersistence().countByF_DOSSIER_TBT(dossierNo, statusTBT); + } + + /** + * Returns all the dossier taxs where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @return the matching dossier taxs + */ + public static List findByF_DOSSIER_CTT(String dossierNo, + int statusCTT) { + return getPersistence().findByF_DOSSIER_CTT(dossierNo, statusCTT); + } + + /** + * Returns a range of all the dossier taxs where dossierNo = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + public static List findByF_DOSSIER_CTT(String dossierNo, + int statusCTT, int start, int end) { + return getPersistence() + .findByF_DOSSIER_CTT(dossierNo, statusCTT, start, end); + } + + /** + * Returns an ordered range of all the dossier taxs where dossierNo = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + public static List findByF_DOSSIER_CTT(String dossierNo, + int statusCTT, int start, int end, + OrderByComparator orderByComparator) { + return getPersistence() + .findByF_DOSSIER_CTT(dossierNo, statusCTT, start, end, + orderByComparator); + } + + /** + * Returns an ordered range of all the dossier taxs where dossierNo = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + public static List findByF_DOSSIER_CTT(String dossierNo, + int statusCTT, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findByF_DOSSIER_CTT(dossierNo, statusCTT, start, end, + orderByComparator, retrieveFromCache); + } + + /** + * Returns the first dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public static DossierTax findByF_DOSSIER_CTT_First(String dossierNo, + int statusCTT, OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByF_DOSSIER_CTT_First(dossierNo, statusCTT, + orderByComparator); + } + + /** + * Returns the first dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByF_DOSSIER_CTT_First(String dossierNo, + int statusCTT, OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_DOSSIER_CTT_First(dossierNo, statusCTT, + orderByComparator); + } + + /** + * Returns the last dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + public static DossierTax findByF_DOSSIER_CTT_Last(String dossierNo, + int statusCTT, OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByF_DOSSIER_CTT_Last(dossierNo, statusCTT, + orderByComparator); + } + + /** + * Returns the last dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + public static DossierTax fetchByF_DOSSIER_CTT_Last(String dossierNo, + int statusCTT, OrderByComparator orderByComparator) { + return getPersistence() + .fetchByF_DOSSIER_CTT_Last(dossierNo, statusCTT, + orderByComparator); + } + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param taxId the primary key of the current dossier tax + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public static DossierTax[] findByF_DOSSIER_CTT_PrevAndNext(long taxId, + String dossierNo, int statusCTT, + OrderByComparator orderByComparator) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence() + .findByF_DOSSIER_CTT_PrevAndNext(taxId, dossierNo, + statusCTT, orderByComparator); + } + + /** + * Removes all the dossier taxs where dossierNo = ? and statusCTT = ? from the database. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + */ + public static void removeByF_DOSSIER_CTT(String dossierNo, int statusCTT) { + getPersistence().removeByF_DOSSIER_CTT(dossierNo, statusCTT); + } + + /** + * Returns the number of dossier taxs where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @return the number of matching dossier taxs + */ + public static int countByF_DOSSIER_CTT(String dossierNo, int statusCTT) { + return getPersistence().countByF_DOSSIER_CTT(dossierNo, statusCTT); + } + + /** + * Caches the dossier tax in the entity cache if it is enabled. + * + * @param dossierTax the dossier tax + */ + public static void cacheResult(DossierTax dossierTax) { + getPersistence().cacheResult(dossierTax); + } + + /** + * Caches the dossier taxs in the entity cache if it is enabled. + * + * @param dossierTaxs the dossier taxs + */ + public static void cacheResult(List dossierTaxs) { + getPersistence().cacheResult(dossierTaxs); + } + + /** + * Creates a new dossier tax with the primary key. Does not add the dossier tax to the database. + * + * @param taxId the primary key for the new dossier tax + * @return the new dossier tax + */ + public static DossierTax create(long taxId) { + return getPersistence().create(taxId); + } + + /** + * Removes the dossier tax with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax that was removed + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public static DossierTax remove(long taxId) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence().remove(taxId); + } + + public static DossierTax updateImpl(DossierTax dossierTax) { + return getPersistence().updateImpl(dossierTax); + } + + /** + * Returns the dossier tax with the primary key or throws a {@link NoSuchDossierTaxException} if it could not be found. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + public static DossierTax findByPrimaryKey(long taxId) + throws org.opencps.synctracking.exception.NoSuchDossierTaxException { + return getPersistence().findByPrimaryKey(taxId); + } + + /** + * Returns the dossier tax with the primary key or returns null if it could not be found. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax, or null if a dossier tax with the primary key could not be found + */ + public static DossierTax fetchByPrimaryKey(long taxId) { + return getPersistence().fetchByPrimaryKey(taxId); + } + + public static java.util.Map fetchByPrimaryKeys( + java.util.Set primaryKeys) { + return getPersistence().fetchByPrimaryKeys(primaryKeys); + } + + /** + * Returns all the dossier taxs. + * + * @return the dossier taxs + */ + public static List findAll() { + return getPersistence().findAll(); + } + + /** + * Returns a range of all the dossier taxs. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of dossier taxs + */ + public static List findAll(int start, int end) { + return getPersistence().findAll(start, end); + } + + /** + * Returns an ordered range of all the dossier taxs. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of dossier taxs + */ + public static List findAll(int start, int end, + OrderByComparator orderByComparator) { + return getPersistence().findAll(start, end, orderByComparator); + } + + /** + * Returns an ordered range of all the dossier taxs. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of dossier taxs + */ + public static List findAll(int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + return getPersistence() + .findAll(start, end, orderByComparator, retrieveFromCache); + } + + /** + * Removes all the dossier taxs from the database. + */ + public static void removeAll() { + getPersistence().removeAll(); + } + + /** + * Returns the number of dossier taxs. + * + * @return the number of dossier taxs + */ + public static int countAll() { + return getPersistence().countAll(); + } + + public static java.util.Set getBadColumnNames() { + return getPersistence().getBadColumnNames(); + } + + public static DossierTaxPersistence getPersistence() { + return _serviceTracker.getService(); + } + + private static ServiceTracker _serviceTracker; + + static { + Bundle bundle = FrameworkUtil.getBundle(DossierTaxPersistence.class); + + ServiceTracker serviceTracker = + new ServiceTracker(bundle.getBundleContext(), + DossierTaxPersistence.class, null); + + serviceTracker.open(); + + _serviceTracker = serviceTracker; + } +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/persistence/SyncTrackingPersistence.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/persistence/SyncTrackingPersistence.java index 1db7ad007b..d08b618622 100644 --- a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/persistence/SyncTrackingPersistence.java +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/persistence/SyncTrackingPersistence.java @@ -30,7 +30,7 @@ * Caching information and settings can be found in portal.properties *

* - * @author Brian Wing Shun Chan + * @author duongnt * @see org.opencps.synctracking.service.persistence.impl.SyncTrackingPersistenceImpl * @see SyncTrackingUtil * @generated @@ -600,6 +600,63 @@ public SyncTracking removeByF_GID_DossierNo(long groupId, String dossierNo) */ public int countByF_GID_DossierNo(long groupId, String dossierNo); + /** + * Returns the sync tracking where groupId = ? and dossierNo = ? and protocol = ? or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @return the matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public SyncTracking findByF_GID_DossierNo_Protocol(long groupId, + String dossierNo, String protocol) throws NoSuchSyncTrackingException; + + /** + * Returns the sync tracking where groupId = ? and dossierNo = ? and protocol = ? or returns null if it could not be found. Uses the finder cache. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_GID_DossierNo_Protocol(long groupId, + String dossierNo, String protocol); + + /** + * Returns the sync tracking where groupId = ? and dossierNo = ? and protocol = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public SyncTracking fetchByF_GID_DossierNo_Protocol(long groupId, + String dossierNo, String protocol, boolean retrieveFromCache); + + /** + * Removes the sync tracking where groupId = ? and dossierNo = ? and protocol = ? from the database. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @return the sync tracking that was removed + */ + public SyncTracking removeByF_GID_DossierNo_Protocol(long groupId, + String dossierNo, String protocol) throws NoSuchSyncTrackingException; + + /** + * Returns the number of sync trackings where groupId = ? and dossierNo = ? and protocol = ?. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @return the number of matching sync trackings + */ + public int countByF_GID_DossierNo_Protocol(long groupId, String dossierNo, + String protocol); + /** * Returns all the sync trackings where groupId = ? and api = ?. * diff --git a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/persistence/SyncTrackingUtil.java b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/persistence/SyncTrackingUtil.java index 0984acdee3..b0b2e1c9de 100644 --- a/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/persistence/SyncTrackingUtil.java +++ b/modules/backend-synctracking/backend-synctracking-api/src/main/java/org/opencps/synctracking/service/persistence/SyncTrackingUtil.java @@ -37,7 +37,7 @@ * Caching information and settings can be found in portal.properties *

* - * @author Brian Wing Shun Chan + * @author duongnt * @see SyncTrackingPersistence * @see org.opencps.synctracking.service.persistence.impl.SyncTrackingPersistenceImpl * @generated @@ -784,6 +784,82 @@ public static int countByF_GID_DossierNo(long groupId, String dossierNo) { return getPersistence().countByF_GID_DossierNo(groupId, dossierNo); } + /** + * Returns the sync tracking where groupId = ? and dossierNo = ? and protocol = ? or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @return the matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + public static SyncTracking findByF_GID_DossierNo_Protocol(long groupId, + String dossierNo, String protocol) + throws org.opencps.synctracking.exception.NoSuchSyncTrackingException { + return getPersistence() + .findByF_GID_DossierNo_Protocol(groupId, dossierNo, protocol); + } + + /** + * Returns the sync tracking where groupId = ? and dossierNo = ? and protocol = ? or returns null if it could not be found. Uses the finder cache. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_GID_DossierNo_Protocol(long groupId, + String dossierNo, String protocol) { + return getPersistence() + .fetchByF_GID_DossierNo_Protocol(groupId, dossierNo, protocol); + } + + /** + * Returns the sync tracking where groupId = ? and dossierNo = ? and protocol = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + public static SyncTracking fetchByF_GID_DossierNo_Protocol(long groupId, + String dossierNo, String protocol, boolean retrieveFromCache) { + return getPersistence() + .fetchByF_GID_DossierNo_Protocol(groupId, dossierNo, + protocol, retrieveFromCache); + } + + /** + * Removes the sync tracking where groupId = ? and dossierNo = ? and protocol = ? from the database. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @return the sync tracking that was removed + */ + public static SyncTracking removeByF_GID_DossierNo_Protocol(long groupId, + String dossierNo, String protocol) + throws org.opencps.synctracking.exception.NoSuchSyncTrackingException { + return getPersistence() + .removeByF_GID_DossierNo_Protocol(groupId, dossierNo, + protocol); + } + + /** + * Returns the number of sync trackings where groupId = ? and dossierNo = ? and protocol = ?. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @return the number of matching sync trackings + */ + public static int countByF_GID_DossierNo_Protocol(long groupId, + String dossierNo, String protocol) { + return getPersistence() + .countByF_GID_DossierNo_Protocol(groupId, dossierNo, protocol); + } + /** * Returns all the sync trackings where groupId = ? and api = ?. * diff --git a/modules/backend-synctracking/backend-synctracking-service/bnd.bnd b/modules/backend-synctracking/backend-synctracking-service/bnd.bnd index db1ce767e8..c011eca485 100644 --- a/modules/backend-synctracking/backend-synctracking-service/bnd.bnd +++ b/modules/backend-synctracking/backend-synctracking-service/bnd.bnd @@ -3,4 +3,3 @@ Bundle-SymbolicName: org.opencps.backend.synctracking.service Bundle-Version: 1.0.0 Liferay-Require-SchemaVersion: 1.0.0 Liferay-Service: true --dsannotations-options: inherit diff --git a/modules/backend-synctracking/backend-synctracking-service/build.gradle b/modules/backend-synctracking/backend-synctracking-service/build.gradle index 530a9fa1b1..4d9ffd20f0 100644 --- a/modules/backend-synctracking/backend-synctracking-service/build.gradle +++ b/modules/backend-synctracking/backend-synctracking-service/build.gradle @@ -1,23 +1,30 @@ dependencies { - compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.5.0" - compileOnly group: "com.liferay", name: "com.liferay.portal.spring.extender.api", version: "3.0.0" - compile "org.springframework.boot:spring-boot-starter-web:1.5.6.RELEASE" + compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0" + compileOnly group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0" + compileOnly group: "com.liferay", name: "com.liferay.portal.spring.extender", version: "2.0.0" compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "3.0.0" - compileOnly group: "org.osgi", name: "org.osgi.core", version: "6.0.0" + compileOnly group: 'com.liferay', name: 'com.liferay.portal.upgrade.api', version: '2.0.0' + compileOnly group: 'com.liferay', name: 'com.liferay.petra.string', version: '2.0.1' + compileOnly group: 'com.liferay', name: 'com.liferay.portal.upgrade.api', version: '2.0.0' - compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations", version: "1.3.0" - compileOnly group: "javax.portlet", name: "portlet-api", version: "2.0" + compileOnly group: "javax.portlet", name: "portlet-api", version: "3.0.0" compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1" - compileOnly group: "javax.ws.rs", name: "javax.ws.rs-api", version: "2.1" + compileOnly group: "javax.ws.rs", name: "javax.ws.rs-api", version: "2.0.1" + + compileOnly group: "org.osgi", name: "org.osgi.core", version: "5.0.0" compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations", version: "1.3.0" compileOnly group: "org.osgi", name: "org.osgi.service.jaxrs", version: "1.0.0" + + compile "org.springframework.boot:spring-boot-starter-web:1.5.6.RELEASE" + compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8' compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.8' compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.8' - compileOnly group: 'com.liferay', name: 'com.liferay.portal.upgrade.api', version: '2.0.0' + compileOnly project(":modules:backend-synctracking:backend-synctracking-api") compileOnly project(":modules:backend-communication:backend-communication-api") compileOnly project(":modules:backend-auth") + compileOnly project(":modules:backend-dossiermgt:backend-dossiermgt-api") } buildService { diff --git a/modules/backend-synctracking/backend-synctracking-service/service.xml b/modules/backend-synctracking/backend-synctracking-service/service.xml index 1915cca01d..ca4aa9ee11 100644 --- a/modules/backend-synctracking/backend-synctracking-service/service.xml +++ b/modules/backend-synctracking/backend-synctracking-service/service.xml @@ -1,9 +1,13 @@ - + - - FOO - + + duongnt + syncTracking + @@ -48,6 +52,12 @@ + + + + + + @@ -106,4 +116,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/SyncTrackingAction.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/SyncTrackingAction.java index ef112dc44a..006813b284 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/SyncTrackingAction.java +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/SyncTrackingAction.java @@ -1,13 +1,16 @@ package org.opencps.synctracking.action; import com.liferay.portal.kernel.json.JSONObject; -import org.opencps.synctracking.model.DtoResponse; -import org.opencps.synctracking.model.SyncTrackingQuery; -import org.opencps.synctracking.model.SyncTrackingResponse; +import org.opencps.synctracking.model.*; public interface SyncTrackingAction { public DtoResponse get(SyncTrackingQuery syncTrackingQuery) throws Exception; public boolean create(SyncTrackingQuery syncTrackingQuery) throws Exception; public boolean resend(SyncTrackingQuery syncTrackingQuery, JSONObject config) throws Exception; public boolean createSynTrackingDVCQG(SyncTrackingQuery syncTrackingQuery) throws Exception; + public boolean createDossierTax(DossierTaxInput dossierTaxInput) throws Exception; + public boolean updateDossierTax(DossierTaxInput dossierTaxInput) throws Exception; + public SyncTrackingResponse getSyncTracking(SyncTrackingQuery dossierTaxInput) throws Exception; + public DossierTaxResponse getDetailDossierTax(DossierTaxInput input) throws Exception; + public String getDDossierTax(DossierTaxInput input) throws Exception; } diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/TransformAction.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/TransformAction.java index 94b07b1982..ad32df8ae1 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/TransformAction.java +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/TransformAction.java @@ -1,5 +1,7 @@ package org.opencps.synctracking.action; +import org.opencps.synctracking.model.DossierTax; +import org.opencps.synctracking.model.DossierTaxResponse; import org.opencps.synctracking.model.SyncTracking; import org.opencps.synctracking.model.SyncTrackingResponse; @@ -7,4 +9,8 @@ public interface TransformAction { public List transForm(List listTracking) throws Exception; + + public SyncTrackingResponse transForm(SyncTracking listTracking) throws Exception; + + public DossierTaxResponse transFormDossierTax(DossierTax dossierTax) throws Exception; } diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/impl/SyncTrackingActionImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/impl/SyncTrackingActionImpl.java index 015d0ed28a..8f749eb0ff 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/impl/SyncTrackingActionImpl.java +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/impl/SyncTrackingActionImpl.java @@ -1,21 +1,29 @@ package org.opencps.synctracking.action.impl; +import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONObject; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.Validator; +import org.opencps.auth.utils.APIDateTimeUtils; +import org.opencps.dossiermgt.input.model.DossierTaxInfo; import org.opencps.synctracking.action.IntegrationOutsideApi; import org.opencps.synctracking.action.SyncTrackingAction; import org.opencps.synctracking.action.TransformAction; -import org.opencps.synctracking.model.DtoResponse; -import org.opencps.synctracking.model.SyncTracking; -import org.opencps.synctracking.model.SyncTrackingQuery; -import org.opencps.synctracking.model.SyncTrackingResponse; +import org.opencps.synctracking.model.*; +import org.opencps.synctracking.service.DossierTaxLocalServiceUtil; import org.opencps.synctracking.service.SyncTrackingLocalServiceUtil; import org.opencps.synctracking.service.util.CommonServiceUtils; +import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.http.client.ClientHttpRequestFactory; +import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; +import org.springframework.http.converter.StringHttpMessageConverter; +import org.springframework.web.client.RestTemplate; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -26,10 +34,14 @@ public class SyncTrackingActionImpl implements SyncTrackingAction { private TransformAction transformAction; private IntegrationOutsideApi integrationOutsideApi; private Log _log = LogFactoryUtil.getLog(SyncTrackingActionImpl.class); + private RestTemplate restTemplate; + private static final Integer timeout = 10000 ; public SyncTrackingActionImpl(TransformAction transformAction, IntegrationOutsideApi integrationOutsideApi) { this.transformAction = transformAction; this.integrationOutsideApi = integrationOutsideApi; + this.restTemplate = new RestTemplate(setConfigRestTemplate(timeout)); + this.restTemplate.getMessageConverters().add(0, new StringHttpMessageConverter(Charset.forName("UTF-8"))); } @Override @@ -203,12 +215,8 @@ public boolean createSynTrackingDVCQG(SyncTrackingQuery syncTrackingQuery) throw throw new Exception("No body param was found"); } - if (Validator.isNull(syncTrackingQuery.groupId) || syncTrackingQuery.groupId == 0) { - throw new Exception("No groupId was found"); - } - if (Validator.isNull(syncTrackingQuery.bodyRequest) || syncTrackingQuery.bodyRequest.isEmpty()) { - throw new Exception("No from unit code was found"); + throw new Exception("No from bodyRequest was found"); } SyncTrackingLocalServiceUtil.createSyncTrackingManual(syncTrackingQuery); @@ -219,6 +227,172 @@ public boolean createSynTrackingDVCQG(SyncTrackingQuery syncTrackingQuery) throw } } + @Override + public boolean createDossierTax(DossierTaxInput dossierTaxInput) throws Exception { + try { + if (Validator.isNull(dossierTaxInput)) { + throw new Exception("No body param was found"); + } + + if (Validator.isNull(dossierTaxInput.dossierNo) || dossierTaxInput.dossierNo.isEmpty()) { + throw new Exception("No from dossierNo was found"); + } + + if (Validator.isNull(dossierTaxInput.maSoThue) || dossierTaxInput.maSoThue.isEmpty()) { + throw new Exception("No from maSoThue was found"); + } + + if (Validator.isNull(dossierTaxInput.soQuyetDinh) || dossierTaxInput.soQuyetDinh.isEmpty()) { + throw new Exception("No from soQuyetDinh was found"); + } + + _log.info("Tạo dữ liệu thuế: " + dossierTaxInput.dossierNo); + DossierTaxLocalServiceUtil.createDossierTaxManual(dossierTaxInput); + return true; + }catch (Exception e){ + _log.error(e); + throw new Exception(e.getMessage()); + } + + } + + @Override + public boolean updateDossierTax(DossierTaxInput dossierTaxInput) throws Exception { + try { + if (Validator.isNull(dossierTaxInput)) { + throw new Exception("No body param was found"); + } + + if (Validator.isNull(dossierTaxInput.dossierNo) || dossierTaxInput.dossierNo.isEmpty()) { + throw new Exception("No from dossierNo was found"); + } + + if (Validator.isNull(dossierTaxInput.maSoThue) || dossierTaxInput.maSoThue.isEmpty()) { + throw new Exception("No from maSoThue was found"); + } + + if (Validator.isNull(dossierTaxInput.soQuyetDinh) || dossierTaxInput.soQuyetDinh.isEmpty()) { + throw new Exception("No from soQuyetDinh was found"); + } + _log.info("---- Mã hồ sơ ---: " + dossierTaxInput.dossierNo + "--- Mã số thuế--- :" + dossierTaxInput.maSoThue + " --- Số Quyết Định ---: " + dossierTaxInput.soQuyetDinh ); + DossierTax dossierTax = DossierTaxLocalServiceUtil.fetchDossierTaxByDMS(dossierTaxInput.dossierNo, dossierTaxInput.maSoThue, dossierTaxInput.soQuyetDinh); + if (Validator.isNotNull(dossierTax)) { + _log.info("Cập nhật dữ liệu thuế"); + dossierTax.setHoTenNguoiNopTien(dossierTaxInput.hoTenNguoiNopTien); + dossierTax.setSoCmtNguoiNopTien(Integer.valueOf(dossierTaxInput.soCmtNguoiNopTien)); + dossierTax.setDiaChiNguoiNopTien(dossierTaxInput.diaChiNguoiNopTien); + dossierTax.setTinhNguoiNopTien(dossierTaxInput.tinhNguoiNopTien); + dossierTax.setHuyenNguoiNopTien(dossierTaxInput.huyenNguoiNopTien); + dossierTax.setXaNguoiNopTien(dossierTaxInput.xaNguoiNopTien); + dossierTax.setThoiGianThanhToan(APIDateTimeUtils.convertStringToDate(dossierTaxInput.thoiGianThanhToan,APIDateTimeUtils._NORMAL_DATE)); + dossierTax.setNgayNhanBienLai(APIDateTimeUtils.convertStringToDate(dossierTaxInput.ngayNhanBienLai,APIDateTimeUtils._NORMAL_DATE)); + dossierTax.setNgayThueTraThongBao(APIDateTimeUtils.convertStringToDate(dossierTaxInput.ngayThueTraThongBao,APIDateTimeUtils._NORMAL_DATE)); + dossierTax.setNgayTraThongBao(APIDateTimeUtils.convertStringToDate(dossierTaxInput.ngayTraThongBao,APIDateTimeUtils._NORMAL_DATE)); + dossierTax.setSoTienNop(Integer.valueOf(dossierTaxInput.soTienNop)); + dossierTax.setNoiDungThanhToan(dossierTaxInput.noiDungThanhToan); + dossierTax.setTrangThaiThanhToan(dossierTaxInput.trangThaiThanhToan); + dossierTax.setFileChungTu(dossierTaxInput.fileChungTu); + dossierTax.setNgayQuyetDinh(APIDateTimeUtils.convertStringToDate(dossierTaxInput.ngayQuyetDinh,APIDateTimeUtils._NORMAL_DATE)); + if(Validator.isNotNull(dossierTaxInput.statusTBT)) { + dossierTax.setStatusTBT(Integer.valueOf(dossierTaxInput.statusTBT)); + } + if(Validator.isNotNull(dossierTaxInput.statusCTT)) { + dossierTax.setStatusCTT(Integer.valueOf(dossierTaxInput.statusCTT)); + } + DossierTaxLocalServiceUtil.updateDossierTax(dossierTax); + return true; + } + return false; + }catch (Exception e){ + _log.error(e); + throw new Exception(e.getMessage()); + } + } + + @Override + public SyncTrackingResponse getSyncTracking(SyncTrackingQuery input) throws Exception { + try { + SyncTrackingResponse syncTrackingResponse = new SyncTrackingResponse(); + if (Validator.isNull(input)) { + throw new Exception("No body param was found"); + } + + if (Validator.isNull(input.dossierNo) || input.dossierNo.isEmpty()) { + throw new Exception("No from dossierNo was found"); + } + SyncTracking syncTracking = SyncTrackingLocalServiceUtil.getByDossierNoAndProtocol(input.groupId, input.dossierNo, input.protocol); + if(Validator.isNotNull(syncTracking)) { + _log.debug("SyncTracking: " + JSONFactoryUtil.looseSerialize(syncTracking)); + syncTrackingResponse = transformAction.transForm(syncTracking); + } + + return syncTrackingResponse; + + }catch (Exception e){ + e.getMessage(); + } + return null; + } + + @Override + public DossierTaxResponse getDetailDossierTax(DossierTaxInput input) throws Exception { + try { + DossierTaxResponse response = new DossierTaxResponse(); + if (Validator.isNull(input)) { + throw new Exception("No body param was found"); + } + + if (Validator.isNull(input.dossierNo) || input.dossierNo.isEmpty()) { + throw new Exception("No from dossierNo was found"); + } + + if (Validator.isNull(input.maSoThue) || input.maSoThue.isEmpty()) { + throw new Exception("No from Ma So Thue was found"); + } + if (Validator.isNull(input.soQuyetDinh) || input.soQuyetDinh.isEmpty()) { + throw new Exception("No from So Quyet Dinh was found"); + } + + DossierTax dossierTax = DossierTaxLocalServiceUtil.fetchDossierTaxByDMS(input.dossierNo, input.maSoThue, input.soQuyetDinh); + if (Validator.isNotNull(dossierTax)) { + _log.debug("SyncTracking: " + JSONFactoryUtil.looseSerialize(dossierTax)); + response = transformAction.transFormDossierTax(dossierTax); + } + + return response; + + }catch (Exception e){ + e.getMessage(); + } + return null; + } + + @Override + public String getDDossierTax(DossierTaxInput input) throws Exception { + try { + + HttpHeaders headers = new HttpHeaders(); + headers.set("Accept", "*"); + DossierTaxInfo body = new DossierTaxInfo(); + String urlCall ="127.0.0.1:8081/o/rest/getDetailDossierTax"; + + body.dossierNo = input.dossierNo; + body.maSoThue = input.maSoThue; + body.soQuyetDinh = input.soQuyetDinh; + headers.add("groupId", String.valueOf(input.groupId)); + _log.info("Body: " + JSONFactoryUtil.looseSerialize(body)); + HttpEntity entity = new HttpEntity<>(body, headers); + ResponseEntity response = restTemplate.postForEntity(urlCall, entity, String.class); + if(Validator.isNotNull(response)){ + return response.getBody(); + } + return null; + }catch (Exception e){ + e.getMessage(); + } + return null; + } + @Override public boolean resend(SyncTrackingQuery syncTrackingQuery, JSONObject config) throws Exception { try { @@ -259,4 +433,10 @@ public boolean resend(SyncTrackingQuery syncTrackingQuery, JSONObject config) th throw new Exception(e.getMessage()); } } + private ClientHttpRequestFactory setConfigRestTemplate(Integer timeout) { + HttpComponentsClientHttpRequestFactory clientHttpRequestFactory + = new HttpComponentsClientHttpRequestFactory(); + clientHttpRequestFactory.setConnectTimeout(timeout); + return clientHttpRequestFactory; + } } diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/impl/TransformActionImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/impl/TransformActionImpl.java index 1848c17b66..469f50d76c 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/impl/TransformActionImpl.java +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/impl/TransformActionImpl.java @@ -4,6 +4,8 @@ import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.util.Validator; import org.opencps.synctracking.action.TransformAction; +import org.opencps.synctracking.model.DossierTax; +import org.opencps.synctracking.model.DossierTaxResponse; import org.opencps.synctracking.model.SyncTracking; import org.opencps.synctracking.model.SyncTrackingResponse; import org.opencps.synctracking.service.util.CommonConstant; @@ -46,4 +48,53 @@ public List transForm(List listTracking) thr throw new Exception(e.getMessage()); } } + + @Override + public SyncTrackingResponse transForm(SyncTracking syncTracking) throws Exception { + try { + SyncTrackingResponse oneTrackingTransform = new SyncTrackingResponse(); + + oneTrackingTransform.api = syncTracking.getApi(); + oneTrackingTransform.bodyRequest = Validator.isNotNull(syncTracking.getBodyRequest()) + ? syncTracking.getBodyRequest() : ""; + oneTrackingTransform.bodyResponse = Validator.isNotNull(syncTracking.getResponse()) + ? syncTracking.getResponse() : ""; + oneTrackingTransform.createDate = Validator.isNotNull(syncTracking.getCreateDate()) + ? syncTracking.getCreateDate().getTime() : 0; + oneTrackingTransform.dossierNo = Validator.isNotNull(syncTracking.getDossierNo()) + ? syncTracking.getDossierNo(): ""; + oneTrackingTransform.serviceCode = Validator.isNotNull(syncTracking.getServiceCode()) + ? syncTracking.getServiceCode(): ""; + oneTrackingTransform.fromUnit = Validator.isNotNull(syncTracking.getFromUnit()) + ? syncTracking.getFromUnit() : ""; + oneTrackingTransform.toUnit = Validator.isNotNull(syncTracking.getToUnit()) + ? syncTracking.getToUnit() : ""; + oneTrackingTransform.stateSync = Validator.isNotNull(syncTracking.getStateSync()) + ? syncTracking.getStateSync() : CommonConstant.STATE_ERROR; + oneTrackingTransform.trackingId = Validator.isNotNull(syncTracking.getTrackingId()) + ? syncTracking.getTrackingId() : 0; + return oneTrackingTransform; + } catch (Exception e) { + _log.error(e); + throw new Exception(e.getMessage()); + } + } + + @Override + public DossierTaxResponse transFormDossierTax(DossierTax dossierTax) throws Exception { + try { + DossierTaxResponse oneDossierTaxTransform = new DossierTaxResponse(); + + oneDossierTaxTransform.dossierNo = Validator.isNotNull(dossierTax.getDossierNo()) + ? dossierTax.getDossierNo() : ""; + oneDossierTaxTransform.maSoThue = Validator.isNotNull(dossierTax.getMaSoThue()) + ? dossierTax.getMaSoThue() : ""; + oneDossierTaxTransform.soQuyetDinh = Validator.isNotNull(dossierTax.getSoQuyetDinh()) + ? dossierTax.getSoQuyetDinh() : ""; + return oneDossierTaxTransform; + } catch (Exception e) { + _log.error(e); + throw new Exception(e.getMessage()); + } + } } diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/impl/scheduler/QueueDVCQGScheduler.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/impl/scheduler/QueueDVCQGScheduler.java new file mode 100644 index 0000000000..a890d3b874 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/action/impl/scheduler/QueueDVCQGScheduler.java @@ -0,0 +1,567 @@ +package org.opencps.synctracking.action.impl.scheduler; + +import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.json.JSONArray; +import com.liferay.portal.kernel.json.JSONException; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.messaging.BaseMessageListener; +import com.liferay.portal.kernel.messaging.DestinationNames; +import com.liferay.portal.kernel.messaging.Message; +import com.liferay.portal.kernel.module.framework.ModuleServiceLifecycle; +import com.liferay.portal.kernel.scheduler.*; +import com.liferay.portal.kernel.search.Field; +import com.liferay.portal.kernel.util.PropsUtil; +import com.liferay.portal.kernel.util.Validator; +import org.opencps.auth.utils.APIDateTimeUtils; +import org.opencps.communication.model.ServerConfig; +import org.opencps.communication.service.ServerConfigLocalServiceUtil; +import org.opencps.dossiermgt.constants.DossierTerm; +import org.opencps.dossiermgt.model.Dossier; +import org.opencps.dossiermgt.service.DossierLocalServiceUtil; +import org.opencps.kernel.scheduler.StorageTypeAwareSchedulerEntryImpl; +import org.opencps.synctracking.model.DossierTax; +import org.opencps.synctracking.service.DossierTaxLocalServiceUtil; +import org.opencps.synctracking.service.comparator.QueueDVCQGComparator; +import org.osgi.service.component.annotations.*; + +import javax.ws.rs.HttpMethod; +import javax.ws.rs.core.MediaType; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.time.LocalDate; +import java.util.*; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.ThreadPoolExecutor; + +@Component(immediate = true, service = QueueDVCQGScheduler.class) +public class QueueDVCQGScheduler extends BaseMessageListener { + public static final int STATE_WAITING_SYNC = 1; + public static final int STATE_DONE = 3; + private static final Integer QUANTITY_JOB_DVCQG = 500; + private volatile boolean isRunning = false; + private static final String SERVER_CONFIG_NULL = "There is no server config frequency"; + private static final String PARSE_CONFIG_JSON_FAIL= "Create object json from config error"; + private static int timeSyncDossierDVCQG = Validator.isNotNull(PropsUtil.get("opencps.sync.dossiertax.time")) + ? Integer.valueOf(PropsUtil.get("opencps.sync.dossiertax.time")) + : 1440; + private static final Boolean ENABLE_JOB = Validator.isNotNull(PropsUtil.get("org.opencps.dossiertax.enable")) + ? Boolean.valueOf(PropsUtil.get("org.opencps.dossiertax.enable")) : false; + + //Start time config + private static int HOUR_STATISTIC = Validator.isNotNull(PropsUtil.get("opencps.dossiertax.hour")) + ? Integer.valueOf(PropsUtil.get("opencps.dossiertax.hour")) :-1; + private static int MINUTE_STATISTIC = Validator.isNotNull(PropsUtil.get("opencps.dossiertax.minute")) + ? Integer.valueOf(PropsUtil.get("opencps.dossiertax.minute")) :-1; + private static int SECOND_STATISTIC = Validator.isNotNull(PropsUtil.get("opencps.dossiertax.second")) + ? Integer.valueOf(PropsUtil.get("opencps.dossiertax.second")) :-1; + + public static final String UTF_8 = "UTF-8"; + public static final String VALUE_AUTHORIZATION = "Authorization"; + public static final String VALUE_BASIC = "Basic "; + public static final String VALUE_ACCEPT = "Accept"; + public static final String CONTENT_LENGTH = "Content-Length"; + public static final String OPENCPS_REST_CONNECTION_TIMEOUT = "org.opencps.rest.connection.timeout"; + public static final String OPENCPS_REST_READ_TIMEOUT = "org.opencps.rest.read.timeout"; + public static final int DEFAULT_READ_TIMEOUT = 3 * 60000; + public static final int DEFAULT_CONNECT_TIMEOUT = 3 * 60000; + + static class Counter { + private volatile static int count = 0; + public static int getCount(){ + return count; + } + public static synchronized void decreaseCount(){ + count--; + } + + public static synchronized void setCount(int countNew){ + count = countNew; + } + } + private static volatile ThreadPoolExecutor threadPoolExecutor; + + private int corePoolSize = 10; + private int maximumPoolSize = 20; + private int queueCapacity = 5; + private int keepAliveTime = 10; + public QueueDVCQGScheduler () { + _log.info("Constructor QueueDVCQGScheduler"); + + if(Validator.isNull(threadPoolExecutor)) { + _log.info("Creating threadPoolExecutor first time..."); + threadPoolExecutor = new ThreadPoolExecutor( + corePoolSize, // Số thread mặc định được cấp để xử lý request + maximumPoolSize, //Số thread tối đa được dùng + keepAliveTime, //thời gian sống 1 thread nếu thread đang ko làm gì + java.util.concurrent.TimeUnit.SECONDS, //đơn vị thời gian + new ArrayBlockingQueue<>(queueCapacity), //Queue để lưu số lượng request chờ khi số thread trong + // corePoolSize được dùng hết, khi số lượng request = queueCapacity thì sẽ tạo 1 thread mới + new ThreadPoolExecutor.CallerRunsPolicy()); //Tự động xử lý exception khi số lượng request vượt quá queueCapacity + } + } + + @Override + protected void doReceive(Message message) throws Exception { + _log.debug("=======START SEND : ====== : isRunning: "+ isRunning); + if (!isRunning) { + isRunning = true; + } else { + return; + } + + if(!ENABLE_JOB) { + return; + } + + if(Counter.getCount() > 0) { + return; + } + try { + doProcess(message); + } + + catch (Exception e) { + _log.debug(e); + } + isRunning = false; + _log.debug("------- END SEND : ------: isRunning: "+ isRunning); + } + + private void doProcess(Message message) { + _log.info("TASK SEND DVCQG time: " + timeSyncDossierDVCQG); + _log.info("isRunning: " + isRunning + ", jobEnable: " + ENABLE_JOB + ", counting: " + Counter.getCount()); + // Lấy danh sách thông báo thuế và chứng từ thuế + List lstQueueTBT = DossierTaxLocalServiceUtil.getByStatusTBT(new int[] { + STATE_WAITING_SYNC }, 0, QUANTITY_JOB_DVCQG, + new QueueDVCQGComparator(true, Field.CREATE_DATE, Date.class)); + + List lstQueueCTT = DossierTaxLocalServiceUtil.getByStatusCTT(STATE_DONE, + STATE_WAITING_SYNC , 0, QUANTITY_JOB_DVCQG, + new QueueDVCQGComparator(true, Field.CREATE_DATE, Date.class)); + + //Remove duplicated dossierNo + Set listDossierNoTBT = new HashSet<>(); + Set listDossierNoCTT = new HashSet<>(); + JSONArray jsonArray = JSONFactoryUtil.createJSONArray(); + + if(lstQueueTBT !=null && lstQueueTBT.size()> 0) { + for (DossierTax queue : lstQueueTBT) { + // TODO distinct thông báo thuế + listDossierNoTBT.add(queue.getDossierNo()); + + } + } + if(lstQueueCTT !=null && lstQueueCTT.size()> 0) { + for (DossierTax queue : lstQueueCTT) { + // todo distinct chứng từ thuế + listDossierNoCTT.add(queue.getDossierNo()); + } + } + + if(lstQueueTBT !=null && lstQueueTBT.size() >0){ + for(String dossierNo : listDossierNoTBT) { + // Todo Thông báo thuế + JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); + jsonObject.put("dossierNo", dossierNo); + jsonObject.put("type", false); + jsonArray.put(jsonObject); + } + } + + if(listDossierNoCTT !=null && listDossierNoCTT.size() >0){ + for(String dossierNo : listDossierNoCTT) { + // Todo Chứng từ thuế + JSONObject jsonObject = JSONFactoryUtil.createJSONObject(); + jsonObject.put("dossierNo", dossierNo); + jsonObject.put("type", true); + jsonArray.put(jsonObject); + } + } + if(Validator.isNull(jsonArray)) { + _log.warn( "Not found queue dvcqg with dossierNo still running..."); + return; + } + try { + // Todo Thông báo thuế && Chứng từ thuế + if(jsonArray !=null){ + Counter.setCount(jsonArray.length()); + for (int i = 0; i < jsonArray.length(); i++) { + JSONObject object = jsonArray.getJSONObject(i); + threadPoolExecutor.execute(() -> mainProcess(object)); + } + } + + }catch (Exception e){ + e.getMessage(); + } + } + + private void mainProcess(JSONObject object) { + String dossierNo = object.getString("dossierNo"); + boolean type = object.getBoolean("type"); + _log.info("dossierNo : " + dossierNo); + _log.info("type : " + type); + Dossier dossier = DossierLocalServiceUtil.fetchByDO_NO(dossierNo); + + if (type) { + // TODO type = true ( Chứng từ thuế ) + List lstCTT = DossierTaxLocalServiceUtil.getByDossierIdAndStatusCTT(dossierNo, 1); + + if (lstCTT == null && lstCTT.size() == 0) { + return; + } + if (Validator.isNotNull(dossier)) { + JSONObject result = doAction(dossier, type); + for (DossierTax dossierTax : lstCTT) { + if (dossierTax.getStatusCTT() == 3) { + continue; + } else if (dossierTax.getStatusCTT() == 1) { + if (Validator.isNotNull(result) && Validator.isNotNull(result.getString("dossierActionId"))) { + dossierTax.setStatusCTT(3); + } else { + dossierTax.setStatusCTT(4); + } + DossierTaxLocalServiceUtil.updateDossierTax(dossierTax); + } + } + } + }else { + + // TODO type = true ( Thông báo thuế ) + List lstTTB = DossierTaxLocalServiceUtil.getByDossierIdAndStatusTBT(dossierNo, 1); + if (lstTTB == null && lstTTB.size() == 0) { + return; + } + if (Validator.isNotNull(dossier)) { + JSONObject result = doAction(dossier, type); + for (DossierTax dossierTax : lstTTB) { + if (dossierTax.getStatusTBT() == 3) { + continue; + } else if (dossierTax.getStatusTBT() == 1) { + if (Validator.isNotNull(result) && Validator.isNotNull(result.getString("dossierActionId"))) { + dossierTax.setStatusTBT(3); + } else { + dossierTax.setStatusTBT(4); + } + DossierTaxLocalServiceUtil.updateDossierTax(dossierTax); + } + } + } + } + Counter.decreaseCount(); + _log.info("Counting remain: " + Counter.getCount()); + if (Counter.getCount() == 0) { + _log.info("Time end: " + APIDateTimeUtils.convertDateToString(new Date())); + } + } + + public JSONObject getServerConfigByServerNo(String protocol, String serverNo) { + // Get ServerConfig + List listConfig = new ArrayList<>(); + if(Validator.isNotNull(protocol)) { + listConfig = ServerConfigLocalServiceUtil.getByProtocol(protocol); + }else if(Validator.isNotNull(serverNo)){ + listConfig = ServerConfigLocalServiceUtil.getByServerAndProtocol(serverNo, "API_SYNC"); + } + JSONObject configJson = JSONFactoryUtil.createJSONObject(); + try { + ServerConfig serverConfig = listConfig.get(0); + if (Validator.isNull(serverConfig.getConfigs()) + || serverConfig.getConfigs().isEmpty()) { + throw new Exception(SERVER_CONFIG_NULL); + } + configJson = JSONFactoryUtil.createJSONObject(serverConfig.getConfigs()); + + if (Validator.isNull(configJson)) { + throw new Exception(PARSE_CONFIG_JSON_FAIL); + } + } catch (Exception e) { + e.getMessage(); + } + return configJson; + } + private JSONObject doAction(Dossier dossier, boolean actionCTTD) { + JSONObject resPostDossier = JSONFactoryUtil.createJSONObject(); + try { + + JSONObject action; + JSONObject config = getServerConfigByServerNo(DossierTerm.DVCQG_THANH_TOAN_THUE,""); + + if (dossier.isOnline()) { + // TODO: call api doaction to DVC + action = config.getJSONObject(DossierTerm.ACTION_IS_ONLINE); + + String actionCode = action.getString(DossierTerm.ACTION_CODE); + + //url doAction + // tạo file trc mới doAction tạo trên DVC + // Hồ sơ trực tiếp sẽ lấy groupId bên DVC + String url = action.getString(DossierTerm.URL); + + String username = action.getString(DossierTerm.USERNAME); + + String pwd = action.getString(DossierTerm.PWD); + + + HashMap properties = new HashMap(); + + properties.put(Field.GROUP_ID, action.getString(Field.GROUP_ID)); + + String endPoint = DossierTerm.buildPathDoAction(url, dossier.getReferenceUid()); + resPostDossier.put("urlAction", endPoint); + Map params = new HashMap(); + + params.put(DossierTerm.ACTION_CODE, actionCode); + + _log.debug("params============" + params); + resPostDossier = callPostAPI(HttpMethod.POST, MediaType.APPLICATION_JSON, endPoint, + properties, params, username, pwd); + + _log.info("=====resPostDossier=========: " + resPostDossier); + + return resPostDossier; + } else {// + // tạo file trc mới doAction tạo trên DVC + // Hs trực tuyến lấy groupId theo SERVER_ + GovAgencyCode của hồ sơ trong ServerConfig + // TODO: DoAction hồ sơ tại MCDT + action = config.getJSONObject(DossierTerm.ACTION_IS_NOT_ONLINE); + HashMap properties = new HashMap(); + if(Validator.isNotNull(dossier.getGovAgencyCode())){ + JSONObject serverConfig = getServerConfigByServerNo("", "SERVER_" + dossier.getGovAgencyCode()); + properties.put(Field.GROUP_ID, serverConfig.getString(Field.GROUP_ID)); + }else { + + properties.put(Field.GROUP_ID, action.getString(Field.GROUP_ID)); + } + String endPoint = DossierTerm.buildPathDoAction(action.getString(DossierTerm.URL), + dossier.getReferenceUid()); + + resPostDossier.put("urlAction", endPoint); + + Map params = new HashMap(); + + if(actionCTTD){ + params.put(DossierTerm.ACTION_CODE, action.get(DossierTerm.ACTION_CODE_CHUNG_TU)); + }else { + params.put(DossierTerm.ACTION_CODE, action.get(DossierTerm.ACTION_CODE)); + } + _log.info(endPoint); + resPostDossier = callPostAPI(HttpMethod.POST, MediaType.APPLICATION_JSON, endPoint, + properties, params, action.getString(DossierTerm.USERNAME), action.getString(DossierTerm.PWD)); + + _log.info("=====resPostDossier========= : " + resPostDossier); + return resPostDossier; + } + + } catch (Exception e) { + _log.error(e); + + } + return resPostDossier; + } + + public static int getRestConnectionTimeout() { + String connectionTimeoutProperty = PropsUtil.get(OPENCPS_REST_CONNECTION_TIMEOUT); + return Validator.isNotNull(connectionTimeoutProperty) ? Integer.parseInt(connectionTimeoutProperty) : DEFAULT_CONNECT_TIMEOUT; + + } + + public static int getRestReadTimeout() { + String readTimeoutProperty = PropsUtil.get(OPENCPS_REST_READ_TIMEOUT); + return Validator.isNotNull(readTimeoutProperty) ? Integer.parseInt(readTimeoutProperty) : DEFAULT_READ_TIMEOUT; + + } + public JSONObject callPostAPI(String httpMethod, String accept, String urlPath, HashMap properties, + Map params, String username, String password) { + + JSONObject response = JSONFactoryUtil.createJSONObject(); + + HttpURLConnection conn = null; + + BufferedReader br = null; + + try { + + URL url = new URL(urlPath); + + conn = (HttpURLConnection) url.openConnection(); + conn.setConnectTimeout(getRestConnectionTimeout()); + conn.setReadTimeout(getRestReadTimeout()); + conn.setRequestMethod(httpMethod); + conn.setDoInput(true); + conn.setDoOutput(true); + + conn.setRequestProperty(VALUE_ACCEPT, accept); + + if (Validator.isNotNull(username) && Validator.isNotNull(password)) { + String authString = username + StringPool.COLON + password; + + String authStringEnc = new String(Base64.getEncoder().encodeToString(authString.getBytes())); + + conn.setRequestProperty(VALUE_AUTHORIZATION, VALUE_BASIC + authStringEnc); + } + + if (!properties.isEmpty()) { + for (Map.Entry m : properties.entrySet()) { + conn.setRequestProperty(m.getKey().toString(), m.getValue().toString()); + } + } + + StringBuilder postData = new StringBuilder(); + + for (Map.Entry param : params.entrySet()) { + if (postData.length() != 0) + postData.append(StringPool.AMPERSAND.charAt(0)); + postData.append(java.net.URLEncoder.encode(param.getKey(), UTF_8)); + postData.append(StringPool.EQUAL.charAt(0)); + postData.append(java.net.URLEncoder.encode(String.valueOf(param.getValue()), UTF_8)); + } + + byte[] postDataBytes = postData.toString().getBytes(UTF_8); + + conn.setRequestProperty(CONTENT_LENGTH, String.valueOf(postDataBytes.length)); + + conn.getOutputStream().write(postDataBytes); + + br = new BufferedReader(new InputStreamReader((conn.getInputStream()))); + + String output; + + StringBuilder sb = new StringBuilder(); + + while ((output = br.readLine()) != null) { + sb.append(output); + } + + response = JSONFactoryUtil.createJSONObject(sb.toString()); + + conn.disconnect(); + + } catch (MalformedURLException e) { + _log.error("Can't invoke api " + urlPath); + _log.error(e); + return response; + } catch (IOException e) { + _log.error("Can't invoke api " + urlPath); + _log.error(e); + return response; + } catch (JSONException e) { + _log.error("Can't invoke api " + urlPath); + _log.error(e); + return response; + } finally { + if (conn != null) { + conn.disconnect(); + } + if (br != null) { + try { + br.close(); + } catch (IOException e) { + _log.error(e); + } + } + + } + + return response; + } + @Activate + @Modified + protected void activate(Map properties) throws SchedulerException { + String listenerClass = getClass().getName(); + Calendar cal = Calendar.getInstance(); + LocalDate now = LocalDate.now(); + int year = now.getYear(); + int month = now.getMonthValue(); + int day = now.getDayOfMonth(); + if (HOUR_STATISTIC != -1 && MINUTE_STATISTIC != -1 && SECOND_STATISTIC != -1) { + cal.set(year, month-1, day, HOUR_STATISTIC, MINUTE_STATISTIC, SECOND_STATISTIC); + }else { + cal.set(year, month-1, day); + } + Date startDate = cal.getTime(); + + Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, startDate, null, timeSyncDossierDVCQG, TimeUnit.MINUTE); + + _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger); + _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED); + + + if (_initialized) { + deactivate(); + } + + _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH); + _initialized = true; + } + + @Deactivate + protected void deactivate() { + if (_initialized) { + try { + _schedulerEngineHelper.unschedule(_schedulerEntryImpl, getStorageType()); + } catch (SchedulerException se) { + if (_log.isWarnEnabled()) { + _log.warn("Unable to unschedule trigger", se); + } + } + + _schedulerEngineHelper.unregister(this); + } + _initialized = false; + isRunning = false; + } + + /** + * getStorageType: Utility method to get the storage type from the scheduler entry wrapper. + * @return StorageType The storage type to use. + */ + protected StorageType getStorageType() { + if (_schedulerEntryImpl instanceof StorageTypeAware) { + return ((StorageTypeAware) _schedulerEntryImpl).getStorageType(); + } + + return StorageType.PERSISTED; + } + + /** + * setModuleServiceLifecycle: So this requires some explanation... + * + * OSGi will start a component once all of it's dependencies are satisfied. However, there + * are times where you want to hold off until the portal is completely ready to go. + * + * This reference declaration is waiting for the ModuleServiceLifecycle's PORTAL_INITIALIZED + * component which will not be available until, surprise surprise, the portal has finished + * initializing. + * + * With this reference, this component activation waits until portal initialization has completed. + * @param moduleServiceLifecycle + */ + @Reference(target = ModuleServiceLifecycle.PORTAL_INITIALIZED, unbind = "-") + protected void setModuleServiceLifecycle(ModuleServiceLifecycle moduleServiceLifecycle) { + } + + @Reference(unbind = "-") + protected void setTriggerFactory(TriggerFactory triggerFactory) { + _triggerFactory = triggerFactory; + } + + @Reference(unbind = "-") + protected void setSchedulerEngineHelper(SchedulerEngineHelper schedulerEngineHelper) { + _schedulerEngineHelper = schedulerEngineHelper; + } + + private SchedulerEngineHelper _schedulerEngineHelper; + private TriggerFactory _triggerFactory; + private volatile boolean _initialized; + private SchedulerEntryImpl _schedulerEntryImpl = null; + + private Log _log = LogFactoryUtil.getLog(QueueDVCQGScheduler.class); +} diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/application/SyncTrackingApplication.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/application/SyncTrackingApplication.java index 8d302ce7a6..23a9ac092d 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/application/SyncTrackingApplication.java +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/application/SyncTrackingApplication.java @@ -1,6 +1,7 @@ package org.opencps.synctracking.application; import com.fasterxml.jackson.databind.ObjectMapper; +import com.liferay.petra.string.StringPool; import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONObject; import com.liferay.portal.kernel.log.Log; @@ -14,9 +15,7 @@ import org.opencps.synctracking.action.impl.IntegrationOutsideApiImpl; import org.opencps.synctracking.action.impl.SyncTrackingActionImpl; import org.opencps.synctracking.action.impl.TransformActionImpl; -import org.opencps.synctracking.model.DtoResponse; -import org.opencps.synctracking.model.SyncTrackingQuery; -import org.opencps.synctracking.model.SyncTrackingResponse; +import org.opencps.synctracking.model.*; import org.osgi.service.component.annotations.Component; import org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants; @@ -121,6 +120,100 @@ public Response createSynTrackingByDVCQG(@HeaderParam("groupId") long groupId, S } } + @POST + @Path("/dossierTax") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public Response createDossierTax(@HeaderParam("groupId") long groupId, DossierTaxInput input) { + try { + if(groupId != 0) { + input.groupId = groupId; + } + syncTrackingAction.createDossierTax(input); + return Response.status(200).entity("Saved").build(); + } catch (Exception e) { + _log.error(e); + return Response.status(500).entity("Error").build(); + } + } + + @POST + @Path("/update/dossierTax") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public Response updateDossierTax(@HeaderParam("groupId") long groupId, DossierTaxInput input) { + try { + if(groupId != 0) { + input.groupId = groupId; + } + syncTrackingAction.updateDossierTax(input); + return Response.status(200).entity("Saved").build(); + } catch (Exception e) { + _log.error(e); + return Response.status(500).entity("Error").build(); + } + } + + @POST + @Path("/getSyncTracking") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public Response getSynTracking(@HeaderParam("groupId") long groupId, SyncTrackingQuery input) { + try { + SyncTrackingResponse response = new SyncTrackingResponse(); + if(groupId != 0) { + input.groupId = groupId; + } + response = syncTrackingAction.getSyncTracking(input); + if(Validator.isNotNull(response.dossierNo)) { + return Response.status(200).entity(objectMapper.writeValueAsString(response)).build(); + }else { + return Response.status(200).entity(StringPool.BLANK).build(); + } + } catch (Exception e) { + _log.error(e); + return Response.status(500).entity("Error").build(); + } + } + + @POST + @Path("/getDetailDossierTax") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public Response getDossierTax(@HeaderParam("groupId") long groupId, DossierTaxInput input) { + try { + DossierTaxResponse response = new DossierTaxResponse(); + response = syncTrackingAction.getDetailDossierTax(input); +// _log.info("Response: " + JSONFactoryUtil.looseSerialize(response)); + if(Validator.isNotNull(response.dossierNo)) { + return Response.status(200).entity(objectMapper.writeValueAsString(response)).build(); + }else { + return Response.status(200).entity(StringPool.BLANK).build(); + } + } catch (Exception e) { + _log.error(e); + return Response.status(500).entity("Error").build(); + } + } + + @POST + @Path("/getDossierTax") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public Response getDDossierTax(@HeaderParam("groupId") long groupId, DossierTaxInput input) { + try { + String response = syncTrackingAction.getDDossierTax(input); + if(Validator.isNotNull(response)) { + return Response.status(200).entity(response).build(); + }else { + return Response.status(200).entity(StringPool.BLANK).build(); + } + } catch (Exception e) { + _log.error(e); + return Response.status(500).entity("Error").build(); + } + } + @POST @Path("/resend") @Consumes({ MediaType.APPLICATION_JSON }) diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/DossierTaxBaseImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/DossierTaxBaseImpl.java new file mode 100644 index 0000000000..94b2ea057f --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/DossierTaxBaseImpl.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import org.opencps.synctracking.model.DossierTax; +import org.opencps.synctracking.service.DossierTaxLocalServiceUtil; + +/** + * The extended model base implementation for the DossierTax service. Represents a row in the "opencps_dossier_tax" database table, with each column mapped to a property of this class. + * + *

+ * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link DossierTaxImpl}. + *

+ * + * @author duongnt + * @see DossierTaxImpl + * @see DossierTax + * @generated + */ +@ProviderType +public abstract class DossierTaxBaseImpl extends DossierTaxModelImpl + implements DossierTax { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a dossier tax model instance should use the {@link DossierTax} interface instead. + */ + @Override + public void persist() { + if (this.isNew()) { + DossierTaxLocalServiceUtil.addDossierTax(this); + } + else { + DossierTaxLocalServiceUtil.updateDossierTax(this); + } + } +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/DossierTaxCacheModel.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/DossierTaxCacheModel.java new file mode 100644 index 0000000000..13e751f478 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/DossierTaxCacheModel.java @@ -0,0 +1,500 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.util.HashUtil; +import com.liferay.portal.kernel.util.StringBundler; + +import org.opencps.synctracking.model.DossierTax; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +import java.util.Date; + +/** + * The cache model class for representing DossierTax in entity cache. + * + * @author duongnt + * @see DossierTax + * @generated + */ +@ProviderType +public class DossierTaxCacheModel implements CacheModel, + Externalizable { + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof DossierTaxCacheModel)) { + return false; + } + + DossierTaxCacheModel dossierTaxCacheModel = (DossierTaxCacheModel)obj; + + if (taxId == dossierTaxCacheModel.taxId) { + return true; + } + + return false; + } + + @Override + public int hashCode() { + return HashUtil.hash(0, taxId); + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(61); + + sb.append("{uuid="); + sb.append(uuid); + sb.append(", taxId="); + sb.append(taxId); + sb.append(", companyId="); + sb.append(companyId); + sb.append(", groupId="); + sb.append(groupId); + sb.append(", userId="); + sb.append(userId); + sb.append(", userName="); + sb.append(userName); + sb.append(", createDate="); + sb.append(createDate); + sb.append(", modifiedDate="); + sb.append(modifiedDate); + sb.append(", dossierNo="); + sb.append(dossierNo); + sb.append(", maSoThue="); + sb.append(maSoThue); + sb.append(", soQuyetDinh="); + sb.append(soQuyetDinh); + sb.append(", ngayQuyetDinh="); + sb.append(ngayQuyetDinh); + sb.append(", tenTieuMuc="); + sb.append(tenTieuMuc); + sb.append(", soTien="); + sb.append(soTien); + sb.append(", hoTenNguoiNopTien="); + sb.append(hoTenNguoiNopTien); + sb.append(", soCmtNguoiNopTien="); + sb.append(soCmtNguoiNopTien); + sb.append(", diaChiNguoiNopTien="); + sb.append(diaChiNguoiNopTien); + sb.append(", tinhNguoiNopTien="); + sb.append(tinhNguoiNopTien); + sb.append(", huyenNguoiNopTien="); + sb.append(huyenNguoiNopTien); + sb.append(", xaNguoiNopTien="); + sb.append(xaNguoiNopTien); + sb.append(", thoiGianThanhToan="); + sb.append(thoiGianThanhToan); + sb.append(", soTienNop="); + sb.append(soTienNop); + sb.append(", noiDungThanhToan="); + sb.append(noiDungThanhToan); + sb.append(", trangThaiThanhToan="); + sb.append(trangThaiThanhToan); + sb.append(", fileChungTu="); + sb.append(fileChungTu); + sb.append(", ngayThueTraThongBao="); + sb.append(ngayThueTraThongBao); + sb.append(", ngayTraThongBao="); + sb.append(ngayTraThongBao); + sb.append(", ngayNhanBienLai="); + sb.append(ngayNhanBienLai); + sb.append(", statusTBT="); + sb.append(statusTBT); + sb.append(", statusCTT="); + sb.append(statusCTT); + sb.append("}"); + + return sb.toString(); + } + + @Override + public DossierTax toEntityModel() { + DossierTaxImpl dossierTaxImpl = new DossierTaxImpl(); + + if (uuid == null) { + dossierTaxImpl.setUuid(""); + } + else { + dossierTaxImpl.setUuid(uuid); + } + + dossierTaxImpl.setTaxId(taxId); + dossierTaxImpl.setCompanyId(companyId); + dossierTaxImpl.setGroupId(groupId); + dossierTaxImpl.setUserId(userId); + + if (userName == null) { + dossierTaxImpl.setUserName(""); + } + else { + dossierTaxImpl.setUserName(userName); + } + + if (createDate == Long.MIN_VALUE) { + dossierTaxImpl.setCreateDate(null); + } + else { + dossierTaxImpl.setCreateDate(new Date(createDate)); + } + + if (modifiedDate == Long.MIN_VALUE) { + dossierTaxImpl.setModifiedDate(null); + } + else { + dossierTaxImpl.setModifiedDate(new Date(modifiedDate)); + } + + if (dossierNo == null) { + dossierTaxImpl.setDossierNo(""); + } + else { + dossierTaxImpl.setDossierNo(dossierNo); + } + + if (maSoThue == null) { + dossierTaxImpl.setMaSoThue(""); + } + else { + dossierTaxImpl.setMaSoThue(maSoThue); + } + + if (soQuyetDinh == null) { + dossierTaxImpl.setSoQuyetDinh(""); + } + else { + dossierTaxImpl.setSoQuyetDinh(soQuyetDinh); + } + + if (ngayQuyetDinh == Long.MIN_VALUE) { + dossierTaxImpl.setNgayQuyetDinh(null); + } + else { + dossierTaxImpl.setNgayQuyetDinh(new Date(ngayQuyetDinh)); + } + + if (tenTieuMuc == null) { + dossierTaxImpl.setTenTieuMuc(""); + } + else { + dossierTaxImpl.setTenTieuMuc(tenTieuMuc); + } + + dossierTaxImpl.setSoTien(soTien); + + if (hoTenNguoiNopTien == null) { + dossierTaxImpl.setHoTenNguoiNopTien(""); + } + else { + dossierTaxImpl.setHoTenNguoiNopTien(hoTenNguoiNopTien); + } + + dossierTaxImpl.setSoCmtNguoiNopTien(soCmtNguoiNopTien); + + if (diaChiNguoiNopTien == null) { + dossierTaxImpl.setDiaChiNguoiNopTien(""); + } + else { + dossierTaxImpl.setDiaChiNguoiNopTien(diaChiNguoiNopTien); + } + + if (tinhNguoiNopTien == null) { + dossierTaxImpl.setTinhNguoiNopTien(""); + } + else { + dossierTaxImpl.setTinhNguoiNopTien(tinhNguoiNopTien); + } + + if (huyenNguoiNopTien == null) { + dossierTaxImpl.setHuyenNguoiNopTien(""); + } + else { + dossierTaxImpl.setHuyenNguoiNopTien(huyenNguoiNopTien); + } + + if (xaNguoiNopTien == null) { + dossierTaxImpl.setXaNguoiNopTien(""); + } + else { + dossierTaxImpl.setXaNguoiNopTien(xaNguoiNopTien); + } + + if (thoiGianThanhToan == Long.MIN_VALUE) { + dossierTaxImpl.setThoiGianThanhToan(null); + } + else { + dossierTaxImpl.setThoiGianThanhToan(new Date(thoiGianThanhToan)); + } + + dossierTaxImpl.setSoTienNop(soTienNop); + + if (noiDungThanhToan == null) { + dossierTaxImpl.setNoiDungThanhToan(""); + } + else { + dossierTaxImpl.setNoiDungThanhToan(noiDungThanhToan); + } + + dossierTaxImpl.setTrangThaiThanhToan(trangThaiThanhToan); + + if (fileChungTu == null) { + dossierTaxImpl.setFileChungTu(""); + } + else { + dossierTaxImpl.setFileChungTu(fileChungTu); + } + + if (ngayThueTraThongBao == Long.MIN_VALUE) { + dossierTaxImpl.setNgayThueTraThongBao(null); + } + else { + dossierTaxImpl.setNgayThueTraThongBao(new Date(ngayThueTraThongBao)); + } + + if (ngayTraThongBao == Long.MIN_VALUE) { + dossierTaxImpl.setNgayTraThongBao(null); + } + else { + dossierTaxImpl.setNgayTraThongBao(new Date(ngayTraThongBao)); + } + + if (ngayNhanBienLai == Long.MIN_VALUE) { + dossierTaxImpl.setNgayNhanBienLai(null); + } + else { + dossierTaxImpl.setNgayNhanBienLai(new Date(ngayNhanBienLai)); + } + + dossierTaxImpl.setStatusTBT(statusTBT); + dossierTaxImpl.setStatusCTT(statusCTT); + + dossierTaxImpl.resetOriginalValues(); + + return dossierTaxImpl; + } + + @Override + public void readExternal(ObjectInput objectInput) throws IOException { + uuid = objectInput.readUTF(); + + taxId = objectInput.readLong(); + + companyId = objectInput.readLong(); + + groupId = objectInput.readLong(); + + userId = objectInput.readLong(); + userName = objectInput.readUTF(); + createDate = objectInput.readLong(); + modifiedDate = objectInput.readLong(); + dossierNo = objectInput.readUTF(); + maSoThue = objectInput.readUTF(); + soQuyetDinh = objectInput.readUTF(); + ngayQuyetDinh = objectInput.readLong(); + tenTieuMuc = objectInput.readUTF(); + + soTien = objectInput.readInt(); + hoTenNguoiNopTien = objectInput.readUTF(); + + soCmtNguoiNopTien = objectInput.readInt(); + diaChiNguoiNopTien = objectInput.readUTF(); + tinhNguoiNopTien = objectInput.readUTF(); + huyenNguoiNopTien = objectInput.readUTF(); + xaNguoiNopTien = objectInput.readUTF(); + thoiGianThanhToan = objectInput.readLong(); + + soTienNop = objectInput.readInt(); + noiDungThanhToan = objectInput.readUTF(); + + trangThaiThanhToan = objectInput.readInt(); + fileChungTu = objectInput.readUTF(); + ngayThueTraThongBao = objectInput.readLong(); + ngayTraThongBao = objectInput.readLong(); + ngayNhanBienLai = objectInput.readLong(); + + statusTBT = objectInput.readInt(); + + statusCTT = objectInput.readInt(); + } + + @Override + public void writeExternal(ObjectOutput objectOutput) + throws IOException { + if (uuid == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(uuid); + } + + objectOutput.writeLong(taxId); + + objectOutput.writeLong(companyId); + + objectOutput.writeLong(groupId); + + objectOutput.writeLong(userId); + + if (userName == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(userName); + } + + objectOutput.writeLong(createDate); + objectOutput.writeLong(modifiedDate); + + if (dossierNo == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(dossierNo); + } + + if (maSoThue == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(maSoThue); + } + + if (soQuyetDinh == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(soQuyetDinh); + } + + objectOutput.writeLong(ngayQuyetDinh); + + if (tenTieuMuc == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(tenTieuMuc); + } + + objectOutput.writeInt(soTien); + + if (hoTenNguoiNopTien == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(hoTenNguoiNopTien); + } + + objectOutput.writeInt(soCmtNguoiNopTien); + + if (diaChiNguoiNopTien == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(diaChiNguoiNopTien); + } + + if (tinhNguoiNopTien == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(tinhNguoiNopTien); + } + + if (huyenNguoiNopTien == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(huyenNguoiNopTien); + } + + if (xaNguoiNopTien == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(xaNguoiNopTien); + } + + objectOutput.writeLong(thoiGianThanhToan); + + objectOutput.writeInt(soTienNop); + + if (noiDungThanhToan == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(noiDungThanhToan); + } + + objectOutput.writeInt(trangThaiThanhToan); + + if (fileChungTu == null) { + objectOutput.writeUTF(""); + } + else { + objectOutput.writeUTF(fileChungTu); + } + + objectOutput.writeLong(ngayThueTraThongBao); + objectOutput.writeLong(ngayTraThongBao); + objectOutput.writeLong(ngayNhanBienLai); + + objectOutput.writeInt(statusTBT); + + objectOutput.writeInt(statusCTT); + } + + public String uuid; + public long taxId; + public long companyId; + public long groupId; + public long userId; + public String userName; + public long createDate; + public long modifiedDate; + public String dossierNo; + public String maSoThue; + public String soQuyetDinh; + public long ngayQuyetDinh; + public String tenTieuMuc; + public int soTien; + public String hoTenNguoiNopTien; + public int soCmtNguoiNopTien; + public String diaChiNguoiNopTien; + public String tinhNguoiNopTien; + public String huyenNguoiNopTien; + public String xaNguoiNopTien; + public long thoiGianThanhToan; + public int soTienNop; + public String noiDungThanhToan; + public int trangThaiThanhToan; + public String fileChungTu; + public long ngayThueTraThongBao; + public long ngayTraThongBao; + public long ngayNhanBienLai; + public int statusTBT; + public int statusCTT; +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/DossierTaxImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/DossierTaxImpl.java new file mode 100644 index 0000000000..a04a2a60c4 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/DossierTaxImpl.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.model.impl; + +import aQute.bnd.annotation.ProviderType; + +/** + * The extended model implementation for the DossierTax service. Represents a row in the "opencps_dossier_tax" database table, with each column mapped to a property of this class. + * + *

+ * Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.synctracking.model.DossierTax} interface. + *

+ * + * @author Brian Wing Shun Chan + */ +@ProviderType +public class DossierTaxImpl extends DossierTaxBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. All methods that expect a dossier tax model instance should use the {@link org.opencps.synctracking.model.DossierTax} interface instead. + */ + public DossierTaxImpl() { + } +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/DossierTaxModelImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/DossierTaxModelImpl.java new file mode 100644 index 0000000000..d65212c6c3 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/DossierTaxModelImpl.java @@ -0,0 +1,1503 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.model.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.expando.kernel.model.ExpandoBridge; +import com.liferay.expando.kernel.util.ExpandoBridgeFactoryUtil; + +import com.liferay.exportimport.kernel.lar.StagedModelType; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.model.CacheModel; +import com.liferay.portal.kernel.model.ModelWrapper; +import com.liferay.portal.kernel.model.User; +import com.liferay.portal.kernel.model.impl.BaseModelImpl; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.service.UserLocalServiceUtil; +import com.liferay.portal.kernel.util.DateUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.PortalUtil; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; + +import org.opencps.synctracking.model.DossierTax; +import org.opencps.synctracking.model.DossierTaxModel; + +import java.io.Serializable; + +import java.sql.Types; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * The base model implementation for the DossierTax service. Represents a row in the "opencps_dossier_tax" database table, with each column mapped to a property of this class. + * + *

+ * This implementation and its corresponding interface {@link DossierTaxModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link DossierTaxImpl}. + *

+ * + * @author duongnt + * @see DossierTaxImpl + * @see DossierTax + * @see DossierTaxModel + * @generated + */ +@ProviderType +public class DossierTaxModelImpl extends BaseModelImpl + implements DossierTaxModel { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a dossier tax model instance should use the {@link DossierTax} interface instead. + */ + public static final String TABLE_NAME = "opencps_dossier_tax"; + public static final Object[][] TABLE_COLUMNS = { + { "uuid_", Types.VARCHAR }, + { "taxId", Types.BIGINT }, + { "companyId", Types.BIGINT }, + { "groupId", Types.BIGINT }, + { "userId", Types.BIGINT }, + { "userName", Types.VARCHAR }, + { "createDate", Types.TIMESTAMP }, + { "modifiedDate", Types.TIMESTAMP }, + { "dossierNo", Types.VARCHAR }, + { "maSoThue", Types.VARCHAR }, + { "soQuyetDinh", Types.VARCHAR }, + { "ngayQuyetDinh", Types.TIMESTAMP }, + { "tenTieuMuc", Types.VARCHAR }, + { "soTien", Types.INTEGER }, + { "hoTenNguoiNopTien", Types.VARCHAR }, + { "soCmtNguoiNopTien", Types.INTEGER }, + { "diaChiNguoiNopTien", Types.VARCHAR }, + { "tinhNguoiNopTien", Types.VARCHAR }, + { "huyenNguoiNopTien", Types.VARCHAR }, + { "xaNguoiNopTien", Types.VARCHAR }, + { "thoiGianThanhToan", Types.TIMESTAMP }, + { "soTienNop", Types.INTEGER }, + { "noiDungThanhToan", Types.VARCHAR }, + { "trangThaiThanhToan", Types.INTEGER }, + { "fileChungTu", Types.VARCHAR }, + { "ngayThueTraThongBao", Types.TIMESTAMP }, + { "ngayTraThongBao", Types.TIMESTAMP }, + { "ngayNhanBienLai", Types.TIMESTAMP }, + { "statusTBT", Types.INTEGER }, + { "statusCTT", Types.INTEGER } + }; + public static final Map TABLE_COLUMNS_MAP = new HashMap(); + + static { + TABLE_COLUMNS_MAP.put("uuid_", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("taxId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("companyId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("groupId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("userId", Types.BIGINT); + TABLE_COLUMNS_MAP.put("userName", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("createDate", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("modifiedDate", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("dossierNo", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("maSoThue", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("soQuyetDinh", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("ngayQuyetDinh", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("tenTieuMuc", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("soTien", Types.INTEGER); + TABLE_COLUMNS_MAP.put("hoTenNguoiNopTien", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("soCmtNguoiNopTien", Types.INTEGER); + TABLE_COLUMNS_MAP.put("diaChiNguoiNopTien", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("tinhNguoiNopTien", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("huyenNguoiNopTien", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("xaNguoiNopTien", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("thoiGianThanhToan", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("soTienNop", Types.INTEGER); + TABLE_COLUMNS_MAP.put("noiDungThanhToan", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("trangThaiThanhToan", Types.INTEGER); + TABLE_COLUMNS_MAP.put("fileChungTu", Types.VARCHAR); + TABLE_COLUMNS_MAP.put("ngayThueTraThongBao", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("ngayTraThongBao", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("ngayNhanBienLai", Types.TIMESTAMP); + TABLE_COLUMNS_MAP.put("statusTBT", Types.INTEGER); + TABLE_COLUMNS_MAP.put("statusCTT", Types.INTEGER); + } + + public static final String TABLE_SQL_CREATE = "create table opencps_dossier_tax (uuid_ VARCHAR(75) null,taxId LONG not null primary key,companyId LONG,groupId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,dossierNo VARCHAR(75) null,maSoThue VARCHAR(75) null,soQuyetDinh VARCHAR(75) null,ngayQuyetDinh DATE null,tenTieuMuc VARCHAR(75) null,soTien INTEGER,hoTenNguoiNopTien VARCHAR(75) null,soCmtNguoiNopTien INTEGER,diaChiNguoiNopTien VARCHAR(75) null,tinhNguoiNopTien VARCHAR(75) null,huyenNguoiNopTien VARCHAR(75) null,xaNguoiNopTien VARCHAR(75) null,thoiGianThanhToan DATE null,soTienNop INTEGER,noiDungThanhToan VARCHAR(75) null,trangThaiThanhToan INTEGER,fileChungTu VARCHAR(75) null,ngayThueTraThongBao DATE null,ngayTraThongBao DATE null,ngayNhanBienLai DATE null,statusTBT INTEGER,statusCTT INTEGER)"; + public static final String TABLE_SQL_DROP = "drop table opencps_dossier_tax"; + public static final String ORDER_BY_JPQL = " ORDER BY dossierTax.createDate DESC"; + public static final String ORDER_BY_SQL = " ORDER BY opencps_dossier_tax.createDate DESC"; + public static final String DATA_SOURCE = "liferayDataSource"; + public static final String SESSION_FACTORY = "liferaySessionFactory"; + public static final String TX_MANAGER = "liferayTransactionManager"; + public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(org.opencps.synctracking.org.opencps.backend.synctracking.service.util.ServiceProps.get( + "value.object.entity.cache.enabled.org.opencps.synctracking.model.DossierTax"), + true); + public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(org.opencps.synctracking.org.opencps.backend.synctracking.service.util.ServiceProps.get( + "value.object.finder.cache.enabled.org.opencps.synctracking.model.DossierTax"), + true); + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(org.opencps.synctracking.org.opencps.backend.synctracking.service.util.ServiceProps.get( + "value.object.column.bitmask.enabled.org.opencps.synctracking.model.DossierTax"), + true); + public static final long COMPANYID_COLUMN_BITMASK = 1L; + public static final long DOSSIERNO_COLUMN_BITMASK = 2L; + public static final long GROUPID_COLUMN_BITMASK = 4L; + public static final long MASOTHUE_COLUMN_BITMASK = 8L; + public static final long SOQUYETDINH_COLUMN_BITMASK = 16L; + public static final long STATUSCTT_COLUMN_BITMASK = 32L; + public static final long STATUSTBT_COLUMN_BITMASK = 64L; + public static final long UUID_COLUMN_BITMASK = 128L; + public static final long CREATEDATE_COLUMN_BITMASK = 256L; + public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(org.opencps.synctracking.org.opencps.backend.synctracking.service.util.ServiceProps.get( + "lock.expiration.time.org.opencps.synctracking.model.DossierTax")); + + public DossierTaxModelImpl() { + } + + @Override + public long getPrimaryKey() { + return _taxId; + } + + @Override + public void setPrimaryKey(long primaryKey) { + setTaxId(primaryKey); + } + + @Override + public Serializable getPrimaryKeyObj() { + return _taxId; + } + + @Override + public void setPrimaryKeyObj(Serializable primaryKeyObj) { + setPrimaryKey(((Long)primaryKeyObj).longValue()); + } + + @Override + public Class getModelClass() { + return DossierTax.class; + } + + @Override + public String getModelClassName() { + return DossierTax.class.getName(); + } + + @Override + public Map getModelAttributes() { + Map attributes = new HashMap(); + + attributes.put("uuid", getUuid()); + attributes.put("taxId", getTaxId()); + attributes.put("companyId", getCompanyId()); + attributes.put("groupId", getGroupId()); + attributes.put("userId", getUserId()); + attributes.put("userName", getUserName()); + attributes.put("createDate", getCreateDate()); + attributes.put("modifiedDate", getModifiedDate()); + attributes.put("dossierNo", getDossierNo()); + attributes.put("maSoThue", getMaSoThue()); + attributes.put("soQuyetDinh", getSoQuyetDinh()); + attributes.put("ngayQuyetDinh", getNgayQuyetDinh()); + attributes.put("tenTieuMuc", getTenTieuMuc()); + attributes.put("soTien", getSoTien()); + attributes.put("hoTenNguoiNopTien", getHoTenNguoiNopTien()); + attributes.put("soCmtNguoiNopTien", getSoCmtNguoiNopTien()); + attributes.put("diaChiNguoiNopTien", getDiaChiNguoiNopTien()); + attributes.put("tinhNguoiNopTien", getTinhNguoiNopTien()); + attributes.put("huyenNguoiNopTien", getHuyenNguoiNopTien()); + attributes.put("xaNguoiNopTien", getXaNguoiNopTien()); + attributes.put("thoiGianThanhToan", getThoiGianThanhToan()); + attributes.put("soTienNop", getSoTienNop()); + attributes.put("noiDungThanhToan", getNoiDungThanhToan()); + attributes.put("trangThaiThanhToan", getTrangThaiThanhToan()); + attributes.put("fileChungTu", getFileChungTu()); + attributes.put("ngayThueTraThongBao", getNgayThueTraThongBao()); + attributes.put("ngayTraThongBao", getNgayTraThongBao()); + attributes.put("ngayNhanBienLai", getNgayNhanBienLai()); + attributes.put("statusTBT", getStatusTBT()); + attributes.put("statusCTT", getStatusCTT()); + + attributes.put("entityCacheEnabled", isEntityCacheEnabled()); + attributes.put("finderCacheEnabled", isFinderCacheEnabled()); + + return attributes; + } + + @Override + public void setModelAttributes(Map attributes) { + String uuid = (String)attributes.get("uuid"); + + if (uuid != null) { + setUuid(uuid); + } + + Long taxId = (Long)attributes.get("taxId"); + + if (taxId != null) { + setTaxId(taxId); + } + + Long companyId = (Long)attributes.get("companyId"); + + if (companyId != null) { + setCompanyId(companyId); + } + + Long groupId = (Long)attributes.get("groupId"); + + if (groupId != null) { + setGroupId(groupId); + } + + Long userId = (Long)attributes.get("userId"); + + if (userId != null) { + setUserId(userId); + } + + String userName = (String)attributes.get("userName"); + + if (userName != null) { + setUserName(userName); + } + + Date createDate = (Date)attributes.get("createDate"); + + if (createDate != null) { + setCreateDate(createDate); + } + + Date modifiedDate = (Date)attributes.get("modifiedDate"); + + if (modifiedDate != null) { + setModifiedDate(modifiedDate); + } + + String dossierNo = (String)attributes.get("dossierNo"); + + if (dossierNo != null) { + setDossierNo(dossierNo); + } + + String maSoThue = (String)attributes.get("maSoThue"); + + if (maSoThue != null) { + setMaSoThue(maSoThue); + } + + String soQuyetDinh = (String)attributes.get("soQuyetDinh"); + + if (soQuyetDinh != null) { + setSoQuyetDinh(soQuyetDinh); + } + + Date ngayQuyetDinh = (Date)attributes.get("ngayQuyetDinh"); + + if (ngayQuyetDinh != null) { + setNgayQuyetDinh(ngayQuyetDinh); + } + + String tenTieuMuc = (String)attributes.get("tenTieuMuc"); + + if (tenTieuMuc != null) { + setTenTieuMuc(tenTieuMuc); + } + + Integer soTien = (Integer)attributes.get("soTien"); + + if (soTien != null) { + setSoTien(soTien); + } + + String hoTenNguoiNopTien = (String)attributes.get("hoTenNguoiNopTien"); + + if (hoTenNguoiNopTien != null) { + setHoTenNguoiNopTien(hoTenNguoiNopTien); + } + + Integer soCmtNguoiNopTien = (Integer)attributes.get("soCmtNguoiNopTien"); + + if (soCmtNguoiNopTien != null) { + setSoCmtNguoiNopTien(soCmtNguoiNopTien); + } + + String diaChiNguoiNopTien = (String)attributes.get("diaChiNguoiNopTien"); + + if (diaChiNguoiNopTien != null) { + setDiaChiNguoiNopTien(diaChiNguoiNopTien); + } + + String tinhNguoiNopTien = (String)attributes.get("tinhNguoiNopTien"); + + if (tinhNguoiNopTien != null) { + setTinhNguoiNopTien(tinhNguoiNopTien); + } + + String huyenNguoiNopTien = (String)attributes.get("huyenNguoiNopTien"); + + if (huyenNguoiNopTien != null) { + setHuyenNguoiNopTien(huyenNguoiNopTien); + } + + String xaNguoiNopTien = (String)attributes.get("xaNguoiNopTien"); + + if (xaNguoiNopTien != null) { + setXaNguoiNopTien(xaNguoiNopTien); + } + + Date thoiGianThanhToan = (Date)attributes.get("thoiGianThanhToan"); + + if (thoiGianThanhToan != null) { + setThoiGianThanhToan(thoiGianThanhToan); + } + + Integer soTienNop = (Integer)attributes.get("soTienNop"); + + if (soTienNop != null) { + setSoTienNop(soTienNop); + } + + String noiDungThanhToan = (String)attributes.get("noiDungThanhToan"); + + if (noiDungThanhToan != null) { + setNoiDungThanhToan(noiDungThanhToan); + } + + Integer trangThaiThanhToan = (Integer)attributes.get( + "trangThaiThanhToan"); + + if (trangThaiThanhToan != null) { + setTrangThaiThanhToan(trangThaiThanhToan); + } + + String fileChungTu = (String)attributes.get("fileChungTu"); + + if (fileChungTu != null) { + setFileChungTu(fileChungTu); + } + + Date ngayThueTraThongBao = (Date)attributes.get("ngayThueTraThongBao"); + + if (ngayThueTraThongBao != null) { + setNgayThueTraThongBao(ngayThueTraThongBao); + } + + Date ngayTraThongBao = (Date)attributes.get("ngayTraThongBao"); + + if (ngayTraThongBao != null) { + setNgayTraThongBao(ngayTraThongBao); + } + + Date ngayNhanBienLai = (Date)attributes.get("ngayNhanBienLai"); + + if (ngayNhanBienLai != null) { + setNgayNhanBienLai(ngayNhanBienLai); + } + + Integer statusTBT = (Integer)attributes.get("statusTBT"); + + if (statusTBT != null) { + setStatusTBT(statusTBT); + } + + Integer statusCTT = (Integer)attributes.get("statusCTT"); + + if (statusCTT != null) { + setStatusCTT(statusCTT); + } + } + + @Override + public String getUuid() { + if (_uuid == null) { + return ""; + } + else { + return _uuid; + } + } + + @Override + public void setUuid(String uuid) { + if (_originalUuid == null) { + _originalUuid = _uuid; + } + + _uuid = uuid; + } + + public String getOriginalUuid() { + return GetterUtil.getString(_originalUuid); + } + + @Override + public long getTaxId() { + return _taxId; + } + + @Override + public void setTaxId(long taxId) { + _taxId = taxId; + } + + @Override + public long getCompanyId() { + return _companyId; + } + + @Override + public void setCompanyId(long companyId) { + _columnBitmask |= COMPANYID_COLUMN_BITMASK; + + if (!_setOriginalCompanyId) { + _setOriginalCompanyId = true; + + _originalCompanyId = _companyId; + } + + _companyId = companyId; + } + + public long getOriginalCompanyId() { + return _originalCompanyId; + } + + @Override + public long getGroupId() { + return _groupId; + } + + @Override + public void setGroupId(long groupId) { + _columnBitmask |= GROUPID_COLUMN_BITMASK; + + if (!_setOriginalGroupId) { + _setOriginalGroupId = true; + + _originalGroupId = _groupId; + } + + _groupId = groupId; + } + + public long getOriginalGroupId() { + return _originalGroupId; + } + + @Override + public long getUserId() { + return _userId; + } + + @Override + public void setUserId(long userId) { + _userId = userId; + } + + @Override + public String getUserUuid() { + try { + User user = UserLocalServiceUtil.getUserById(getUserId()); + + return user.getUuid(); + } + catch (PortalException pe) { + return ""; + } + } + + @Override + public void setUserUuid(String userUuid) { + } + + @Override + public String getUserName() { + if (_userName == null) { + return ""; + } + else { + return _userName; + } + } + + @Override + public void setUserName(String userName) { + _userName = userName; + } + + @Override + public Date getCreateDate() { + return _createDate; + } + + @Override + public void setCreateDate(Date createDate) { + _columnBitmask = -1L; + + _createDate = createDate; + } + + @Override + public Date getModifiedDate() { + return _modifiedDate; + } + + public boolean hasSetModifiedDate() { + return _setModifiedDate; + } + + @Override + public void setModifiedDate(Date modifiedDate) { + _setModifiedDate = true; + + _modifiedDate = modifiedDate; + } + + @Override + public String getDossierNo() { + if (_dossierNo == null) { + return ""; + } + else { + return _dossierNo; + } + } + + @Override + public void setDossierNo(String dossierNo) { + _columnBitmask |= DOSSIERNO_COLUMN_BITMASK; + + if (_originalDossierNo == null) { + _originalDossierNo = _dossierNo; + } + + _dossierNo = dossierNo; + } + + public String getOriginalDossierNo() { + return GetterUtil.getString(_originalDossierNo); + } + + @Override + public String getMaSoThue() { + if (_maSoThue == null) { + return ""; + } + else { + return _maSoThue; + } + } + + @Override + public void setMaSoThue(String maSoThue) { + _columnBitmask |= MASOTHUE_COLUMN_BITMASK; + + if (_originalMaSoThue == null) { + _originalMaSoThue = _maSoThue; + } + + _maSoThue = maSoThue; + } + + public String getOriginalMaSoThue() { + return GetterUtil.getString(_originalMaSoThue); + } + + @Override + public String getSoQuyetDinh() { + if (_soQuyetDinh == null) { + return ""; + } + else { + return _soQuyetDinh; + } + } + + @Override + public void setSoQuyetDinh(String soQuyetDinh) { + _columnBitmask |= SOQUYETDINH_COLUMN_BITMASK; + + if (_originalSoQuyetDinh == null) { + _originalSoQuyetDinh = _soQuyetDinh; + } + + _soQuyetDinh = soQuyetDinh; + } + + public String getOriginalSoQuyetDinh() { + return GetterUtil.getString(_originalSoQuyetDinh); + } + + @Override + public Date getNgayQuyetDinh() { + return _ngayQuyetDinh; + } + + @Override + public void setNgayQuyetDinh(Date ngayQuyetDinh) { + _ngayQuyetDinh = ngayQuyetDinh; + } + + @Override + public String getTenTieuMuc() { + if (_tenTieuMuc == null) { + return ""; + } + else { + return _tenTieuMuc; + } + } + + @Override + public void setTenTieuMuc(String tenTieuMuc) { + _tenTieuMuc = tenTieuMuc; + } + + @Override + public int getSoTien() { + return _soTien; + } + + @Override + public void setSoTien(int soTien) { + _soTien = soTien; + } + + @Override + public String getHoTenNguoiNopTien() { + if (_hoTenNguoiNopTien == null) { + return ""; + } + else { + return _hoTenNguoiNopTien; + } + } + + @Override + public void setHoTenNguoiNopTien(String hoTenNguoiNopTien) { + _hoTenNguoiNopTien = hoTenNguoiNopTien; + } + + @Override + public int getSoCmtNguoiNopTien() { + return _soCmtNguoiNopTien; + } + + @Override + public void setSoCmtNguoiNopTien(int soCmtNguoiNopTien) { + _soCmtNguoiNopTien = soCmtNguoiNopTien; + } + + @Override + public String getDiaChiNguoiNopTien() { + if (_diaChiNguoiNopTien == null) { + return ""; + } + else { + return _diaChiNguoiNopTien; + } + } + + @Override + public void setDiaChiNguoiNopTien(String diaChiNguoiNopTien) { + _diaChiNguoiNopTien = diaChiNguoiNopTien; + } + + @Override + public String getTinhNguoiNopTien() { + if (_tinhNguoiNopTien == null) { + return ""; + } + else { + return _tinhNguoiNopTien; + } + } + + @Override + public void setTinhNguoiNopTien(String tinhNguoiNopTien) { + _tinhNguoiNopTien = tinhNguoiNopTien; + } + + @Override + public String getHuyenNguoiNopTien() { + if (_huyenNguoiNopTien == null) { + return ""; + } + else { + return _huyenNguoiNopTien; + } + } + + @Override + public void setHuyenNguoiNopTien(String huyenNguoiNopTien) { + _huyenNguoiNopTien = huyenNguoiNopTien; + } + + @Override + public String getXaNguoiNopTien() { + if (_xaNguoiNopTien == null) { + return ""; + } + else { + return _xaNguoiNopTien; + } + } + + @Override + public void setXaNguoiNopTien(String xaNguoiNopTien) { + _xaNguoiNopTien = xaNguoiNopTien; + } + + @Override + public Date getThoiGianThanhToan() { + return _thoiGianThanhToan; + } + + @Override + public void setThoiGianThanhToan(Date thoiGianThanhToan) { + _thoiGianThanhToan = thoiGianThanhToan; + } + + @Override + public int getSoTienNop() { + return _soTienNop; + } + + @Override + public void setSoTienNop(int soTienNop) { + _soTienNop = soTienNop; + } + + @Override + public String getNoiDungThanhToan() { + if (_noiDungThanhToan == null) { + return ""; + } + else { + return _noiDungThanhToan; + } + } + + @Override + public void setNoiDungThanhToan(String noiDungThanhToan) { + _noiDungThanhToan = noiDungThanhToan; + } + + @Override + public int getTrangThaiThanhToan() { + return _trangThaiThanhToan; + } + + @Override + public void setTrangThaiThanhToan(int trangThaiThanhToan) { + _trangThaiThanhToan = trangThaiThanhToan; + } + + @Override + public String getFileChungTu() { + if (_fileChungTu == null) { + return ""; + } + else { + return _fileChungTu; + } + } + + @Override + public void setFileChungTu(String fileChungTu) { + _fileChungTu = fileChungTu; + } + + @Override + public Date getNgayThueTraThongBao() { + return _ngayThueTraThongBao; + } + + @Override + public void setNgayThueTraThongBao(Date ngayThueTraThongBao) { + _ngayThueTraThongBao = ngayThueTraThongBao; + } + + @Override + public Date getNgayTraThongBao() { + return _ngayTraThongBao; + } + + @Override + public void setNgayTraThongBao(Date ngayTraThongBao) { + _ngayTraThongBao = ngayTraThongBao; + } + + @Override + public Date getNgayNhanBienLai() { + return _ngayNhanBienLai; + } + + @Override + public void setNgayNhanBienLai(Date ngayNhanBienLai) { + _ngayNhanBienLai = ngayNhanBienLai; + } + + @Override + public int getStatusTBT() { + return _statusTBT; + } + + @Override + public void setStatusTBT(int statusTBT) { + _columnBitmask |= STATUSTBT_COLUMN_BITMASK; + + if (!_setOriginalStatusTBT) { + _setOriginalStatusTBT = true; + + _originalStatusTBT = _statusTBT; + } + + _statusTBT = statusTBT; + } + + public int getOriginalStatusTBT() { + return _originalStatusTBT; + } + + @Override + public int getStatusCTT() { + return _statusCTT; + } + + @Override + public void setStatusCTT(int statusCTT) { + _columnBitmask |= STATUSCTT_COLUMN_BITMASK; + + if (!_setOriginalStatusCTT) { + _setOriginalStatusCTT = true; + + _originalStatusCTT = _statusCTT; + } + + _statusCTT = statusCTT; + } + + public int getOriginalStatusCTT() { + return _originalStatusCTT; + } + + @Override + public StagedModelType getStagedModelType() { + return new StagedModelType(PortalUtil.getClassNameId( + DossierTax.class.getName())); + } + + public long getColumnBitmask() { + return _columnBitmask; + } + + @Override + public ExpandoBridge getExpandoBridge() { + return ExpandoBridgeFactoryUtil.getExpandoBridge(getCompanyId(), + DossierTax.class.getName(), getPrimaryKey()); + } + + @Override + public void setExpandoBridgeAttributes(ServiceContext serviceContext) { + ExpandoBridge expandoBridge = getExpandoBridge(); + + expandoBridge.setAttributes(serviceContext); + } + + @Override + public DossierTax toEscapedModel() { + if (_escapedModel == null) { + _escapedModel = (DossierTax)ProxyUtil.newProxyInstance(_classLoader, + _escapedModelInterfaces, new AutoEscapeBeanHandler(this)); + } + + return _escapedModel; + } + + @Override + public Object clone() { + DossierTaxImpl dossierTaxImpl = new DossierTaxImpl(); + + dossierTaxImpl.setUuid(getUuid()); + dossierTaxImpl.setTaxId(getTaxId()); + dossierTaxImpl.setCompanyId(getCompanyId()); + dossierTaxImpl.setGroupId(getGroupId()); + dossierTaxImpl.setUserId(getUserId()); + dossierTaxImpl.setUserName(getUserName()); + dossierTaxImpl.setCreateDate(getCreateDate()); + dossierTaxImpl.setModifiedDate(getModifiedDate()); + dossierTaxImpl.setDossierNo(getDossierNo()); + dossierTaxImpl.setMaSoThue(getMaSoThue()); + dossierTaxImpl.setSoQuyetDinh(getSoQuyetDinh()); + dossierTaxImpl.setNgayQuyetDinh(getNgayQuyetDinh()); + dossierTaxImpl.setTenTieuMuc(getTenTieuMuc()); + dossierTaxImpl.setSoTien(getSoTien()); + dossierTaxImpl.setHoTenNguoiNopTien(getHoTenNguoiNopTien()); + dossierTaxImpl.setSoCmtNguoiNopTien(getSoCmtNguoiNopTien()); + dossierTaxImpl.setDiaChiNguoiNopTien(getDiaChiNguoiNopTien()); + dossierTaxImpl.setTinhNguoiNopTien(getTinhNguoiNopTien()); + dossierTaxImpl.setHuyenNguoiNopTien(getHuyenNguoiNopTien()); + dossierTaxImpl.setXaNguoiNopTien(getXaNguoiNopTien()); + dossierTaxImpl.setThoiGianThanhToan(getThoiGianThanhToan()); + dossierTaxImpl.setSoTienNop(getSoTienNop()); + dossierTaxImpl.setNoiDungThanhToan(getNoiDungThanhToan()); + dossierTaxImpl.setTrangThaiThanhToan(getTrangThaiThanhToan()); + dossierTaxImpl.setFileChungTu(getFileChungTu()); + dossierTaxImpl.setNgayThueTraThongBao(getNgayThueTraThongBao()); + dossierTaxImpl.setNgayTraThongBao(getNgayTraThongBao()); + dossierTaxImpl.setNgayNhanBienLai(getNgayNhanBienLai()); + dossierTaxImpl.setStatusTBT(getStatusTBT()); + dossierTaxImpl.setStatusCTT(getStatusCTT()); + + dossierTaxImpl.resetOriginalValues(); + + return dossierTaxImpl; + } + + @Override + public int compareTo(DossierTax dossierTax) { + int value = 0; + + value = DateUtil.compareTo(getCreateDate(), dossierTax.getCreateDate()); + + value = value * -1; + + if (value != 0) { + return value; + } + + return 0; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof DossierTax)) { + return false; + } + + DossierTax dossierTax = (DossierTax)obj; + + long primaryKey = dossierTax.getPrimaryKey(); + + if (getPrimaryKey() == primaryKey) { + return true; + } + else { + return false; + } + } + + @Override + public int hashCode() { + return (int)getPrimaryKey(); + } + + @Override + public boolean isEntityCacheEnabled() { + return ENTITY_CACHE_ENABLED; + } + + @Override + public boolean isFinderCacheEnabled() { + return FINDER_CACHE_ENABLED; + } + + @Override + public void resetOriginalValues() { + DossierTaxModelImpl dossierTaxModelImpl = this; + + dossierTaxModelImpl._originalUuid = dossierTaxModelImpl._uuid; + + dossierTaxModelImpl._originalCompanyId = dossierTaxModelImpl._companyId; + + dossierTaxModelImpl._setOriginalCompanyId = false; + + dossierTaxModelImpl._originalGroupId = dossierTaxModelImpl._groupId; + + dossierTaxModelImpl._setOriginalGroupId = false; + + dossierTaxModelImpl._setModifiedDate = false; + + dossierTaxModelImpl._originalDossierNo = dossierTaxModelImpl._dossierNo; + + dossierTaxModelImpl._originalMaSoThue = dossierTaxModelImpl._maSoThue; + + dossierTaxModelImpl._originalSoQuyetDinh = dossierTaxModelImpl._soQuyetDinh; + + dossierTaxModelImpl._originalStatusTBT = dossierTaxModelImpl._statusTBT; + + dossierTaxModelImpl._setOriginalStatusTBT = false; + + dossierTaxModelImpl._originalStatusCTT = dossierTaxModelImpl._statusCTT; + + dossierTaxModelImpl._setOriginalStatusCTT = false; + + dossierTaxModelImpl._columnBitmask = 0; + } + + @Override + public CacheModel toCacheModel() { + DossierTaxCacheModel dossierTaxCacheModel = new DossierTaxCacheModel(); + + dossierTaxCacheModel.uuid = getUuid(); + + String uuid = dossierTaxCacheModel.uuid; + + if ((uuid != null) && (uuid.length() == 0)) { + dossierTaxCacheModel.uuid = null; + } + + dossierTaxCacheModel.taxId = getTaxId(); + + dossierTaxCacheModel.companyId = getCompanyId(); + + dossierTaxCacheModel.groupId = getGroupId(); + + dossierTaxCacheModel.userId = getUserId(); + + dossierTaxCacheModel.userName = getUserName(); + + String userName = dossierTaxCacheModel.userName; + + if ((userName != null) && (userName.length() == 0)) { + dossierTaxCacheModel.userName = null; + } + + Date createDate = getCreateDate(); + + if (createDate != null) { + dossierTaxCacheModel.createDate = createDate.getTime(); + } + else { + dossierTaxCacheModel.createDate = Long.MIN_VALUE; + } + + Date modifiedDate = getModifiedDate(); + + if (modifiedDate != null) { + dossierTaxCacheModel.modifiedDate = modifiedDate.getTime(); + } + else { + dossierTaxCacheModel.modifiedDate = Long.MIN_VALUE; + } + + dossierTaxCacheModel.dossierNo = getDossierNo(); + + String dossierNo = dossierTaxCacheModel.dossierNo; + + if ((dossierNo != null) && (dossierNo.length() == 0)) { + dossierTaxCacheModel.dossierNo = null; + } + + dossierTaxCacheModel.maSoThue = getMaSoThue(); + + String maSoThue = dossierTaxCacheModel.maSoThue; + + if ((maSoThue != null) && (maSoThue.length() == 0)) { + dossierTaxCacheModel.maSoThue = null; + } + + dossierTaxCacheModel.soQuyetDinh = getSoQuyetDinh(); + + String soQuyetDinh = dossierTaxCacheModel.soQuyetDinh; + + if ((soQuyetDinh != null) && (soQuyetDinh.length() == 0)) { + dossierTaxCacheModel.soQuyetDinh = null; + } + + Date ngayQuyetDinh = getNgayQuyetDinh(); + + if (ngayQuyetDinh != null) { + dossierTaxCacheModel.ngayQuyetDinh = ngayQuyetDinh.getTime(); + } + else { + dossierTaxCacheModel.ngayQuyetDinh = Long.MIN_VALUE; + } + + dossierTaxCacheModel.tenTieuMuc = getTenTieuMuc(); + + String tenTieuMuc = dossierTaxCacheModel.tenTieuMuc; + + if ((tenTieuMuc != null) && (tenTieuMuc.length() == 0)) { + dossierTaxCacheModel.tenTieuMuc = null; + } + + dossierTaxCacheModel.soTien = getSoTien(); + + dossierTaxCacheModel.hoTenNguoiNopTien = getHoTenNguoiNopTien(); + + String hoTenNguoiNopTien = dossierTaxCacheModel.hoTenNguoiNopTien; + + if ((hoTenNguoiNopTien != null) && (hoTenNguoiNopTien.length() == 0)) { + dossierTaxCacheModel.hoTenNguoiNopTien = null; + } + + dossierTaxCacheModel.soCmtNguoiNopTien = getSoCmtNguoiNopTien(); + + dossierTaxCacheModel.diaChiNguoiNopTien = getDiaChiNguoiNopTien(); + + String diaChiNguoiNopTien = dossierTaxCacheModel.diaChiNguoiNopTien; + + if ((diaChiNguoiNopTien != null) && (diaChiNguoiNopTien.length() == 0)) { + dossierTaxCacheModel.diaChiNguoiNopTien = null; + } + + dossierTaxCacheModel.tinhNguoiNopTien = getTinhNguoiNopTien(); + + String tinhNguoiNopTien = dossierTaxCacheModel.tinhNguoiNopTien; + + if ((tinhNguoiNopTien != null) && (tinhNguoiNopTien.length() == 0)) { + dossierTaxCacheModel.tinhNguoiNopTien = null; + } + + dossierTaxCacheModel.huyenNguoiNopTien = getHuyenNguoiNopTien(); + + String huyenNguoiNopTien = dossierTaxCacheModel.huyenNguoiNopTien; + + if ((huyenNguoiNopTien != null) && (huyenNguoiNopTien.length() == 0)) { + dossierTaxCacheModel.huyenNguoiNopTien = null; + } + + dossierTaxCacheModel.xaNguoiNopTien = getXaNguoiNopTien(); + + String xaNguoiNopTien = dossierTaxCacheModel.xaNguoiNopTien; + + if ((xaNguoiNopTien != null) && (xaNguoiNopTien.length() == 0)) { + dossierTaxCacheModel.xaNguoiNopTien = null; + } + + Date thoiGianThanhToan = getThoiGianThanhToan(); + + if (thoiGianThanhToan != null) { + dossierTaxCacheModel.thoiGianThanhToan = thoiGianThanhToan.getTime(); + } + else { + dossierTaxCacheModel.thoiGianThanhToan = Long.MIN_VALUE; + } + + dossierTaxCacheModel.soTienNop = getSoTienNop(); + + dossierTaxCacheModel.noiDungThanhToan = getNoiDungThanhToan(); + + String noiDungThanhToan = dossierTaxCacheModel.noiDungThanhToan; + + if ((noiDungThanhToan != null) && (noiDungThanhToan.length() == 0)) { + dossierTaxCacheModel.noiDungThanhToan = null; + } + + dossierTaxCacheModel.trangThaiThanhToan = getTrangThaiThanhToan(); + + dossierTaxCacheModel.fileChungTu = getFileChungTu(); + + String fileChungTu = dossierTaxCacheModel.fileChungTu; + + if ((fileChungTu != null) && (fileChungTu.length() == 0)) { + dossierTaxCacheModel.fileChungTu = null; + } + + Date ngayThueTraThongBao = getNgayThueTraThongBao(); + + if (ngayThueTraThongBao != null) { + dossierTaxCacheModel.ngayThueTraThongBao = ngayThueTraThongBao.getTime(); + } + else { + dossierTaxCacheModel.ngayThueTraThongBao = Long.MIN_VALUE; + } + + Date ngayTraThongBao = getNgayTraThongBao(); + + if (ngayTraThongBao != null) { + dossierTaxCacheModel.ngayTraThongBao = ngayTraThongBao.getTime(); + } + else { + dossierTaxCacheModel.ngayTraThongBao = Long.MIN_VALUE; + } + + Date ngayNhanBienLai = getNgayNhanBienLai(); + + if (ngayNhanBienLai != null) { + dossierTaxCacheModel.ngayNhanBienLai = ngayNhanBienLai.getTime(); + } + else { + dossierTaxCacheModel.ngayNhanBienLai = Long.MIN_VALUE; + } + + dossierTaxCacheModel.statusTBT = getStatusTBT(); + + dossierTaxCacheModel.statusCTT = getStatusCTT(); + + return dossierTaxCacheModel; + } + + @Override + public String toString() { + StringBundler sb = new StringBundler(61); + + sb.append("{uuid="); + sb.append(getUuid()); + sb.append(", taxId="); + sb.append(getTaxId()); + sb.append(", companyId="); + sb.append(getCompanyId()); + sb.append(", groupId="); + sb.append(getGroupId()); + sb.append(", userId="); + sb.append(getUserId()); + sb.append(", userName="); + sb.append(getUserName()); + sb.append(", createDate="); + sb.append(getCreateDate()); + sb.append(", modifiedDate="); + sb.append(getModifiedDate()); + sb.append(", dossierNo="); + sb.append(getDossierNo()); + sb.append(", maSoThue="); + sb.append(getMaSoThue()); + sb.append(", soQuyetDinh="); + sb.append(getSoQuyetDinh()); + sb.append(", ngayQuyetDinh="); + sb.append(getNgayQuyetDinh()); + sb.append(", tenTieuMuc="); + sb.append(getTenTieuMuc()); + sb.append(", soTien="); + sb.append(getSoTien()); + sb.append(", hoTenNguoiNopTien="); + sb.append(getHoTenNguoiNopTien()); + sb.append(", soCmtNguoiNopTien="); + sb.append(getSoCmtNguoiNopTien()); + sb.append(", diaChiNguoiNopTien="); + sb.append(getDiaChiNguoiNopTien()); + sb.append(", tinhNguoiNopTien="); + sb.append(getTinhNguoiNopTien()); + sb.append(", huyenNguoiNopTien="); + sb.append(getHuyenNguoiNopTien()); + sb.append(", xaNguoiNopTien="); + sb.append(getXaNguoiNopTien()); + sb.append(", thoiGianThanhToan="); + sb.append(getThoiGianThanhToan()); + sb.append(", soTienNop="); + sb.append(getSoTienNop()); + sb.append(", noiDungThanhToan="); + sb.append(getNoiDungThanhToan()); + sb.append(", trangThaiThanhToan="); + sb.append(getTrangThaiThanhToan()); + sb.append(", fileChungTu="); + sb.append(getFileChungTu()); + sb.append(", ngayThueTraThongBao="); + sb.append(getNgayThueTraThongBao()); + sb.append(", ngayTraThongBao="); + sb.append(getNgayTraThongBao()); + sb.append(", ngayNhanBienLai="); + sb.append(getNgayNhanBienLai()); + sb.append(", statusTBT="); + sb.append(getStatusTBT()); + sb.append(", statusCTT="); + sb.append(getStatusCTT()); + sb.append("}"); + + return sb.toString(); + } + + @Override + public String toXmlString() { + StringBundler sb = new StringBundler(94); + + sb.append(""); + sb.append("org.opencps.synctracking.model.DossierTax"); + sb.append(""); + + sb.append( + "uuid"); + sb.append( + "taxId"); + sb.append( + "companyId"); + sb.append( + "groupId"); + sb.append( + "userId"); + sb.append( + "userName"); + sb.append( + "createDate"); + sb.append( + "modifiedDate"); + sb.append( + "dossierNo"); + sb.append( + "maSoThue"); + sb.append( + "soQuyetDinh"); + sb.append( + "ngayQuyetDinh"); + sb.append( + "tenTieuMuc"); + sb.append( + "soTien"); + sb.append( + "hoTenNguoiNopTien"); + sb.append( + "soCmtNguoiNopTien"); + sb.append( + "diaChiNguoiNopTien"); + sb.append( + "tinhNguoiNopTien"); + sb.append( + "huyenNguoiNopTien"); + sb.append( + "xaNguoiNopTien"); + sb.append( + "thoiGianThanhToan"); + sb.append( + "soTienNop"); + sb.append( + "noiDungThanhToan"); + sb.append( + "trangThaiThanhToan"); + sb.append( + "fileChungTu"); + sb.append( + "ngayThueTraThongBao"); + sb.append( + "ngayTraThongBao"); + sb.append( + "ngayNhanBienLai"); + sb.append( + "statusTBT"); + sb.append( + "statusCTT"); + + sb.append(""); + + return sb.toString(); + } + + private static final ClassLoader _classLoader = DossierTax.class.getClassLoader(); + private static final Class[] _escapedModelInterfaces = new Class[] { + DossierTax.class, ModelWrapper.class + }; + private String _uuid; + private String _originalUuid; + private long _taxId; + private long _companyId; + private long _originalCompanyId; + private boolean _setOriginalCompanyId; + private long _groupId; + private long _originalGroupId; + private boolean _setOriginalGroupId; + private long _userId; + private String _userName; + private Date _createDate; + private Date _modifiedDate; + private boolean _setModifiedDate; + private String _dossierNo; + private String _originalDossierNo; + private String _maSoThue; + private String _originalMaSoThue; + private String _soQuyetDinh; + private String _originalSoQuyetDinh; + private Date _ngayQuyetDinh; + private String _tenTieuMuc; + private int _soTien; + private String _hoTenNguoiNopTien; + private int _soCmtNguoiNopTien; + private String _diaChiNguoiNopTien; + private String _tinhNguoiNopTien; + private String _huyenNguoiNopTien; + private String _xaNguoiNopTien; + private Date _thoiGianThanhToan; + private int _soTienNop; + private String _noiDungThanhToan; + private int _trangThaiThanhToan; + private String _fileChungTu; + private Date _ngayThueTraThongBao; + private Date _ngayTraThongBao; + private Date _ngayNhanBienLai; + private int _statusTBT; + private int _originalStatusTBT; + private boolean _setOriginalStatusTBT; + private int _statusCTT; + private int _originalStatusCTT; + private boolean _setOriginalStatusCTT; + private long _columnBitmask; + private DossierTax _escapedModel; +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/SyncTrackingBaseImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/SyncTrackingBaseImpl.java index 2f7007bdcb..8a4406e8eb 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/SyncTrackingBaseImpl.java +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/SyncTrackingBaseImpl.java @@ -26,7 +26,7 @@ * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link SyncTrackingImpl}. *

* - * @author Brian Wing Shun Chan + * @author duongnt * @see SyncTrackingImpl * @see SyncTracking * @generated diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/SyncTrackingCacheModel.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/SyncTrackingCacheModel.java index d281bc9fdb..d39f024c21 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/SyncTrackingCacheModel.java +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/SyncTrackingCacheModel.java @@ -16,7 +16,6 @@ import aQute.bnd.annotation.ProviderType; - import com.liferay.portal.kernel.model.CacheModel; import com.liferay.portal.kernel.util.HashUtil; import com.liferay.portal.kernel.util.StringBundler; @@ -33,7 +32,7 @@ /** * The cache model class for representing SyncTracking in entity cache. * - * @author Brian Wing Shun Chan + * @author duongnt * @see SyncTracking * @generated */ diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/SyncTrackingModelImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/SyncTrackingModelImpl.java index 866b115bd0..dbd3a7f814 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/SyncTrackingModelImpl.java +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/model/impl/SyncTrackingModelImpl.java @@ -23,7 +23,6 @@ import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.json.JSON; import com.liferay.portal.kernel.model.CacheModel; import com.liferay.portal.kernel.model.ModelWrapper; import com.liferay.portal.kernel.model.User; @@ -38,16 +37,13 @@ import org.opencps.synctracking.model.SyncTracking; import org.opencps.synctracking.model.SyncTrackingModel; -import org.opencps.synctracking.model.SyncTrackingSoap; import java.io.Serializable; import java.sql.Types; -import java.util.ArrayList; import java.util.Date; import java.util.HashMap; -import java.util.List; import java.util.Map; /** @@ -57,13 +53,12 @@ * This implementation and its corresponding interface {@link SyncTrackingModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link SyncTrackingImpl}. *

* - * @author Brian Wing Shun Chan + * @author duongnt * @see SyncTrackingImpl * @see SyncTracking * @see SyncTrackingModel * @generated */ -@JSON(strict = true) @ProviderType public class SyncTrackingModelImpl extends BaseModelImpl implements SyncTrackingModel { @@ -120,20 +115,20 @@ public class SyncTrackingModelImpl extends BaseModelImpl TABLE_COLUMNS_MAP.put("metaData", Types.VARCHAR); } - public static final String TABLE_SQL_CREATE = "create table opencps_synctracking (uuid_ VARCHAR(75) null,trackingId LONG not null primary key,companyId LONG,groupId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,dossierNo VARCHAR(75) null,referenceUid VARCHAR(75) null,serverNo VARCHAR(75) null,protocol VARCHAR(75) null,stateSync INTEGER,serviceCode VARCHAR(75) null,api VARCHAR(75) null,fromUnit VARCHAR(75) null,toUnit VARCHAR(75) null,bodyRequest VARCHAR(75) null,response VARCHAR(75) null,metaData VARCHAR(75) null)"; + public static final String TABLE_SQL_CREATE = "create table opencps_synctracking (uuid_ VARCHAR(75) null,trackingId LONG not null primary key,companyId LONG,groupId LONG,userId LONG,userName VARCHAR(75) null,createDate DATE null,modifiedDate DATE null,dossierNo VARCHAR(75) null,referenceUid VARCHAR(75) null,serverNo VARCHAR(75) null,protocol VARCHAR(75) null,stateSync INTEGER,serviceCode VARCHAR(75) null,api VARCHAR(200) null,fromUnit VARCHAR(75) null,toUnit VARCHAR(75) null,bodyRequest TEXT null,response TEXT null,metaData VARCHAR(500) null)"; public static final String TABLE_SQL_DROP = "drop table opencps_synctracking"; public static final String ORDER_BY_JPQL = " ORDER BY syncTracking.createDate DESC"; public static final String ORDER_BY_SQL = " ORDER BY opencps_synctracking.createDate DESC"; public static final String DATA_SOURCE = "liferayDataSource"; public static final String SESSION_FACTORY = "liferaySessionFactory"; public static final String TX_MANAGER = "liferayTransactionManager"; - public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(org.opencps.synctracking.service.util.ServiceProps.get( + public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(org.opencps.synctracking.org.opencps.backend.synctracking.service.util.ServiceProps.get( "value.object.entity.cache.enabled.org.opencps.synctracking.model.SyncTracking"), true); - public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(org.opencps.synctracking.service.util.ServiceProps.get( + public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(org.opencps.synctracking.org.opencps.backend.synctracking.service.util.ServiceProps.get( "value.object.finder.cache.enabled.org.opencps.synctracking.model.SyncTracking"), true); - public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(org.opencps.synctracking.service.util.ServiceProps.get( + public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(org.opencps.synctracking.org.opencps.backend.synctracking.service.util.ServiceProps.get( "value.object.column.bitmask.enabled.org.opencps.synctracking.model.SyncTracking"), true); public static final long API_COLUMN_BITMASK = 1L; @@ -146,65 +141,7 @@ public class SyncTrackingModelImpl extends BaseModelImpl public static final long REFERENCEUID_COLUMN_BITMASK = 128L; public static final long SERVICECODE_COLUMN_BITMASK = 256L; public static final long UUID_COLUMN_BITMASK = 512L; - - /** - * Converts the soap model instance into a normal model instance. - * - * @param soapModel the soap model instance to convert - * @return the normal model instance - */ - public static SyncTracking toModel(SyncTrackingSoap soapModel) { - if (soapModel == null) { - return null; - } - - SyncTracking model = new SyncTrackingImpl(); - - model.setUuid(soapModel.getUuid()); - model.setTrackingId(soapModel.getTrackingId()); - model.setCompanyId(soapModel.getCompanyId()); - model.setGroupId(soapModel.getGroupId()); - model.setUserId(soapModel.getUserId()); - model.setUserName(soapModel.getUserName()); - model.setCreateDate(soapModel.getCreateDate()); - model.setModifiedDate(soapModel.getModifiedDate()); - model.setDossierNo(soapModel.getDossierNo()); - model.setReferenceUid(soapModel.getReferenceUid()); - model.setServerNo(soapModel.getServerNo()); - model.setProtocol(soapModel.getProtocol()); - model.setStateSync(soapModel.getStateSync()); - model.setServiceCode(soapModel.getServiceCode()); - model.setApi(soapModel.getApi()); - model.setFromUnit(soapModel.getFromUnit()); - model.setToUnit(soapModel.getToUnit()); - model.setBodyRequest(soapModel.getBodyRequest()); - model.setResponse(soapModel.getResponse()); - model.setMetaData(soapModel.getMetaData()); - - return model; - } - - /** - * Converts the soap model instances into normal model instances. - * - * @param soapModels the soap model instances to convert - * @return the normal model instances - */ - public static List toModels(SyncTrackingSoap[] soapModels) { - if (soapModels == null) { - return null; - } - - List models = new ArrayList(soapModels.length); - - for (SyncTrackingSoap soapModel : soapModels) { - models.add(toModel(soapModel)); - } - - return models; - } - - public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(org.opencps.synctracking.service.util.ServiceProps.get( + public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(org.opencps.synctracking.org.opencps.backend.synctracking.service.util.ServiceProps.get( "lock.expiration.time.org.opencps.synctracking.model.SyncTracking")); public SyncTrackingModelImpl() { @@ -394,7 +331,6 @@ public void setModelAttributes(Map attributes) { } } - @JSON @Override public String getUuid() { if (_uuid == null) { @@ -418,7 +354,6 @@ public String getOriginalUuid() { return GetterUtil.getString(_originalUuid); } - @JSON @Override public long getTrackingId() { return _trackingId; @@ -429,7 +364,6 @@ public void setTrackingId(long trackingId) { _trackingId = trackingId; } - @JSON @Override public long getCompanyId() { return _companyId; @@ -452,7 +386,6 @@ public long getOriginalCompanyId() { return _originalCompanyId; } - @JSON @Override public long getGroupId() { return _groupId; @@ -475,7 +408,6 @@ public long getOriginalGroupId() { return _originalGroupId; } - @JSON @Override public long getUserId() { return _userId; @@ -502,7 +434,6 @@ public String getUserUuid() { public void setUserUuid(String userUuid) { } - @JSON @Override public String getUserName() { if (_userName == null) { @@ -518,7 +449,6 @@ public void setUserName(String userName) { _userName = userName; } - @JSON @Override public Date getCreateDate() { return _createDate; @@ -539,7 +469,6 @@ public Date getOriginalCreateDate() { return _originalCreateDate; } - @JSON @Override public Date getModifiedDate() { return _modifiedDate; @@ -566,7 +495,6 @@ public Date getOriginalModifiedDate() { return _originalModifiedDate; } - @JSON @Override public String getDossierNo() { if (_dossierNo == null) { @@ -592,7 +520,6 @@ public String getOriginalDossierNo() { return GetterUtil.getString(_originalDossierNo); } - @JSON @Override public String getReferenceUid() { if (_referenceUid == null) { @@ -618,7 +545,6 @@ public String getOriginalReferenceUid() { return GetterUtil.getString(_originalReferenceUid); } - @JSON @Override public String getServerNo() { if (_serverNo == null) { @@ -634,7 +560,6 @@ public void setServerNo(String serverNo) { _serverNo = serverNo; } - @JSON @Override public String getProtocol() { if (_protocol == null) { @@ -660,7 +585,6 @@ public String getOriginalProtocol() { return GetterUtil.getString(_originalProtocol); } - @JSON @Override public int getStateSync() { return _stateSync; @@ -671,7 +595,6 @@ public void setStateSync(int stateSync) { _stateSync = stateSync; } - @JSON @Override public String getServiceCode() { if (_serviceCode == null) { @@ -697,7 +620,6 @@ public String getOriginalServiceCode() { return GetterUtil.getString(_originalServiceCode); } - @JSON @Override public String getApi() { if (_api == null) { @@ -723,7 +645,6 @@ public String getOriginalApi() { return GetterUtil.getString(_originalApi); } - @JSON @Override public String getFromUnit() { if (_fromUnit == null) { @@ -739,7 +660,6 @@ public void setFromUnit(String fromUnit) { _fromUnit = fromUnit; } - @JSON @Override public String getToUnit() { if (_toUnit == null) { @@ -755,7 +675,6 @@ public void setToUnit(String toUnit) { _toUnit = toUnit; } - @JSON @Override public String getBodyRequest() { if (_bodyRequest == null) { @@ -771,7 +690,6 @@ public void setBodyRequest(String bodyRequest) { _bodyRequest = bodyRequest; } - @JSON @Override public String getResponse() { if (_response == null) { @@ -787,7 +705,6 @@ public void setResponse(String response) { _response = response; } - @JSON @Override public String getMetaData() { if (_metaData == null) { diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/org/opencps/backend/synctracking/service/util/ServiceProps.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/org/opencps/backend/synctracking/service/util/ServiceProps.java new file mode 100644 index 0000000000..19b9e61e74 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/org/opencps/backend/synctracking/service/util/ServiceProps.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.org.opencps.backend.synctracking.service.util; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.configuration.Configuration; +import com.liferay.portal.kernel.configuration.ConfigurationFactoryUtil; +import com.liferay.portal.kernel.configuration.Filter; + +import java.util.Properties; + +/** + * @author duongnt + * @generated + */ +@ProviderType +public class ServiceProps { + public static void addProperties(Properties properties) { + _instance._configuration.addProperties(properties); + } + + public static boolean contains(String key) { + return _instance._configuration.contains(key); + } + + public static String get(String key) { + return _instance._configuration.get(key); + } + + public static String get(String key, Filter filter) { + return _instance._configuration.get(key, filter); + } + + public static String[] getArray(String key) { + return _instance._configuration.getArray(key); + } + + public static String[] getArray(String key, Filter filter) { + return _instance._configuration.getArray(key, filter); + } + + public static Properties getProperties() { + return _instance._configuration.getProperties(); + } + + public static void removeProperties(Properties properties) { + _instance._configuration.removeProperties(properties); + } + + public static void set(String key, String value) { + _instance._configuration.set(key, value); + } + + private ServiceProps() { + _configuration = ConfigurationFactoryUtil.getConfiguration(getClass() + .getClassLoader(), + "service"); + } + + private static ServiceProps _instance = new ServiceProps(); + private Configuration _configuration; +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/scheduler/FakeCounterScheduler.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/scheduler/FakeCounterScheduler.java deleted file mode 100644 index fb8eaeb85c..0000000000 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/scheduler/FakeCounterScheduler.java +++ /dev/null @@ -1,122 +0,0 @@ -package org.opencps.synctracking.scheduler; - -import com.liferay.counter.kernel.model.Counter; -import com.liferay.counter.kernel.service.CounterLocalServiceUtil; -import com.liferay.portal.kernel.log.Log; -import com.liferay.portal.kernel.log.LogFactoryUtil; -import com.liferay.portal.kernel.messaging.BaseMessageListener; -import com.liferay.portal.kernel.messaging.DestinationNames; -import com.liferay.portal.kernel.messaging.Message; -import com.liferay.portal.kernel.module.framework.ModuleServiceLifecycle; -import com.liferay.portal.kernel.scheduler.*; -import org.opencps.kernel.scheduler.StorageTypeAwareSchedulerEntryImpl; -import org.osgi.service.component.annotations.Activate; -import org.osgi.service.component.annotations.Deactivate; -import org.osgi.service.component.annotations.Modified; -import org.osgi.service.component.annotations.Reference; - -import java.util.Date; -import java.util.Map; - -//@Component(immediate = true, service = FakeCounterScheduler.class) -public class FakeCounterScheduler extends BaseMessageListener { - private static volatile boolean isRunning; - private static final Integer timeRunScheduler = 1; - @Override - protected void doReceive(Message message) throws Exception { - if(isRunning) { - return; - } - Counter currentCounter = CounterLocalServiceUtil.fetchCounter("opencps.dossier#100349#1082020"); - _log.info("======Scheduler-Current Id in Scheduler: " + currentCounter.getCurrentId()); - long _counterNumber = currentCounter.getCurrentId() + 1; - currentCounter.setCurrentId(_counterNumber); -// Counter newCounter = CounterLocalServiceUtil.updateCounter(currentCounter); - -// _log.info("======Scheduler-Current Id in Schedulerafter Tang: " + newCounter.getCurrentId()); - isRunning = false; - } - - - @Activate - @Modified - protected void activate(Map properties) throws SchedulerException { - String listenerClass = getClass().getName(); - Trigger jobTrigger = _triggerFactory.createTrigger(listenerClass, listenerClass, new Date(), null, timeRunScheduler, TimeUnit.SECOND); - - _schedulerEntryImpl = new SchedulerEntryImpl(getClass().getName(), jobTrigger); - _schedulerEntryImpl = new StorageTypeAwareSchedulerEntryImpl(_schedulerEntryImpl, StorageType.MEMORY_CLUSTERED); - -// _schedulerEntryImpl.setTrigger(jobTrigger); - - if (_initialized) { - deactivate(); - } - - _schedulerEngineHelper.register(this, _schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH); - _initialized = true; - } - - @Deactivate - protected void deactivate() { - if (_initialized) { - try { - _schedulerEngineHelper.unschedule(_schedulerEntryImpl, getStorageType()); - } catch (SchedulerException se) { - if (_log.isWarnEnabled()) { - _log.warn("Unable to unschedule trigger", se); - } - } - - _schedulerEngineHelper.unregister(this); - } - _initialized = false; - isRunning = false; - } - - /** - * getStorageType: Utility method to get the storage type from the scheduler entry wrapper. - * @return StorageType The storage type to use. - */ - protected StorageType getStorageType() { - if (_schedulerEntryImpl instanceof StorageTypeAware) { - return ((StorageTypeAware) _schedulerEntryImpl).getStorageType(); - } - - return StorageType.PERSISTED; - } - - /** - * setModuleServiceLifecycle: So this requires some explanation... - * - * OSGi will start a component once all of it's dependencies are satisfied. However, there - * are times where you want to hold off until the portal is completely ready to go. - * - * This reference declaration is waiting for the ModuleServiceLifecycle's PORTAL_INITIALIZED - * component which will not be available until, surprise surprise, the portal has finished - * initializing. - * - * With this reference, this component activation waits until portal initialization has completed. - * @param moduleServiceLifecycle - */ - @Reference(target = ModuleServiceLifecycle.PORTAL_INITIALIZED, unbind = "-") - protected void setModuleServiceLifecycle(ModuleServiceLifecycle moduleServiceLifecycle) { - } - - @Reference(unbind = "-") - protected void setTriggerFactory(TriggerFactory triggerFactory) { - _triggerFactory = triggerFactory; - } - - @Reference(unbind = "-") - protected void setSchedulerEngineHelper(SchedulerEngineHelper schedulerEngineHelper) { - _schedulerEngineHelper = schedulerEngineHelper; - } - - private SchedulerEngineHelper _schedulerEngineHelper; - private TriggerFactory _triggerFactory; - private volatile boolean _initialized; - private SchedulerEntryImpl _schedulerEntryImpl = null; - - private Log _log = LogFactoryUtil.getLog(FakeCounterScheduler.class); -} diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/base/DossierTaxLocalServiceBaseImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/base/DossierTaxLocalServiceBaseImpl.java new file mode 100644 index 0000000000..7a95cc5057 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/base/DossierTaxLocalServiceBaseImpl.java @@ -0,0 +1,695 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.service.base; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.exportimport.kernel.lar.ExportImportHelperUtil; +import com.liferay.exportimport.kernel.lar.ManifestSummary; +import com.liferay.exportimport.kernel.lar.PortletDataContext; +import com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil; +import com.liferay.exportimport.kernel.lar.StagedModelType; + +import com.liferay.portal.kernel.bean.BeanReference; +import com.liferay.portal.kernel.dao.db.DB; +import com.liferay.portal.kernel.dao.db.DBManagerUtil; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; +import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; +import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; +import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery; +import com.liferay.portal.kernel.dao.orm.Projection; +import com.liferay.portal.kernel.exception.PortalException; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService; +import com.liferay.portal.kernel.search.Indexable; +import com.liferay.portal.kernel.search.IndexableType; +import com.liferay.portal.kernel.service.BaseLocalServiceImpl; +import com.liferay.portal.kernel.service.PersistedModelLocalServiceRegistry; +import com.liferay.portal.kernel.service.persistence.ClassNamePersistence; +import com.liferay.portal.kernel.service.persistence.UserPersistence; +import com.liferay.portal.kernel.transaction.Transactional; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.PortalUtil; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import org.opencps.synctracking.model.DossierTax; +import org.opencps.synctracking.service.DossierTaxLocalService; +import org.opencps.synctracking.service.persistence.DossierTaxPersistence; +import org.opencps.synctracking.service.persistence.SyncTrackingPersistence; + +import java.io.Serializable; + +import java.util.List; + +import javax.sql.DataSource; + +/** + * Provides the base implementation for the dossier tax local service. + * + *

+ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.opencps.synctracking.service.impl.DossierTaxLocalServiceImpl}. + *

+ * + * @author duongnt + * @see org.opencps.synctracking.service.impl.DossierTaxLocalServiceImpl + * @see org.opencps.synctracking.service.DossierTaxLocalServiceUtil + * @generated + */ +@ProviderType +public abstract class DossierTaxLocalServiceBaseImpl + extends BaseLocalServiceImpl implements DossierTaxLocalService, + IdentifiableOSGiService { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link org.opencps.synctracking.service.DossierTaxLocalServiceUtil} to access the dossier tax local service. + */ + + /** + * Adds the dossier tax to the database. Also notifies the appropriate model listeners. + * + * @param dossierTax the dossier tax + * @return the dossier tax that was added + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public DossierTax addDossierTax(DossierTax dossierTax) { + dossierTax.setNew(true); + + return dossierTaxPersistence.update(dossierTax); + } + + /** + * Creates a new dossier tax with the primary key. Does not add the dossier tax to the database. + * + * @param taxId the primary key for the new dossier tax + * @return the new dossier tax + */ + @Override + @Transactional(enabled = false) + public DossierTax createDossierTax(long taxId) { + return dossierTaxPersistence.create(taxId); + } + + /** + * Deletes the dossier tax with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax that was removed + * @throws PortalException if a dossier tax with the primary key could not be found + */ + @Indexable(type = IndexableType.DELETE) + @Override + public DossierTax deleteDossierTax(long taxId) throws PortalException { + return dossierTaxPersistence.remove(taxId); + } + + /** + * Deletes the dossier tax from the database. Also notifies the appropriate model listeners. + * + * @param dossierTax the dossier tax + * @return the dossier tax that was removed + */ + @Indexable(type = IndexableType.DELETE) + @Override + public DossierTax deleteDossierTax(DossierTax dossierTax) { + return dossierTaxPersistence.remove(dossierTax); + } + + @Override + public DynamicQuery dynamicQuery() { + Class clazz = getClass(); + + return DynamicQueryFactoryUtil.forClass(DossierTax.class, + clazz.getClassLoader()); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery) { + return dossierTaxPersistence.findWithDynamicQuery(dynamicQuery); + } + + /** + * Performs a dynamic query on the database and returns a range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.synctracking.model.impl.DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @return the range of matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end) { + return dossierTaxPersistence.findWithDynamicQuery(dynamicQuery, start, + end); + } + + /** + * Performs a dynamic query on the database and returns an ordered range of the matching rows. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.synctracking.model.impl.DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dynamicQuery the dynamic query + * @param start the lower bound of the range of model instances + * @param end the upper bound of the range of model instances (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching rows + */ + @Override + public List dynamicQuery(DynamicQuery dynamicQuery, int start, + int end, OrderByComparator orderByComparator) { + return dossierTaxPersistence.findWithDynamicQuery(dynamicQuery, start, + end, orderByComparator); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery) { + return dossierTaxPersistence.countWithDynamicQuery(dynamicQuery); + } + + /** + * Returns the number of rows matching the dynamic query. + * + * @param dynamicQuery the dynamic query + * @param projection the projection to apply to the query + * @return the number of rows matching the dynamic query + */ + @Override + public long dynamicQueryCount(DynamicQuery dynamicQuery, + Projection projection) { + return dossierTaxPersistence.countWithDynamicQuery(dynamicQuery, + projection); + } + + @Override + public DossierTax fetchDossierTax(long taxId) { + return dossierTaxPersistence.fetchByPrimaryKey(taxId); + } + + /** + * Returns the dossier tax matching the UUID and group. + * + * @param uuid the dossier tax's UUID + * @param groupId the primary key of the group + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchDossierTaxByUuidAndGroupId(String uuid, long groupId) { + return dossierTaxPersistence.fetchByUUID_G(uuid, groupId); + } + + /** + * Returns the dossier tax with the primary key. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax + * @throws PortalException if a dossier tax with the primary key could not be found + */ + @Override + public DossierTax getDossierTax(long taxId) throws PortalException { + return dossierTaxPersistence.findByPrimaryKey(taxId); + } + + @Override + public ActionableDynamicQuery getActionableDynamicQuery() { + ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery(); + + actionableDynamicQuery.setBaseLocalService(dossierTaxLocalService); + actionableDynamicQuery.setClassLoader(getClassLoader()); + actionableDynamicQuery.setModelClass(DossierTax.class); + + actionableDynamicQuery.setPrimaryKeyPropertyName("taxId"); + + return actionableDynamicQuery; + } + + @Override + public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { + IndexableActionableDynamicQuery indexableActionableDynamicQuery = new IndexableActionableDynamicQuery(); + + indexableActionableDynamicQuery.setBaseLocalService(dossierTaxLocalService); + indexableActionableDynamicQuery.setClassLoader(getClassLoader()); + indexableActionableDynamicQuery.setModelClass(DossierTax.class); + + indexableActionableDynamicQuery.setPrimaryKeyPropertyName("taxId"); + + return indexableActionableDynamicQuery; + } + + protected void initActionableDynamicQuery( + ActionableDynamicQuery actionableDynamicQuery) { + actionableDynamicQuery.setBaseLocalService(dossierTaxLocalService); + actionableDynamicQuery.setClassLoader(getClassLoader()); + actionableDynamicQuery.setModelClass(DossierTax.class); + + actionableDynamicQuery.setPrimaryKeyPropertyName("taxId"); + } + + @Override + public ExportActionableDynamicQuery getExportActionableDynamicQuery( + final PortletDataContext portletDataContext) { + final ExportActionableDynamicQuery exportActionableDynamicQuery = new ExportActionableDynamicQuery() { + @Override + public long performCount() throws PortalException { + ManifestSummary manifestSummary = portletDataContext.getManifestSummary(); + + StagedModelType stagedModelType = getStagedModelType(); + + long modelAdditionCount = super.performCount(); + + manifestSummary.addModelAdditionCount(stagedModelType, + modelAdditionCount); + + long modelDeletionCount = ExportImportHelperUtil.getModelDeletionCount(portletDataContext, + stagedModelType); + + manifestSummary.addModelDeletionCount(stagedModelType, + modelDeletionCount); + + return modelAdditionCount; + } + }; + + initActionableDynamicQuery(exportActionableDynamicQuery); + + exportActionableDynamicQuery.setAddCriteriaMethod(new ActionableDynamicQuery.AddCriteriaMethod() { + @Override + public void addCriteria(DynamicQuery dynamicQuery) { + portletDataContext.addDateRangeCriteria(dynamicQuery, + "modifiedDate"); + } + }); + + exportActionableDynamicQuery.setCompanyId(portletDataContext.getCompanyId()); + + exportActionableDynamicQuery.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod() { + @Override + public void performAction(DossierTax dossierTax) + throws PortalException { + StagedModelDataHandlerUtil.exportStagedModel(portletDataContext, + dossierTax); + } + }); + exportActionableDynamicQuery.setStagedModelType(new StagedModelType( + PortalUtil.getClassNameId(DossierTax.class.getName()))); + + return exportActionableDynamicQuery; + } + + /** + * @throws PortalException + */ + @Override + public PersistedModel deletePersistedModel(PersistedModel persistedModel) + throws PortalException { + return dossierTaxLocalService.deleteDossierTax((DossierTax)persistedModel); + } + + @Override + public PersistedModel getPersistedModel(Serializable primaryKeyObj) + throws PortalException { + return dossierTaxPersistence.findByPrimaryKey(primaryKeyObj); + } + + /** + * Returns all the dossier taxs matching the UUID and company. + * + * @param uuid the UUID of the dossier taxs + * @param companyId the primary key of the company + * @return the matching dossier taxs, or an empty list if no matches were found + */ + @Override + public List getDossierTaxsByUuidAndCompanyId(String uuid, + long companyId) { + return dossierTaxPersistence.findByUuid_C(uuid, companyId); + } + + /** + * Returns a range of dossier taxs matching the UUID and company. + * + * @param uuid the UUID of the dossier taxs + * @param companyId the primary key of the company + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the range of matching dossier taxs, or an empty list if no matches were found + */ + @Override + public List getDossierTaxsByUuidAndCompanyId(String uuid, + long companyId, int start, int end, + OrderByComparator orderByComparator) { + return dossierTaxPersistence.findByUuid_C(uuid, companyId, start, end, + orderByComparator); + } + + /** + * Returns the dossier tax matching the UUID and group. + * + * @param uuid the dossier tax's UUID + * @param groupId the primary key of the group + * @return the matching dossier tax + * @throws PortalException if a matching dossier tax could not be found + */ + @Override + public DossierTax getDossierTaxByUuidAndGroupId(String uuid, long groupId) + throws PortalException { + return dossierTaxPersistence.findByUUID_G(uuid, groupId); + } + + /** + * Returns a range of all the dossier taxs. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link org.opencps.synctracking.model.impl.DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of dossier taxs + */ + @Override + public List getDossierTaxs(int start, int end) { + return dossierTaxPersistence.findAll(start, end); + } + + /** + * Returns the number of dossier taxs. + * + * @return the number of dossier taxs + */ + @Override + public int getDossierTaxsCount() { + return dossierTaxPersistence.countAll(); + } + + /** + * Updates the dossier tax in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. + * + * @param dossierTax the dossier tax + * @return the dossier tax that was updated + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public DossierTax updateDossierTax(DossierTax dossierTax) { + return dossierTaxPersistence.update(dossierTax); + } + + /** + * Returns the dossier tax local service. + * + * @return the dossier tax local service + */ + public DossierTaxLocalService getDossierTaxLocalService() { + return dossierTaxLocalService; + } + + /** + * Sets the dossier tax local service. + * + * @param dossierTaxLocalService the dossier tax local service + */ + public void setDossierTaxLocalService( + DossierTaxLocalService dossierTaxLocalService) { + this.dossierTaxLocalService = dossierTaxLocalService; + } + + /** + * Returns the dossier tax persistence. + * + * @return the dossier tax persistence + */ + public DossierTaxPersistence getDossierTaxPersistence() { + return dossierTaxPersistence; + } + + /** + * Sets the dossier tax persistence. + * + * @param dossierTaxPersistence the dossier tax persistence + */ + public void setDossierTaxPersistence( + DossierTaxPersistence dossierTaxPersistence) { + this.dossierTaxPersistence = dossierTaxPersistence; + } + + /** + * Returns the sync tracking local service. + * + * @return the sync tracking local service + */ + public org.opencps.synctracking.service.SyncTrackingLocalService getSyncTrackingLocalService() { + return syncTrackingLocalService; + } + + /** + * Sets the sync tracking local service. + * + * @param syncTrackingLocalService the sync tracking local service + */ + public void setSyncTrackingLocalService( + org.opencps.synctracking.service.SyncTrackingLocalService syncTrackingLocalService) { + this.syncTrackingLocalService = syncTrackingLocalService; + } + + /** + * Returns the sync tracking persistence. + * + * @return the sync tracking persistence + */ + public SyncTrackingPersistence getSyncTrackingPersistence() { + return syncTrackingPersistence; + } + + /** + * Sets the sync tracking persistence. + * + * @param syncTrackingPersistence the sync tracking persistence + */ + public void setSyncTrackingPersistence( + SyncTrackingPersistence syncTrackingPersistence) { + this.syncTrackingPersistence = syncTrackingPersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.kernel.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the class name local service. + * + * @return the class name local service + */ + public com.liferay.portal.kernel.service.ClassNameLocalService getClassNameLocalService() { + return classNameLocalService; + } + + /** + * Sets the class name local service. + * + * @param classNameLocalService the class name local service + */ + public void setClassNameLocalService( + com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService) { + this.classNameLocalService = classNameLocalService; + } + + /** + * Returns the class name persistence. + * + * @return the class name persistence + */ + public ClassNamePersistence getClassNamePersistence() { + return classNamePersistence; + } + + /** + * Sets the class name persistence. + * + * @param classNamePersistence the class name persistence + */ + public void setClassNamePersistence( + ClassNamePersistence classNamePersistence) { + this.classNamePersistence = classNamePersistence; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.kernel.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.kernel.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.kernel.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user persistence. + * + * @return the user persistence + */ + public UserPersistence getUserPersistence() { + return userPersistence; + } + + /** + * Sets the user persistence. + * + * @param userPersistence the user persistence + */ + public void setUserPersistence(UserPersistence userPersistence) { + this.userPersistence = userPersistence; + } + + public void afterPropertiesSet() { + persistedModelLocalServiceRegistry.register("org.opencps.synctracking.model.DossierTax", + dossierTaxLocalService); + } + + public void destroy() { + persistedModelLocalServiceRegistry.unregister( + "org.opencps.synctracking.model.DossierTax"); + } + + /** + * Returns the OSGi service identifier. + * + * @return the OSGi service identifier + */ + @Override + public String getOSGiServiceIdentifier() { + return DossierTaxLocalService.class.getName(); + } + + protected Class getModelClass() { + return DossierTax.class; + } + + protected String getModelClassName() { + return DossierTax.class.getName(); + } + + /** + * Performs a SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) { + try { + DataSource dataSource = dossierTaxPersistence.getDataSource(); + + DB db = DBManagerUtil.getDB(); + + sql = db.buildSQL(sql); + sql = PortalUtil.transformSQL(sql); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = DossierTaxLocalService.class) + protected DossierTaxLocalService dossierTaxLocalService; + @BeanReference(type = DossierTaxPersistence.class) + protected DossierTaxPersistence dossierTaxPersistence; + @BeanReference(type = org.opencps.synctracking.service.SyncTrackingLocalService.class) + protected org.opencps.synctracking.service.SyncTrackingLocalService syncTrackingLocalService; + @BeanReference(type = SyncTrackingPersistence.class) + protected SyncTrackingPersistence syncTrackingPersistence; + @ServiceReference(type = com.liferay.counter.kernel.service.CounterLocalService.class) + protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService; + @ServiceReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class) + protected com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService; + @ServiceReference(type = ClassNamePersistence.class) + protected ClassNamePersistence classNamePersistence; + @ServiceReference(type = com.liferay.portal.kernel.service.ResourceLocalService.class) + protected com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService; + @ServiceReference(type = com.liferay.portal.kernel.service.UserLocalService.class) + protected com.liferay.portal.kernel.service.UserLocalService userLocalService; + @ServiceReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + @ServiceReference(type = PersistedModelLocalServiceRegistry.class) + protected PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry; +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/base/SyncTrackingLocalServiceBaseImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/base/SyncTrackingLocalServiceBaseImpl.java index d3cdf42fbb..287a1faa3b 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/base/SyncTrackingLocalServiceBaseImpl.java +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/base/SyncTrackingLocalServiceBaseImpl.java @@ -51,6 +51,7 @@ import org.opencps.synctracking.model.SyncTracking; import org.opencps.synctracking.service.SyncTrackingLocalService; +import org.opencps.synctracking.service.persistence.DossierTaxPersistence; import org.opencps.synctracking.service.persistence.SyncTrackingPersistence; import java.io.Serializable; @@ -66,7 +67,7 @@ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.opencps.synctracking.service.impl.SyncTrackingLocalServiceImpl}. *

* - * @author Brian Wing Shun Chan + * @author duongnt * @see org.opencps.synctracking.service.impl.SyncTrackingLocalServiceImpl * @see org.opencps.synctracking.service.SyncTrackingLocalServiceUtil * @generated @@ -431,6 +432,44 @@ public SyncTracking updateSyncTracking(SyncTracking syncTracking) { return syncTrackingPersistence.update(syncTracking); } + /** + * Returns the dossier tax local service. + * + * @return the dossier tax local service + */ + public org.opencps.synctracking.service.DossierTaxLocalService getDossierTaxLocalService() { + return dossierTaxLocalService; + } + + /** + * Sets the dossier tax local service. + * + * @param dossierTaxLocalService the dossier tax local service + */ + public void setDossierTaxLocalService( + org.opencps.synctracking.service.DossierTaxLocalService dossierTaxLocalService) { + this.dossierTaxLocalService = dossierTaxLocalService; + } + + /** + * Returns the dossier tax persistence. + * + * @return the dossier tax persistence + */ + public DossierTaxPersistence getDossierTaxPersistence() { + return dossierTaxPersistence; + } + + /** + * Sets the dossier tax persistence. + * + * @param dossierTaxPersistence the dossier tax persistence + */ + public void setDossierTaxPersistence( + DossierTaxPersistence dossierTaxPersistence) { + this.dossierTaxPersistence = dossierTaxPersistence; + } + /** * Returns the sync tracking local service. * @@ -634,6 +673,10 @@ protected void runSQL(String sql) { } } + @BeanReference(type = org.opencps.synctracking.service.DossierTaxLocalService.class) + protected org.opencps.synctracking.service.DossierTaxLocalService dossierTaxLocalService; + @BeanReference(type = DossierTaxPersistence.class) + protected DossierTaxPersistence dossierTaxPersistence; @BeanReference(type = SyncTrackingLocalService.class) protected SyncTrackingLocalService syncTrackingLocalService; @BeanReference(type = SyncTrackingPersistence.class) diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/base/SyncTrackingServiceBaseImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/base/SyncTrackingServiceBaseImpl.java deleted file mode 100644 index 4e56b3e316..0000000000 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/base/SyncTrackingServiceBaseImpl.java +++ /dev/null @@ -1,333 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package org.opencps.synctracking.service.base; - -import com.liferay.portal.kernel.bean.BeanReference; -import com.liferay.portal.kernel.dao.db.DB; -import com.liferay.portal.kernel.dao.db.DBManagerUtil; -import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; -import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; -import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.module.framework.service.IdentifiableOSGiService; -import com.liferay.portal.kernel.service.BaseServiceImpl; -import com.liferay.portal.kernel.service.persistence.ClassNamePersistence; -import com.liferay.portal.kernel.service.persistence.UserPersistence; -import com.liferay.portal.kernel.util.PortalUtil; -import com.liferay.portal.spring.extender.service.ServiceReference; - -import org.opencps.synctracking.model.SyncTracking; -import org.opencps.synctracking.service.SyncTrackingService; -import org.opencps.synctracking.service.persistence.SyncTrackingPersistence; - -import javax.sql.DataSource; - -/** - * Provides the base implementation for the sync tracking remote service. - * - *

- * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link org.opencps.synctracking.service.impl.SyncTrackingServiceImpl}. - *

- * - * @author Brian Wing Shun Chan - * @see org.opencps.synctracking.service.impl.SyncTrackingServiceImpl - * @see org.opencps.synctracking.service.SyncTrackingServiceUtil - * @generated - */ -public abstract class SyncTrackingServiceBaseImpl extends BaseServiceImpl - implements SyncTrackingService, IdentifiableOSGiService { - /* - * NOTE FOR DEVELOPERS: - * - * Never modify or reference this class directly. Always use {@link org.opencps.synctracking.service.SyncTrackingServiceUtil} to access the sync tracking remote service. - */ - - /** - * Returns the sync tracking local service. - * - * @return the sync tracking local service - */ - public org.opencps.synctracking.service.SyncTrackingLocalService getSyncTrackingLocalService() { - return syncTrackingLocalService; - } - - /** - * Sets the sync tracking local service. - * - * @param syncTrackingLocalService the sync tracking local service - */ - public void setSyncTrackingLocalService( - org.opencps.synctracking.service.SyncTrackingLocalService syncTrackingLocalService) { - this.syncTrackingLocalService = syncTrackingLocalService; - } - - /** - * Returns the sync tracking remote service. - * - * @return the sync tracking remote service - */ - public SyncTrackingService getSyncTrackingService() { - return syncTrackingService; - } - - /** - * Sets the sync tracking remote service. - * - * @param syncTrackingService the sync tracking remote service - */ - public void setSyncTrackingService(SyncTrackingService syncTrackingService) { - this.syncTrackingService = syncTrackingService; - } - - /** - * Returns the sync tracking persistence. - * - * @return the sync tracking persistence - */ - public SyncTrackingPersistence getSyncTrackingPersistence() { - return syncTrackingPersistence; - } - - /** - * Sets the sync tracking persistence. - * - * @param syncTrackingPersistence the sync tracking persistence - */ - public void setSyncTrackingPersistence( - SyncTrackingPersistence syncTrackingPersistence) { - this.syncTrackingPersistence = syncTrackingPersistence; - } - - /** - * Returns the counter local service. - * - * @return the counter local service - */ - public com.liferay.counter.kernel.service.CounterLocalService getCounterLocalService() { - return counterLocalService; - } - - /** - * Sets the counter local service. - * - * @param counterLocalService the counter local service - */ - public void setCounterLocalService( - com.liferay.counter.kernel.service.CounterLocalService counterLocalService) { - this.counterLocalService = counterLocalService; - } - - /** - * Returns the class name local service. - * - * @return the class name local service - */ - public com.liferay.portal.kernel.service.ClassNameLocalService getClassNameLocalService() { - return classNameLocalService; - } - - /** - * Sets the class name local service. - * - * @param classNameLocalService the class name local service - */ - public void setClassNameLocalService( - com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService) { - this.classNameLocalService = classNameLocalService; - } - - /** - * Returns the class name remote service. - * - * @return the class name remote service - */ - public com.liferay.portal.kernel.service.ClassNameService getClassNameService() { - return classNameService; - } - - /** - * Sets the class name remote service. - * - * @param classNameService the class name remote service - */ - public void setClassNameService( - com.liferay.portal.kernel.service.ClassNameService classNameService) { - this.classNameService = classNameService; - } - - /** - * Returns the class name persistence. - * - * @return the class name persistence - */ - public ClassNamePersistence getClassNamePersistence() { - return classNamePersistence; - } - - /** - * Sets the class name persistence. - * - * @param classNamePersistence the class name persistence - */ - public void setClassNamePersistence( - ClassNamePersistence classNamePersistence) { - this.classNamePersistence = classNamePersistence; - } - - /** - * Returns the resource local service. - * - * @return the resource local service - */ - public com.liferay.portal.kernel.service.ResourceLocalService getResourceLocalService() { - return resourceLocalService; - } - - /** - * Sets the resource local service. - * - * @param resourceLocalService the resource local service - */ - public void setResourceLocalService( - com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService) { - this.resourceLocalService = resourceLocalService; - } - - /** - * Returns the user local service. - * - * @return the user local service - */ - public com.liferay.portal.kernel.service.UserLocalService getUserLocalService() { - return userLocalService; - } - - /** - * Sets the user local service. - * - * @param userLocalService the user local service - */ - public void setUserLocalService( - com.liferay.portal.kernel.service.UserLocalService userLocalService) { - this.userLocalService = userLocalService; - } - - /** - * Returns the user remote service. - * - * @return the user remote service - */ - public com.liferay.portal.kernel.service.UserService getUserService() { - return userService; - } - - /** - * Sets the user remote service. - * - * @param userService the user remote service - */ - public void setUserService( - com.liferay.portal.kernel.service.UserService userService) { - this.userService = userService; - } - - /** - * Returns the user persistence. - * - * @return the user persistence - */ - public UserPersistence getUserPersistence() { - return userPersistence; - } - - /** - * Sets the user persistence. - * - * @param userPersistence the user persistence - */ - public void setUserPersistence(UserPersistence userPersistence) { - this.userPersistence = userPersistence; - } - - public void afterPropertiesSet() { - } - - public void destroy() { - } - - /** - * Returns the OSGi service identifier. - * - * @return the OSGi service identifier - */ - @Override - public String getOSGiServiceIdentifier() { - return SyncTrackingService.class.getName(); - } - - protected Class getModelClass() { - return SyncTracking.class; - } - - protected String getModelClassName() { - return SyncTracking.class.getName(); - } - - /** - * Performs a SQL query. - * - * @param sql the sql query - */ - protected void runSQL(String sql) { - try { - DataSource dataSource = syncTrackingPersistence.getDataSource(); - - DB db = DBManagerUtil.getDB(); - - sql = db.buildSQL(sql); - sql = PortalUtil.transformSQL(sql); - - SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, - sql); - - sqlUpdate.update(); - } - catch (Exception e) { - throw new SystemException(e); - } - } - - @BeanReference(type = org.opencps.synctracking.service.SyncTrackingLocalService.class) - protected org.opencps.synctracking.service.SyncTrackingLocalService syncTrackingLocalService; - @BeanReference(type = SyncTrackingService.class) - protected SyncTrackingService syncTrackingService; - @BeanReference(type = SyncTrackingPersistence.class) - protected SyncTrackingPersistence syncTrackingPersistence; - @ServiceReference(type = com.liferay.counter.kernel.service.CounterLocalService.class) - protected com.liferay.counter.kernel.service.CounterLocalService counterLocalService; - @ServiceReference(type = com.liferay.portal.kernel.service.ClassNameLocalService.class) - protected com.liferay.portal.kernel.service.ClassNameLocalService classNameLocalService; - @ServiceReference(type = com.liferay.portal.kernel.service.ClassNameService.class) - protected com.liferay.portal.kernel.service.ClassNameService classNameService; - @ServiceReference(type = ClassNamePersistence.class) - protected ClassNamePersistence classNamePersistence; - @ServiceReference(type = com.liferay.portal.kernel.service.ResourceLocalService.class) - protected com.liferay.portal.kernel.service.ResourceLocalService resourceLocalService; - @ServiceReference(type = com.liferay.portal.kernel.service.UserLocalService.class) - protected com.liferay.portal.kernel.service.UserLocalService userLocalService; - @ServiceReference(type = com.liferay.portal.kernel.service.UserService.class) - protected com.liferay.portal.kernel.service.UserService userService; - @ServiceReference(type = UserPersistence.class) - protected UserPersistence userPersistence; -} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/comparator/QueueDVCQGComparator.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/comparator/QueueDVCQGComparator.java new file mode 100644 index 0000000000..75ab52ffe1 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/comparator/QueueDVCQGComparator.java @@ -0,0 +1,193 @@ +package org.opencps.synctracking.service.comparator; + +import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.Validator; +import org.opencps.synctracking.model.DossierTax; + +import java.beans.Introspector; +import java.beans.PropertyDescriptor; +import java.util.Date; + +public class QueueDVCQGComparator extends OrderByComparator { + private static final long serialVersionUID = 1L; + + private static final String _TABLE_NAME = "opencps_dossier_tax"; + + private static final String _defaultColumnName = "createDate"; + + public String _ORDER_BY_ASC = _TABLE_NAME + StringPool.PERIOD + getColumnName() + " ASC"; + + public String _ORDER_BY_DESC = _TABLE_NAME + StringPool.PERIOD + getColumnName() + " DESC"; + + private boolean _ascending; + + private String _columnName; + + private Class _columnType; + + public QueueDVCQGComparator() { + + this(false, _defaultColumnName, String.class); + } + + public QueueDVCQGComparator(boolean ascending, String columnName, Class columnType) { + + _ascending = ascending; + + _columnName = columnName; + + _columnType = columnType; + } + + @Override + public int compare(DossierTax publishQueue0, DossierTax publishQueue1) { + + int value = -1; + + Object value0 = getValue(publishQueue0.getClass(), publishQueue0); + Object value1 = getValue(publishQueue1.getClass(), publishQueue1); + if (value0 == null && value1 != null) { + return -1; + } + else if (value0 != null && value1 == null) { + return 1; + } + else if (value0 == null && value1 == null) { + return 0; + } + if (_columnType.isAssignableFrom(String.class)) { + value = ((String) value0).compareTo(((String) value1)); + } else if (_columnType.isAssignableFrom(Date.class)) { + value = ((Date) value0).compareTo(((Date) value1)); + } else if (_columnType.isAssignableFrom(Long.class) + || _columnType.isAssignableFrom(long.class)) { + value = ((Long) value0).compareTo(((Long) value1)); + } else if (_columnType.isAssignableFrom(Integer.class) + || _columnType.isAssignableFrom(int.class)) { + value = ((Integer) value0).compareTo(((Integer) value1)); + } else if (_columnType.isAssignableFrom(Double.class) + || _columnType.isAssignableFrom(double.class)) { + value = ((Double) value0).compareTo(((Double) value1)); + } else if (_columnType.isAssignableFrom(Float.class) + || _columnType.isAssignableFrom(float.class)) { + value = ((Float) value0).compareTo(((Float) value1)); + } else if (_columnType.isAssignableFrom(Short.class) + || _columnType.isAssignableFrom(short.class)) { + value = ((Short) value0).compareTo(((Short) value1)); + } + + return _ascending ? value : -value; + } + + public String getColumnName() { + + if (Validator.isNull(_columnName)) { + return _defaultColumnName; + } + return _columnName; + } + + public String getORDER_BY_ASC() { + + return _TABLE_NAME + StringPool.PERIOD + getColumnName() + " ASC"; + } + + public String getORDER_BY_DESC() { + + return _TABLE_NAME + StringPool.PERIOD + getColumnName() + " DESC"; + } + + @Override + public String getOrderBy() { + + if (_ascending) { + return _ORDER_BY_ASC; + } else { + return _ORDER_BY_DESC; + } + } + + @Override + public String[] getOrderByFields() { + + return new String[] { getColumnName() }; + } + + @Override + public boolean isAscending() { + + return _ascending; + } + + public void setColumnName(String columnName) { + + this._columnName = columnName; + } + + public void setORDER_BY_ASC(String orderByASC) { + + _ORDER_BY_ASC = orderByASC; + } + + public void setORDER_BY_DESC(String orderByDESC) { + + _ORDER_BY_DESC = orderByDESC; + } + + public Class getColumnType() { + + return _columnType; + } + + public void setColumnType(Class columnType) { + + this._columnType = columnType; + } + + /** + * @param clazz + * @param object + * @return + */ + private Object getValue(Class clazz, Object object) { + + PropertyDescriptor[] propertyDescriptors = null; + + Object value = null; + + try { + propertyDescriptors = Introspector.getBeanInfo(clazz).getPropertyDescriptors(); + } catch (Exception e) { + _log.error(e); + } + + if (propertyDescriptors != null && propertyDescriptors.length > 0) { + + try { + for (PropertyDescriptor pd : propertyDescriptors) { + + if (pd.getReadMethod() != null && !"class".equals(pd.getName()) + && pd.getDisplayName().equals(getColumnName())) { + + value = pd.getReadMethod().invoke(object); + + break; + + } + + } + } catch (Exception e) { + _log.error(e); + } + + } + + return value; + } + + private Log _log = LogFactoryUtil.getLog(QueueDVCQGComparator.class.getName()); + +} diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/http/SyncTrackingServiceHttp.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/http/SyncTrackingServiceHttp.java deleted file mode 100644 index b73034c845..0000000000 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/http/SyncTrackingServiceHttp.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package org.opencps.synctracking.service.http; - -import aQute.bnd.annotation.ProviderType; - -/** - * Provides the HTTP utility for the - * {@link org.opencps.synctracking.service.SyncTrackingServiceUtil} service utility. The - * static methods of this class calls the same methods of the service utility. - * However, the signatures are different because it requires an additional - * {@link com.liferay.portal.kernel.security.auth.HttpPrincipal} parameter. - * - *

- * The benefits of using the HTTP utility is that it is fast and allows for - * tunneling without the cost of serializing to text. The drawback is that it - * only works with Java. - *

- * - *

- * Set the property tunnel.servlet.hosts.allowed in portal.properties to - * configure security. - *

- * - *

- * The HTTP utility is only generated for remote services. - *

- * - * @author Brian Wing Shun Chan - * @see SyncTrackingServiceSoap - * @see com.liferay.portal.kernel.security.auth.HttpPrincipal - * @see org.opencps.synctracking.service.SyncTrackingServiceUtil - * @generated - */ -@ProviderType -public class SyncTrackingServiceHttp { -} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/http/SyncTrackingServiceSoap.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/http/SyncTrackingServiceSoap.java deleted file mode 100644 index b36665d142..0000000000 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/http/SyncTrackingServiceSoap.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package org.opencps.synctracking.service.http; - -import aQute.bnd.annotation.ProviderType; - -/** - * Provides the SOAP utility for the - * {@link org.opencps.synctracking.service.SyncTrackingServiceUtil} service utility. The - * static methods of this class calls the same methods of the service utility. - * However, the signatures are different because it is difficult for SOAP to - * support certain types. - * - *

- * ServiceBuilder follows certain rules in translating the methods. For example, - * if the method in the service utility returns a {@link java.util.List}, that - * is translated to an array of {@link org.opencps.synctracking.model.SyncTrackingSoap}. - * If the method in the service utility returns a - * {@link org.opencps.synctracking.model.SyncTracking}, that is translated to a - * {@link org.opencps.synctracking.model.SyncTrackingSoap}. Methods that SOAP cannot - * safely wire are skipped. - *

- * - *

- * The benefits of using the SOAP utility is that it is cross platform - * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and - * even Perl, to call the generated services. One drawback of SOAP is that it is - * slow because it needs to serialize all calls into a text format (XML). - *

- * - *

- * You can see a list of services at http://localhost:8080/api/axis. Set the - * property axis.servlet.hosts.allowed in portal.properties to configure - * security. - *

- * - *

- * The SOAP utility is only generated for remote services. - *

- * - * @author Brian Wing Shun Chan - * @see SyncTrackingServiceHttp - * @see org.opencps.synctracking.model.SyncTrackingSoap - * @see org.opencps.synctracking.service.SyncTrackingServiceUtil - * @generated - */ -@ProviderType -public class SyncTrackingServiceSoap { -} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/impl/DossierTaxLocalServiceImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/impl/DossierTaxLocalServiceImpl.java new file mode 100644 index 0000000000..2855f9e0f6 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/impl/DossierTaxLocalServiceImpl.java @@ -0,0 +1,168 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.service.impl; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.Validator; +import org.opencps.auth.utils.APIDateTimeUtils; +import org.opencps.synctracking.model.DossierTax; +import org.opencps.synctracking.model.DossierTaxInput; +import org.opencps.synctracking.service.base.DossierTaxLocalServiceBaseImpl; + +import java.util.Date; +import java.util.List; + +/** + * The implementation of the dossier tax local service. + * + *

+ * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.synctracking.service.DossierTaxLocalService} interface. + * + *

+ * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM. + *

+ * + * @author Brian Wing Shun Chan + * @see DossierTaxLocalServiceBaseImpl + * @see org.opencps.synctracking.service.DossierTaxLocalServiceUtil + */ +public class DossierTaxLocalServiceImpl extends DossierTaxLocalServiceBaseImpl { + @Override + public DossierTax createDossierTaxManual(DossierTaxInput dossierTaxInput) { + long taxId = counterLocalService.increment(DossierTax.class.getName()); + Date now = new Date(); + DossierTax dossierTax = dossierTaxLocalService.createDossierTax(taxId); + dossierTax.setCreateDate(now); + dossierTax.setModifiedDate(now); + dossierTax.setGroupId(dossierTaxInput.groupId); + + + if(Validator.isNotNull(dossierTaxInput.dossierNo)) { + dossierTax.setDossierNo(dossierTaxInput.dossierNo); + } + + if(Validator.isNotNull(dossierTaxInput.maSoThue)) { + dossierTax.setMaSoThue(dossierTaxInput.maSoThue); + } + + if(Validator.isNotNull(dossierTaxInput.soQuyetDinh)) { + dossierTax.setSoQuyetDinh(dossierTaxInput.soQuyetDinh); + } + + if(Validator.isNotNull(dossierTaxInput.ngayQuyetDinh)) { + dossierTax.setNgayQuyetDinh(APIDateTimeUtils + .convertStringToDate(dossierTaxInput.ngayQuyetDinh, APIDateTimeUtils._NORMAL_PARTTERN)); + } + + if(Validator.isNotNull(dossierTaxInput.tenTieuMuc)) { + dossierTax.setTenTieuMuc(dossierTaxInput.tenTieuMuc); + } + + if(Validator.isNotNull(dossierTaxInput.soTien) && dossierTaxInput.soTien > 0) { + dossierTax.setSoTien(dossierTaxInput.soTien); + } + + if(Validator.isNotNull(dossierTaxInput.hoTenNguoiNopTien)) { + dossierTax.setHoTenNguoiNopTien(dossierTaxInput.hoTenNguoiNopTien); + } + + if(Validator.isNotNull(dossierTaxInput.soCmtNguoiNopTien)) { + dossierTax.setSoCmtNguoiNopTien(Integer.valueOf(dossierTaxInput.soCmtNguoiNopTien)); + } + + if(Validator.isNotNull(dossierTaxInput.diaChiNguoiNopTien)) { + dossierTax.setDiaChiNguoiNopTien(dossierTaxInput.diaChiNguoiNopTien); + } + + if(Validator.isNotNull(dossierTaxInput.tinhNguoiNopTien)) { + dossierTax.setTinhNguoiNopTien(dossierTaxInput.tinhNguoiNopTien); + } + + if(Validator.isNotNull(dossierTaxInput.huyenNguoiNopTien)) { + dossierTax.setHuyenNguoiNopTien(dossierTaxInput.huyenNguoiNopTien); + } + + if(Validator.isNotNull(dossierTaxInput.xaNguoiNopTien)) { + dossierTax.setXaNguoiNopTien(dossierTaxInput.xaNguoiNopTien); + } + + if(Validator.isNotNull(dossierTaxInput.xaNguoiNopTien)) { + dossierTax.setThoiGianThanhToan(APIDateTimeUtils.convertStringToDate(dossierTaxInput.thoiGianThanhToan, APIDateTimeUtils._NORMAL_DATE)); + } + + if(Validator.isNotNull(dossierTaxInput.xaNguoiNopTien)) { + dossierTax.setNgayNhanBienLai(APIDateTimeUtils.convertStringToDate(dossierTaxInput.ngayNhanBienLai, APIDateTimeUtils._NORMAL_DATE)); + } + + if(Validator.isNotNull(dossierTaxInput.xaNguoiNopTien)) { + dossierTax.setNgayThueTraThongBao(APIDateTimeUtils.convertStringToDate(dossierTaxInput.ngayThueTraThongBao, APIDateTimeUtils._NORMAL_DATE)); + } + + if(Validator.isNotNull(dossierTaxInput.xaNguoiNopTien)) { + dossierTax.setNgayTraThongBao(APIDateTimeUtils.convertStringToDate(dossierTaxInput.ngayTraThongBao, APIDateTimeUtils._NORMAL_DATE)); + } + + if(Validator.isNotNull(dossierTaxInput.xaNguoiNopTien)) { + dossierTax.setSoTienNop(Integer.valueOf(dossierTaxInput.soTienNop)); + } + + if(Validator.isNotNull(dossierTaxInput.xaNguoiNopTien)) { + dossierTax.setNoiDungThanhToan(dossierTaxInput.noiDungThanhToan); + } + + if(Validator.isNotNull(dossierTaxInput.xaNguoiNopTien)) { + dossierTax.setTrangThaiThanhToan(dossierTaxInput.trangThaiThanhToan); + } + + if(Validator.isNotNull(dossierTaxInput.statusTBT)) { + dossierTax.setStatusTBT(Integer.valueOf(dossierTaxInput.statusTBT)); + } + if(Validator.isNotNull(dossierTaxInput.statusCTT)) { + dossierTax.setStatusCTT(Integer.valueOf(dossierTaxInput.statusCTT)); + } + + dossierTaxPersistence.update(dossierTax); + return dossierTax; + } + + @Override + public List getByStatusTBT(int[] statuses, int start, int end, OrderByComparator orderByComparator) { + return dossierTaxPersistence.findByF_STATUS_TBT(statuses, start, end, orderByComparator); + } + + @Override + public List getByStatusCTT(int statusTBT, int statusCTT, int start, int end, OrderByComparator orderByComparator) { + return dossierTaxPersistence.findByF_STATUS_CTT(statusTBT, statusCTT, start, end, orderByComparator); + } + + @Override + public List getByDossierIdAndStatusTBT(String dossierNo, int statuses) { + return dossierTaxPersistence.findByF_DOSSIER_TBT(dossierNo, statuses); + } + + @Override + public List getByDossierIdAndStatusCTT(String dossierNo, int statuses) { + return dossierTaxPersistence.findByF_DOSSIER_CTT(dossierNo, statuses); + } + + @Override + public DossierTax fetchDossierTaxByDMS(String dossierNo, String maSoThue, String soQuyetDinh) { + return dossierTaxPersistence.fetchByF_DMS(dossierNo, maSoThue, soQuyetDinh); + } + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this class directly. Always use {@link org.opencps.synctracking.service.DossierTaxLocalServiceUtil} to access the dossier tax local service. + */ +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/impl/SyncTrackingLocalServiceImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/impl/SyncTrackingLocalServiceImpl.java index 84a179431a..11347632f9 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/impl/SyncTrackingLocalServiceImpl.java +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/impl/SyncTrackingLocalServiceImpl.java @@ -17,6 +17,7 @@ import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.util.Validator; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -109,9 +110,13 @@ public List getByReferenceUidAndDate(long groupId, String referenc // TODO Auto-generated method stub return syncTrackingPersistence.findByF_GID_REFERENCE_UID_CREATED_BETWEEN(groupId, referenceUid, fromDate, toDate, start, end); } - + + @Override + public SyncTracking getByDossierNoAndProtocol(long groupId, String dossierNo, String protocol) { + return syncTrackingPersistence.fetchByF_GID_DossierNo_Protocol(groupId,dossierNo, protocol); + } + public SyncTracking createSyncTrackingManual(SyncTrackingQuery syncTrackingQuery) { - System.out.println("SyncTrackingQuery: " + JSONFactoryUtil.looseSerialize(syncTrackingQuery)); long syncTrackingId = counterLocalService.increment(SyncTracking.class.getName()); Date now = new Date(); @@ -139,6 +144,14 @@ public SyncTracking createSyncTrackingManual(SyncTrackingQuery syncTrackingQuery syncTracking.setApi(syncTrackingQuery.api); } + if(Validator.isNotNull(syncTrackingQuery.protocol)) { + syncTracking.setProtocol(syncTrackingQuery.protocol); + } + + if(Validator.isNotNull(syncTrackingQuery.serverNo)) { + syncTracking.setServerNo(syncTrackingQuery.serverNo); + } + if(Validator.isNotNull(syncTrackingQuery.fromUnit)) { syncTracking.setFromUnit(syncTrackingQuery.fromUnit); } diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/impl/SyncTrackingServiceImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/impl/SyncTrackingServiceImpl.java deleted file mode 100644 index 16dddd1415..0000000000 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/impl/SyncTrackingServiceImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) 2000-present Liferay, Inc. All rights reserved. - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or (at your option) - * any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - */ - -package org.opencps.synctracking.service.impl; - -import org.opencps.synctracking.service.base.SyncTrackingServiceBaseImpl; - -/** - * The implementation of the sync tracking remote service. - * - *

- * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link org.opencps.synctracking.service.SyncTrackingService} interface. - * - *

- * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely. - *

- * - * @author Brian Wing Shun Chan - * @see SyncTrackingServiceBaseImpl - * @see org.opencps.synctracking.service.SyncTrackingServiceUtil - */ -public class SyncTrackingServiceImpl extends SyncTrackingServiceBaseImpl { - /* - * NOTE FOR DEVELOPERS: - * - * Never reference this class directly. Always use {@link org.opencps.synctracking.service.SyncTrackingServiceUtil} to access the sync tracking remote service. - */ -} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/persistence/impl/DossierTaxPersistenceImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/persistence/impl/DossierTaxPersistenceImpl.java new file mode 100644 index 0000000000..b6ae9a6c95 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/persistence/impl/DossierTaxPersistenceImpl.java @@ -0,0 +1,5294 @@ +/** + * Copyright (c) 2000-present Liferay, Inc. All rights reserved. + * + * This library is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 2.1 of the License, or (at your option) + * any later version. + * + * This library is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more + * details. + */ + +package org.opencps.synctracking.service.persistence.impl; + +import aQute.bnd.annotation.ProviderType; + +import com.liferay.portal.kernel.dao.orm.EntityCache; +import com.liferay.portal.kernel.dao.orm.FinderCache; +import com.liferay.portal.kernel.dao.orm.FinderPath; +import com.liferay.portal.kernel.dao.orm.Query; +import com.liferay.portal.kernel.dao.orm.QueryPos; +import com.liferay.portal.kernel.dao.orm.QueryUtil; +import com.liferay.portal.kernel.dao.orm.Session; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.service.ServiceContextThreadLocal; +import com.liferay.portal.kernel.service.persistence.CompanyProvider; +import com.liferay.portal.kernel.service.persistence.CompanyProviderWrapper; +import com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl; +import com.liferay.portal.kernel.util.ArrayUtil; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.SetUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.kernel.util.Validator; +import com.liferay.portal.kernel.uuid.PortalUUIDUtil; +import com.liferay.portal.spring.extender.service.ServiceReference; + +import org.opencps.synctracking.exception.NoSuchDossierTaxException; +import org.opencps.synctracking.model.DossierTax; +import org.opencps.synctracking.model.impl.DossierTaxImpl; +import org.opencps.synctracking.model.impl.DossierTaxModelImpl; +import org.opencps.synctracking.service.persistence.DossierTaxPersistence; + +import java.io.Serializable; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationHandler; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * The persistence implementation for the dossier tax service. + * + *

+ * Caching information and settings can be found in portal.properties + *

+ * + * @author duongnt + * @see DossierTaxPersistence + * @see org.opencps.synctracking.service.persistence.DossierTaxUtil + * @generated + */ +@ProviderType +public class DossierTaxPersistenceImpl extends BasePersistenceImpl + implements DossierTaxPersistence { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link DossierTaxUtil} to access the dossier tax persistence. Modify service.xml and rerun ServiceBuilder to regenerate this class. + */ + public static final String FINDER_CLASS_NAME_ENTITY = DossierTaxImpl.class.getName(); + public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List1"; + public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY + + ".List2"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]); + public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid", + new String[] { + String.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid", + new String[] { String.class.getName() }, + DossierTaxModelImpl.UUID_COLUMN_BITMASK | + DossierTaxModelImpl.CREATEDATE_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_UUID = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid", + new String[] { String.class.getName() }); + + /** + * Returns all the dossier taxs where uuid = ?. + * + * @param uuid the uuid + * @return the matching dossier taxs + */ + @Override + public List findByUuid(String uuid) { + return findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the dossier taxs where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + @Override + public List findByUuid(String uuid, int start, int end) { + return findByUuid(uuid, start, end, null); + } + + /** + * Returns an ordered range of all the dossier taxs where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + @Override + public List findByUuid(String uuid, int start, int end, + OrderByComparator orderByComparator) { + return findByUuid(uuid, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the dossier taxs where uuid = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + @Override + public List findByUuid(String uuid, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID; + finderArgs = new Object[] { uuid }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID; + finderArgs = new Object[] { uuid, start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (DossierTax dossierTax : list) { + if (!Objects.equals(uuid, dossierTax.getUuid())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(3 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(DossierTaxModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first dossier tax in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + @Override + public DossierTax findByUuid_First(String uuid, + OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByUuid_First(uuid, orderByComparator); + + if (dossierTax != null) { + return dossierTax; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append("}"); + + throw new NoSuchDossierTaxException(msg.toString()); + } + + /** + * Returns the first dossier tax in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByUuid_First(String uuid, + OrderByComparator orderByComparator) { + List list = findByUuid(uuid, 0, 1, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last dossier tax in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + @Override + public DossierTax findByUuid_Last(String uuid, + OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByUuid_Last(uuid, orderByComparator); + + if (dossierTax != null) { + return dossierTax; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append("}"); + + throw new NoSuchDossierTaxException(msg.toString()); + } + + /** + * Returns the last dossier tax in the ordered set where uuid = ?. + * + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByUuid_Last(String uuid, + OrderByComparator orderByComparator) { + int count = countByUuid(uuid); + + if (count == 0) { + return null; + } + + List list = findByUuid(uuid, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where uuid = ?. + * + * @param taxId the primary key of the current dossier tax + * @param uuid the uuid + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + @Override + public DossierTax[] findByUuid_PrevAndNext(long taxId, String uuid, + OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = findByPrimaryKey(taxId); + + Session session = null; + + try { + session = openSession(); + + DossierTax[] array = new DossierTaxImpl[3]; + + array[0] = getByUuid_PrevAndNext(session, dossierTax, uuid, + orderByComparator, true); + + array[1] = dossierTax; + + array[2] = getByUuid_PrevAndNext(session, dossierTax, uuid, + orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected DossierTax getByUuid_PrevAndNext(Session session, + DossierTax dossierTax, String uuid, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(DossierTaxModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(dossierTax); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the dossier taxs where uuid = ? from the database. + * + * @param uuid the uuid + */ + @Override + public void removeByUuid(String uuid) { + for (DossierTax dossierTax : findByUuid(uuid, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null)) { + remove(dossierTax); + } + } + + /** + * Returns the number of dossier taxs where uuid = ?. + * + * @param uuid the uuid + * @return the number of matching dossier taxs + */ + @Override + public int countByUuid(String uuid) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID; + + Object[] finderArgs = new Object[] { uuid }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_DOSSIERTAX_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_UUID_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_UUID_UUID_1 = "dossierTax.uuid IS NULL"; + private static final String _FINDER_COLUMN_UUID_UUID_2 = "dossierTax.uuid = ?"; + private static final String _FINDER_COLUMN_UUID_UUID_3 = "(dossierTax.uuid IS NULL OR dossierTax.uuid = '')"; + public static final FinderPath FINDER_PATH_FETCH_BY_UUID_G = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByUUID_G", + new String[] { String.class.getName(), Long.class.getName() }, + DossierTaxModelImpl.UUID_COLUMN_BITMASK | + DossierTaxModelImpl.GROUPID_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_UUID_G = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUUID_G", + new String[] { String.class.getName(), Long.class.getName() }); + + /** + * Returns the dossier tax where uuid = ? and groupId = ? or throws a {@link NoSuchDossierTaxException} if it could not be found. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + @Override + public DossierTax findByUUID_G(String uuid, long groupId) + throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByUUID_G(uuid, groupId); + + if (dossierTax == null) { + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append(", groupId="); + msg.append(groupId); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchDossierTaxException(msg.toString()); + } + + return dossierTax; + } + + /** + * Returns the dossier tax where uuid = ? and groupId = ? or returns null if it could not be found. Uses the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByUUID_G(String uuid, long groupId) { + return fetchByUUID_G(uuid, groupId, true); + } + + /** + * Returns the dossier tax where uuid = ? and groupId = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param uuid the uuid + * @param groupId the group ID + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByUUID_G(String uuid, long groupId, + boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { uuid, groupId }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_UUID_G, + finderArgs, this); + } + + if (result instanceof DossierTax) { + DossierTax dossierTax = (DossierTax)result; + + if (!Objects.equals(uuid, dossierTax.getUuid()) || + (groupId != dossierTax.getGroupId())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_G_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_G_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_G_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(groupId); + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, + finderArgs, list); + } + else { + DossierTax dossierTax = list.get(0); + + result = dossierTax; + + cacheResult(dossierTax); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (DossierTax)result; + } + } + + /** + * Removes the dossier tax where uuid = ? and groupId = ? from the database. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the dossier tax that was removed + */ + @Override + public DossierTax removeByUUID_G(String uuid, long groupId) + throws NoSuchDossierTaxException { + DossierTax dossierTax = findByUUID_G(uuid, groupId); + + return remove(dossierTax); + } + + /** + * Returns the number of dossier taxs where uuid = ? and groupId = ?. + * + * @param uuid the uuid + * @param groupId the group ID + * @return the number of matching dossier taxs + */ + @Override + public int countByUUID_G(String uuid, long groupId) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G; + + Object[] finderArgs = new Object[] { uuid, groupId }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_DOSSIERTAX_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_G_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_G_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_G_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_G_GROUPID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(groupId); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_UUID_G_UUID_1 = "dossierTax.uuid IS NULL AND "; + private static final String _FINDER_COLUMN_UUID_G_UUID_2 = "dossierTax.uuid = ? AND "; + private static final String _FINDER_COLUMN_UUID_G_UUID_3 = "(dossierTax.uuid IS NULL OR dossierTax.uuid = '') AND "; + private static final String _FINDER_COLUMN_UUID_G_GROUPID_2 = "dossierTax.groupId = ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByUuid_C", + new String[] { + String.class.getName(), Long.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C = + new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByUuid_C", + new String[] { String.class.getName(), Long.class.getName() }, + DossierTaxModelImpl.UUID_COLUMN_BITMASK | + DossierTaxModelImpl.COMPANYID_COLUMN_BITMASK | + DossierTaxModelImpl.CREATEDATE_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_UUID_C = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByUuid_C", + new String[] { String.class.getName(), Long.class.getName() }); + + /** + * Returns all the dossier taxs where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the matching dossier taxs + */ + @Override + public List findByUuid_C(String uuid, long companyId) { + return findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the dossier taxs where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + @Override + public List findByUuid_C(String uuid, long companyId, + int start, int end) { + return findByUuid_C(uuid, companyId, start, end, null); + } + + /** + * Returns an ordered range of all the dossier taxs where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + @Override + public List findByUuid_C(String uuid, long companyId, + int start, int end, OrderByComparator orderByComparator) { + return findByUuid_C(uuid, companyId, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the dossier taxs where uuid = ? and companyId = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param uuid the uuid + * @param companyId the company ID + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + @Override + public List findByUuid_C(String uuid, long companyId, + int start, int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C; + finderArgs = new Object[] { uuid, companyId }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_UUID_C; + finderArgs = new Object[] { + uuid, companyId, + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (DossierTax dossierTax : list) { + if (!Objects.equals(uuid, dossierTax.getUuid()) || + (companyId != dossierTax.getCompanyId())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_C_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_C_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_C_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(DossierTaxModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(companyId); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + @Override + public DossierTax findByUuid_C_First(String uuid, long companyId, + OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByUuid_C_First(uuid, companyId, + orderByComparator); + + if (dossierTax != null) { + return dossierTax; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append(", companyId="); + msg.append(companyId); + + msg.append("}"); + + throw new NoSuchDossierTaxException(msg.toString()); + } + + /** + * Returns the first dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByUuid_C_First(String uuid, long companyId, + OrderByComparator orderByComparator) { + List list = findByUuid_C(uuid, companyId, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + @Override + public DossierTax findByUuid_C_Last(String uuid, long companyId, + OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByUuid_C_Last(uuid, companyId, + orderByComparator); + + if (dossierTax != null) { + return dossierTax; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("uuid="); + msg.append(uuid); + + msg.append(", companyId="); + msg.append(companyId); + + msg.append("}"); + + throw new NoSuchDossierTaxException(msg.toString()); + } + + /** + * Returns the last dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByUuid_C_Last(String uuid, long companyId, + OrderByComparator orderByComparator) { + int count = countByUuid_C(uuid, companyId); + + if (count == 0) { + return null; + } + + List list = findByUuid_C(uuid, companyId, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where uuid = ? and companyId = ?. + * + * @param taxId the primary key of the current dossier tax + * @param uuid the uuid + * @param companyId the company ID + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + @Override + public DossierTax[] findByUuid_C_PrevAndNext(long taxId, String uuid, + long companyId, OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = findByPrimaryKey(taxId); + + Session session = null; + + try { + session = openSession(); + + DossierTax[] array = new DossierTaxImpl[3]; + + array[0] = getByUuid_C_PrevAndNext(session, dossierTax, uuid, + companyId, orderByComparator, true); + + array[1] = dossierTax; + + array[2] = getByUuid_C_PrevAndNext(session, dossierTax, uuid, + companyId, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected DossierTax getByUuid_C_PrevAndNext(Session session, + DossierTax dossierTax, String uuid, long companyId, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_C_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_C_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_C_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(DossierTaxModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(companyId); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(dossierTax); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the dossier taxs where uuid = ? and companyId = ? from the database. + * + * @param uuid the uuid + * @param companyId the company ID + */ + @Override + public void removeByUuid_C(String uuid, long companyId) { + for (DossierTax dossierTax : findByUuid_C(uuid, companyId, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(dossierTax); + } + } + + /** + * Returns the number of dossier taxs where uuid = ? and companyId = ?. + * + * @param uuid the uuid + * @param companyId the company ID + * @return the number of matching dossier taxs + */ + @Override + public int countByUuid_C(String uuid, long companyId) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C; + + Object[] finderArgs = new Object[] { uuid, companyId }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_DOSSIERTAX_WHERE); + + boolean bindUuid = false; + + if (uuid == null) { + query.append(_FINDER_COLUMN_UUID_C_UUID_1); + } + else if (uuid.equals("")) { + query.append(_FINDER_COLUMN_UUID_C_UUID_3); + } + else { + bindUuid = true; + + query.append(_FINDER_COLUMN_UUID_C_UUID_2); + } + + query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindUuid) { + qPos.add(uuid); + } + + qPos.add(companyId); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_UUID_C_UUID_1 = "dossierTax.uuid IS NULL AND "; + private static final String _FINDER_COLUMN_UUID_C_UUID_2 = "dossierTax.uuid = ? AND "; + private static final String _FINDER_COLUMN_UUID_C_UUID_3 = "(dossierTax.uuid IS NULL OR dossierTax.uuid = '') AND "; + private static final String _FINDER_COLUMN_UUID_C_COMPANYID_2 = "dossierTax.companyId = ?"; + public static final FinderPath FINDER_PATH_FETCH_BY_F_DMS = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByF_DMS", + new String[] { + String.class.getName(), String.class.getName(), + String.class.getName() + }, + DossierTaxModelImpl.DOSSIERNO_COLUMN_BITMASK | + DossierTaxModelImpl.MASOTHUE_COLUMN_BITMASK | + DossierTaxModelImpl.SOQUYETDINH_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_DMS = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByF_DMS", + new String[] { + String.class.getName(), String.class.getName(), + String.class.getName() + }); + + /** + * Returns the dossier tax where dossierNo = ? and maSoThue = ? and soQuyetDinh = ? or throws a {@link NoSuchDossierTaxException} if it could not be found. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @return the matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + @Override + public DossierTax findByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh) throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByF_DMS(dossierNo, maSoThue, soQuyetDinh); + + if (dossierTax == null) { + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("dossierNo="); + msg.append(dossierNo); + + msg.append(", maSoThue="); + msg.append(maSoThue); + + msg.append(", soQuyetDinh="); + msg.append(soQuyetDinh); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchDossierTaxException(msg.toString()); + } + + return dossierTax; + } + + /** + * Returns the dossier tax where dossierNo = ? and maSoThue = ? and soQuyetDinh = ? or returns null if it could not be found. Uses the finder cache. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh) { + return fetchByF_DMS(dossierNo, maSoThue, soQuyetDinh, true); + } + + /** + * Returns the dossier tax where dossierNo = ? and maSoThue = ? and soQuyetDinh = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh, boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { dossierNo, maSoThue, soQuyetDinh }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_F_DMS, + finderArgs, this); + } + + if (result instanceof DossierTax) { + DossierTax dossierTax = (DossierTax)result; + + if (!Objects.equals(dossierNo, dossierTax.getDossierNo()) || + !Objects.equals(maSoThue, dossierTax.getMaSoThue()) || + !Objects.equals(soQuyetDinh, dossierTax.getSoQuyetDinh())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(5); + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_DMS_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_DMS_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_DMS_DOSSIERNO_2); + } + + boolean bindMaSoThue = false; + + if (maSoThue == null) { + query.append(_FINDER_COLUMN_F_DMS_MASOTHUE_1); + } + else if (maSoThue.equals("")) { + query.append(_FINDER_COLUMN_F_DMS_MASOTHUE_3); + } + else { + bindMaSoThue = true; + + query.append(_FINDER_COLUMN_F_DMS_MASOTHUE_2); + } + + boolean bindSoQuyetDinh = false; + + if (soQuyetDinh == null) { + query.append(_FINDER_COLUMN_F_DMS_SOQUYETDINH_1); + } + else if (soQuyetDinh.equals("")) { + query.append(_FINDER_COLUMN_F_DMS_SOQUYETDINH_3); + } + else { + bindSoQuyetDinh = true; + + query.append(_FINDER_COLUMN_F_DMS_SOQUYETDINH_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindMaSoThue) { + qPos.add(maSoThue); + } + + if (bindSoQuyetDinh) { + qPos.add(soQuyetDinh); + } + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_F_DMS, + finderArgs, list); + } + else { + if (list.size() > 1) { + Collections.sort(list, Collections.reverseOrder()); + + if (_log.isWarnEnabled()) { + _log.warn( + "DossierTaxPersistenceImpl.fetchByF_DMS(String, String, String, boolean) with parameters (" + + StringUtil.merge(finderArgs) + + ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); + } + } + + DossierTax dossierTax = list.get(0); + + result = dossierTax; + + cacheResult(dossierTax); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_DMS, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (DossierTax)result; + } + } + + /** + * Removes the dossier tax where dossierNo = ? and maSoThue = ? and soQuyetDinh = ? from the database. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @return the dossier tax that was removed + */ + @Override + public DossierTax removeByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh) throws NoSuchDossierTaxException { + DossierTax dossierTax = findByF_DMS(dossierNo, maSoThue, soQuyetDinh); + + return remove(dossierTax); + } + + /** + * Returns the number of dossier taxs where dossierNo = ? and maSoThue = ? and soQuyetDinh = ?. + * + * @param dossierNo the dossier no + * @param maSoThue the ma so thue + * @param soQuyetDinh the so quyet dinh + * @return the number of matching dossier taxs + */ + @Override + public int countByF_DMS(String dossierNo, String maSoThue, + String soQuyetDinh) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_DMS; + + Object[] finderArgs = new Object[] { dossierNo, maSoThue, soQuyetDinh }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_COUNT_DOSSIERTAX_WHERE); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_DMS_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_DMS_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_DMS_DOSSIERNO_2); + } + + boolean bindMaSoThue = false; + + if (maSoThue == null) { + query.append(_FINDER_COLUMN_F_DMS_MASOTHUE_1); + } + else if (maSoThue.equals("")) { + query.append(_FINDER_COLUMN_F_DMS_MASOTHUE_3); + } + else { + bindMaSoThue = true; + + query.append(_FINDER_COLUMN_F_DMS_MASOTHUE_2); + } + + boolean bindSoQuyetDinh = false; + + if (soQuyetDinh == null) { + query.append(_FINDER_COLUMN_F_DMS_SOQUYETDINH_1); + } + else if (soQuyetDinh.equals("")) { + query.append(_FINDER_COLUMN_F_DMS_SOQUYETDINH_3); + } + else { + bindSoQuyetDinh = true; + + query.append(_FINDER_COLUMN_F_DMS_SOQUYETDINH_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindMaSoThue) { + qPos.add(maSoThue); + } + + if (bindSoQuyetDinh) { + qPos.add(soQuyetDinh); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_DMS_DOSSIERNO_1 = "dossierTax.dossierNo IS NULL AND "; + private static final String _FINDER_COLUMN_F_DMS_DOSSIERNO_2 = "dossierTax.dossierNo = ? AND "; + private static final String _FINDER_COLUMN_F_DMS_DOSSIERNO_3 = "(dossierTax.dossierNo IS NULL OR dossierTax.dossierNo = '') AND "; + private static final String _FINDER_COLUMN_F_DMS_MASOTHUE_1 = "dossierTax.maSoThue IS NULL AND "; + private static final String _FINDER_COLUMN_F_DMS_MASOTHUE_2 = "dossierTax.maSoThue = ? AND "; + private static final String _FINDER_COLUMN_F_DMS_MASOTHUE_3 = "(dossierTax.maSoThue IS NULL OR dossierTax.maSoThue = '') AND "; + private static final String _FINDER_COLUMN_F_DMS_SOQUYETDINH_1 = "dossierTax.soQuyetDinh IS NULL"; + private static final String _FINDER_COLUMN_F_DMS_SOQUYETDINH_2 = "dossierTax.soQuyetDinh = ?"; + private static final String _FINDER_COLUMN_F_DMS_SOQUYETDINH_3 = "(dossierTax.soQuyetDinh IS NULL OR dossierTax.soQuyetDinh = '')"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_STATUS_TBT = + new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByF_STATUS_TBT", + new String[] { + Integer.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_STATUS_TBT = + new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByF_STATUS_TBT", + new String[] { Integer.class.getName() }, + DossierTaxModelImpl.STATUSTBT_COLUMN_BITMASK | + DossierTaxModelImpl.CREATEDATE_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_STATUS_TBT = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByF_STATUS_TBT", + new String[] { Integer.class.getName() }); + public static final FinderPath FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_STATUS_TBT = + new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "countByF_STATUS_TBT", + new String[] { Integer.class.getName() }); + + /** + * Returns all the dossier taxs where statusTBT = ?. + * + * @param statusTBT the status tbt + * @return the matching dossier taxs + */ + @Override + public List findByF_STATUS_TBT(int statusTBT) { + return findByF_STATUS_TBT(statusTBT, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the dossier taxs where statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + @Override + public List findByF_STATUS_TBT(int statusTBT, int start, int end) { + return findByF_STATUS_TBT(statusTBT, start, end, null); + } + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + @Override + public List findByF_STATUS_TBT(int statusTBT, int start, + int end, OrderByComparator orderByComparator) { + return findByF_STATUS_TBT(statusTBT, start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + @Override + public List findByF_STATUS_TBT(int statusTBT, int start, + int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_STATUS_TBT; + finderArgs = new Object[] { statusTBT }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_STATUS_TBT; + finderArgs = new Object[] { statusTBT, start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (DossierTax dossierTax : list) { + if ((statusTBT != dossierTax.getStatusTBT())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(3 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + query.append(_FINDER_COLUMN_F_STATUS_TBT_STATUSTBT_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(DossierTaxModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(statusTBT); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first dossier tax in the ordered set where statusTBT = ?. + * + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + @Override + public DossierTax findByF_STATUS_TBT_First(int statusTBT, + OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByF_STATUS_TBT_First(statusTBT, + orderByComparator); + + if (dossierTax != null) { + return dossierTax; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("statusTBT="); + msg.append(statusTBT); + + msg.append("}"); + + throw new NoSuchDossierTaxException(msg.toString()); + } + + /** + * Returns the first dossier tax in the ordered set where statusTBT = ?. + * + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByF_STATUS_TBT_First(int statusTBT, + OrderByComparator orderByComparator) { + List list = findByF_STATUS_TBT(statusTBT, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last dossier tax in the ordered set where statusTBT = ?. + * + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + @Override + public DossierTax findByF_STATUS_TBT_Last(int statusTBT, + OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByF_STATUS_TBT_Last(statusTBT, + orderByComparator); + + if (dossierTax != null) { + return dossierTax; + } + + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("statusTBT="); + msg.append(statusTBT); + + msg.append("}"); + + throw new NoSuchDossierTaxException(msg.toString()); + } + + /** + * Returns the last dossier tax in the ordered set where statusTBT = ?. + * + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByF_STATUS_TBT_Last(int statusTBT, + OrderByComparator orderByComparator) { + int count = countByF_STATUS_TBT(statusTBT); + + if (count == 0) { + return null; + } + + List list = findByF_STATUS_TBT(statusTBT, count - 1, count, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where statusTBT = ?. + * + * @param taxId the primary key of the current dossier tax + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + @Override + public DossierTax[] findByF_STATUS_TBT_PrevAndNext(long taxId, + int statusTBT, OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = findByPrimaryKey(taxId); + + Session session = null; + + try { + session = openSession(); + + DossierTax[] array = new DossierTaxImpl[3]; + + array[0] = getByF_STATUS_TBT_PrevAndNext(session, dossierTax, + statusTBT, orderByComparator, true); + + array[1] = dossierTax; + + array[2] = getByF_STATUS_TBT_PrevAndNext(session, dossierTax, + statusTBT, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected DossierTax getByF_STATUS_TBT_PrevAndNext(Session session, + DossierTax dossierTax, int statusTBT, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(3); + } + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + query.append(_FINDER_COLUMN_F_STATUS_TBT_STATUSTBT_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(DossierTaxModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(statusTBT); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(dossierTax); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Returns all the dossier taxs where statusTBT = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBTs the status tbts + * @return the matching dossier taxs + */ + @Override + public List findByF_STATUS_TBT(int[] statusTBTs) { + return findByF_STATUS_TBT(statusTBTs, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the dossier taxs where statusTBT = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBTs the status tbts + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + @Override + public List findByF_STATUS_TBT(int[] statusTBTs, int start, + int end) { + return findByF_STATUS_TBT(statusTBTs, start, end, null); + } + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = any ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBTs the status tbts + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + @Override + public List findByF_STATUS_TBT(int[] statusTBTs, int start, + int end, OrderByComparator orderByComparator) { + return findByF_STATUS_TBT(statusTBTs, start, end, orderByComparator, + true); + } + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ?, optionally using the finder cache. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + @Override + public List findByF_STATUS_TBT(int[] statusTBTs, int start, + int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + if (statusTBTs == null) { + statusTBTs = new int[0]; + } + else if (statusTBTs.length > 1) { + statusTBTs = ArrayUtil.unique(statusTBTs); + + Arrays.sort(statusTBTs); + } + + if (statusTBTs.length == 1) { + return findByF_STATUS_TBT(statusTBTs[0], start, end, + orderByComparator); + } + + boolean pagination = true; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderArgs = new Object[] { StringUtil.merge(statusTBTs) }; + } + else { + finderArgs = new Object[] { + StringUtil.merge(statusTBTs), + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_F_STATUS_TBT, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (DossierTax dossierTax : list) { + if (!ArrayUtil.contains(statusTBTs, + dossierTax.getStatusTBT())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = new StringBundler(); + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + if (statusTBTs.length > 0) { + query.append("("); + + query.append(_FINDER_COLUMN_F_STATUS_TBT_STATUSTBT_7); + + query.append(StringUtil.merge(statusTBTs)); + + query.append(")"); + + query.append(")"); + } + + query.setStringAt(removeConjunction(query.stringAt(query.index() - + 1)), query.index() - 1); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(DossierTaxModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_F_STATUS_TBT, + finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_F_STATUS_TBT, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Removes all the dossier taxs where statusTBT = ? from the database. + * + * @param statusTBT the status tbt + */ + @Override + public void removeByF_STATUS_TBT(int statusTBT) { + for (DossierTax dossierTax : findByF_STATUS_TBT(statusTBT, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(dossierTax); + } + } + + /** + * Returns the number of dossier taxs where statusTBT = ?. + * + * @param statusTBT the status tbt + * @return the number of matching dossier taxs + */ + @Override + public int countByF_STATUS_TBT(int statusTBT) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_STATUS_TBT; + + Object[] finderArgs = new Object[] { statusTBT }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(2); + + query.append(_SQL_COUNT_DOSSIERTAX_WHERE); + + query.append(_FINDER_COLUMN_F_STATUS_TBT_STATUSTBT_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(statusTBT); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + /** + * Returns the number of dossier taxs where statusTBT = any ?. + * + * @param statusTBTs the status tbts + * @return the number of matching dossier taxs + */ + @Override + public int countByF_STATUS_TBT(int[] statusTBTs) { + if (statusTBTs == null) { + statusTBTs = new int[0]; + } + else if (statusTBTs.length > 1) { + statusTBTs = ArrayUtil.unique(statusTBTs); + + Arrays.sort(statusTBTs); + } + + Object[] finderArgs = new Object[] { StringUtil.merge(statusTBTs) }; + + Long count = (Long)finderCache.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_STATUS_TBT, + finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(); + + query.append(_SQL_COUNT_DOSSIERTAX_WHERE); + + if (statusTBTs.length > 0) { + query.append("("); + + query.append(_FINDER_COLUMN_F_STATUS_TBT_STATUSTBT_7); + + query.append(StringUtil.merge(statusTBTs)); + + query.append(")"); + + query.append(")"); + } + + query.setStringAt(removeConjunction(query.stringAt(query.index() - + 1)), query.index() - 1); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_STATUS_TBT, + finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_F_STATUS_TBT, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_STATUS_TBT_STATUSTBT_2 = "dossierTax.statusTBT = ?"; + private static final String _FINDER_COLUMN_F_STATUS_TBT_STATUSTBT_7 = "dossierTax.statusTBT IN ("; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_STATUS_CTT = + new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByF_STATUS_CTT", + new String[] { + Integer.class.getName(), Integer.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_STATUS_CTT = + new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByF_STATUS_CTT", + new String[] { Integer.class.getName(), Integer.class.getName() }, + DossierTaxModelImpl.STATUSTBT_COLUMN_BITMASK | + DossierTaxModelImpl.STATUSCTT_COLUMN_BITMASK | + DossierTaxModelImpl.CREATEDATE_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_STATUS_CTT = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByF_STATUS_CTT", + new String[] { Integer.class.getName(), Integer.class.getName() }); + + /** + * Returns all the dossier taxs where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @return the matching dossier taxs + */ + @Override + public List findByF_STATUS_CTT(int statusTBT, int statusCTT) { + return findByF_STATUS_CTT(statusTBT, statusCTT, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the dossier taxs where statusTBT = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + @Override + public List findByF_STATUS_CTT(int statusTBT, int statusCTT, + int start, int end) { + return findByF_STATUS_CTT(statusTBT, statusCTT, start, end, null); + } + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + @Override + public List findByF_STATUS_CTT(int statusTBT, int statusCTT, + int start, int end, OrderByComparator orderByComparator) { + return findByF_STATUS_CTT(statusTBT, statusCTT, start, end, + orderByComparator, true); + } + + /** + * Returns an ordered range of all the dossier taxs where statusTBT = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + @Override + public List findByF_STATUS_CTT(int statusTBT, int statusCTT, + int start, int end, OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_STATUS_CTT; + finderArgs = new Object[] { statusTBT, statusCTT }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_STATUS_CTT; + finderArgs = new Object[] { + statusTBT, statusCTT, + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (DossierTax dossierTax : list) { + if ((statusTBT != dossierTax.getStatusTBT()) || + (statusCTT != dossierTax.getStatusCTT())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + query.append(_FINDER_COLUMN_F_STATUS_CTT_STATUSTBT_2); + + query.append(_FINDER_COLUMN_F_STATUS_CTT_STATUSCTT_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(DossierTaxModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(statusTBT); + + qPos.add(statusCTT); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + @Override + public DossierTax findByF_STATUS_CTT_First(int statusTBT, int statusCTT, + OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByF_STATUS_CTT_First(statusTBT, statusCTT, + orderByComparator); + + if (dossierTax != null) { + return dossierTax; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("statusTBT="); + msg.append(statusTBT); + + msg.append(", statusCTT="); + msg.append(statusCTT); + + msg.append("}"); + + throw new NoSuchDossierTaxException(msg.toString()); + } + + /** + * Returns the first dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByF_STATUS_CTT_First(int statusTBT, int statusCTT, + OrderByComparator orderByComparator) { + List list = findByF_STATUS_CTT(statusTBT, statusCTT, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + @Override + public DossierTax findByF_STATUS_CTT_Last(int statusTBT, int statusCTT, + OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByF_STATUS_CTT_Last(statusTBT, statusCTT, + orderByComparator); + + if (dossierTax != null) { + return dossierTax; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("statusTBT="); + msg.append(statusTBT); + + msg.append(", statusCTT="); + msg.append(statusCTT); + + msg.append("}"); + + throw new NoSuchDossierTaxException(msg.toString()); + } + + /** + * Returns the last dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByF_STATUS_CTT_Last(int statusTBT, int statusCTT, + OrderByComparator orderByComparator) { + int count = countByF_STATUS_CTT(statusTBT, statusCTT); + + if (count == 0) { + return null; + } + + List list = findByF_STATUS_CTT(statusTBT, statusCTT, + count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where statusTBT = ? and statusCTT = ?. + * + * @param taxId the primary key of the current dossier tax + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + @Override + public DossierTax[] findByF_STATUS_CTT_PrevAndNext(long taxId, + int statusTBT, int statusCTT, + OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = findByPrimaryKey(taxId); + + Session session = null; + + try { + session = openSession(); + + DossierTax[] array = new DossierTaxImpl[3]; + + array[0] = getByF_STATUS_CTT_PrevAndNext(session, dossierTax, + statusTBT, statusCTT, orderByComparator, true); + + array[1] = dossierTax; + + array[2] = getByF_STATUS_CTT_PrevAndNext(session, dossierTax, + statusTBT, statusCTT, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected DossierTax getByF_STATUS_CTT_PrevAndNext(Session session, + DossierTax dossierTax, int statusTBT, int statusCTT, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + query.append(_FINDER_COLUMN_F_STATUS_CTT_STATUSTBT_2); + + query.append(_FINDER_COLUMN_F_STATUS_CTT_STATUSCTT_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(DossierTaxModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(statusTBT); + + qPos.add(statusCTT); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(dossierTax); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the dossier taxs where statusTBT = ? and statusCTT = ? from the database. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + */ + @Override + public void removeByF_STATUS_CTT(int statusTBT, int statusCTT) { + for (DossierTax dossierTax : findByF_STATUS_CTT(statusTBT, statusCTT, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(dossierTax); + } + } + + /** + * Returns the number of dossier taxs where statusTBT = ? and statusCTT = ?. + * + * @param statusTBT the status tbt + * @param statusCTT the status ctt + * @return the number of matching dossier taxs + */ + @Override + public int countByF_STATUS_CTT(int statusTBT, int statusCTT) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_STATUS_CTT; + + Object[] finderArgs = new Object[] { statusTBT, statusCTT }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_DOSSIERTAX_WHERE); + + query.append(_FINDER_COLUMN_F_STATUS_CTT_STATUSTBT_2); + + query.append(_FINDER_COLUMN_F_STATUS_CTT_STATUSCTT_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(statusTBT); + + qPos.add(statusCTT); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_STATUS_CTT_STATUSTBT_2 = "dossierTax.statusTBT = ? AND "; + private static final String _FINDER_COLUMN_F_STATUS_CTT_STATUSCTT_2 = "dossierTax.statusCTT = ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_DOSSIER_TBT = + new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByF_DOSSIER_TBT", + new String[] { + String.class.getName(), Integer.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_DOSSIER_TBT = + new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByF_DOSSIER_TBT", + new String[] { String.class.getName(), Integer.class.getName() }, + DossierTaxModelImpl.DOSSIERNO_COLUMN_BITMASK | + DossierTaxModelImpl.STATUSTBT_COLUMN_BITMASK | + DossierTaxModelImpl.CREATEDATE_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_DOSSIER_TBT = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByF_DOSSIER_TBT", + new String[] { String.class.getName(), Integer.class.getName() }); + + /** + * Returns all the dossier taxs where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @return the matching dossier taxs + */ + @Override + public List findByF_DOSSIER_TBT(String dossierNo, int statusTBT) { + return findByF_DOSSIER_TBT(dossierNo, statusTBT, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the dossier taxs where dossierNo = ? and statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + @Override + public List findByF_DOSSIER_TBT(String dossierNo, + int statusTBT, int start, int end) { + return findByF_DOSSIER_TBT(dossierNo, statusTBT, start, end, null); + } + + /** + * Returns an ordered range of all the dossier taxs where dossierNo = ? and statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + @Override + public List findByF_DOSSIER_TBT(String dossierNo, + int statusTBT, int start, int end, + OrderByComparator orderByComparator) { + return findByF_DOSSIER_TBT(dossierNo, statusTBT, start, end, + orderByComparator, true); + } + + /** + * Returns an ordered range of all the dossier taxs where dossierNo = ? and statusTBT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + @Override + public List findByF_DOSSIER_TBT(String dossierNo, + int statusTBT, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_DOSSIER_TBT; + finderArgs = new Object[] { dossierNo, statusTBT }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_DOSSIER_TBT; + finderArgs = new Object[] { + dossierNo, statusTBT, + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (DossierTax dossierTax : list) { + if (!Objects.equals(dossierNo, dossierTax.getDossierNo()) || + (statusTBT != dossierTax.getStatusTBT())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_DOSSIER_TBT_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_DOSSIER_TBT_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_DOSSIER_TBT_DOSSIERNO_2); + } + + query.append(_FINDER_COLUMN_F_DOSSIER_TBT_STATUSTBT_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(DossierTaxModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + qPos.add(statusTBT); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + @Override + public DossierTax findByF_DOSSIER_TBT_First(String dossierNo, + int statusTBT, OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByF_DOSSIER_TBT_First(dossierNo, + statusTBT, orderByComparator); + + if (dossierTax != null) { + return dossierTax; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("dossierNo="); + msg.append(dossierNo); + + msg.append(", statusTBT="); + msg.append(statusTBT); + + msg.append("}"); + + throw new NoSuchDossierTaxException(msg.toString()); + } + + /** + * Returns the first dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByF_DOSSIER_TBT_First(String dossierNo, + int statusTBT, OrderByComparator orderByComparator) { + List list = findByF_DOSSIER_TBT(dossierNo, statusTBT, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + @Override + public DossierTax findByF_DOSSIER_TBT_Last(String dossierNo, int statusTBT, + OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByF_DOSSIER_TBT_Last(dossierNo, statusTBT, + orderByComparator); + + if (dossierTax != null) { + return dossierTax; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("dossierNo="); + msg.append(dossierNo); + + msg.append(", statusTBT="); + msg.append(statusTBT); + + msg.append("}"); + + throw new NoSuchDossierTaxException(msg.toString()); + } + + /** + * Returns the last dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByF_DOSSIER_TBT_Last(String dossierNo, + int statusTBT, OrderByComparator orderByComparator) { + int count = countByF_DOSSIER_TBT(dossierNo, statusTBT); + + if (count == 0) { + return null; + } + + List list = findByF_DOSSIER_TBT(dossierNo, statusTBT, + count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where dossierNo = ? and statusTBT = ?. + * + * @param taxId the primary key of the current dossier tax + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + @Override + public DossierTax[] findByF_DOSSIER_TBT_PrevAndNext(long taxId, + String dossierNo, int statusTBT, + OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = findByPrimaryKey(taxId); + + Session session = null; + + try { + session = openSession(); + + DossierTax[] array = new DossierTaxImpl[3]; + + array[0] = getByF_DOSSIER_TBT_PrevAndNext(session, dossierTax, + dossierNo, statusTBT, orderByComparator, true); + + array[1] = dossierTax; + + array[2] = getByF_DOSSIER_TBT_PrevAndNext(session, dossierTax, + dossierNo, statusTBT, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected DossierTax getByF_DOSSIER_TBT_PrevAndNext(Session session, + DossierTax dossierTax, String dossierNo, int statusTBT, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_DOSSIER_TBT_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_DOSSIER_TBT_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_DOSSIER_TBT_DOSSIERNO_2); + } + + query.append(_FINDER_COLUMN_F_DOSSIER_TBT_STATUSTBT_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(DossierTaxModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + qPos.add(statusTBT); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(dossierTax); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the dossier taxs where dossierNo = ? and statusTBT = ? from the database. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + */ + @Override + public void removeByF_DOSSIER_TBT(String dossierNo, int statusTBT) { + for (DossierTax dossierTax : findByF_DOSSIER_TBT(dossierNo, statusTBT, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(dossierTax); + } + } + + /** + * Returns the number of dossier taxs where dossierNo = ? and statusTBT = ?. + * + * @param dossierNo the dossier no + * @param statusTBT the status tbt + * @return the number of matching dossier taxs + */ + @Override + public int countByF_DOSSIER_TBT(String dossierNo, int statusTBT) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_DOSSIER_TBT; + + Object[] finderArgs = new Object[] { dossierNo, statusTBT }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_DOSSIERTAX_WHERE); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_DOSSIER_TBT_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_DOSSIER_TBT_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_DOSSIER_TBT_DOSSIERNO_2); + } + + query.append(_FINDER_COLUMN_F_DOSSIER_TBT_STATUSTBT_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + qPos.add(statusTBT); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_DOSSIER_TBT_DOSSIERNO_1 = "dossierTax.dossierNo IS NULL AND "; + private static final String _FINDER_COLUMN_F_DOSSIER_TBT_DOSSIERNO_2 = "dossierTax.dossierNo = ? AND "; + private static final String _FINDER_COLUMN_F_DOSSIER_TBT_DOSSIERNO_3 = "(dossierTax.dossierNo IS NULL OR dossierTax.dossierNo = '') AND "; + private static final String _FINDER_COLUMN_F_DOSSIER_TBT_STATUSTBT_2 = "dossierTax.statusTBT = ?"; + public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_DOSSIER_CTT = + new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findByF_DOSSIER_CTT", + new String[] { + String.class.getName(), Integer.class.getName(), + + Integer.class.getName(), Integer.class.getName(), + OrderByComparator.class.getName() + }); + public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_DOSSIER_CTT = + new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, DossierTaxImpl.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findByF_DOSSIER_CTT", + new String[] { String.class.getName(), Integer.class.getName() }, + DossierTaxModelImpl.DOSSIERNO_COLUMN_BITMASK | + DossierTaxModelImpl.STATUSCTT_COLUMN_BITMASK | + DossierTaxModelImpl.CREATEDATE_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_DOSSIER_CTT = new FinderPath(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByF_DOSSIER_CTT", + new String[] { String.class.getName(), Integer.class.getName() }); + + /** + * Returns all the dossier taxs where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @return the matching dossier taxs + */ + @Override + public List findByF_DOSSIER_CTT(String dossierNo, int statusCTT) { + return findByF_DOSSIER_CTT(dossierNo, statusCTT, QueryUtil.ALL_POS, + QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the dossier taxs where dossierNo = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of matching dossier taxs + */ + @Override + public List findByF_DOSSIER_CTT(String dossierNo, + int statusCTT, int start, int end) { + return findByF_DOSSIER_CTT(dossierNo, statusCTT, start, end, null); + } + + /** + * Returns an ordered range of all the dossier taxs where dossierNo = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of matching dossier taxs + */ + @Override + public List findByF_DOSSIER_CTT(String dossierNo, + int statusCTT, int start, int end, + OrderByComparator orderByComparator) { + return findByF_DOSSIER_CTT(dossierNo, statusCTT, start, end, + orderByComparator, true); + } + + /** + * Returns an ordered range of all the dossier taxs where dossierNo = ? and statusCTT = ?. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of matching dossier taxs + */ + @Override + public List findByF_DOSSIER_CTT(String dossierNo, + int statusCTT, int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_DOSSIER_CTT; + finderArgs = new Object[] { dossierNo, statusCTT }; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_F_DOSSIER_CTT; + finderArgs = new Object[] { + dossierNo, statusCTT, + + start, end, orderByComparator + }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + + if ((list != null) && !list.isEmpty()) { + for (DossierTax dossierTax : list) { + if (!Objects.equals(dossierNo, dossierTax.getDossierNo()) || + (statusCTT != dossierTax.getStatusCTT())) { + list = null; + + break; + } + } + } + } + + if (list == null) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(4 + + (orderByComparator.getOrderByFields().length * 2)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_DOSSIER_CTT_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_DOSSIER_CTT_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_DOSSIER_CTT_DOSSIERNO_2); + } + + query.append(_FINDER_COLUMN_F_DOSSIER_CTT_STATUSCTT_2); + + if (orderByComparator != null) { + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + } + else + if (pagination) { + query.append(DossierTaxModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + qPos.add(statusCTT); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Returns the first dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + @Override + public DossierTax findByF_DOSSIER_CTT_First(String dossierNo, + int statusCTT, OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByF_DOSSIER_CTT_First(dossierNo, + statusCTT, orderByComparator); + + if (dossierTax != null) { + return dossierTax; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("dossierNo="); + msg.append(dossierNo); + + msg.append(", statusCTT="); + msg.append(statusCTT); + + msg.append("}"); + + throw new NoSuchDossierTaxException(msg.toString()); + } + + /** + * Returns the first dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the first matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByF_DOSSIER_CTT_First(String dossierNo, + int statusCTT, OrderByComparator orderByComparator) { + List list = findByF_DOSSIER_CTT(dossierNo, statusCTT, 0, 1, + orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the last dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax + * @throws NoSuchDossierTaxException if a matching dossier tax could not be found + */ + @Override + public DossierTax findByF_DOSSIER_CTT_Last(String dossierNo, int statusCTT, + OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByF_DOSSIER_CTT_Last(dossierNo, statusCTT, + orderByComparator); + + if (dossierTax != null) { + return dossierTax; + } + + StringBundler msg = new StringBundler(6); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("dossierNo="); + msg.append(dossierNo); + + msg.append(", statusCTT="); + msg.append(statusCTT); + + msg.append("}"); + + throw new NoSuchDossierTaxException(msg.toString()); + } + + /** + * Returns the last dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the last matching dossier tax, or null if a matching dossier tax could not be found + */ + @Override + public DossierTax fetchByF_DOSSIER_CTT_Last(String dossierNo, + int statusCTT, OrderByComparator orderByComparator) { + int count = countByF_DOSSIER_CTT(dossierNo, statusCTT); + + if (count == 0) { + return null; + } + + List list = findByF_DOSSIER_CTT(dossierNo, statusCTT, + count - 1, count, orderByComparator); + + if (!list.isEmpty()) { + return list.get(0); + } + + return null; + } + + /** + * Returns the dossier taxs before and after the current dossier tax in the ordered set where dossierNo = ? and statusCTT = ?. + * + * @param taxId the primary key of the current dossier tax + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @param orderByComparator the comparator to order the set by (optionally null) + * @return the previous, current, and next dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + @Override + public DossierTax[] findByF_DOSSIER_CTT_PrevAndNext(long taxId, + String dossierNo, int statusCTT, + OrderByComparator orderByComparator) + throws NoSuchDossierTaxException { + DossierTax dossierTax = findByPrimaryKey(taxId); + + Session session = null; + + try { + session = openSession(); + + DossierTax[] array = new DossierTaxImpl[3]; + + array[0] = getByF_DOSSIER_CTT_PrevAndNext(session, dossierTax, + dossierNo, statusCTT, orderByComparator, true); + + array[1] = dossierTax; + + array[2] = getByF_DOSSIER_CTT_PrevAndNext(session, dossierTax, + dossierNo, statusCTT, orderByComparator, false); + + return array; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + protected DossierTax getByF_DOSSIER_CTT_PrevAndNext(Session session, + DossierTax dossierTax, String dossierNo, int statusCTT, + OrderByComparator orderByComparator, boolean previous) { + StringBundler query = null; + + if (orderByComparator != null) { + query = new StringBundler(5 + + (orderByComparator.getOrderByConditionFields().length * 3) + + (orderByComparator.getOrderByFields().length * 3)); + } + else { + query = new StringBundler(4); + } + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_DOSSIER_CTT_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_DOSSIER_CTT_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_DOSSIER_CTT_DOSSIERNO_2); + } + + query.append(_FINDER_COLUMN_F_DOSSIER_CTT_STATUSCTT_2); + + if (orderByComparator != null) { + String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); + + if (orderByConditionFields.length > 0) { + query.append(WHERE_AND); + } + + for (int i = 0; i < orderByConditionFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByConditionFields[i]); + + if ((i + 1) < orderByConditionFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN_HAS_NEXT); + } + else { + query.append(WHERE_LESSER_THAN_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(WHERE_GREATER_THAN); + } + else { + query.append(WHERE_LESSER_THAN); + } + } + } + + query.append(ORDER_BY_CLAUSE); + + String[] orderByFields = orderByComparator.getOrderByFields(); + + for (int i = 0; i < orderByFields.length; i++) { + query.append(_ORDER_BY_ENTITY_ALIAS); + query.append(orderByFields[i]); + + if ((i + 1) < orderByFields.length) { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC_HAS_NEXT); + } + else { + query.append(ORDER_BY_DESC_HAS_NEXT); + } + } + else { + if (orderByComparator.isAscending() ^ previous) { + query.append(ORDER_BY_ASC); + } + else { + query.append(ORDER_BY_DESC); + } + } + } + } + else { + query.append(DossierTaxModelImpl.ORDER_BY_JPQL); + } + + String sql = query.toString(); + + Query q = session.createQuery(sql); + + q.setFirstResult(0); + q.setMaxResults(2); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + qPos.add(statusCTT); + + if (orderByComparator != null) { + Object[] values = orderByComparator.getOrderByConditionValues(dossierTax); + + for (Object value : values) { + qPos.add(value); + } + } + + List list = q.list(); + + if (list.size() == 2) { + return list.get(1); + } + else { + return null; + } + } + + /** + * Removes all the dossier taxs where dossierNo = ? and statusCTT = ? from the database. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + */ + @Override + public void removeByF_DOSSIER_CTT(String dossierNo, int statusCTT) { + for (DossierTax dossierTax : findByF_DOSSIER_CTT(dossierNo, statusCTT, + QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { + remove(dossierTax); + } + } + + /** + * Returns the number of dossier taxs where dossierNo = ? and statusCTT = ?. + * + * @param dossierNo the dossier no + * @param statusCTT the status ctt + * @return the number of matching dossier taxs + */ + @Override + public int countByF_DOSSIER_CTT(String dossierNo, int statusCTT) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_DOSSIER_CTT; + + Object[] finderArgs = new Object[] { dossierNo, statusCTT }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(3); + + query.append(_SQL_COUNT_DOSSIERTAX_WHERE); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_DOSSIER_CTT_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_DOSSIER_CTT_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_DOSSIER_CTT_DOSSIERNO_2); + } + + query.append(_FINDER_COLUMN_F_DOSSIER_CTT_STATUSCTT_2); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + qPos.add(statusCTT); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_DOSSIER_CTT_DOSSIERNO_1 = "dossierTax.dossierNo IS NULL AND "; + private static final String _FINDER_COLUMN_F_DOSSIER_CTT_DOSSIERNO_2 = "dossierTax.dossierNo = ? AND "; + private static final String _FINDER_COLUMN_F_DOSSIER_CTT_DOSSIERNO_3 = "(dossierTax.dossierNo IS NULL OR dossierTax.dossierNo = '') AND "; + private static final String _FINDER_COLUMN_F_DOSSIER_CTT_STATUSCTT_2 = "dossierTax.statusCTT = ?"; + + public DossierTaxPersistenceImpl() { + setModelClass(DossierTax.class); + + try { + Field field = BasePersistenceImpl.class.getDeclaredField( + "_dbColumnNames"); + + field.setAccessible(true); + + Map dbColumnNames = new HashMap(); + + dbColumnNames.put("uuid", "uuid_"); + + field.set(this, dbColumnNames); + } + catch (Exception e) { + if (_log.isDebugEnabled()) { + _log.debug(e, e); + } + } + } + + /** + * Caches the dossier tax in the entity cache if it is enabled. + * + * @param dossierTax the dossier tax + */ + @Override + public void cacheResult(DossierTax dossierTax) { + entityCache.putResult(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxImpl.class, dossierTax.getPrimaryKey(), dossierTax); + + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, + new Object[] { dossierTax.getUuid(), dossierTax.getGroupId() }, + dossierTax); + + finderCache.putResult(FINDER_PATH_FETCH_BY_F_DMS, + new Object[] { + dossierTax.getDossierNo(), dossierTax.getMaSoThue(), + dossierTax.getSoQuyetDinh() + }, dossierTax); + + dossierTax.resetOriginalValues(); + } + + /** + * Caches the dossier taxs in the entity cache if it is enabled. + * + * @param dossierTaxs the dossier taxs + */ + @Override + public void cacheResult(List dossierTaxs) { + for (DossierTax dossierTax : dossierTaxs) { + if (entityCache.getResult( + DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxImpl.class, dossierTax.getPrimaryKey()) == null) { + cacheResult(dossierTax); + } + else { + dossierTax.resetOriginalValues(); + } + } + } + + /** + * Clears the cache for all dossier taxs. + * + *

+ * The {@link EntityCache} and {@link FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache() { + entityCache.clearCache(DossierTaxImpl.class); + + finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + /** + * Clears the cache for the dossier tax. + * + *

+ * The {@link EntityCache} and {@link FinderCache} are both cleared by this method. + *

+ */ + @Override + public void clearCache(DossierTax dossierTax) { + entityCache.removeResult(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxImpl.class, dossierTax.getPrimaryKey()); + + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + clearUniqueFindersCache((DossierTaxModelImpl)dossierTax, true); + } + + @Override + public void clearCache(List dossierTaxs) { + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + for (DossierTax dossierTax : dossierTaxs) { + entityCache.removeResult(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxImpl.class, dossierTax.getPrimaryKey()); + + clearUniqueFindersCache((DossierTaxModelImpl)dossierTax, true); + } + } + + protected void cacheUniqueFindersCache( + DossierTaxModelImpl dossierTaxModelImpl) { + Object[] args = new Object[] { + dossierTaxModelImpl.getUuid(), dossierTaxModelImpl.getGroupId() + }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_UUID_G, args, + Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, args, + dossierTaxModelImpl, false); + + args = new Object[] { + dossierTaxModelImpl.getDossierNo(), + dossierTaxModelImpl.getMaSoThue(), + dossierTaxModelImpl.getSoQuyetDinh() + }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_F_DMS, args, + Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_F_DMS, args, + dossierTaxModelImpl, false); + } + + protected void clearUniqueFindersCache( + DossierTaxModelImpl dossierTaxModelImpl, boolean clearCurrent) { + if (clearCurrent) { + Object[] args = new Object[] { + dossierTaxModelImpl.getUuid(), + dossierTaxModelImpl.getGroupId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); + } + + if ((dossierTaxModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_UUID_G.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + dossierTaxModelImpl.getOriginalUuid(), + dossierTaxModelImpl.getOriginalGroupId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_G, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_UUID_G, args); + } + + if (clearCurrent) { + Object[] args = new Object[] { + dossierTaxModelImpl.getDossierNo(), + dossierTaxModelImpl.getMaSoThue(), + dossierTaxModelImpl.getSoQuyetDinh() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_DMS, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_DMS, args); + } + + if ((dossierTaxModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_F_DMS.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + dossierTaxModelImpl.getOriginalDossierNo(), + dossierTaxModelImpl.getOriginalMaSoThue(), + dossierTaxModelImpl.getOriginalSoQuyetDinh() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_DMS, args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_DMS, args); + } + } + + /** + * Creates a new dossier tax with the primary key. Does not add the dossier tax to the database. + * + * @param taxId the primary key for the new dossier tax + * @return the new dossier tax + */ + @Override + public DossierTax create(long taxId) { + DossierTax dossierTax = new DossierTaxImpl(); + + dossierTax.setNew(true); + dossierTax.setPrimaryKey(taxId); + + String uuid = PortalUUIDUtil.generate(); + + dossierTax.setUuid(uuid); + + dossierTax.setCompanyId(companyProvider.getCompanyId()); + + return dossierTax; + } + + /** + * Removes the dossier tax with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax that was removed + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + @Override + public DossierTax remove(long taxId) throws NoSuchDossierTaxException { + return remove((Serializable)taxId); + } + + /** + * Removes the dossier tax with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param primaryKey the primary key of the dossier tax + * @return the dossier tax that was removed + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + @Override + public DossierTax remove(Serializable primaryKey) + throws NoSuchDossierTaxException { + Session session = null; + + try { + session = openSession(); + + DossierTax dossierTax = (DossierTax)session.get(DossierTaxImpl.class, + primaryKey); + + if (dossierTax == null) { + if (_log.isDebugEnabled()) { + _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchDossierTaxException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return remove(dossierTax); + } + catch (NoSuchDossierTaxException nsee) { + throw nsee; + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + } + + @Override + protected DossierTax removeImpl(DossierTax dossierTax) { + Session session = null; + + try { + session = openSession(); + + if (!session.contains(dossierTax)) { + dossierTax = (DossierTax)session.get(DossierTaxImpl.class, + dossierTax.getPrimaryKeyObj()); + } + + if (dossierTax != null) { + session.delete(dossierTax); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + if (dossierTax != null) { + clearCache(dossierTax); + } + + return dossierTax; + } + + @Override + public DossierTax updateImpl(DossierTax dossierTax) { + boolean isNew = dossierTax.isNew(); + + if (!(dossierTax instanceof DossierTaxModelImpl)) { + InvocationHandler invocationHandler = null; + + if (ProxyUtil.isProxyClass(dossierTax.getClass())) { + invocationHandler = ProxyUtil.getInvocationHandler(dossierTax); + + throw new IllegalArgumentException( + "Implement ModelWrapper in dossierTax proxy " + + invocationHandler.getClass()); + } + + throw new IllegalArgumentException( + "Implement ModelWrapper in custom DossierTax implementation " + + dossierTax.getClass()); + } + + DossierTaxModelImpl dossierTaxModelImpl = (DossierTaxModelImpl)dossierTax; + + if (Validator.isNull(dossierTax.getUuid())) { + String uuid = PortalUUIDUtil.generate(); + + dossierTax.setUuid(uuid); + } + + ServiceContext serviceContext = ServiceContextThreadLocal.getServiceContext(); + + Date now = new Date(); + + if (isNew && (dossierTax.getCreateDate() == null)) { + if (serviceContext == null) { + dossierTax.setCreateDate(now); + } + else { + dossierTax.setCreateDate(serviceContext.getCreateDate(now)); + } + } + + if (!dossierTaxModelImpl.hasSetModifiedDate()) { + if (serviceContext == null) { + dossierTax.setModifiedDate(now); + } + else { + dossierTax.setModifiedDate(serviceContext.getModifiedDate(now)); + } + } + + Session session = null; + + try { + session = openSession(); + + if (dossierTax.isNew()) { + session.save(dossierTax); + + dossierTax.setNew(false); + } + else { + dossierTax = (DossierTax)session.merge(dossierTax); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + + if (!DossierTaxModelImpl.COLUMN_BITMASK_ENABLED) { + finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + else + if (isNew) { + Object[] args = new Object[] { dossierTaxModelImpl.getUuid() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + + args = new Object[] { + dossierTaxModelImpl.getUuid(), + dossierTaxModelImpl.getCompanyId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, + args); + + args = new Object[] { dossierTaxModelImpl.getStatusTBT() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_STATUS_TBT, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_STATUS_TBT, + args); + + args = new Object[] { + dossierTaxModelImpl.getStatusTBT(), + dossierTaxModelImpl.getStatusCTT() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_STATUS_CTT, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_STATUS_CTT, + args); + + args = new Object[] { + dossierTaxModelImpl.getDossierNo(), + dossierTaxModelImpl.getStatusTBT() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_DOSSIER_TBT, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_DOSSIER_TBT, + args); + + args = new Object[] { + dossierTaxModelImpl.getDossierNo(), + dossierTaxModelImpl.getStatusCTT() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_DOSSIER_CTT, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_DOSSIER_CTT, + args); + + finderCache.removeResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL, + FINDER_ARGS_EMPTY); + } + + else { + if ((dossierTaxModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + dossierTaxModelImpl.getOriginalUuid() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + + args = new Object[] { dossierTaxModelImpl.getUuid() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID, + args); + } + + if ((dossierTaxModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + dossierTaxModelImpl.getOriginalUuid(), + dossierTaxModelImpl.getOriginalCompanyId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, + args); + + args = new Object[] { + dossierTaxModelImpl.getUuid(), + dossierTaxModelImpl.getCompanyId() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_UUID_C, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_UUID_C, + args); + } + + if ((dossierTaxModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_STATUS_TBT.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + dossierTaxModelImpl.getOriginalStatusTBT() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_STATUS_TBT, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_STATUS_TBT, + args); + + args = new Object[] { dossierTaxModelImpl.getStatusTBT() }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_STATUS_TBT, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_STATUS_TBT, + args); + } + + if ((dossierTaxModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_STATUS_CTT.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + dossierTaxModelImpl.getOriginalStatusTBT(), + dossierTaxModelImpl.getOriginalStatusCTT() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_STATUS_CTT, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_STATUS_CTT, + args); + + args = new Object[] { + dossierTaxModelImpl.getStatusTBT(), + dossierTaxModelImpl.getStatusCTT() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_STATUS_CTT, args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_STATUS_CTT, + args); + } + + if ((dossierTaxModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_DOSSIER_TBT.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + dossierTaxModelImpl.getOriginalDossierNo(), + dossierTaxModelImpl.getOriginalStatusTBT() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_DOSSIER_TBT, + args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_DOSSIER_TBT, + args); + + args = new Object[] { + dossierTaxModelImpl.getDossierNo(), + dossierTaxModelImpl.getStatusTBT() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_DOSSIER_TBT, + args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_DOSSIER_TBT, + args); + } + + if ((dossierTaxModelImpl.getColumnBitmask() & + FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_DOSSIER_CTT.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + dossierTaxModelImpl.getOriginalDossierNo(), + dossierTaxModelImpl.getOriginalStatusCTT() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_DOSSIER_CTT, + args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_DOSSIER_CTT, + args); + + args = new Object[] { + dossierTaxModelImpl.getDossierNo(), + dossierTaxModelImpl.getStatusCTT() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_DOSSIER_CTT, + args); + finderCache.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_F_DOSSIER_CTT, + args); + } + } + + entityCache.putResult(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxImpl.class, dossierTax.getPrimaryKey(), dossierTax, false); + + clearUniqueFindersCache(dossierTaxModelImpl, false); + cacheUniqueFindersCache(dossierTaxModelImpl); + + dossierTax.resetOriginalValues(); + + return dossierTax; + } + + /** + * Returns the dossier tax with the primary key or throws a {@link com.liferay.portal.kernel.exception.NoSuchModelException} if it could not be found. + * + * @param primaryKey the primary key of the dossier tax + * @return the dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + @Override + public DossierTax findByPrimaryKey(Serializable primaryKey) + throws NoSuchDossierTaxException { + DossierTax dossierTax = fetchByPrimaryKey(primaryKey); + + if (dossierTax == null) { + if (_log.isDebugEnabled()) { + _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); + } + + throw new NoSuchDossierTaxException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + + primaryKey); + } + + return dossierTax; + } + + /** + * Returns the dossier tax with the primary key or throws a {@link NoSuchDossierTaxException} if it could not be found. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax + * @throws NoSuchDossierTaxException if a dossier tax with the primary key could not be found + */ + @Override + public DossierTax findByPrimaryKey(long taxId) + throws NoSuchDossierTaxException { + return findByPrimaryKey((Serializable)taxId); + } + + /** + * Returns the dossier tax with the primary key or returns null if it could not be found. + * + * @param primaryKey the primary key of the dossier tax + * @return the dossier tax, or null if a dossier tax with the primary key could not be found + */ + @Override + public DossierTax fetchByPrimaryKey(Serializable primaryKey) { + Serializable serializable = entityCache.getResult(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxImpl.class, primaryKey); + + if (serializable == nullModel) { + return null; + } + + DossierTax dossierTax = (DossierTax)serializable; + + if (dossierTax == null) { + Session session = null; + + try { + session = openSession(); + + dossierTax = (DossierTax)session.get(DossierTaxImpl.class, + primaryKey); + + if (dossierTax != null) { + cacheResult(dossierTax); + } + else { + entityCache.putResult(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxImpl.class, primaryKey, nullModel); + } + } + catch (Exception e) { + entityCache.removeResult(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxImpl.class, primaryKey); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return dossierTax; + } + + /** + * Returns the dossier tax with the primary key or returns null if it could not be found. + * + * @param taxId the primary key of the dossier tax + * @return the dossier tax, or null if a dossier tax with the primary key could not be found + */ + @Override + public DossierTax fetchByPrimaryKey(long taxId) { + return fetchByPrimaryKey((Serializable)taxId); + } + + @Override + public Map fetchByPrimaryKeys( + Set primaryKeys) { + if (primaryKeys.isEmpty()) { + return Collections.emptyMap(); + } + + Map map = new HashMap(); + + if (primaryKeys.size() == 1) { + Iterator iterator = primaryKeys.iterator(); + + Serializable primaryKey = iterator.next(); + + DossierTax dossierTax = fetchByPrimaryKey(primaryKey); + + if (dossierTax != null) { + map.put(primaryKey, dossierTax); + } + + return map; + } + + Set uncachedPrimaryKeys = null; + + for (Serializable primaryKey : primaryKeys) { + Serializable serializable = entityCache.getResult(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxImpl.class, primaryKey); + + if (serializable != nullModel) { + if (serializable == null) { + if (uncachedPrimaryKeys == null) { + uncachedPrimaryKeys = new HashSet(); + } + + uncachedPrimaryKeys.add(primaryKey); + } + else { + map.put(primaryKey, (DossierTax)serializable); + } + } + } + + if (uncachedPrimaryKeys == null) { + return map; + } + + StringBundler query = new StringBundler((uncachedPrimaryKeys.size() * 2) + + 1); + + query.append(_SQL_SELECT_DOSSIERTAX_WHERE_PKS_IN); + + for (Serializable primaryKey : uncachedPrimaryKeys) { + query.append((long)primaryKey); + + query.append(","); + } + + query.setIndex(query.index() - 1); + + query.append(")"); + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + for (DossierTax dossierTax : (List)q.list()) { + map.put(dossierTax.getPrimaryKeyObj(), dossierTax); + + cacheResult(dossierTax); + + uncachedPrimaryKeys.remove(dossierTax.getPrimaryKeyObj()); + } + + for (Serializable primaryKey : uncachedPrimaryKeys) { + entityCache.putResult(DossierTaxModelImpl.ENTITY_CACHE_ENABLED, + DossierTaxImpl.class, primaryKey, nullModel); + } + } + catch (Exception e) { + throw processException(e); + } + finally { + closeSession(session); + } + + return map; + } + + /** + * Returns all the dossier taxs. + * + * @return the dossier taxs + */ + @Override + public List findAll() { + return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + } + + /** + * Returns a range of all the dossier taxs. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @return the range of dossier taxs + */ + @Override + public List findAll(int start, int end) { + return findAll(start, end, null); + } + + /** + * Returns an ordered range of all the dossier taxs. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @return the ordered range of dossier taxs + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator) { + return findAll(start, end, orderByComparator, true); + } + + /** + * Returns an ordered range of all the dossier taxs. + * + *

+ * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to {@link QueryUtil#ALL_POS} will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link DossierTaxModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. + *

+ * + * @param start the lower bound of the range of dossier taxs + * @param end the upper bound of the range of dossier taxs (not inclusive) + * @param orderByComparator the comparator to order the results by (optionally null) + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the ordered range of dossier taxs + */ + @Override + public List findAll(int start, int end, + OrderByComparator orderByComparator, + boolean retrieveFromCache) { + boolean pagination = true; + FinderPath finderPath = null; + Object[] finderArgs = null; + + if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && + (orderByComparator == null)) { + pagination = false; + finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL; + finderArgs = FINDER_ARGS_EMPTY; + } + else { + finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL; + finderArgs = new Object[] { start, end, orderByComparator }; + } + + List list = null; + + if (retrieveFromCache) { + list = (List)finderCache.getResult(finderPath, + finderArgs, this); + } + + if (list == null) { + StringBundler query = null; + String sql = null; + + if (orderByComparator != null) { + query = new StringBundler(2 + + (orderByComparator.getOrderByFields().length * 2)); + + query.append(_SQL_SELECT_DOSSIERTAX); + + appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, + orderByComparator); + + sql = query.toString(); + } + else { + sql = _SQL_SELECT_DOSSIERTAX; + + if (pagination) { + sql = sql.concat(DossierTaxModelImpl.ORDER_BY_JPQL); + } + } + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + if (!pagination) { + list = (List)QueryUtil.list(q, getDialect(), + start, end, false); + + Collections.sort(list); + + list = Collections.unmodifiableList(list); + } + else { + list = (List)QueryUtil.list(q, getDialect(), + start, end); + } + + cacheResult(list); + + finderCache.putResult(finderPath, finderArgs, list); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return list; + } + + /** + * Removes all the dossier taxs from the database. + * + */ + @Override + public void removeAll() { + for (DossierTax dossierTax : findAll()) { + remove(dossierTax); + } + } + + /** + * Returns the number of dossier taxs. + * + * @return the number of dossier taxs + */ + @Override + public int countAll() { + Long count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY, this); + + if (count == null) { + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(_SQL_COUNT_DOSSIERTAX); + + count = (Long)q.uniqueResult(); + + finderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY, + count); + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_COUNT_ALL, + FINDER_ARGS_EMPTY); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + @Override + public Set getBadColumnNames() { + return _badColumnNames; + } + + @Override + protected Map getTableColumnsMap() { + return DossierTaxModelImpl.TABLE_COLUMNS_MAP; + } + + /** + * Initializes the dossier tax persistence. + */ + public void afterPropertiesSet() { + } + + public void destroy() { + entityCache.removeCache(DossierTaxImpl.class.getName()); + finderCache.removeCache(FINDER_CLASS_NAME_ENTITY); + finderCache.removeCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + finderCache.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + @ServiceReference(type = CompanyProviderWrapper.class) + protected CompanyProvider companyProvider; + @ServiceReference(type = EntityCache.class) + protected EntityCache entityCache; + @ServiceReference(type = FinderCache.class) + protected FinderCache finderCache; + private static final String _SQL_SELECT_DOSSIERTAX = "SELECT dossierTax FROM DossierTax dossierTax"; + private static final String _SQL_SELECT_DOSSIERTAX_WHERE_PKS_IN = "SELECT dossierTax FROM DossierTax dossierTax WHERE taxId IN ("; + private static final String _SQL_SELECT_DOSSIERTAX_WHERE = "SELECT dossierTax FROM DossierTax dossierTax WHERE "; + private static final String _SQL_COUNT_DOSSIERTAX = "SELECT COUNT(dossierTax) FROM DossierTax dossierTax"; + private static final String _SQL_COUNT_DOSSIERTAX_WHERE = "SELECT COUNT(dossierTax) FROM DossierTax dossierTax WHERE "; + private static final String _ORDER_BY_ENTITY_ALIAS = "dossierTax."; + private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No DossierTax exists with the primary key "; + private static final String _NO_SUCH_ENTITY_WITH_KEY = "No DossierTax exists with the key {"; + private static final Log _log = LogFactoryUtil.getLog(DossierTaxPersistenceImpl.class); + private static final Set _badColumnNames = SetUtil.fromArray(new String[] { + "uuid" + }); +} \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/persistence/impl/SyncTrackingPersistenceImpl.java b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/persistence/impl/SyncTrackingPersistenceImpl.java index ee62f855c7..315796787e 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/persistence/impl/SyncTrackingPersistenceImpl.java +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/java/org/opencps/synctracking/service/persistence/impl/SyncTrackingPersistenceImpl.java @@ -16,7 +16,6 @@ import aQute.bnd.annotation.ProviderType; - import com.liferay.portal.kernel.dao.orm.EntityCache; import com.liferay.portal.kernel.dao.orm.FinderCache; import com.liferay.portal.kernel.dao.orm.FinderPath; @@ -70,7 +69,7 @@ * Caching information and settings can be found in portal.properties *

* - * @author Brian Wing Shun Chan + * @author duongnt * @see SyncTrackingPersistence * @see org.opencps.synctracking.service.persistence.SyncTrackingUtil * @generated @@ -2504,6 +2503,335 @@ else if (dossierNo.equals("")) { private static final String _FINDER_COLUMN_F_GID_DOSSIERNO_DOSSIERNO_1 = "syncTracking.dossierNo IS NULL"; private static final String _FINDER_COLUMN_F_GID_DOSSIERNO_DOSSIERNO_2 = "syncTracking.dossierNo = ?"; private static final String _FINDER_COLUMN_F_GID_DOSSIERNO_DOSSIERNO_3 = "(syncTracking.dossierNo IS NULL OR syncTracking.dossierNo = '')"; + public static final FinderPath FINDER_PATH_FETCH_BY_F_GID_DOSSIERNO_PROTOCOL = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, + FINDER_CLASS_NAME_ENTITY, "fetchByF_GID_DossierNo_Protocol", + new String[] { + Long.class.getName(), String.class.getName(), + String.class.getName() + }, + SyncTrackingModelImpl.GROUPID_COLUMN_BITMASK | + SyncTrackingModelImpl.DOSSIERNO_COLUMN_BITMASK | + SyncTrackingModelImpl.PROTOCOL_COLUMN_BITMASK); + public static final FinderPath FINDER_PATH_COUNT_BY_F_GID_DOSSIERNO_PROTOCOL = + new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, + SyncTrackingModelImpl.FINDER_CACHE_ENABLED, Long.class, + FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, + "countByF_GID_DossierNo_Protocol", + new String[] { + Long.class.getName(), String.class.getName(), + String.class.getName() + }); + + /** + * Returns the sync tracking where groupId = ? and dossierNo = ? and protocol = ? or throws a {@link NoSuchSyncTrackingException} if it could not be found. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @return the matching sync tracking + * @throws NoSuchSyncTrackingException if a matching sync tracking could not be found + */ + @Override + public SyncTracking findByF_GID_DossierNo_Protocol(long groupId, + String dossierNo, String protocol) throws NoSuchSyncTrackingException { + SyncTracking syncTracking = fetchByF_GID_DossierNo_Protocol(groupId, + dossierNo, protocol); + + if (syncTracking == null) { + StringBundler msg = new StringBundler(8); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("groupId="); + msg.append(groupId); + + msg.append(", dossierNo="); + msg.append(dossierNo); + + msg.append(", protocol="); + msg.append(protocol); + + msg.append("}"); + + if (_log.isDebugEnabled()) { + _log.debug(msg.toString()); + } + + throw new NoSuchSyncTrackingException(msg.toString()); + } + + return syncTracking; + } + + /** + * Returns the sync tracking where groupId = ? and dossierNo = ? and protocol = ? or returns null if it could not be found. Uses the finder cache. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_GID_DossierNo_Protocol(long groupId, + String dossierNo, String protocol) { + return fetchByF_GID_DossierNo_Protocol(groupId, dossierNo, protocol, + true); + } + + /** + * Returns the sync tracking where groupId = ? and dossierNo = ? and protocol = ? or returns null if it could not be found, optionally using the finder cache. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @param retrieveFromCache whether to retrieve from the finder cache + * @return the matching sync tracking, or null if a matching sync tracking could not be found + */ + @Override + public SyncTracking fetchByF_GID_DossierNo_Protocol(long groupId, + String dossierNo, String protocol, boolean retrieveFromCache) { + Object[] finderArgs = new Object[] { groupId, dossierNo, protocol }; + + Object result = null; + + if (retrieveFromCache) { + result = finderCache.getResult(FINDER_PATH_FETCH_BY_F_GID_DOSSIERNO_PROTOCOL, + finderArgs, this); + } + + if (result instanceof SyncTracking) { + SyncTracking syncTracking = (SyncTracking)result; + + if ((groupId != syncTracking.getGroupId()) || + !Objects.equals(dossierNo, syncTracking.getDossierNo()) || + !Objects.equals(protocol, syncTracking.getProtocol())) { + result = null; + } + } + + if (result == null) { + StringBundler query = new StringBundler(5); + + query.append(_SQL_SELECT_SYNCTRACKING_WHERE); + + query.append(_FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_GROUPID_2); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_DOSSIERNO_2); + } + + boolean bindProtocol = false; + + if (protocol == null) { + query.append(_FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_PROTOCOL_1); + } + else if (protocol.equals("")) { + query.append(_FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_PROTOCOL_3); + } + else { + bindProtocol = true; + + query.append(_FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_PROTOCOL_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindProtocol) { + qPos.add(protocol); + } + + List list = q.list(); + + if (list.isEmpty()) { + finderCache.putResult(FINDER_PATH_FETCH_BY_F_GID_DOSSIERNO_PROTOCOL, + finderArgs, list); + } + else { + if (list.size() > 1) { + Collections.sort(list, Collections.reverseOrder()); + + if (_log.isWarnEnabled()) { + _log.warn( + "SyncTrackingPersistenceImpl.fetchByF_GID_DossierNo_Protocol(long, String, String, boolean) with parameters (" + + StringUtil.merge(finderArgs) + + ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder."); + } + } + + SyncTracking syncTracking = list.get(0); + + result = syncTracking; + + cacheResult(syncTracking); + } + } + catch (Exception e) { + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_GID_DOSSIERNO_PROTOCOL, + finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + if (result instanceof List) { + return null; + } + else { + return (SyncTracking)result; + } + } + + /** + * Removes the sync tracking where groupId = ? and dossierNo = ? and protocol = ? from the database. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @return the sync tracking that was removed + */ + @Override + public SyncTracking removeByF_GID_DossierNo_Protocol(long groupId, + String dossierNo, String protocol) throws NoSuchSyncTrackingException { + SyncTracking syncTracking = findByF_GID_DossierNo_Protocol(groupId, + dossierNo, protocol); + + return remove(syncTracking); + } + + /** + * Returns the number of sync trackings where groupId = ? and dossierNo = ? and protocol = ?. + * + * @param groupId the group ID + * @param dossierNo the dossier no + * @param protocol the protocol + * @return the number of matching sync trackings + */ + @Override + public int countByF_GID_DossierNo_Protocol(long groupId, String dossierNo, + String protocol) { + FinderPath finderPath = FINDER_PATH_COUNT_BY_F_GID_DOSSIERNO_PROTOCOL; + + Object[] finderArgs = new Object[] { groupId, dossierNo, protocol }; + + Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); + + if (count == null) { + StringBundler query = new StringBundler(4); + + query.append(_SQL_COUNT_SYNCTRACKING_WHERE); + + query.append(_FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_GROUPID_2); + + boolean bindDossierNo = false; + + if (dossierNo == null) { + query.append(_FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_DOSSIERNO_1); + } + else if (dossierNo.equals("")) { + query.append(_FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_DOSSIERNO_3); + } + else { + bindDossierNo = true; + + query.append(_FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_DOSSIERNO_2); + } + + boolean bindProtocol = false; + + if (protocol == null) { + query.append(_FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_PROTOCOL_1); + } + else if (protocol.equals("")) { + query.append(_FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_PROTOCOL_3); + } + else { + bindProtocol = true; + + query.append(_FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_PROTOCOL_2); + } + + String sql = query.toString(); + + Session session = null; + + try { + session = openSession(); + + Query q = session.createQuery(sql); + + QueryPos qPos = QueryPos.getInstance(q); + + qPos.add(groupId); + + if (bindDossierNo) { + qPos.add(dossierNo); + } + + if (bindProtocol) { + qPos.add(protocol); + } + + count = (Long)q.uniqueResult(); + + finderCache.putResult(finderPath, finderArgs, count); + } + catch (Exception e) { + finderCache.removeResult(finderPath, finderArgs); + + throw processException(e); + } + finally { + closeSession(session); + } + } + + return count.intValue(); + } + + private static final String _FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_GROUPID_2 = + "syncTracking.groupId = ? AND "; + private static final String _FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_DOSSIERNO_1 = + "syncTracking.dossierNo IS NULL AND "; + private static final String _FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_DOSSIERNO_2 = + "syncTracking.dossierNo = ? AND "; + private static final String _FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_DOSSIERNO_3 = + "(syncTracking.dossierNo IS NULL OR syncTracking.dossierNo = '') AND "; + private static final String _FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_PROTOCOL_1 = + "syncTracking.protocol IS NULL"; + private static final String _FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_PROTOCOL_2 = + "syncTracking.protocol = ?"; + private static final String _FINDER_COLUMN_F_GID_DOSSIERNO_PROTOCOL_PROTOCOL_3 = + "(syncTracking.protocol IS NULL OR syncTracking.protocol = '')"; public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_F_GID_API = new FinderPath(SyncTrackingModelImpl.ENTITY_CACHE_ENABLED, SyncTrackingModelImpl.FINDER_CACHE_ENABLED, SyncTrackingImpl.class, @@ -8841,6 +9169,12 @@ public void cacheResult(SyncTracking syncTracking) { new Object[] { syncTracking.getGroupId(), syncTracking.getDossierNo() }, syncTracking); + finderCache.putResult(FINDER_PATH_FETCH_BY_F_GID_DOSSIERNO_PROTOCOL, + new Object[] { + syncTracking.getGroupId(), syncTracking.getDossierNo(), + syncTracking.getProtocol() + }, syncTracking); + syncTracking.resetOriginalValues(); } @@ -8941,6 +9275,17 @@ protected void cacheUniqueFindersCache( Long.valueOf(1), false); finderCache.putResult(FINDER_PATH_FETCH_BY_F_GID_DOSSIERNO, args, syncTrackingModelImpl, false); + + args = new Object[] { + syncTrackingModelImpl.getGroupId(), + syncTrackingModelImpl.getDossierNo(), + syncTrackingModelImpl.getProtocol() + }; + + finderCache.putResult(FINDER_PATH_COUNT_BY_F_GID_DOSSIERNO_PROTOCOL, + args, Long.valueOf(1), false); + finderCache.putResult(FINDER_PATH_FETCH_BY_F_GID_DOSSIERNO_PROTOCOL, + args, syncTrackingModelImpl, false); } protected void clearUniqueFindersCache( @@ -9011,6 +9356,33 @@ protected void clearUniqueFindersCache( finderCache.removeResult(FINDER_PATH_COUNT_BY_F_GID_DOSSIERNO, args); finderCache.removeResult(FINDER_PATH_FETCH_BY_F_GID_DOSSIERNO, args); } + + if (clearCurrent) { + Object[] args = new Object[] { + syncTrackingModelImpl.getGroupId(), + syncTrackingModelImpl.getDossierNo(), + syncTrackingModelImpl.getProtocol() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_GID_DOSSIERNO_PROTOCOL, + args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_GID_DOSSIERNO_PROTOCOL, + args); + } + + if ((syncTrackingModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_F_GID_DOSSIERNO_PROTOCOL.getColumnBitmask()) != 0) { + Object[] args = new Object[] { + syncTrackingModelImpl.getOriginalGroupId(), + syncTrackingModelImpl.getOriginalDossierNo(), + syncTrackingModelImpl.getOriginalProtocol() + }; + + finderCache.removeResult(FINDER_PATH_COUNT_BY_F_GID_DOSSIERNO_PROTOCOL, + args); + finderCache.removeResult(FINDER_PATH_FETCH_BY_F_GID_DOSSIERNO_PROTOCOL, + args); + } } /** diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/module-hbm.xml b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/module-hbm.xml index 25440b1822..311a98a79f 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/module-hbm.xml +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/module-hbm.xml @@ -2,29 +2,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/module-log4j.xml b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/module-log4j.xml new file mode 100644 index 0000000000..03166d94d8 --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/module-log4j.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/portlet-model-hints.xml b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/portlet-model-hints.xml index 195bbb84d4..b99c4c797a 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/portlet-model-hints.xml +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/portlet-model-hints.xml @@ -1,6 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -16,11 +48,19 @@ - + + 200 + - - - + + 10000 + + + 5000 + + + 500 + \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/spring/module-spring.xml b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/spring/module-spring.xml index 23836d2740..dffb39977d 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/spring/module-spring.xml +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/spring/module-spring.xml @@ -7,7 +7,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd" > + + - \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/sql/indexes.sql b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/sql/indexes.sql index 08f99a7e98..b35c3e73f3 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/sql/indexes.sql +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/sql/indexes.sql @@ -1,6 +1,15 @@ -create index IX_269B4D3B on opencps_synctracking (groupId, api[$COLUMN_LENGTH:75$]); +create index IX_DDEE0E6D on opencps_dossier_tax (dossierNo[$COLUMN_LENGTH:75$], maSoThue[$COLUMN_LENGTH:75$], soQuyetDinh[$COLUMN_LENGTH:75$]); +create index IX_F5256AFF on opencps_dossier_tax (dossierNo[$COLUMN_LENGTH:75$], statusCTT); +create index IX_F60CCBE2 on opencps_dossier_tax (dossierNo[$COLUMN_LENGTH:75$], statusTBT); +create index IX_8E2E21A7 on opencps_dossier_tax (statusCTT); +create index IX_C29CF377 on opencps_dossier_tax (statusTBT, statusCTT); +create index IX_6763B1CE on opencps_dossier_tax (uuid_[$COLUMN_LENGTH:75$], companyId); +create unique index IX_822A53D0 on opencps_dossier_tax (uuid_[$COLUMN_LENGTH:75$], groupId); + +create index IX_269B4D3B on opencps_synctracking (groupId, api[$COLUMN_LENGTH:200$]); create index IX_5D8AF1B8 on opencps_synctracking (groupId, createDate, modifiedDate); create index IX_FC376796 on opencps_synctracking (groupId, dossierNo[$COLUMN_LENGTH:75$], createDate, modifiedDate); +create index IX_B16EC099 on opencps_synctracking (groupId, dossierNo[$COLUMN_LENGTH:75$], protocol[$COLUMN_LENGTH:75$]); create index IX_C61B1D01 on opencps_synctracking (groupId, protocol[$COLUMN_LENGTH:75$], dossierNo[$COLUMN_LENGTH:75$]); create index IX_E5F3717 on opencps_synctracking (groupId, protocol[$COLUMN_LENGTH:75$], serviceCode[$COLUMN_LENGTH:75$]); create index IX_1A268FF1 on opencps_synctracking (groupId, referenceUid[$COLUMN_LENGTH:75$], createDate, modifiedDate); diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/sql/tables.sql b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/sql/tables.sql index e69de29bb2..2fde57277e 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/sql/tables.sql +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/META-INF/sql/tables.sql @@ -0,0 +1,55 @@ +create table opencps_dossier_tax ( + uuid_ VARCHAR(75) null, + taxId LONG not null primary key, + companyId LONG, + groupId LONG, + userId LONG, + userName VARCHAR(75) null, + createDate DATE null, + modifiedDate DATE null, + dossierNo VARCHAR(75) null, + maSoThue VARCHAR(75) null, + soQuyetDinh VARCHAR(75) null, + ngayQuyetDinh DATE null, + tenTieuMuc VARCHAR(75) null, + soTien INTEGER, + hoTenNguoiNopTien VARCHAR(75) null, + soCmtNguoiNopTien INTEGER, + diaChiNguoiNopTien VARCHAR(75) null, + tinhNguoiNopTien VARCHAR(75) null, + huyenNguoiNopTien VARCHAR(75) null, + xaNguoiNopTien VARCHAR(75) null, + thoiGianThanhToan DATE null, + soTienNop INTEGER, + noiDungThanhToan VARCHAR(75) null, + trangThaiThanhToan INTEGER, + fileChungTu VARCHAR(75) null, + ngayThueTraThongBao DATE null, + ngayTraThongBao DATE null, + ngayNhanBienLai DATE null, + statusTBT INTEGER, + statusCTT INTEGER +); + +create table opencps_synctracking ( + uuid_ VARCHAR(75) null, + trackingId LONG not null primary key, + companyId LONG, + groupId LONG, + userId LONG, + userName VARCHAR(75) null, + createDate DATE null, + modifiedDate DATE null, + dossierNo VARCHAR(75) null, + referenceUid VARCHAR(75) null, + serverNo VARCHAR(75) null, + protocol VARCHAR(75) null, + stateSync INTEGER, + serviceCode VARCHAR(75) null, + api VARCHAR(200) null, + fromUnit VARCHAR(75) null, + toUnit VARCHAR(75) null, + bodyRequest TEXT null, + response TEXT null, + metaData VARCHAR(500) null +); \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/resources/service-ext.properties b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/service-ext.properties new file mode 100644 index 0000000000..4d590730aa --- /dev/null +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/service-ext.properties @@ -0,0 +1,2 @@ +build.auto.upgrade=false +build.number=5 \ No newline at end of file diff --git a/modules/backend-synctracking/backend-synctracking-service/src/main/resources/service.properties b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/service.properties index a4a2f3442a..601f196844 100644 --- a/modules/backend-synctracking/backend-synctracking-service/src/main/resources/service.properties +++ b/modules/backend-synctracking/backend-synctracking-service/src/main/resources/service.properties @@ -12,6 +12,6 @@ ## Build ## - build.namespace=FOO - build.number=2 - build.date=1623140841851 \ No newline at end of file + build.namespace=syncTracking + build.number=29 + build.date=1625930515644 \ No newline at end of file diff --git a/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantDataLocalService.java b/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantDataLocalService.java index f94ff3fd04..b3ff3934f1 100644 --- a/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantDataLocalService.java +++ b/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantDataLocalService.java @@ -26,6 +26,7 @@ import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.model.PersistedModel; +import com.liferay.portal.kernel.repository.model.FileEntry; import com.liferay.portal.kernel.search.Hits; import com.liferay.portal.kernel.search.Indexable; import com.liferay.portal.kernel.search.IndexableType; @@ -321,16 +322,22 @@ public Hits searchLucene(LinkedHashMap params, public ApplicantData updateApplicantData(long groupId, long applicantDataId, String fileTemplateNo, String fileNo, - String fileName, String applicantIdNo, int status, + String fileName, String applicantIdNo, String status, ServiceContext serviceContext) throws PortalException, SystemException; @Indexable(type = IndexableType.REINDEX) public ApplicantData updateApplicantData(long groupId, long applicantDataId, String fileTemplateNo, String fileNo, - String fileName, String applicantIdNo, int status, + String fileName, String applicantIdNo, String status, String sourceFileName, InputStream inputStream, ServiceContext serviceContext) throws PortalException, SystemException; + + @Indexable(type = IndexableType.REINDEX) + public FileEntry uploadFileDLEntry(long userId, long groupId, + InputStream inputStream, String sourceFileName, + String fileType, long fileSize, ServiceContext serviceContext) throws Exception; + @Indexable(type = IndexableType.REINDEX) public ApplicantData updateApplicantData(ServiceContext context, long groupId, long applicantDataId, String fileTemplateNo, diff --git a/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantDataLocalServiceUtil.java b/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantDataLocalServiceUtil.java index 7d29f2b308..89fcb9f3d4 100644 --- a/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantDataLocalServiceUtil.java +++ b/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantDataLocalServiceUtil.java @@ -375,9 +375,17 @@ public static org.opencps.usermgt.model.ApplicantData updateApplicantData( return getService().updateApplicantData(applicantData); } + + public static com.liferay.portal.kernel.repository.model.FileEntry uploadFileDLEntry(long userId, long groupId, + java.io.InputStream inputStream, String sourceFileName, + String fileType, long fileSize, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception{ + return getService().uploadFileDLEntry(userId, groupId, inputStream, sourceFileName, fileType, fileSize, serviceContext); + } + + public static org.opencps.usermgt.model.ApplicantData updateApplicantData( long groupId, long applicantDataId, String fileTemplateNo, - String fileNo, String fileName, String applicantIdNo, int status, + String fileNo, String fileName, String applicantIdNo, String status, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { @@ -389,7 +397,7 @@ public static org.opencps.usermgt.model.ApplicantData updateApplicantData( public static org.opencps.usermgt.model.ApplicantData updateApplicantData( long groupId, long applicantDataId, String fileTemplateNo, - String fileNo, String fileName, String applicantIdNo, int status, + String fileNo, String fileName, String applicantIdNo, String status, String sourceFileName, java.io.InputStream inputStream, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException, diff --git a/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantDataLocalServiceWrapper.java b/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantDataLocalServiceWrapper.java index ae9b7b6c7a..2747544000 100644 --- a/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantDataLocalServiceWrapper.java +++ b/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantDataLocalServiceWrapper.java @@ -400,7 +400,7 @@ public org.opencps.usermgt.model.ApplicantData updateApplicantData( @Override public org.opencps.usermgt.model.ApplicantData updateApplicantData( long groupId, long applicantDataId, String fileTemplateNo, - String fileNo, String fileName, String applicantIdNo, int status, + String fileNo, String fileName, String applicantIdNo, String status, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { @@ -412,7 +412,7 @@ public org.opencps.usermgt.model.ApplicantData updateApplicantData( @Override public org.opencps.usermgt.model.ApplicantData updateApplicantData( long groupId, long applicantDataId, String fileTemplateNo, - String fileNo, String fileName, String applicantIdNo, int status, + String fileNo, String fileName, String applicantIdNo, String status, String sourceFileName, java.io.InputStream inputStream, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException, @@ -422,6 +422,14 @@ public org.opencps.usermgt.model.ApplicantData updateApplicantData( status, sourceFileName, inputStream, serviceContext); } + @Override + public com.liferay.portal.kernel.repository.model.FileEntry uploadFileDLEntry(long userId, long groupId, java.io.InputStream inputStream, + String sourceFileName, String fileType, long fileSize, com.liferay.portal.kernel.service.ServiceContext serviceContext) + throws Exception { + return _applicantDataLocalService.uploadFileDLEntry(userId, groupId, inputStream, sourceFileName, + fileType, fileSize, serviceContext ); + } + @Override public org.opencps.usermgt.model.ApplicantData updateApplicantData( com.liferay.portal.kernel.service.ServiceContext context, long groupId, diff --git a/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantLocalService.java b/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantLocalService.java index 5bcf0e2ab5..fc67d7d6a1 100644 --- a/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantLocalService.java +++ b/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantLocalService.java @@ -330,6 +330,10 @@ public ExportActionableDynamicQuery getExportActionableDynamicQuery( @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); + @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) + public List getListApplicationByG_NotEqualZero_CDateToNow( + Date date); + /** * Returns the OSGi service identifier. * diff --git a/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantLocalServiceUtil.java b/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantLocalServiceUtil.java index c1dcfe56a8..b665e959c8 100644 --- a/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantLocalServiceUtil.java +++ b/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantLocalServiceUtil.java @@ -386,6 +386,11 @@ public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery return getService().getIndexableActionableDynamicQuery(); } + public static java.util.List getListApplicationByG_NotEqualZero_CDateToNow( + java.util.Date date) { + return getService().getListApplicationByG_NotEqualZero_CDateToNow(date); + } + /** * Returns the OSGi service identifier. * diff --git a/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantLocalServiceWrapper.java b/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantLocalServiceWrapper.java index fd7e6d78aa..86853338ba 100644 --- a/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantLocalServiceWrapper.java +++ b/modules/backend-usermgt/backend-usermgt-api/src/main/java/org/opencps/usermgt/service/ApplicantLocalServiceWrapper.java @@ -408,6 +408,12 @@ public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getInde return _applicantLocalService.getIndexableActionableDynamicQuery(); } + @Override + public java.util.List getListApplicationByG_NotEqualZero_CDateToNow( + java.util.Date date) { + return _applicantLocalService.getListApplicationByG_NotEqualZero_CDateToNow(date); + } + /** * Returns the OSGi service identifier. * diff --git a/modules/backend-usermgt/backend-usermgt-service/src/main/java/org/opencps/usermgt/service/impl/ApplicantDataLocalServiceImpl.java b/modules/backend-usermgt/backend-usermgt-service/src/main/java/org/opencps/usermgt/service/impl/ApplicantDataLocalServiceImpl.java index 96ac9b7fcf..35fab6406b 100644 --- a/modules/backend-usermgt/backend-usermgt-service/src/main/java/org/opencps/usermgt/service/impl/ApplicantDataLocalServiceImpl.java +++ b/modules/backend-usermgt/backend-usermgt-service/src/main/java/org/opencps/usermgt/service/impl/ApplicantDataLocalServiceImpl.java @@ -151,7 +151,7 @@ public ApplicantData updateApplicantData(ServiceContext context, long groupId, } @Override - public ApplicantData updateApplicantData(long groupId, long applicantDataId, String fileTemplateNo, String fileNo, String fileName, String applicantIdNo, int status, ServiceContext serviceContext) throws PortalException, SystemException { + public ApplicantData updateApplicantData(long groupId, long applicantDataId, String fileTemplateNo, String fileNo, String fileName, String applicantIdNo, String status, ServiceContext serviceContext) throws PortalException, SystemException { ApplicantData applicantData = null; Date now = new Date(); @@ -166,8 +166,12 @@ public ApplicantData updateApplicantData(long groupId, long applicantDataId, Str applicantData.setFileTemplateNo(fileTemplateNo); applicantData.setFileNo(fileNo); applicantData.setFileName(fileName); - applicantData.setApplicantIdNo(applicantIdNo); - applicantData.setStatus(status); + if(Validator.isNotNull(applicantIdNo)) { + applicantData.setApplicantIdNo(applicantIdNo); + } + if(Validator.isNotNull(status)) { + applicantData.setStatus(Validator.isNotNull(status) ? Integer.parseInt(status) : 0); + } applicantData.setApplicantDataType(0); applicantData = applicantDataPersistence.update(applicantData); @@ -298,7 +302,7 @@ public ApplicantData updateApplicantData(long groupId, String fileNo, String fileName, String applicantIdNo, - int status, + String status, String sourceFileName, InputStream inputStream, ServiceContext serviceContext) throws PortalException, SystemException { ApplicantData applicantData = null; @@ -314,8 +318,12 @@ public ApplicantData updateApplicantData(long groupId, applicantData.setFileTemplateNo(fileTemplateNo); applicantData.setFileNo(fileNo); applicantData.setFileName(fileName); - applicantData.setApplicantIdNo(applicantIdNo); - applicantData.setStatus(status); + if(Validator.isNotNull(applicantIdNo)) { + applicantData.setApplicantIdNo(applicantIdNo); + } + if(Validator.isNotNull(status)) { + applicantData.setStatus(Validator.isNotNull(status) ? Integer.parseInt(status) : 0); + } applicantData.setApplicantDataType(0); if (applicantData.getFileEntryId() != 0) { @@ -355,17 +363,23 @@ private String getFileName(String sourceFileName) { return Validator.isNotNull(ext) ? (System.currentTimeMillis() + StringPool.PERIOD + ext) : String.valueOf(System.currentTimeMillis()); } - private FileEntry uploadApplicantDataFile(long userId, long groupId, + public FileEntry uploadApplicantDataFile(long userId, long groupId, InputStream inputStream, String sourceFileName, - String fileType, long fileSize, ServiceContext serviceContext) + String fileType, long fileSize, ServiceContext serviceContext) throws Exception { return uploadFile(userId, groupId, 0, inputStream, sourceFileName, fileType, fileSize, FOLDER_NAME_APPLICANT_DATA_FILE, serviceContext); } + @Override + public FileEntry uploadFileDLEntry(long userId, long groupId, InputStream inputStream, String sourceFileName, String fileType, long fileSize, ServiceContext serviceContext) throws Exception { + return uploadFile(userId, groupId, 0, inputStream, sourceFileName, + fileType, fileSize, FOLDER_NAME_APPLICANT_DATA_FILE, serviceContext); + } + private FileEntry uploadFile(long userId, long groupId, long fileEntryId, InputStream inputStream, String sourceFileName, - String fileType, long fileSize, String destination, ServiceContext serviceContext) + String fileType, long fileSize, String destination, ServiceContext serviceContext) throws Exception { FileEntry fileEntry = null; diff --git a/modules/backend-usermgt/backend-usermgt-service/src/main/java/org/opencps/usermgt/service/impl/ApplicantLocalServiceImpl.java b/modules/backend-usermgt/backend-usermgt-service/src/main/java/org/opencps/usermgt/service/impl/ApplicantLocalServiceImpl.java index c75b84b043..fed66aa3ad 100644 --- a/modules/backend-usermgt/backend-usermgt-service/src/main/java/org/opencps/usermgt/service/impl/ApplicantLocalServiceImpl.java +++ b/modules/backend-usermgt/backend-usermgt-service/src/main/java/org/opencps/usermgt/service/impl/ApplicantLocalServiceImpl.java @@ -20,6 +20,8 @@ import java.util.List; import com.liferay.counter.kernel.model.Counter; +import com.liferay.portal.kernel.dao.orm.DynamicQuery; +import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil; import org.opencps.backend.usermgt.service.util.ConfigConstants; import org.opencps.backend.usermgt.service.util.ConfigProps; import org.opencps.datamgt.constants.DataMGTConstants; @@ -42,6 +44,7 @@ import com.liferay.portal.kernel.exception.NoSuchUserException; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONObject; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; @@ -177,7 +180,7 @@ public Applicant updateApplication(ServiceContext context, long groupId, long ap Date idDate = DateTimeUtils.stringToDate(applicantIdDate); _log.debug("ADD APPLICANT | profile: "+profile); if (applicantId == 0) { - + _log.info("4444444"); validateAdd(applicantName, applicantIdType, applicantIdNo, applicantIdDate); validateApplicantDuplicate(groupId, context.getCompanyId(), contactTelNo, applicantIdNo, contactEmail); @@ -193,9 +196,10 @@ public Applicant updateApplication(ServiceContext context, long groupId, long ap } applicantId = counterLocalService.increment(Applicant.class.getName()); - + + _log.info("5555555 : applicantId " + applicantId); applicant = applicantPersistence.create(applicantId); - _log.debug("ADD APPLICANT: " + applicant); + _log.info("ADD APPLICANT: " + applicant); Role roleDefault = RoleLocalServiceUtil.getRole(context.getCompanyId(), ServiceProps.APPLICANT_ROLE_NAME); @@ -351,6 +355,7 @@ public Applicant updateApplication(ServiceContext context, long groupId, long ap } + _log.info("7777777 : " + JSONFactoryUtil.looseSerialize(applicant)); return applicantPersistence.update(applicant); } @@ -1850,4 +1855,12 @@ public User addUser(String fullName, String screenName, String email, String pas // private Log _log = // LogFactoryUtil.getLog(ApplicantLocalServiceImpl.class); + public List getListApplicationByG_NotEqualZero_CDateToNow(Date date){ + DynamicQuery dynamicQuery = applicantLocalService.dynamicQuery(); + dynamicQuery.add(RestrictionsFactoryUtil.gt("createDate", date)); + dynamicQuery.add(RestrictionsFactoryUtil.ne("groupId", 0L)); + return applicantPersistence.findWithDynamicQuery(dynamicQuery); + } + + } diff --git a/modules/backend-usermgt/backend-usermgt-service/src/main/java/org/opencps/usermgt/sso/authentication/MICSSOAutoLogin.java b/modules/backend-usermgt/backend-usermgt-service/src/main/java/org/opencps/usermgt/sso/authentication/MICSSOAutoLogin.java index 2e2ab1b571..3713d4cf50 100644 --- a/modules/backend-usermgt/backend-usermgt-service/src/main/java/org/opencps/usermgt/sso/authentication/MICSSOAutoLogin.java +++ b/modules/backend-usermgt/backend-usermgt-service/src/main/java/org/opencps/usermgt/sso/authentication/MICSSOAutoLogin.java @@ -17,7 +17,7 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -@Component(immediate = true, service = AutoLogin.class) +//@Component(immediate = true, service = AutoLogin.class) public class MICSSOAutoLogin extends BaseAutoLogin { private String _SESSION_API_PRIFIX = "equinox.http.rest.v2"; private Log _log = LogFactoryUtil.getLog(MICSSOAutoLogin.class.getName()); @@ -62,7 +62,6 @@ protected User getUser(HttpServletRequest request){ } return _userLocalService.fetchUser(employee.getMappingUserId()); } catch (Exception e) { - _log.error(e); return null; } } diff --git a/modules/backend-usermgt/backend-usermgt-service/src/main/resources/service.properties b/modules/backend-usermgt/backend-usermgt-service/src/main/resources/service.properties index 78e34261ea..7b89777dd0 100644 --- a/modules/backend-usermgt/backend-usermgt-service/src/main/resources/service.properties +++ b/modules/backend-usermgt/backend-usermgt-service/src/main/resources/service.properties @@ -13,5 +13,5 @@ ## build.namespace=UserMgt - build.number=4272 - build.date=1615189078377 \ No newline at end of file + build.number=4277 + build.date=1625217739398 \ No newline at end of file diff --git a/modules/backend-zalo-hook/build.gradle b/modules/backend-zalo-hook/build.gradle index 3b3bb627bf..82c6b369bb 100644 --- a/modules/backend-zalo-hook/build.gradle +++ b/modules/backend-zalo-hook/build.gradle @@ -14,15 +14,28 @@ dependencies { compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations", version: "1.4.0" compileOnly group: "org.osgi", name: "org.osgi.service.log", version: "1.4.0" compileOnly group: 'com.liferay', name: 'com.liferay.petra.string', version: '2.0.1' - + + + + compileOnly project(":modules:backend-usermgt:backend-usermgt-api") + compileOnly project(":modules:backend-usermgt:backend-usermgt-service") + + compileOnly project(":modules:backend-communication:backend-communication-api") compileOnly project(":modules:backend-communication:backend-communication-service") compileOnly project(":modules:backend-dossiermgt:backend-dossiermgt-service") compileOnly project(":modules:backend-dossiermgt:backend-dossiermgt-api") + compileOnly 'org.osgi:org.osgi.service.jaxrs:1.0.0' compile name : "VNPostNGSPSDK", transitive:false compile name : "gson-2.8.0", transitive:false + + compile 'org.apache.httpcomponents:httpcore:4.4.3' + compile 'org.apache.httpcomponents:httpmime:4.5.1' + + + } repositories { diff --git a/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/api/ZaloWebhookManagement.java b/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/api/ZaloWebhookManagement.java new file mode 100644 index 0000000000..fbe00abb07 --- /dev/null +++ b/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/api/ZaloWebhookManagement.java @@ -0,0 +1,116 @@ +package org.opencps.zalo.hook.api; + +import com.liferay.portal.kernel.json.JSONException; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.model.Company; +import com.liferay.portal.kernel.model.User; +import com.liferay.portal.kernel.service.ServiceContext; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.Validator; +import org.opencps.communication.model.ServerConfig; +import org.opencps.communication.service.ServerConfigLocalServiceUtil; +import org.opencps.zalo.hook.constants.ZaloHookConstantKeys; +import org.opencps.zalo.hook.utils.ActionUtils; +import org.osgi.service.component.annotations.Component; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.*; +import javax.ws.rs.core.*; + +import org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants; + +import java.net.HttpURLConnection; +import java.util.Collections; +import java.util.Locale; +import java.util.Set; + + +@Component(immediate = true, property = { JaxrsWhiteboardConstants.JAX_RS_APPLICATION_BASE + "=/secure/zaloSearch", + JaxrsWhiteboardConstants.JAX_RS_NAME + "=OpenCPS.zaloSearch" }, service = Application.class) +public class ZaloWebhookManagement extends Application { + + + private static final String TYPE_ERROR = "typeError"; + private static final String SERVER_NO = "ZALO"; + private static final String PROTOCOL = "ZALO_INF"; + private static final long GROUP_ID = 35417; + + @Override + public Set getSingletons() { + return Collections.singleton(this); + } + + private static final Log _log = LogFactoryUtil.getLog(ZaloWebhookManagement.class); + + + @GET + @Path("/action") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public Response test(@Context HttpServletRequest request, @Context HttpServletResponse response, + @Context HttpHeaders header, @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext) { + return Response.status(HttpURLConnection.HTTP_OK).entity("OK").build(); + } + + @POST + @Path("/action") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + public Response doAction(@Context HttpServletRequest request, @Context HttpServletResponse response, + @Context HttpHeaders header, @Context Company company, @Context Locale locale, @Context User user, + @Context ServiceContext serviceContext, String body) throws JSONException { + ServerConfig serverConfig = null; + try { + serverConfig = ServerConfigLocalServiceUtil.getByServerNoAndProtocol(GROUP_ID,SERVER_NO,PROTOCOL); + } catch (Exception ex){ + _log.error(ex.getMessage()); + } + + if(Validator.isNotNull(serverConfig)){ + JSONObject config = JSONFactoryUtil.createJSONObject(serverConfig.getConfigs()); + String messageReply = ""; + try { + JSONObject bodyJson = JSONFactoryUtil.createJSONObject(body); + JSONObject sender = bodyJson.getJSONObject(ZaloHookConstantKeys.ZALO_V2_PARAM_SENDER); + String senderId = sender.getString(ZaloHookConstantKeys.ZALO_V2_PARAM_SENDER_ID); + try { + JSONObject message = bodyJson.getJSONObject(ZaloHookConstantKeys.ZALO_V2_ACTION_POST_MESSAGE); + String textJson = message.getString(ZaloHookConstantKeys.ZALO_V2_PARAM_MESSAGE_TEXT); + if(textJson.startsWith(StringPool.POUND) && !textJson.startsWith(StringPool.POUND + ZaloHookConstantKeys.ZALO_MESSAGE_SYNTAX_SEARCH_DOSSIER + "Menu")){ + textJson = textJson.replace(StringPool.POUND + ZaloHookConstantKeys.ZALO_MESSAGE_SYNTAX_SEARCH_DOSSIER, ""); + textJson = textJson.trim(); + String[] arrayText = textJson.split(StringPool.SPACE); + if(arrayText.length == 2){ + String dossierNo = arrayText[0]; + String password_ = arrayText[1]; + messageReply = ActionUtils.execFindDossier(dossierNo, password_, serverConfig); + } else { + messageReply = config.getString(TYPE_ERROR); + } + } else { + return Response.status(HttpURLConnection.HTTP_OK).entity("OK").build(); + } + + } catch (Exception ex){ + messageReply = config.getString(TYPE_ERROR); + } + + ActionUtils.execSendMessage(senderId, messageReply, serverConfig); + } catch (Exception e){ + _log.error(e.getMessage()); + } + + return Response.status(HttpURLConnection.HTTP_OK).entity("OK").build(); + } else { + + _log.error("Không tìm thấy serverConfig với điều kiện : {groupId : " +GROUP_ID+",serverNo: " +SERVER_NO +", protocol " + PROTOCOL + "}"); + + return Response.status(HttpURLConnection.HTTP_OK).entity("OK").build(); + } + } +} diff --git a/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/client/ZaloBaseClient.java b/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/client/ZaloBaseClient.java new file mode 100644 index 0000000000..3227c2ef73 --- /dev/null +++ b/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/client/ZaloBaseClient.java @@ -0,0 +1,187 @@ +package org.opencps.zalo.hook.client; + +import com.google.gson.JsonObject; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.net.URISyntaxException; +import java.util.Map; + +import org.apache.http.HttpEntity; +import org.apache.http.HttpHost; +import org.apache.http.ParseException; +import org.apache.http.StatusLine; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.utils.URIBuilder; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +import org.apache.http.entity.mime.MultipartEntityBuilder; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.util.EntityUtils; +import org.opencps.zalo.hook.exception.APIException; + +/** + * + * @author nghiadc + */ +public class ZaloBaseClient { + + protected boolean isUseProxy = false; + protected static final int CONNECTION_TIMEOUT = 2000; + protected static final int READ_TIMEOUT = 15000; + protected RequestConfig config = null; + + public void setIsUseProxy(boolean useProxy) { + this.isUseProxy = useProxy; + } + + public void setProxy(String host, int port) { + this.isUseProxy = true; + HttpHost proxy = new HttpHost(host, port); + config = RequestConfig.custom().setSocketTimeout(READ_TIMEOUT + CONNECTION_TIMEOUT) + .setConnectTimeout(CONNECTION_TIMEOUT) + .setConnectionRequestTimeout(READ_TIMEOUT) + .setProxy(proxy) + .build(); + } + + protected String sendHttpGetRequest(String enpointUrl, Map params, Map header) throws APIException { + CloseableHttpClient httpclient = HttpClients.createDefault(); + try { + try { + + URIBuilder builder = new URIBuilder(enpointUrl); + if (params != null) { + for (Map.Entry entry : params.entrySet()) { + builder.addParameter(entry.getKey(), entry.getValue()); + } + } + HttpGet httpget = new HttpGet(builder.toString()); + if (isUseProxy) { + httpget.setConfig(config); + } + if (header != null) { + for (Map.Entry entry : header.entrySet()) { + httpget.addHeader(entry.getKey(), entry.getValue()); + } + } + CloseableHttpResponse response = httpclient.execute(httpget); + try { + HttpEntity entity = response.getEntity(); + String rs = EntityUtils.toString(entity); + + StatusLine statusLine = response.getStatusLine(); + + return rs; + } finally { + response.close(); + } + } catch (IOException ex) { + throw new APIException(ex); + } finally { + httpclient.close(); + } + } catch (Exception ex) { + throw new APIException(ex); + } + } + + protected String sendHttpPostRequest(String enpointUrl, Map params, JsonObject data, Map header) throws APIException { + CloseableHttpClient httpclient = HttpClients.createDefault(); + try { + try { + URIBuilder builder = new URIBuilder(enpointUrl); + + if (params != null) { + for (Map.Entry entry : params.entrySet()) { + builder.addParameter(entry.getKey(), entry.getValue()); + } + } + HttpPost httpPost = new HttpPost(builder.toString()); + if (isUseProxy) { + httpPost.setConfig(config); + } + if (header != null) { + for (Map.Entry entry : header.entrySet()) { + httpPost.addHeader(entry.getKey(), entry.getValue()); + } + } + httpPost.setEntity(new StringEntity(data.toString(), ContentType.APPLICATION_JSON)); + + CloseableHttpResponse response = httpclient.execute(httpPost); + try { + HttpEntity entity = response.getEntity(); + return EntityUtils.toString(entity); + } finally { + response.close(); + } + } catch (IOException ex) { + throw new APIException(ex); + } finally { + httpclient.close(); + } + } catch (APIException | IOException | ParseException | URISyntaxException ex) { + throw new APIException(ex); + } + } + + protected String sendHttpUploadRequest(String enpointUrl, File file, Map params, Map header) throws APIException { + CloseableHttpClient httpclient = HttpClients.createDefault(); + try { + try { + CloseableHttpClient httpClient = HttpClients.createDefault(); + URIBuilder builder = new URIBuilder(enpointUrl); + + if (params != null) { + for (Map.Entry entry : params.entrySet()) { + builder.addParameter(entry.getKey(), entry.getValue()); + } + } + HttpPost uploadFile = new HttpPost(builder.toString()); + + if (isUseProxy) { + uploadFile.setConfig(config); + } + if (header != null) { + for (Map.Entry entry : header.entrySet()) { + uploadFile.addHeader(entry.getKey(), entry.getValue()); + } + } + + MultipartEntityBuilder Mulbuilder = MultipartEntityBuilder.create(); +// for (Map.Entry entry : params.entrySet()) { +// builder.addTextBody(entry.getKey(), entry.getValue(), ContentType.TEXT_PLAIN); +// } + // This attaches the file to the POST: + Mulbuilder.addBinaryBody( + "file", + new FileInputStream(file), + ContentType.MULTIPART_FORM_DATA, + file.getName() + ); + HttpEntity multipart = Mulbuilder.build(); + uploadFile.setEntity(multipart); + CloseableHttpResponse response = httpClient.execute(uploadFile); + try { + HttpEntity entity = response.getEntity(); + return EntityUtils.toString(entity); + } finally { + response.close(); + } + + } catch (IOException ex) { + throw new APIException(ex); + } catch (URISyntaxException ex) { + throw new APIException(ex); + } finally { + httpclient.close(); + } + } catch (APIException | IOException | ParseException ex) { + throw new APIException(ex); + } + } +} diff --git a/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/client/ZaloOaClient.java b/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/client/ZaloOaClient.java new file mode 100644 index 0000000000..22fcf1a53c --- /dev/null +++ b/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/client/ZaloOaClient.java @@ -0,0 +1,54 @@ +package org.opencps.zalo.hook.client; + +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.google.gson.JsonSyntaxException; +import org.opencps.zalo.hook.config.APIConfig; +import org.opencps.zalo.hook.exception.APIException; + +import java.io.File; +import java.util.HashMap; +import java.util.Map; +import java.util.TreeMap; + +public class ZaloOaClient extends ZaloBaseClient{ + + public ZaloOaClient() { + } + + public JsonObject excuteRequest(String endPoint, String method, Map params, JsonObject bodyData) throws APIException { + File file = null; + Map sortedMap = new TreeMap<>(); + if (params == null) { + params = new HashMap<>(); + } + for (Map.Entry entrySet : params.entrySet()) { + String key = entrySet.getKey(); + Object value = entrySet.getValue(); + if (value instanceof File) { + file = (File) value; + } else { + sortedMap.put(key, value.toString()); + } + } + + String response; + if (file != null) { + response = sendHttpUploadRequest(endPoint, file, sortedMap, APIConfig.DEFAULT_HEADER); + } else { + if ("GET".equals(method.toUpperCase())) { + response = sendHttpGetRequest(endPoint, sortedMap, APIConfig.DEFAULT_HEADER); + } else { + response = sendHttpPostRequest(endPoint, sortedMap, bodyData, APIConfig.DEFAULT_HEADER); + } + } + JsonObject result = null; + try { + JsonParser parser = new JsonParser(); + result = parser.parse(response).getAsJsonObject(); + } catch (JsonSyntaxException e) { + throw new APIException("Response is not json: " + response); + } + return result; + } +} diff --git a/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/config/APIConfig.java b/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/config/APIConfig.java new file mode 100644 index 0000000000..01047cc3c9 --- /dev/null +++ b/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/config/APIConfig.java @@ -0,0 +1,42 @@ +package org.opencps.zalo.hook.config; + +import org.opencps.zalo.hook.exception.APIException; + +import java.io.File; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class APIConfig { + + public static final String DEFAULT_OA_API_VERSION = "v2.0"; + public static final String DEFAULT_3RDAPP_API_VERSION = "v2.0"; + public static final String DEFAULT_OA_API_BASE = "https://openapi.zaloapp.com/"; + + public static final String USER_AGENT = "zalosdk/2.0 Zalo Open API Java SDK"; + public static final String SDK_VERSION = "Java 2.0"; + public static final String SDK_SOURCE = "JavaSDK-2.0"; + public static final Map DEFAULT_HEADER = createDefaultHeader(); + public static String TEMPORARY_DIR = null; + + public static Map createDefaultHeader() { + Map map = new HashMap<>(); + map.put("User-Agent", USER_AGENT); + map.put("SDK_VERSION", SDK_VERSION); + map.put("SDK-Source", SDK_SOURCE); + return map; + } + + public static void setTempDir(String dir) throws APIException { + File file = new File(dir); + if (file.isDirectory()) { + try { + TEMPORARY_DIR = file.getCanonicalPath(); + return; + } catch (IOException ex) { + throw new APIException(ex); + } + } + throw new APIException(String.format("%s is not directory", dir)); + } +}; diff --git a/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/exception/APIException.java b/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/exception/APIException.java new file mode 100644 index 0000000000..ea5e0e74e3 --- /dev/null +++ b/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/exception/APIException.java @@ -0,0 +1,39 @@ +package org.opencps.zalo.hook.exception; + +public class APIException extends Exception { + + int code; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public APIException(int code, String message) { + super(message); + this.code = code; + } + + public APIException() { + super(); + } + + public APIException(Throwable e) { + super(e); + } + + public APIException(String message) { + super(message); + } + + public APIException(String message, Throwable e) { + super(message, e); + } + + public String toString() { + return "error: " + code + " | " + super.getMessage(); + } +} diff --git a/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/utils/ActionUtils.java b/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/utils/ActionUtils.java new file mode 100644 index 0000000000..67c292b9a2 --- /dev/null +++ b/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/utils/ActionUtils.java @@ -0,0 +1,108 @@ +package org.opencps.zalo.hook.utils; + +import com.google.gson.JsonObject; +import com.liferay.portal.kernel.json.JSONException; +import com.liferay.portal.kernel.json.JSONFactoryUtil; +import com.liferay.portal.kernel.json.JSONObject; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.Validator; +import org.opencps.communication.model.ServerConfig; +import org.opencps.dossiermgt.model.Dossier; +import org.opencps.dossiermgt.service.DossierLocalServiceUtil; +import org.opencps.zalo.hook.api.ZaloWebhookManagement; +import org.opencps.zalo.hook.client.ZaloOaClient; +import org.opencps.zalo.hook.exception.APIException; + +import java.util.HashMap; +import java.util.Map; + +public class ActionUtils { + private static final String OAID_TOKEN_ACCESS = "oaid_token_access"; + private static final String API_SEND_MESSAGE = "api_send_message"; + + private static final String DOSSIER_ERROR_PASSWORD_MESS = "dossierErrorPasswordMes"; + private static final String DOSSIER_NOT_FOUND_MES = "dossierNotFoundMes"; + private static final String DOSSIER_ERROR_FIND_MES = "dossierErrorFindMes"; + + + private static final Log _log = LogFactoryUtil.getLog(ZaloWebhookManagement.class); + + public static String execFindDossier(String dossierNo, String password_, ServerConfig serverConfig) throws JSONException { + + JSONObject config = JSONFactoryUtil.createJSONObject(serverConfig.getConfigs()); + + Dossier dossier = null; + try { + dossier = DossierLocalServiceUtil.fetchByDO_NO(dossierNo); + } catch (Exception ex){ + _log.error(ex.getMessage()); + return config.getString(DOSSIER_ERROR_FIND_MES); + } + if(Validator.isNotNull(dossier) ){ + if(dossier.getPassword().equals(password_)){ + return generateMessage(dossier); + } else { + return config.getString(DOSSIER_ERROR_PASSWORD_MESS); + } + } else { + return config.getString(DOSSIER_NOT_FOUND_MES); + } + + + + } + + private static String generateMessage(Dossier dossier){ + String onlineText = ""; + if(dossier.getOnline()){ + onlineText = "Hồ sơ nộp trực tuyến"; + } else { + onlineText = "Hồ sơ nộp trực tiếp"; + } + String context = "Kết quả tra cứu: " + + "\n + Mã hồ sơ: " + dossier.getDossierNo() + + "\n + Tên hồ sơ: " + dossier.getDossierName() + + "\n + Trạng thái: " + dossier.getDossierStatusText() + + "\n + Đơn vị tiếp nhận: " + dossier.getGovAgencyName() + + "\n + Ngày tiếp nhận: " + DatetimeUtil.convertDateToString(dossier.getReceiveDate()) + + "\n + Ngày hẹn trả: " + DatetimeUtil.convertDateToString(dossier.getDueDate()) + + "\n + Ngày có kết quả: " + DatetimeUtil.convertDateToString(dossier.getReleaseDate()) + + "\n + Hình thức nộp: " + onlineText + + "\n + Thư điện tử: " + dossier.getContactEmail(); + + return context; + } + public static void execSendMessage(String idSender, String replyMessage, ServerConfig serverConfig) throws APIException, JSONException { + + JSONObject config = JSONFactoryUtil.createJSONObject(serverConfig.getConfigs()); + + String access_token = config.getString(OAID_TOKEN_ACCESS); + String api_send_message = config.getString(API_SEND_MESSAGE); + + ZaloOaClient client = new ZaloOaClient(); + + if(Validator.isNotNull(access_token)){ + Map params = new HashMap<>(); + params.put("access_token", access_token); + + JsonObject id = new JsonObject(); + id.addProperty("user_id", idSender); + + JsonObject text = new JsonObject(); + text.addProperty("text", replyMessage); + + JsonObject bodyRaw = new JsonObject(); + bodyRaw.add("recipient", id); + bodyRaw.add("message", text); + + client.excuteRequest(api_send_message, "POST", params, bodyRaw); + } else { + _log.error("Please config "+OAID_TOKEN_ACCESS+" in serverConfig where serverConfigId = " + serverConfig.getServerConfigId()); + } + + + } + + +} diff --git a/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/utils/DatetimeUtil.java b/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/utils/DatetimeUtil.java new file mode 100644 index 0000000000..702d5266b3 --- /dev/null +++ b/modules/backend-zalo-hook/src/main/java/org/opencps/zalo/hook/utils/DatetimeUtil.java @@ -0,0 +1,101 @@ +package org.opencps.zalo.hook.utils; + +import com.liferay.petra.string.StringPool; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.DateFormatFactoryUtil; +import com.liferay.portal.kernel.util.TimeZoneUtil; +import com.liferay.portal.kernel.util.Validator; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.TimeZone; + + +/** + * @author trungnt + * + */ +public class DatetimeUtil { + private static final Log _log = LogFactoryUtil.getLog(DatetimeUtil.class); + + public static final String _YYYY_MM_DD = "yyyy-MM-dd"; + public static final String _YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; + + public static final String _VN_TIME_ZONE = "Asia/Ho_Chi_Minh"; + + public static String convertTimestampToStringDatetime(long time, String pattern) { + if (time <= 0) { + return StringPool.BLANK; + } + DateFormat dateFormat = DateFormatFactoryUtil.getSimpleDateFormat(pattern); + + Calendar calendar = Calendar.getInstance(); + + calendar.setTimeInMillis(time); + + calendar.setTimeZone(TimeZone.getTimeZone(_VN_TIME_ZONE)); + + dateFormat.setTimeZone(TimeZone.getTimeZone(_VN_TIME_ZONE)); + + return dateFormat.format(calendar.getTime()); + } + + public static long convertDateToTimestamp(Date date) { + + if (date == null) { + return 0; + } + + Calendar calendar = Calendar.getInstance(); + + calendar.setTime(date); + + return calendar.getTimeInMillis(); + } + public static String convertDatetoDateString(Date date) { + if (date == null) { + return null; + } + DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); + String strDate = dateFormat.format(date); + return strDate; + } + public static String convertDatetoDateTimeString(Date date) { + if (date == null) { + return null; + } + date.setSeconds(0); + DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String strDate = dateFormat.format(date); + return strDate; + } + public static String convertDateToString(Date date) { + return convertDateToString(date, _YYYY_MM_DD_HH_MM_SS); + } + + public static String convertDateToString(Date date, String pattern) { + try { + DateFormat dateFormat = DateFormatFactoryUtil.getSimpleDateFormat( + pattern); + + if (Validator.isNull(date) || Validator.isNull(pattern)) { + return StringPool.BLANK; + } + + dateFormat.setTimeZone(TimeZoneUtil.getTimeZone(_VN_TIME_ZONE)); + + Calendar calendar = Calendar.getInstance(); + + calendar.setTime(date); + + return dateFormat.format(calendar.getTime()); + } catch(Exception e) { + _log.debug(e); + return StringPool.BLANK; + } + } + +} diff --git a/modules/backend-zalo-hook/src/main/resources/META-INF/resources/configuration/com.liferay.portal.remote.cxf.common.configuration.CXFEndpointPublisherConfiguration-cxf b/modules/backend-zalo-hook/src/main/resources/META-INF/resources/configuration/com.liferay.portal.remote.cxf.common.configuration.CXFEndpointPublisherConfiguration-cxf new file mode 100644 index 0000000000..d9e568a96b --- /dev/null +++ b/modules/backend-zalo-hook/src/main/resources/META-INF/resources/configuration/com.liferay.portal.remote.cxf.common.configuration.CXFEndpointPublisherConfiguration-cxf @@ -0,0 +1,2 @@ +contextPath=/zaloSearch +authVerifierProperties=auth.verifier.BasicAuthHeaderAuthVerifier.urls.includes=* diff --git a/modules/backend-zalo-hook/src/main/resources/META-INF/resources/configuration/com.liferay.portal.remote.rest.extender.configuration.RestExtenderConfiguration-rest b/modules/backend-zalo-hook/src/main/resources/META-INF/resources/configuration/com.liferay.portal.remote.rest.extender.configuration.RestExtenderConfiguration-rest new file mode 100644 index 0000000000..966cd31218 --- /dev/null +++ b/modules/backend-zalo-hook/src/main/resources/META-INF/resources/configuration/com.liferay.portal.remote.rest.extender.configuration.RestExtenderConfiguration-rest @@ -0,0 +1,2 @@ +contextPath=/zaloSearch +jaxRsApplicationFilterStrings=(component.name=org.opencps.zalo.hook.api.ZaloWebhookManagement) \ No newline at end of file diff --git a/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/action/impl/KeyPayV3ActionImpl.java b/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/action/impl/KeyPayV3ActionImpl.java index ea97cdbce7..70030b60f8 100644 --- a/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/action/impl/KeyPayV3ActionImpl.java +++ b/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/action/impl/KeyPayV3ActionImpl.java @@ -75,7 +75,7 @@ public String createPaylater(User user, long dossierId, ServiceContext serviceCo try { - Dossier dossier = DossierLocalServiceUtil.fetchDossier(dossierId); + Dossier dossier = DossierLocalServiceUtil.findDossierById(dossierId); _log.info("DossierId" + dossierId); _log.info("Dossier" + JSONFactoryUtil.looseSerialize(dossier)); PaymentFile paymentFile = PaymentFileLocalServiceUtil.getByDossierId(dossier.getGroupId(), dossierId); @@ -257,12 +257,13 @@ public File getQrCode(User user, long dossierId, ServiceContext serviceContext, try { Dossier dossier = DossierLocalServiceUtil.fetchDossier(dossierId); PaymentFile paymentFile = PaymentFileLocalServiceUtil.findPaymentFileByDossierId(dossier.getGroupId(), dossierId); - JSONObject data = JSONFactoryUtil.createJSONObject(paymentFile.getEpaymentProfile()) - .getJSONObject(KeyPayTerm.KEYPAY_LATE_CONFIG); - String imageStr = data.getString(KeyPayV3Term.QRCODE_PAY); + JSONObject data = JSONFactoryUtil.createJSONObject(paymentFile.getEpaymentProfile()); + JSONObject keyPayLateConfig = JSONFactoryUtil.createJSONObject(data.getString(KeyPayTerm.KEYPAY_LATE_CONFIG)); + String imageStr = keyPayLateConfig.getString(KeyPayV3Term.QRCODE_PAY); if(Validator.isNotNull(imaStr)){ imageStr = imaStr; } + _log.debug("Image: " + imageStr); if(Validator.isNotNull(imageStr)) { String imageDataBytes = imageStr.split(",")[1]; diff --git a/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/action/impl/PayGateIntegrationActionImpl.java b/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/action/impl/PayGateIntegrationActionImpl.java index 78547bc804..9d0085f5ae 100644 --- a/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/action/impl/PayGateIntegrationActionImpl.java +++ b/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/action/impl/PayGateIntegrationActionImpl.java @@ -789,7 +789,7 @@ public String kpCreateTransaction(User user, long groupId, long dossierId, Servi // TODO: fix bill_info.put(PayGateTerm.MADVC, serviceCodeDVCQG + schema.getString(PayGateTerm.MADVCAPPEND));// chua xd bill_info.put(PayGateTerm.TENDVC, dossier.getServiceName());// chua xd - bill_info.put(PayGateTerm.NOIDUNGTHANHTOAN, paymentFile.getPaymentNote()); + bill_info.put(PayGateTerm.NOIDUNGTHANHTOAN, Validator.isNotNull(paymentFile.getPaymentNote()) ? paymentFile.getPaymentNote() : "Thu phí, lệ phí"); bill_info.put(PayGateTerm.MALOAIHINHTHUPHAT, "");//ko bb; bill_info.put(PayGateTerm.HOTENNGUOINOP, dossier.getApplicantName()); @@ -821,7 +821,7 @@ public String kpCreateTransaction(User user, long groupId, long dossierId, Servi JSONArray dskhoannop = JSONFactoryUtil.createJSONArray(); JSONObject dskhoannop_obj = JSONFactoryUtil.createJSONObject(); - dskhoannop_obj.put(PayGateTerm.NOIDUNG, paymentFile.getPaymentNote()); + dskhoannop_obj.put(PayGateTerm.NOIDUNG, Validator.isNotNull(paymentFile.getPaymentNote()) ? paymentFile.getPaymentNote() : "Thu phí, lệ phí"); dskhoannop_obj.put(PayGateTerm.SOTIEN, String.valueOf(paymentFile.getPaymentAmount())); dskhoannop.put(dskhoannop_obj); diff --git a/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/application/PayGateIntegrationApplication.java b/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/application/PayGateIntegrationApplication.java index a82bdc3750..260325125c 100644 --- a/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/application/PayGateIntegrationApplication.java +++ b/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/application/PayGateIntegrationApplication.java @@ -45,6 +45,7 @@ import org.opencps.dossiermgt.model.PaymentFile; import org.opencps.dossiermgt.service.DossierLocalServiceUtil; import org.opencps.dossiermgt.service.PaymentFileLocalServiceUtil; +import org.opencps.event.message.KeypayV3Event; import org.osgi.service.component.annotations.Component; import org.osgi.service.jaxrs.whiteboard.JaxrsWhiteboardConstants; @@ -441,12 +442,14 @@ public Response getQR(@Context HttpServletRequest request, @Context HttpServletR PaymentFile paymentFile = PaymentFileLocalServiceUtil.findPaymentFileByDossierId(dossier.getGroupId(), dossierId); JSONObject data = JSONFactoryUtil.createJSONObject(paymentFile.getEpaymentProfile()) .getJSONObject(KeyPayTerm.KEYPAY_LATE_CONFIG); + _log.debug("PaymentFile: " + JSONFactoryUtil.looseSerialize(data)); String keySuccess = data.getString(KeyPayV3Term.KEY_PAY_SUCCESS); String keyFail = data.getString(KeyPayV3Term.KEY_PAY_FAIL); String qrCode = data.getString(KeyPayV3Term.QRCODE_PAY); String imageStr = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wCEAAgICAgJCAkKCgkNDgwODRMREBARExwUFhQWFBwrGx8bGx8bKyYuJSMlLiZENS8vNUROQj5CTl9VVV93cXecnNEBCAgICAkICQoKCQ0ODA4NExEQEBETHBQWFBYUHCsbHxsbHxsrJi4lIyUuJkQ1Ly81RE5CPkJOX1VVX3dxd5yc0f/CABEIABQAFAMBIgACEQEDEQH/xAAVAAEBAAAAAAAAAAAAAAAAAAAAB//aAAgBAQAAAAC/gH//xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oACAECEAAAAA//xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oACAEDEAAAAA//xAAUEAEAAAAAAAAAAAAAAAAAAAAw/9oACAEBAAE/AB//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAECAQE/AB//xAAUEQEAAAAAAAAAAAAAAAAAAAAg/9oACAEDAQE/AB//2Q=="; + _log.debug("KeySuccess: " + keySuccess); if(Validator.isNotNull(keySuccess) || Validator.isNotNull(keyFail) && Validator.isNull(qrCode)){ - System.out.println("Vaoo " + tryCount); + _log.debug("Count " + tryCount); try { file = keypayAction.getQrCode(user, dossierId, serviceContext, request, response, imageStr); break; @@ -455,7 +458,6 @@ public Response getQR(@Context HttpServletRequest request, @Context HttpServletR } } - System.out.println("Vaoo " + tryCount); file = keypayAction.getQrCode(user, dossierId, serviceContext, request, response,""); tryCount++; if (tryCount == MAX_TRY_COUNT ) break; diff --git a/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/util/KeyPayV3Utils.java b/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/util/KeyPayV3Utils.java index 5a3b1f7067..37454a6196 100644 --- a/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/util/KeyPayV3Utils.java +++ b/modules/pay-gate-integration/src/main/java/org/fds/opencps/paygate/integration/util/KeyPayV3Utils.java @@ -71,7 +71,7 @@ public static JSONObject postAPI(String endpoint, JSONObject data) { } result = JSONFactoryUtil.createJSONObject(sb.toString()); - _log.info("result " + result); +// _log.info("result " + result); } } catch (Exception e) { diff --git a/modules/sync-tracking/sync-tracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalServiceUtil.java b/modules/sync-tracking/sync-tracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalServiceUtil.java index 37ebaaae01..a26fddba21 100644 --- a/modules/sync-tracking/sync-tracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalServiceUtil.java +++ b/modules/sync-tracking/sync-tracking-api/src/main/java/org/opencps/synctracking/service/SyncTrackingLocalServiceUtil.java @@ -16,7 +16,6 @@ import aQute.bnd.annotation.ProviderType; -import com.liferay.portal.kernel.json.JSONFactoryUtil; import org.osgi.framework.Bundle; import org.osgi.framework.FrameworkUtil; diff --git a/modules/sync-tracking/sync-tracking-service/src/main/java/org/opencps/synctracking/action/impl/SyncTrackingActionImpl.java b/modules/sync-tracking/sync-tracking-service/src/main/java/org/opencps/synctracking/action/impl/SyncTrackingActionImpl.java index 27cba54c0e..2ccf52f3ea 100644 --- a/modules/sync-tracking/sync-tracking-service/src/main/java/org/opencps/synctracking/action/impl/SyncTrackingActionImpl.java +++ b/modules/sync-tracking/sync-tracking-service/src/main/java/org/opencps/synctracking/action/impl/SyncTrackingActionImpl.java @@ -1,5 +1,6 @@ package org.opencps.synctracking.action.impl; +import com.liferay.portal.kernel.json.JSONFactoryUtil; import com.liferay.portal.kernel.json.JSONObject; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; diff --git a/modules/sync-tracking/sync-tracking-service/src/main/java/org/opencps/synctracking/service/impl/SyncTrackingLocalServiceImpl.java b/modules/sync-tracking/sync-tracking-service/src/main/java/org/opencps/synctracking/service/impl/SyncTrackingLocalServiceImpl.java index 82bf9a35a7..1580b8967f 100644 --- a/modules/sync-tracking/sync-tracking-service/src/main/java/org/opencps/synctracking/service/impl/SyncTrackingLocalServiceImpl.java +++ b/modules/sync-tracking/sync-tracking-service/src/main/java/org/opencps/synctracking/service/impl/SyncTrackingLocalServiceImpl.java @@ -105,7 +105,7 @@ public SyncTracking getByReferenceUid(long groupId, String referenceUid) { } public SyncTracking createSyncTrackingManual(SyncTrackingQuery syncTrackingQuery) { - System.out.println("SyncTrackingQuery: " + JSONFactoryUtil.looseSerialize(syncTrackingQuery)); +// System.out.println("SyncTrackingQuery: " + JSONFactoryUtil.looseSerialize(syncTrackingQuery)); long syncTrackingId = counterLocalService.increment(SyncTracking.class.getName()); Date now = new Date(); @@ -153,4 +153,5 @@ public SyncTracking createSyncTrackingManual(SyncTrackingQuery syncTrackingQuery return syncTracking; } + } \ No newline at end of file diff --git a/modules/sync-tracking/sync-tracking-service/src/main/resources/service.properties b/modules/sync-tracking/sync-tracking-service/src/main/resources/service.properties index aa807ccbff..0e3ff9d7c4 100644 --- a/modules/sync-tracking/sync-tracking-service/src/main/resources/service.properties +++ b/modules/sync-tracking/sync-tracking-service/src/main/resources/service.properties @@ -13,5 +13,5 @@ ## build.namespace=logReport - build.number=25 - build.date=1614053919141 \ No newline at end of file + build.number=26 + build.date=1623579308103 \ No newline at end of file diff --git a/wars/v1/build.gradle b/wars/v1/build.gradle index 672307abc7..931d6deefd 100644 --- a/wars/v1/build.gradle +++ b/wars/v1/build.gradle @@ -49,7 +49,7 @@ dependencies { compileOnly project(":modules:backend-communication:backend-communication-api") compileOnly project(":modules:backend-communication:backend-communication-service") // https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind - compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.1.4' + compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8' //compileOnly project(":modules:backend-deliverable:backend-deliverable-api") //compileOnly project(":modules:backend-deliverable:backend-deliverable-service") diff --git a/wars/v1/src/main/java/org/graphql/api/controller/impl/GraphQLController.java b/wars/v1/src/main/java/org/graphql/api/controller/impl/GraphQLController.java index f1c5b3cef0..c9887eef06 100644 --- a/wars/v1/src/main/java/org/graphql/api/controller/impl/GraphQLController.java +++ b/wars/v1/src/main/java/org/graphql/api/controller/impl/GraphQLController.java @@ -85,7 +85,6 @@ public ResponseEntity dataitem(@RequestBody String query) { public ResponseEntity adminconfig(HttpServletRequest request, HttpServletResponse response, @RequestBody String query) { ExecutionResult result = adminConfigService.getGraphQL().execute(query); - Gson gson = new Gson(); String json = gson.toJson(result.getData(), LinkedHashMap.class); diff --git a/wars/v1/src/main/java/org/graphql/api/controller/impl/RestfulController.java b/wars/v1/src/main/java/org/graphql/api/controller/impl/RestfulController.java index fc2ad60c3f..9bad6139cd 100644 --- a/wars/v1/src/main/java/org/graphql/api/controller/impl/RestfulController.java +++ b/wars/v1/src/main/java/org/graphql/api/controller/impl/RestfulController.java @@ -1771,7 +1771,7 @@ public String getDeliverableTest(HttpServletRequest request, HttpServletResponse searchContext, userId); result.put(ConstantUtils.TOTAL, total); - System.out.println("total: " + total); +// System.out.println("total: " + total); } else { result.put(ConstantUtils.TOTAL, 0); } @@ -1786,7 +1786,7 @@ public String getDeliverableTest(HttpServletRequest request, HttpServletResponse _log.debug(e); } - System.out.println("result: " + result); +// System.out.println("result: " + result); return result.toJSONString(); } @@ -1864,7 +1864,7 @@ public String getFile(HttpServletRequest request, HttpServletResponse response, throw new ResourceNotFoundException(); } result = "/documents/" + fileEntry.getGroupId() + StringPool.FORWARD_SLASH + fileEntry.getFolderId() - + StringPool.FORWARD_SLASH + fileEntry.getTitle() + StringPool.FORWARD_SLASH + fileEntry.getUuid(); + + StringPool.FORWARD_SLASH + fileEntry.getFileName() + StringPool.FORWARD_SLASH + fileEntry.getUuid(); } catch (Exception e) { _log.debug(e);