+ * This interface and its corresponding implementation {@link it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link it.mwg.sicilia.sue.model.impl.ApiSettingImpl}. + *
+ * + * @author Manifattura Web Group Srl + * @see ApiSetting + * @see it.mwg.sicilia.sue.model.impl.ApiSettingImpl + * @see it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl + * @generated + */ +public interface ApiSettingModel extends BaseModel+ * This class is a wrapper for {@link ApiSetting}. + *
+ * + * @author Manifattura Web Group Srl + * @see ApiSetting + * @generated + */ +public class ApiSettingWrapper implements ApiSetting, ModelWrappertrue
if this sportello is attivo.
+ *
+ * @return true
if this sportello is attivo; false
otherwise
+ */
+ public boolean isAttivo();
/**
- * Sets the nonce of this sportello.
+ * Sets whether this sportello is attivo.
*
- * @param nonce the nonce of this sportello
+ * @param attivo the attivo of this sportello
*/
- public void setNonce(String nonce);
+ public void setAttivo(boolean attivo);
@Override
public boolean isNew();
diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloSoap.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloSoap.java
index 1dc57500..7ec35dff 100644
--- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloSoap.java
+++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloSoap.java
@@ -38,9 +38,10 @@ public class SportelloSoap implements Serializable {
soapModel.setUserName(model.getUserName());
soapModel.setCreateDate(model.getCreateDate());
soapModel.setModifiedDate(model.getModifiedDate());
- soapModel.setLoginName(model.getLoginName());
- soapModel.setPassword(model.getPassword());
- soapModel.setNonce(model.getNonce());
+ soapModel.setEmail(model.getEmail());
+ soapModel.setComuneId(model.getComuneId());
+ soapModel.setApiKey(model.getApiKey());
+ soapModel.setAttivo(model.getAttivo());
return soapModel;
}
@@ -149,28 +150,40 @@ public class SportelloSoap implements Serializable {
_modifiedDate = modifiedDate;
}
- public String getLoginName() {
- return _loginName;
+ public String getEmail() {
+ return _email;
}
- public void setLoginName(String loginName) {
- _loginName = loginName;
+ public void setEmail(String email) {
+ _email = email;
}
- public String getPassword() {
- return _password;
+ public long getComuneId() {
+ return _comuneId;
}
- public void setPassword(String password) {
- _password = password;
+ public void setComuneId(long comuneId) {
+ _comuneId = comuneId;
}
- public String getNonce() {
- return _nonce;
+ public String getApiKey() {
+ return _apiKey;
}
- public void setNonce(String nonce) {
- _nonce = nonce;
+ public void setApiKey(String apiKey) {
+ _apiKey = apiKey;
+ }
+
+ public boolean getAttivo() {
+ return _attivo;
+ }
+
+ public boolean isAttivo() {
+ return _attivo;
+ }
+
+ public void setAttivo(boolean attivo) {
+ _attivo = attivo;
}
private long _sportelloId;
@@ -180,7 +193,8 @@ public class SportelloSoap implements Serializable {
private String _userName;
private Date _createDate;
private Date _modifiedDate;
- private String _loginName;
- private String _password;
- private String _nonce;
+ private String _email;
+ private long _comuneId;
+ private String _apiKey;
+ private boolean _attivo;
}
\ No newline at end of file
diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloWrapper.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloWrapper.java
index db1e12c2..3c13c9de 100644
--- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloWrapper.java
+++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/model/SportelloWrapper.java
@@ -56,9 +56,10 @@ public class SportelloWrapper implements Sportello, ModelWrappertrue
if this sportello is attivo.
*
- * @param nonce the nonce of this sportello
+ * @return true
if this sportello is attivo; false
otherwise
*/
@Override
- public void setNonce(java.lang.String nonce) {
- _sportello.setNonce(nonce);
+ public boolean isAttivo() {
+ return _sportello.isAttivo();
+ }
+
+ /**
+ * Sets whether this sportello is attivo.
+ *
+ * @param attivo the attivo of this sportello
+ */
+ @Override
+ public void setAttivo(boolean attivo) {
+ _sportello.setAttivo(attivo);
}
@Override
@@ -472,6 +509,27 @@ public class SportelloWrapper implements Sportello, ModelWrapper
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
null
)
+ * @return the ordered range of matching rows
+ * @throws SystemException if a system exception occurred
+ */
+ @SuppressWarnings("rawtypes")
+ public java.util.List dynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
+ int end,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
+ /**
+ * Returns the number of rows that match the dynamic query.
+ *
+ * @param dynamicQuery the dynamic query
+ * @return the number of rows that match the dynamic query
+ * @throws SystemException if a system exception occurred
+ */
+ public long dynamicQueryCount(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
+ /**
+ * Returns the number of rows that match the dynamic query.
+ *
+ * @param dynamicQuery the dynamic query
+ * @param projection the projection to apply to the query
+ * @return the number of rows that match the dynamic query
+ * @throws SystemException if a system exception occurred
+ */
+ public long dynamicQueryCount(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
+ com.liferay.portal.kernel.dao.orm.Projection projection)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public it.mwg.sicilia.sue.model.ApiSetting fetchApiSetting(long id)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
+ /**
+ * Returns the api setting with the primary key.
+ *
+ * @param id the primary key of the api setting
+ * @return the api setting
+ * @throws PortalException if a api setting with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public it.mwg.sicilia.sue.model.ApiSetting getApiSetting(long id)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException;
+
+ @Override
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public com.liferay.portal.model.PersistedModel getPersistedModel(
+ java.io.Serializable primaryKeyObj)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException;
+
+ /**
+ * Returns a range of all the api settings.
+ *
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
null
)
+ * @return the ordered range of matching rows
+ * @throws SystemException if a system exception occurred
+ */
+ @SuppressWarnings("rawtypes")
+ 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)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getService()
+ .dynamicQuery(dynamicQuery, start, end, orderByComparator);
+ }
+
+ /**
+ * Returns the number of rows that match the dynamic query.
+ *
+ * @param dynamicQuery the dynamic query
+ * @return the number of rows that match the dynamic query
+ * @throws SystemException if a system exception occurred
+ */
+ public static long dynamicQueryCount(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getService().dynamicQueryCount(dynamicQuery);
+ }
+
+ /**
+ * Returns the number of rows that match the dynamic query.
+ *
+ * @param dynamicQuery the dynamic query
+ * @param projection the projection to apply to the query
+ * @return the number of rows that match the dynamic query
+ * @throws SystemException if a system exception occurred
+ */
+ public static long dynamicQueryCount(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
+ com.liferay.portal.kernel.dao.orm.Projection projection)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getService().dynamicQueryCount(dynamicQuery, projection);
+ }
+
+ public static it.mwg.sicilia.sue.model.ApiSetting fetchApiSetting(long id)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getService().fetchApiSetting(id);
+ }
+
+ /**
+ * Returns the api setting with the primary key.
+ *
+ * @param id the primary key of the api setting
+ * @return the api setting
+ * @throws PortalException if a api setting with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static it.mwg.sicilia.sue.model.ApiSetting getApiSetting(long id)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return getService().getApiSetting(id);
+ }
+
+ public static com.liferay.portal.model.PersistedModel getPersistedModel(
+ java.io.Serializable primaryKeyObj)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return getService().getPersistedModel(primaryKeyObj);
+ }
+
+ /**
+ * Returns a range of all the api settings.
+ *
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
null
)
+ * @return the ordered range of matching rows
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public java.util.List dynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
+ int end,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _apiSettingLocalService.dynamicQuery(dynamicQuery, start, end,
+ orderByComparator);
+ }
+
+ /**
+ * Returns the number of rows that match the dynamic query.
+ *
+ * @param dynamicQuery the dynamic query
+ * @return the number of rows that match the dynamic query
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public long dynamicQueryCount(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _apiSettingLocalService.dynamicQueryCount(dynamicQuery);
+ }
+
+ /**
+ * Returns the number of rows that match the dynamic query.
+ *
+ * @param dynamicQuery the dynamic query
+ * @param projection the projection to apply to the query
+ * @return the number of rows that match the dynamic query
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public long dynamicQueryCount(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
+ com.liferay.portal.kernel.dao.orm.Projection projection)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _apiSettingLocalService.dynamicQueryCount(dynamicQuery,
+ projection);
+ }
+
+ @Override
+ public it.mwg.sicilia.sue.model.ApiSetting fetchApiSetting(long id)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return _apiSettingLocalService.fetchApiSetting(id);
+ }
+
+ /**
+ * Returns the api setting with the primary key.
+ *
+ * @param id the primary key of the api setting
+ * @return the api setting
+ * @throws PortalException if a api setting with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public it.mwg.sicilia.sue.model.ApiSetting getApiSetting(long id)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return _apiSettingLocalService.getApiSetting(id);
+ }
+
+ @Override
+ public com.liferay.portal.model.PersistedModel getPersistedModel(
+ java.io.Serializable primaryKeyObj)
+ throws com.liferay.portal.kernel.exception.PortalException,
+ com.liferay.portal.kernel.exception.SystemException {
+ return _apiSettingLocalService.getPersistedModel(primaryKeyObj);
+ }
+
+ /**
+ * Returns a range of all the api settings.
+ *
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ * Caching information and settings can be found in portal.properties
+ *
service.xml
and rerun ServiceBuilder to regenerate this interface.
+ */
+
+ /**
+ * Returns the api setting where companyId = ? and key = ? or throws a {@link it.mwg.sicilia.sue.NoSuchApiSettingException} if it could not be found.
+ *
+ * @param companyId the company ID
+ * @param key the key
+ * @return the matching api setting
+ * @throws it.mwg.sicilia.sue.NoSuchApiSettingException if a matching api setting could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public it.mwg.sicilia.sue.model.ApiSetting findByCompanyIdKey(
+ long companyId, long key)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ it.mwg.sicilia.sue.NoSuchApiSettingException;
+
+ /**
+ * Returns the api setting where companyId = ? and key = ? or returns null
if it could not be found. Uses the finder cache.
+ *
+ * @param companyId the company ID
+ * @param key the key
+ * @return the matching api setting, or null
if a matching api setting could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public it.mwg.sicilia.sue.model.ApiSetting fetchByCompanyIdKey(
+ long companyId, long key)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
+ /**
+ * Returns the api setting where companyId = ? and key = ? or returns null
if it could not be found, optionally using the finder cache.
+ *
+ * @param companyId the company ID
+ * @param key the key
+ * @param retrieveFromCache whether to use the finder cache
+ * @return the matching api setting, or null
if a matching api setting could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public it.mwg.sicilia.sue.model.ApiSetting fetchByCompanyIdKey(
+ long companyId, long key, boolean retrieveFromCache)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
+ /**
+ * Removes the api setting where companyId = ? and key = ? from the database.
+ *
+ * @param companyId the company ID
+ * @param key the key
+ * @return the api setting that was removed
+ * @throws SystemException if a system exception occurred
+ */
+ public it.mwg.sicilia.sue.model.ApiSetting removeByCompanyIdKey(
+ long companyId, long key)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ it.mwg.sicilia.sue.NoSuchApiSettingException;
+
+ /**
+ * Returns the number of api settings where companyId = ? and key = ?.
+ *
+ * @param companyId the company ID
+ * @param key the key
+ * @return the number of matching api settings
+ * @throws SystemException if a system exception occurred
+ */
+ public int countByCompanyIdKey(long companyId, long key)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
+ /**
+ * Caches the api setting in the entity cache if it is enabled.
+ *
+ * @param apiSetting the api setting
+ */
+ public void cacheResult(it.mwg.sicilia.sue.model.ApiSetting apiSetting);
+
+ /**
+ * Caches the api settings in the entity cache if it is enabled.
+ *
+ * @param apiSettings the api settings
+ */
+ public void cacheResult(
+ java.util.Listnull
if it could not be found.
+ *
+ * @param id the primary key of the api setting
+ * @return the api setting, or null
if a api setting with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public it.mwg.sicilia.sue.model.ApiSetting fetchByPrimaryKey(long id)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
+ /**
+ * Returns all the api settings.
+ *
+ * @return the api settings
+ * @throws SystemException if a system exception occurred
+ */
+ public java.util.List
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
null
)
+ * @return the ordered range of api settings
+ * @throws SystemException if a system exception occurred
+ */
+ public java.util.List
+ * Caching information and settings can be found in portal.properties
+ *
service.xml
and rerun ServiceBuilder to regenerate this class.
+ */
+
+ /**
+ * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
+ */
+ public static void clearCache() {
+ getPersistence().clearCache();
+ }
+
+ /**
+ * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(com.liferay.portal.model.BaseModel)
+ */
+ public static void clearCache(ApiSetting apiSetting) {
+ getPersistence().clearCache(apiSetting);
+ }
+
+ /**
+ * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
+ */
+ public static long countWithDynamicQuery(DynamicQuery dynamicQuery)
+ throws SystemException {
+ return getPersistence().countWithDynamicQuery(dynamicQuery);
+ }
+
+ /**
+ * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
+ */
+ public static Listnull
if it could not be found. Uses the finder cache.
+ *
+ * @param companyId the company ID
+ * @param key the key
+ * @return the matching api setting, or null
if a matching api setting could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static it.mwg.sicilia.sue.model.ApiSetting fetchByCompanyIdKey(
+ long companyId, long key)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().fetchByCompanyIdKey(companyId, key);
+ }
+
+ /**
+ * Returns the api setting where companyId = ? and key = ? or returns null
if it could not be found, optionally using the finder cache.
+ *
+ * @param companyId the company ID
+ * @param key the key
+ * @param retrieveFromCache whether to use the finder cache
+ * @return the matching api setting, or null
if a matching api setting could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static it.mwg.sicilia.sue.model.ApiSetting fetchByCompanyIdKey(
+ long companyId, long key, boolean retrieveFromCache)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence()
+ .fetchByCompanyIdKey(companyId, key, retrieveFromCache);
+ }
+
+ /**
+ * Removes the api setting where companyId = ? and key = ? from the database.
+ *
+ * @param companyId the company ID
+ * @param key the key
+ * @return the api setting that was removed
+ * @throws SystemException if a system exception occurred
+ */
+ public static it.mwg.sicilia.sue.model.ApiSetting removeByCompanyIdKey(
+ long companyId, long key)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ it.mwg.sicilia.sue.NoSuchApiSettingException {
+ return getPersistence().removeByCompanyIdKey(companyId, key);
+ }
+
+ /**
+ * Returns the number of api settings where companyId = ? and key = ?.
+ *
+ * @param companyId the company ID
+ * @param key the key
+ * @return the number of matching api settings
+ * @throws SystemException if a system exception occurred
+ */
+ public static int countByCompanyIdKey(long companyId, long key)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().countByCompanyIdKey(companyId, key);
+ }
+
+ /**
+ * Caches the api setting in the entity cache if it is enabled.
+ *
+ * @param apiSetting the api setting
+ */
+ public static void cacheResult(
+ it.mwg.sicilia.sue.model.ApiSetting apiSetting) {
+ getPersistence().cacheResult(apiSetting);
+ }
+
+ /**
+ * Caches the api settings in the entity cache if it is enabled.
+ *
+ * @param apiSettings the api settings
+ */
+ public static void cacheResult(
+ java.util.Listnull
if it could not be found.
+ *
+ * @param id the primary key of the api setting
+ * @return the api setting, or null
if a api setting with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static it.mwg.sicilia.sue.model.ApiSetting fetchByPrimaryKey(long id)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().fetchByPrimaryKey(id);
+ }
+
+ /**
+ * Returns all the api settings.
+ *
+ * @return the api settings
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
null
)
+ * @return the ordered range of api settings
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.Listnull
if it could not be found. Uses the finder cache.
+ * Returns the sportello where comuneId = ? or returns null
if it could not be found. Uses the finder cache.
*
- * @param loginName the login name
+ * @param comuneId the comune ID
* @return the matching sportello, or null
if a matching sportello could not be found
* @throws SystemException if a system exception occurred
*/
- public it.mwg.sicilia.sue.model.Sportello fetchByLoginName(
- java.lang.String loginName)
+ public it.mwg.sicilia.sue.model.Sportello fetchByComuneId(long comuneId)
throws com.liferay.portal.kernel.exception.SystemException;
/**
- * Returns the sportello where loginName = ? or returns null
if it could not be found, optionally using the finder cache.
+ * Returns the sportello where comuneId = ? or returns null
if it could not be found, optionally using the finder cache.
*
- * @param loginName the login name
+ * @param comuneId the comune ID
* @param retrieveFromCache whether to use the finder cache
* @return the matching sportello, or null
if a matching sportello could not be found
* @throws SystemException if a system exception occurred
*/
- public it.mwg.sicilia.sue.model.Sportello fetchByLoginName(
- java.lang.String loginName, boolean retrieveFromCache)
+ public it.mwg.sicilia.sue.model.Sportello fetchByComuneId(long comuneId,
+ boolean retrieveFromCache)
throws com.liferay.portal.kernel.exception.SystemException;
/**
- * Removes the sportello where loginName = ? from the database.
+ * Removes the sportello where comuneId = ? from the database.
*
- * @param loginName the login name
+ * @param comuneId the comune ID
* @return the sportello that was removed
* @throws SystemException if a system exception occurred
*/
- public it.mwg.sicilia.sue.model.Sportello removeByLoginName(
- java.lang.String loginName)
+ public it.mwg.sicilia.sue.model.Sportello removeByComuneId(long comuneId)
throws com.liferay.portal.kernel.exception.SystemException,
it.mwg.sicilia.sue.NoSuchSportelloException;
/**
- * Returns the number of sportellos where loginName = ?.
+ * Returns the number of sportellos where comuneId = ?.
*
- * @param loginName the login name
+ * @param comuneId the comune ID
* @return the number of matching sportellos
* @throws SystemException if a system exception occurred
*/
- public int countByLoginName(java.lang.String loginName)
+ public int countByComuneId(long comuneId)
throws com.liferay.portal.kernel.exception.SystemException;
/**
diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/SportelloUtil.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/SportelloUtil.java
index b0cc8a25..344db9c0 100644
--- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/SportelloUtil.java
+++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/service/it/mwg/sicilia/sue/service/persistence/SportelloUtil.java
@@ -111,71 +111,71 @@ public class SportelloUtil {
}
/**
- * Returns the sportello where loginName = ? or throws a {@link it.mwg.sicilia.sue.NoSuchSportelloException} if it could not be found.
+ * Returns the sportello where comuneId = ? or throws a {@link it.mwg.sicilia.sue.NoSuchSportelloException} if it could not be found.
*
- * @param loginName the login name
+ * @param comuneId the comune ID
* @return the matching sportello
* @throws it.mwg.sicilia.sue.NoSuchSportelloException if a matching sportello could not be found
* @throws SystemException if a system exception occurred
*/
- public static it.mwg.sicilia.sue.model.Sportello findByLoginName(
- java.lang.String loginName)
+ public static it.mwg.sicilia.sue.model.Sportello findByComuneId(
+ long comuneId)
throws com.liferay.portal.kernel.exception.SystemException,
it.mwg.sicilia.sue.NoSuchSportelloException {
- return getPersistence().findByLoginName(loginName);
+ return getPersistence().findByComuneId(comuneId);
}
/**
- * Returns the sportello where loginName = ? or returns null
if it could not be found. Uses the finder cache.
+ * Returns the sportello where comuneId = ? or returns null
if it could not be found. Uses the finder cache.
*
- * @param loginName the login name
+ * @param comuneId the comune ID
* @return the matching sportello, or null
if a matching sportello could not be found
* @throws SystemException if a system exception occurred
*/
- public static it.mwg.sicilia.sue.model.Sportello fetchByLoginName(
- java.lang.String loginName)
+ public static it.mwg.sicilia.sue.model.Sportello fetchByComuneId(
+ long comuneId)
throws com.liferay.portal.kernel.exception.SystemException {
- return getPersistence().fetchByLoginName(loginName);
+ return getPersistence().fetchByComuneId(comuneId);
}
/**
- * Returns the sportello where loginName = ? or returns null
if it could not be found, optionally using the finder cache.
+ * Returns the sportello where comuneId = ? or returns null
if it could not be found, optionally using the finder cache.
*
- * @param loginName the login name
+ * @param comuneId the comune ID
* @param retrieveFromCache whether to use the finder cache
* @return the matching sportello, or null
if a matching sportello could not be found
* @throws SystemException if a system exception occurred
*/
- public static it.mwg.sicilia.sue.model.Sportello fetchByLoginName(
- java.lang.String loginName, boolean retrieveFromCache)
+ public static it.mwg.sicilia.sue.model.Sportello fetchByComuneId(
+ long comuneId, boolean retrieveFromCache)
throws com.liferay.portal.kernel.exception.SystemException {
- return getPersistence().fetchByLoginName(loginName, retrieveFromCache);
+ return getPersistence().fetchByComuneId(comuneId, retrieveFromCache);
}
/**
- * Removes the sportello where loginName = ? from the database.
+ * Removes the sportello where comuneId = ? from the database.
*
- * @param loginName the login name
+ * @param comuneId the comune ID
* @return the sportello that was removed
* @throws SystemException if a system exception occurred
*/
- public static it.mwg.sicilia.sue.model.Sportello removeByLoginName(
- java.lang.String loginName)
+ public static it.mwg.sicilia.sue.model.Sportello removeByComuneId(
+ long comuneId)
throws com.liferay.portal.kernel.exception.SystemException,
it.mwg.sicilia.sue.NoSuchSportelloException {
- return getPersistence().removeByLoginName(loginName);
+ return getPersistence().removeByComuneId(comuneId);
}
/**
- * Returns the number of sportellos where loginName = ?.
+ * Returns the number of sportellos where comuneId = ?.
*
- * @param loginName the login name
+ * @param comuneId the comune ID
* @return the number of matching sportellos
* @throws SystemException if a system exception occurred
*/
- public static int countByLoginName(java.lang.String loginName)
+ public static int countByComuneId(long comuneId)
throws com.liferay.portal.kernel.exception.SystemException {
- return getPersistence().countByLoginName(loginName);
+ return getPersistence().countByComuneId(comuneId);
}
/**
diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.properties b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.properties
index fed69cef..7f94ec66 100644
--- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.properties
+++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.properties
@@ -1,3 +1,3 @@
-IX_9824D813=sicilia_sue_Sportello.LoginName
-IX_9824D813=sicilia_sue_Sportello.loginName
-IX_F4E738BB=sicilia_sue_Sportello.userName
\ No newline at end of file
+IX_7B780A8D=sicilia_sue_ApiSetting.CompanyIdKey
+
+IX_8B2AB20B=sicilia_sue_Sportello.ComuneId
\ No newline at end of file
diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.sql b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.sql
index 924eb0ad..c1afa6ba 100644
--- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.sql
+++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/indexes.sql
@@ -1,2 +1,3 @@
-create index IX_9824D813 on sicilia_sue_Sportello (loginName);
-create index IX_F4E738BB on sicilia_sue_Sportello (userName);
\ No newline at end of file
+create unique index IX_7B780A8D on sicilia_sue_ApiSetting (companyId, key_);
+
+create unique index IX_8B2AB20B on sicilia_sue_Sportello (comuneId);
\ No newline at end of file
diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/tables.sql b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/tables.sql
index 7116a560..b98c487c 100644
--- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/tables.sql
+++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/sql/tables.sql
@@ -1,12 +1,20 @@
+create table sicilia_sue_ApiSetting (
+ id_ LONG not null primary key,
+ companyId LONG,
+ key_ LONG,
+ value STRING null
+);
+
create table sicilia_sue_Sportello (
sportelloId LONG not null primary key,
groupId LONG,
companyId LONG,
userId LONG,
- userName VARCHAR(75) null,
+ userName VARCHAR(240) null,
createDate DATE null,
modifiedDate DATE null,
- loginName VARCHAR(75) null,
- password_ VARCHAR(75) null,
- nonce VARCHAR(75) null
+ email VARCHAR(240) null,
+ comuneId LONG,
+ apiKey VARCHAR(240) null,
+ attivo BOOLEAN
);
\ No newline at end of file
diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml
index a56874b8..c568aa50 100644
--- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml
+++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml
@@ -2,7 +2,17 @@
+ * 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 ApiSettingImpl}. + *
+ * + * @author Manifattura Web Group Srl + * @see ApiSettingImpl + * @see it.mwg.sicilia.sue.model.ApiSetting + * @generated + */ +public abstract class ApiSettingBaseImpl extends ApiSettingModelImpl + implements ApiSetting { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. All methods that expect a api setting model instance should use the {@link ApiSetting} interface instead. + */ + @Override + public void persist() throws SystemException { + if (this.isNew()) { + ApiSettingLocalServiceUtil.addApiSetting(this); + } + else { + ApiSettingLocalServiceUtil.updateApiSetting(this); + } + } +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingCacheModel.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingCacheModel.java new file mode 100644 index 00000000..1f3d3910 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingCacheModel.java @@ -0,0 +1,101 @@ +/** + * 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 it.mwg.sicilia.sue.model.impl; + +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.model.CacheModel; + +import it.mwg.sicilia.sue.model.ApiSetting; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; + +/** + * The cache model class for representing ApiSetting in entity cache. + * + * @author Manifattura Web Group Srl + * @see ApiSetting + * @generated + */ +public class ApiSettingCacheModel implements CacheModel+ * 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 it.mwg.sicilia.sue.model.ApiSetting} interface. + *
+ * + * @author Manifattura Web Group Srl + */ +@SuppressWarnings("serial") +public class ApiSettingImpl extends ApiSettingBaseImpl { + /* + * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a api setting model instance + * should use the {@link it.mwg.sicilia.sue.model.ApiSetting} interface instead. + */ + public ApiSettingImpl() { + } +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingModelImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingModelImpl.java new file mode 100644 index 00000000..fc4b84bd --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/ApiSettingModelImpl.java @@ -0,0 +1,460 @@ +/** + * 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 it.mwg.sicilia.sue.model.impl; + +import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler; +import com.liferay.portal.kernel.json.JSON; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.ProxyUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.model.impl.BaseModelImpl; +import com.liferay.portal.service.ServiceContext; + +import com.liferay.portlet.expando.model.ExpandoBridge; +import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil; + +import it.mwg.sicilia.sue.model.ApiSetting; +import it.mwg.sicilia.sue.model.ApiSettingModel; +import it.mwg.sicilia.sue.model.ApiSettingSoap; + +import java.io.Serializable; + +import java.sql.Types; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * The base model implementation for the ApiSetting service. Represents a row in the "sicilia_sue_ApiSetting" database table, with each column mapped to a property of this class. + * + *+ * This implementation and its corresponding interface {@link it.mwg.sicilia.sue.model.ApiSettingModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link ApiSettingImpl}. + *
+ * + * @author Manifattura Web Group Srl + * @see ApiSettingImpl + * @see it.mwg.sicilia.sue.model.ApiSetting + * @see it.mwg.sicilia.sue.model.ApiSettingModel + * @generated + */ +@JSON(strict = true) +public class ApiSettingModelImpl extends BaseModelImpl- * 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 it.mwg.sicilia.sue.model.Sportello} interface. + * 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 it.mwg.sicilia.sue.model.Sportello} interface. *
* * @author Manifattura Web Group Srl @@ -26,10 +37,47 @@ package it.mwg.sicilia.sue.model.impl; @SuppressWarnings("serial") public class SportelloImpl extends SportelloBaseImpl { /* - * NOTE FOR DEVELOPERS: - * - * Never reference this class directly. All methods that expect a sportello model instance should use the {@link it.mwg.sicilia.sue.model.Sportello} interface instead. + * NOTE FOR DEVELOPERS: Never reference this class directly. All methods that expect a sportello model instance + * should use the {@link it.mwg.sicilia.sue.model.Sportello} interface instead. */ + private Comune comune = null; + private Provincia provincia = null; + public SportelloImpl() { } + + @Override + public String getCodiceProvincia() throws PortalException, SystemException { + + return getComune().getCodiceProvincia(); + } + + @Override + public String getNomeComune() throws PortalException, SystemException { + + return getComune().getDenominazione(); + } + + @Override + public String getNomeProvincia() throws SystemException, PortalException { + + return getProvincia().getProvincia(); + } + + private synchronized Comune getComune() throws PortalException, SystemException { + + if (Validator.isNull(comune)) { + comune = ComuneLocalServiceUtil.getComune(getComuneId()); + } + return comune; + } + + private synchronized Provincia getProvincia() throws SystemException, PortalException { + + if (Validator.isNull(provincia)) { + provincia = ProvinciaLocalServiceUtil.fetchByC_C(getComune().getCompanyId(), getComune() + .getCodiceProvincia()); + } + return provincia; + } } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloModelImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloModelImpl.java index 75ef949f..0d5ba76c 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloModelImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/model/impl/SportelloModelImpl.java @@ -73,11 +73,12 @@ public class SportelloModelImpl extends BaseModelImpl+ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link it.mwg.sicilia.sue.service.impl.ApiSettingLocalServiceImpl}. + *
+ * + * @author Manifattura Web Group Srl + * @see it.mwg.sicilia.sue.service.impl.ApiSettingLocalServiceImpl + * @see it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil + * @generated + */ +public abstract class ApiSettingLocalServiceBaseImpl + extends BaseLocalServiceImpl implements ApiSettingLocalService, + IdentifiableBean { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil} to access the api setting local service. + */ + + /** + * Adds the api setting to the database. Also notifies the appropriate model listeners. + * + * @param apiSetting the api setting + * @return the api setting that was added + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.REINDEX) + @Override + public ApiSetting addApiSetting(ApiSetting apiSetting) + throws SystemException { + apiSetting.setNew(true); + + return apiSettingPersistence.update(apiSetting); + } + + /** + * Creates a new api setting with the primary key. Does not add the api setting to the database. + * + * @param id the primary key for the new api setting + * @return the new api setting + */ + @Override + public ApiSetting createApiSetting(long id) { + return apiSettingPersistence.create(id); + } + + /** + * Deletes the api setting with the primary key from the database. Also notifies the appropriate model listeners. + * + * @param id the primary key of the api setting + * @return the api setting that was removed + * @throws PortalException if a api setting with the primary key could not be found + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.DELETE) + @Override + public ApiSetting deleteApiSetting(long id) + throws PortalException, SystemException { + return apiSettingPersistence.remove(id); + } + + /** + * Deletes the api setting from the database. Also notifies the appropriate model listeners. + * + * @param apiSetting the api setting + * @return the api setting that was removed + * @throws SystemException if a system exception occurred + */ + @Indexable(type = IndexableType.DELETE) + @Override + public ApiSetting deleteApiSetting(ApiSetting apiSetting) + throws SystemException { + return apiSettingPersistence.remove(apiSetting); + } + + @Override + public DynamicQuery dynamicQuery() { + Class> clazz = getClass(); + + return DynamicQueryFactoryUtil.forClass(ApiSetting.class, + clazz.getClassLoader()); + } + + /** + * Performs a dynamic query on the database and returns the matching rows. + * + * @param dynamicQuery the dynamic query + * @return the matching rows + * @throws SystemException if a system exception occurred + */ + @Override + @SuppressWarnings("rawtypes") + public List dynamicQuery(DynamicQuery dynamicQuery) + throws SystemException { + return apiSettingPersistence.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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
null
)
+ * @return the ordered range of matching rows
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ @SuppressWarnings("rawtypes")
+ public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end,
+ OrderByComparator orderByComparator) throws SystemException {
+ return apiSettingPersistence.findWithDynamicQuery(dynamicQuery, start,
+ end, orderByComparator);
+ }
+
+ /**
+ * Returns the number of rows that match the dynamic query.
+ *
+ * @param dynamicQuery the dynamic query
+ * @return the number of rows that match the dynamic query
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public long dynamicQueryCount(DynamicQuery dynamicQuery)
+ throws SystemException {
+ return apiSettingPersistence.countWithDynamicQuery(dynamicQuery);
+ }
+
+ /**
+ * Returns the number of rows that match the dynamic query.
+ *
+ * @param dynamicQuery the dynamic query
+ * @param projection the projection to apply to the query
+ * @return the number of rows that match the dynamic query
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public long dynamicQueryCount(DynamicQuery dynamicQuery,
+ Projection projection) throws SystemException {
+ return apiSettingPersistence.countWithDynamicQuery(dynamicQuery,
+ projection);
+ }
+
+ @Override
+ public ApiSetting fetchApiSetting(long id) throws SystemException {
+ return apiSettingPersistence.fetchByPrimaryKey(id);
+ }
+
+ /**
+ * Returns the api setting with the primary key.
+ *
+ * @param id the primary key of the api setting
+ * @return the api setting
+ * @throws PortalException if a api setting with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public ApiSetting getApiSetting(long id)
+ throws PortalException, SystemException {
+ return apiSettingPersistence.findByPrimaryKey(id);
+ }
+
+ @Override
+ public PersistedModel getPersistedModel(Serializable primaryKeyObj)
+ throws PortalException, SystemException {
+ return apiSettingPersistence.findByPrimaryKey(primaryKeyObj);
+ }
+
+ /**
+ * Returns a range of all the api settings.
+ *
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ * This implementation exists only as a container for the default service methods generated by ServiceBuilder. All custom service methods should be put in {@link it.mwg.sicilia.sue.service.impl.ApiSettingServiceImpl}. + *
+ * + * @author Manifattura Web Group Srl + * @see it.mwg.sicilia.sue.service.impl.ApiSettingServiceImpl + * @see it.mwg.sicilia.sue.service.ApiSettingServiceUtil + * @generated + */ +public abstract class ApiSettingServiceBaseImpl extends BaseServiceImpl + implements ApiSettingService, IdentifiableBean { + /* + * NOTE FOR DEVELOPERS: + * + * Never modify or reference this class directly. Always use {@link it.mwg.sicilia.sue.service.ApiSettingServiceUtil} to access the api setting remote service. + */ + + /** + * Returns the api setting local service. + * + * @return the api setting local service + */ + public it.mwg.sicilia.sue.service.ApiSettingLocalService getApiSettingLocalService() { + return apiSettingLocalService; + } + + /** + * Sets the api setting local service. + * + * @param apiSettingLocalService the api setting local service + */ + public void setApiSettingLocalService( + it.mwg.sicilia.sue.service.ApiSettingLocalService apiSettingLocalService) { + this.apiSettingLocalService = apiSettingLocalService; + } + + /** + * Returns the api setting remote service. + * + * @return the api setting remote service + */ + public it.mwg.sicilia.sue.service.ApiSettingService getApiSettingService() { + return apiSettingService; + } + + /** + * Sets the api setting remote service. + * + * @param apiSettingService the api setting remote service + */ + public void setApiSettingService( + it.mwg.sicilia.sue.service.ApiSettingService apiSettingService) { + this.apiSettingService = apiSettingService; + } + + /** + * Returns the api setting persistence. + * + * @return the api setting persistence + */ + public ApiSettingPersistence getApiSettingPersistence() { + return apiSettingPersistence; + } + + /** + * Sets the api setting persistence. + * + * @param apiSettingPersistence the api setting persistence + */ + public void setApiSettingPersistence( + ApiSettingPersistence apiSettingPersistence) { + this.apiSettingPersistence = apiSettingPersistence; + } + + /** + * Returns the sportello local service. + * + * @return the sportello local service + */ + public it.mwg.sicilia.sue.service.SportelloLocalService getSportelloLocalService() { + return sportelloLocalService; + } + + /** + * Sets the sportello local service. + * + * @param sportelloLocalService the sportello local service + */ + public void setSportelloLocalService( + it.mwg.sicilia.sue.service.SportelloLocalService sportelloLocalService) { + this.sportelloLocalService = sportelloLocalService; + } + + /** + * Returns the sportello remote service. + * + * @return the sportello remote service + */ + public it.mwg.sicilia.sue.service.SportelloService getSportelloService() { + return sportelloService; + } + + /** + * Sets the sportello remote service. + * + * @param sportelloService the sportello remote service + */ + public void setSportelloService( + it.mwg.sicilia.sue.service.SportelloService sportelloService) { + this.sportelloService = sportelloService; + } + + /** + * Returns the sportello persistence. + * + * @return the sportello persistence + */ + public SportelloPersistence getSportelloPersistence() { + return sportelloPersistence; + } + + /** + * Sets the sportello persistence. + * + * @param sportelloPersistence the sportello persistence + */ + public void setSportelloPersistence( + SportelloPersistence sportelloPersistence) { + this.sportelloPersistence = sportelloPersistence; + } + + /** + * Returns the counter local service. + * + * @return the counter local service + */ + public com.liferay.counter.service.CounterLocalService getCounterLocalService() { + return counterLocalService; + } + + /** + * Sets the counter local service. + * + * @param counterLocalService the counter local service + */ + public void setCounterLocalService( + com.liferay.counter.service.CounterLocalService counterLocalService) { + this.counterLocalService = counterLocalService; + } + + /** + * Returns the resource local service. + * + * @return the resource local service + */ + public com.liferay.portal.service.ResourceLocalService getResourceLocalService() { + return resourceLocalService; + } + + /** + * Sets the resource local service. + * + * @param resourceLocalService the resource local service + */ + public void setResourceLocalService( + com.liferay.portal.service.ResourceLocalService resourceLocalService) { + this.resourceLocalService = resourceLocalService; + } + + /** + * Returns the user local service. + * + * @return the user local service + */ + public com.liferay.portal.service.UserLocalService getUserLocalService() { + return userLocalService; + } + + /** + * Sets the user local service. + * + * @param userLocalService the user local service + */ + public void setUserLocalService( + com.liferay.portal.service.UserLocalService userLocalService) { + this.userLocalService = userLocalService; + } + + /** + * Returns the user remote service. + * + * @return the user remote service + */ + public com.liferay.portal.service.UserService getUserService() { + return userService; + } + + /** + * Sets the user remote service. + * + * @param userService the user remote service + */ + public void setUserService( + com.liferay.portal.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() { + Class> clazz = getClass(); + + _classLoader = clazz.getClassLoader(); + } + + public void destroy() { + } + + /** + * Returns the Spring bean ID for this bean. + * + * @return the Spring bean ID for this bean + */ + @Override + public String getBeanIdentifier() { + return _beanIdentifier; + } + + /** + * Sets the Spring bean ID for this bean. + * + * @param beanIdentifier the Spring bean ID for this bean + */ + @Override + public void setBeanIdentifier(String beanIdentifier) { + _beanIdentifier = beanIdentifier; + } + + @Override + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + Thread currentThread = Thread.currentThread(); + + ClassLoader contextClassLoader = currentThread.getContextClassLoader(); + + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(_classLoader); + } + + try { + return _clpInvoker.invokeMethod(name, parameterTypes, arguments); + } + finally { + if (contextClassLoader != _classLoader) { + currentThread.setContextClassLoader(contextClassLoader); + } + } + } + + protected Class> getModelClass() { + return ApiSetting.class; + } + + protected String getModelClassName() { + return ApiSetting.class.getName(); + } + + /** + * Performs an SQL query. + * + * @param sql the sql query + */ + protected void runSQL(String sql) throws SystemException { + try { + DataSource dataSource = apiSettingPersistence.getDataSource(); + + SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, + sql, new int[0]); + + sqlUpdate.update(); + } + catch (Exception e) { + throw new SystemException(e); + } + } + + @BeanReference(type = it.mwg.sicilia.sue.service.ApiSettingLocalService.class) + protected it.mwg.sicilia.sue.service.ApiSettingLocalService apiSettingLocalService; + @BeanReference(type = it.mwg.sicilia.sue.service.ApiSettingService.class) + protected it.mwg.sicilia.sue.service.ApiSettingService apiSettingService; + @BeanReference(type = ApiSettingPersistence.class) + protected ApiSettingPersistence apiSettingPersistence; + @BeanReference(type = it.mwg.sicilia.sue.service.SportelloLocalService.class) + protected it.mwg.sicilia.sue.service.SportelloLocalService sportelloLocalService; + @BeanReference(type = it.mwg.sicilia.sue.service.SportelloService.class) + protected it.mwg.sicilia.sue.service.SportelloService sportelloService; + @BeanReference(type = SportelloPersistence.class) + protected SportelloPersistence sportelloPersistence; + @BeanReference(type = com.liferay.counter.service.CounterLocalService.class) + protected com.liferay.counter.service.CounterLocalService counterLocalService; + @BeanReference(type = com.liferay.portal.service.ResourceLocalService.class) + protected com.liferay.portal.service.ResourceLocalService resourceLocalService; + @BeanReference(type = com.liferay.portal.service.UserLocalService.class) + protected com.liferay.portal.service.UserLocalService userLocalService; + @BeanReference(type = com.liferay.portal.service.UserService.class) + protected com.liferay.portal.service.UserService userService; + @BeanReference(type = UserPersistence.class) + protected UserPersistence userPersistence; + private String _beanIdentifier; + private ClassLoader _classLoader; + private ApiSettingServiceClpInvoker _clpInvoker = new ApiSettingServiceClpInvoker(); +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingServiceClpInvoker.java new file mode 100644 index 00000000..8942d24d --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/ApiSettingServiceClpInvoker.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 it.mwg.sicilia.sue.service.base; + +import it.mwg.sicilia.sue.service.ApiSettingServiceUtil; + +import java.util.Arrays; + +/** + * @author Manifattura Web Group Srl + * @generated + */ +public class ApiSettingServiceClpInvoker { + public ApiSettingServiceClpInvoker() { + _methodName24 = "getBeanIdentifier"; + + _methodParameterTypes24 = new String[] { }; + + _methodName25 = "setBeanIdentifier"; + + _methodParameterTypes25 = new String[] { "java.lang.String" }; + } + + public Object invokeMethod(String name, String[] parameterTypes, + Object[] arguments) throws Throwable { + if (_methodName24.equals(name) && + Arrays.deepEquals(_methodParameterTypes24, parameterTypes)) { + return ApiSettingServiceUtil.getBeanIdentifier(); + } + + if (_methodName25.equals(name) && + Arrays.deepEquals(_methodParameterTypes25, parameterTypes)) { + ApiSettingServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); + + return null; + } + + throw new UnsupportedOperationException(); + } + + private String _methodName24; + private String[] _methodParameterTypes24; + private String _methodName25; + private String[] _methodParameterTypes25; +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceBaseImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceBaseImpl.java index 737f1dfe..3c4bbce5 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceBaseImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceBaseImpl.java @@ -33,6 +33,7 @@ import com.liferay.portal.service.persistence.UserPersistence; import it.mwg.sicilia.sue.model.Sportello; import it.mwg.sicilia.sue.service.SportelloLocalService; +import it.mwg.sicilia.sue.service.persistence.ApiSettingPersistence; import it.mwg.sicilia.sue.service.persistence.SportelloPersistence; import java.io.Serializable; @@ -278,6 +279,63 @@ public abstract class SportelloLocalServiceBaseImpl extends BaseLocalServiceImpl return sportelloPersistence.update(sportello); } + /** + * Returns the api setting local service. + * + * @return the api setting local service + */ + public it.mwg.sicilia.sue.service.ApiSettingLocalService getApiSettingLocalService() { + return apiSettingLocalService; + } + + /** + * Sets the api setting local service. + * + * @param apiSettingLocalService the api setting local service + */ + public void setApiSettingLocalService( + it.mwg.sicilia.sue.service.ApiSettingLocalService apiSettingLocalService) { + this.apiSettingLocalService = apiSettingLocalService; + } + + /** + * Returns the api setting remote service. + * + * @return the api setting remote service + */ + public it.mwg.sicilia.sue.service.ApiSettingService getApiSettingService() { + return apiSettingService; + } + + /** + * Sets the api setting remote service. + * + * @param apiSettingService the api setting remote service + */ + public void setApiSettingService( + it.mwg.sicilia.sue.service.ApiSettingService apiSettingService) { + this.apiSettingService = apiSettingService; + } + + /** + * Returns the api setting persistence. + * + * @return the api setting persistence + */ + public ApiSettingPersistence getApiSettingPersistence() { + return apiSettingPersistence; + } + + /** + * Sets the api setting persistence. + * + * @param apiSettingPersistence the api setting persistence + */ + public void setApiSettingPersistence( + ApiSettingPersistence apiSettingPersistence) { + this.apiSettingPersistence = apiSettingPersistence; + } + /** * Returns the sportello local service. * @@ -511,6 +569,12 @@ public abstract class SportelloLocalServiceBaseImpl extends BaseLocalServiceImpl } } + @BeanReference(type = it.mwg.sicilia.sue.service.ApiSettingLocalService.class) + protected it.mwg.sicilia.sue.service.ApiSettingLocalService apiSettingLocalService; + @BeanReference(type = it.mwg.sicilia.sue.service.ApiSettingService.class) + protected it.mwg.sicilia.sue.service.ApiSettingService apiSettingService; + @BeanReference(type = ApiSettingPersistence.class) + protected ApiSettingPersistence apiSettingPersistence; @BeanReference(type = it.mwg.sicilia.sue.service.SportelloLocalService.class) protected it.mwg.sicilia.sue.service.SportelloLocalService sportelloLocalService; @BeanReference(type = it.mwg.sicilia.sue.service.SportelloService.class) diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceClpInvoker.java index e064b6fa..250f23c4 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceClpInvoker.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloLocalServiceClpInvoker.java @@ -106,13 +106,13 @@ public class SportelloLocalServiceClpInvoker { "it.mwg.sicilia.sue.model.Sportello" }; - _methodName34 = "getBeanIdentifier"; + _methodName40 = "getBeanIdentifier"; - _methodParameterTypes34 = new String[] { }; + _methodParameterTypes40 = new String[] { }; - _methodName35 = "setBeanIdentifier"; + _methodName41 = "setBeanIdentifier"; - _methodParameterTypes35 = new String[] { "java.lang.String" }; + _methodParameterTypes41 = new String[] { "java.lang.String" }; } public Object invokeMethod(String name, String[] parameterTypes, @@ -204,13 +204,13 @@ public class SportelloLocalServiceClpInvoker { return SportelloLocalServiceUtil.updateSportello((it.mwg.sicilia.sue.model.Sportello)arguments[0]); } - if (_methodName34.equals(name) && - Arrays.deepEquals(_methodParameterTypes34, parameterTypes)) { + if (_methodName40.equals(name) && + Arrays.deepEquals(_methodParameterTypes40, parameterTypes)) { return SportelloLocalServiceUtil.getBeanIdentifier(); } - if (_methodName35.equals(name) && - Arrays.deepEquals(_methodParameterTypes35, parameterTypes)) { + if (_methodName41.equals(name) && + Arrays.deepEquals(_methodParameterTypes41, parameterTypes)) { SportelloLocalServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); return null; @@ -251,8 +251,8 @@ public class SportelloLocalServiceClpInvoker { private String[] _methodParameterTypes14; private String _methodName15; private String[] _methodParameterTypes15; - private String _methodName34; - private String[] _methodParameterTypes34; - private String _methodName35; - private String[] _methodParameterTypes35; + private String _methodName40; + private String[] _methodParameterTypes40; + private String _methodName41; + private String[] _methodParameterTypes41; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceBaseImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceBaseImpl.java index 09bad918..c3471ced 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceBaseImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceBaseImpl.java @@ -24,6 +24,7 @@ import com.liferay.portal.service.persistence.UserPersistence; import it.mwg.sicilia.sue.model.Sportello; import it.mwg.sicilia.sue.service.SportelloService; +import it.mwg.sicilia.sue.service.persistence.ApiSettingPersistence; import it.mwg.sicilia.sue.service.persistence.SportelloPersistence; import javax.sql.DataSource; @@ -48,6 +49,63 @@ public abstract class SportelloServiceBaseImpl extends BaseServiceImpl * Never modify or reference this class directly. Always use {@link it.mwg.sicilia.sue.service.SportelloServiceUtil} to access the sportello remote service. */ + /** + * Returns the api setting local service. + * + * @return the api setting local service + */ + public it.mwg.sicilia.sue.service.ApiSettingLocalService getApiSettingLocalService() { + return apiSettingLocalService; + } + + /** + * Sets the api setting local service. + * + * @param apiSettingLocalService the api setting local service + */ + public void setApiSettingLocalService( + it.mwg.sicilia.sue.service.ApiSettingLocalService apiSettingLocalService) { + this.apiSettingLocalService = apiSettingLocalService; + } + + /** + * Returns the api setting remote service. + * + * @return the api setting remote service + */ + public it.mwg.sicilia.sue.service.ApiSettingService getApiSettingService() { + return apiSettingService; + } + + /** + * Sets the api setting remote service. + * + * @param apiSettingService the api setting remote service + */ + public void setApiSettingService( + it.mwg.sicilia.sue.service.ApiSettingService apiSettingService) { + this.apiSettingService = apiSettingService; + } + + /** + * Returns the api setting persistence. + * + * @return the api setting persistence + */ + public ApiSettingPersistence getApiSettingPersistence() { + return apiSettingPersistence; + } + + /** + * Sets the api setting persistence. + * + * @param apiSettingPersistence the api setting persistence + */ + public void setApiSettingPersistence( + ApiSettingPersistence apiSettingPersistence) { + this.apiSettingPersistence = apiSettingPersistence; + } + /** * Returns the sportello local service. * @@ -276,6 +334,12 @@ public abstract class SportelloServiceBaseImpl extends BaseServiceImpl } } + @BeanReference(type = it.mwg.sicilia.sue.service.ApiSettingLocalService.class) + protected it.mwg.sicilia.sue.service.ApiSettingLocalService apiSettingLocalService; + @BeanReference(type = it.mwg.sicilia.sue.service.ApiSettingService.class) + protected it.mwg.sicilia.sue.service.ApiSettingService apiSettingService; + @BeanReference(type = ApiSettingPersistence.class) + protected ApiSettingPersistence apiSettingPersistence; @BeanReference(type = it.mwg.sicilia.sue.service.SportelloLocalService.class) protected it.mwg.sicilia.sue.service.SportelloLocalService sportelloLocalService; @BeanReference(type = it.mwg.sicilia.sue.service.SportelloService.class) diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceClpInvoker.java index 2c3d2b46..4b49ae20 100644 --- a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceClpInvoker.java +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/base/SportelloServiceClpInvoker.java @@ -24,24 +24,24 @@ import java.util.Arrays; */ public class SportelloServiceClpInvoker { public SportelloServiceClpInvoker() { - _methodName18 = "getBeanIdentifier"; + _methodName24 = "getBeanIdentifier"; - _methodParameterTypes18 = new String[] { }; + _methodParameterTypes24 = new String[] { }; - _methodName19 = "setBeanIdentifier"; + _methodName25 = "setBeanIdentifier"; - _methodParameterTypes19 = new String[] { "java.lang.String" }; + _methodParameterTypes25 = new String[] { "java.lang.String" }; } public Object invokeMethod(String name, String[] parameterTypes, Object[] arguments) throws Throwable { - if (_methodName18.equals(name) && - Arrays.deepEquals(_methodParameterTypes18, parameterTypes)) { + if (_methodName24.equals(name) && + Arrays.deepEquals(_methodParameterTypes24, parameterTypes)) { return SportelloServiceUtil.getBeanIdentifier(); } - if (_methodName19.equals(name) && - Arrays.deepEquals(_methodParameterTypes19, parameterTypes)) { + if (_methodName25.equals(name) && + Arrays.deepEquals(_methodParameterTypes25, parameterTypes)) { SportelloServiceUtil.setBeanIdentifier((java.lang.String)arguments[0]); return null; @@ -50,8 +50,8 @@ public class SportelloServiceClpInvoker { throw new UnsupportedOperationException(); } - private String _methodName18; - private String[] _methodParameterTypes18; - private String _methodName19; - private String[] _methodParameterTypes19; + private String _methodName24; + private String[] _methodParameterTypes24; + private String _methodName25; + private String[] _methodParameterTypes25; } \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/http/ApiSettingServiceSoap.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/http/ApiSettingServiceSoap.java new file mode 100644 index 00000000..4078f7e1 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/http/ApiSettingServiceSoap.java @@ -0,0 +1,58 @@ +/** + * 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 it.mwg.sicilia.sue.service.http; + +/** + * Provides the SOAP utility for the + * {@link it.mwg.sicilia.sue.service.ApiSettingServiceUtil} 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 it.mwg.sicilia.sue.model.ApiSettingSoap}. + * If the method in the service utility returns a + * {@link it.mwg.sicilia.sue.model.ApiSetting}, that is translated to a + * {@link it.mwg.sicilia.sue.model.ApiSettingSoap}. 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 Manifattura Web Group Srl + * @see ApiSettingServiceHttp + * @see it.mwg.sicilia.sue.model.ApiSettingSoap + * @see it.mwg.sicilia.sue.service.ApiSettingServiceUtil + * @generated + */ +public class ApiSettingServiceSoap { +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/ApiSettingLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/ApiSettingLocalServiceImpl.java new file mode 100644 index 00000000..44a98b5a --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/ApiSettingLocalServiceImpl.java @@ -0,0 +1,65 @@ +/** + * 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 it.mwg.sicilia.sue.service.impl; + +import it.mwg.sicilia.sue.model.ApiSetting; +import it.mwg.sicilia.sue.service.base.ApiSettingLocalServiceBaseImpl; + +import com.liferay.counter.service.CounterLocalServiceUtil; +import com.liferay.portal.kernel.exception.SystemException; +import com.liferay.portal.kernel.util.Validator; + +/** + * The implementation of the api setting 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 it.mwg.sicilia.sue.service.ApiSettingLocalService} 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 Manifattura Web Group Srl + * @see it.mwg.sicilia.sue.service.base.ApiSettingLocalServiceBaseImpl + * @see it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil + */ +public class ApiSettingLocalServiceImpl extends ApiSettingLocalServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: Never reference this interface directly. Always use {@link + * it.mwg.sicilia.sue.service.ApiSettingLocalServiceUtil} to access the api setting local service. + */ + + @Override + public String get(long companyId, long key) throws SystemException { + + ApiSetting apiSetting = apiSettingPersistence.fetchByCompanyIdKey(companyId, key); + return Validator.isNull(apiSetting) ? null : apiSetting.getValue(); + } + + @Override + public void set(long companyId, long key, String value) throws SystemException { + + ApiSetting apiSetting = apiSettingPersistence.fetchByCompanyIdKey(companyId, key); + if (Validator.isNull(apiSetting)) { + apiSetting = createApiSetting(CounterLocalServiceUtil.increment(ApiSetting.class.getName())); + apiSetting.setCompanyId(companyId); + apiSetting.setKey(key); + } + apiSetting.setValue(value); + updateApiSetting(apiSetting); + } +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/ApiSettingServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/ApiSettingServiceImpl.java new file mode 100644 index 00000000..0ac73253 --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/impl/ApiSettingServiceImpl.java @@ -0,0 +1,39 @@ +/** + * 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 it.mwg.sicilia.sue.service.impl; + +import it.mwg.sicilia.sue.service.base.ApiSettingServiceBaseImpl; + +/** + * The implementation of the api setting 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 it.mwg.sicilia.sue.service.ApiSettingService} 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 Manifattura Web Group Srl + * @see it.mwg.sicilia.sue.service.base.ApiSettingServiceBaseImpl + * @see it.mwg.sicilia.sue.service.ApiSettingServiceUtil + */ +public class ApiSettingServiceImpl extends ApiSettingServiceBaseImpl { + /* + * NOTE FOR DEVELOPERS: + * + * Never reference this interface directly. Always use {@link it.mwg.sicilia.sue.service.ApiSettingServiceUtil} to access the api setting remote service. + */ +} \ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/persistence/ApiSettingPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/persistence/ApiSettingPersistenceImpl.java new file mode 100644 index 00000000..2d332caf --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/sicilia-sue-connector-portlet/docroot/WEB-INF/src/it/mwg/sicilia/sue/service/persistence/ApiSettingPersistenceImpl.java @@ -0,0 +1,967 @@ +/** + * 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 it.mwg.sicilia.sue.service.persistence; + +import com.liferay.portal.kernel.cache.CacheRegistryUtil; +import com.liferay.portal.kernel.dao.orm.EntityCacheUtil; +import com.liferay.portal.kernel.dao.orm.FinderCacheUtil; +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.exception.SystemException; +import com.liferay.portal.kernel.log.Log; +import com.liferay.portal.kernel.log.LogFactoryUtil; +import com.liferay.portal.kernel.util.GetterUtil; +import com.liferay.portal.kernel.util.InstanceFactory; +import com.liferay.portal.kernel.util.OrderByComparator; +import com.liferay.portal.kernel.util.PropsKeys; +import com.liferay.portal.kernel.util.PropsUtil; +import com.liferay.portal.kernel.util.SetUtil; +import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; +import com.liferay.portal.kernel.util.StringUtil; +import com.liferay.portal.kernel.util.UnmodifiableList; +import com.liferay.portal.model.CacheModel; +import com.liferay.portal.model.ModelListener; +import com.liferay.portal.service.persistence.impl.BasePersistenceImpl; + +import it.mwg.sicilia.sue.NoSuchApiSettingException; +import it.mwg.sicilia.sue.model.ApiSetting; +import it.mwg.sicilia.sue.model.impl.ApiSettingImpl; +import it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl; +import it.mwg.sicilia.sue.service.persistence.ApiSettingPersistence; + +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Set; + +/** + * The persistence implementation for the api setting service. + * + *
+ * Caching information and settings can be found in portal.properties
+ *
service.xml
and rerun ServiceBuilder to regenerate this class.
+ */
+ public static final String FINDER_CLASS_NAME_ENTITY = ApiSettingImpl.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(ApiSettingModelImpl.ENTITY_CACHE_ENABLED,
+ ApiSettingModelImpl.FINDER_CACHE_ENABLED, ApiSettingImpl.class,
+ FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]);
+ public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(ApiSettingModelImpl.ENTITY_CACHE_ENABLED,
+ ApiSettingModelImpl.FINDER_CACHE_ENABLED, ApiSettingImpl.class,
+ FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]);
+ public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(ApiSettingModelImpl.ENTITY_CACHE_ENABLED,
+ ApiSettingModelImpl.FINDER_CACHE_ENABLED, Long.class,
+ FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]);
+ public static final FinderPath FINDER_PATH_FETCH_BY_COMPANYIDKEY = new FinderPath(ApiSettingModelImpl.ENTITY_CACHE_ENABLED,
+ ApiSettingModelImpl.FINDER_CACHE_ENABLED, ApiSettingImpl.class,
+ FINDER_CLASS_NAME_ENTITY, "fetchByCompanyIdKey",
+ new String[] { Long.class.getName(), Long.class.getName() },
+ ApiSettingModelImpl.COMPANYID_COLUMN_BITMASK |
+ ApiSettingModelImpl.KEY_COLUMN_BITMASK);
+ public static final FinderPath FINDER_PATH_COUNT_BY_COMPANYIDKEY = new FinderPath(ApiSettingModelImpl.ENTITY_CACHE_ENABLED,
+ ApiSettingModelImpl.FINDER_CACHE_ENABLED, Long.class,
+ FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByCompanyIdKey",
+ new String[] { Long.class.getName(), Long.class.getName() });
+
+ /**
+ * Returns the api setting where companyId = ? and key = ? or throws a {@link it.mwg.sicilia.sue.NoSuchApiSettingException} if it could not be found.
+ *
+ * @param companyId the company ID
+ * @param key the key
+ * @return the matching api setting
+ * @throws it.mwg.sicilia.sue.NoSuchApiSettingException if a matching api setting could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public ApiSetting findByCompanyIdKey(long companyId, long key)
+ throws NoSuchApiSettingException, SystemException {
+ ApiSetting apiSetting = fetchByCompanyIdKey(companyId, key);
+
+ if (apiSetting == null) {
+ StringBundler msg = new StringBundler(6);
+
+ msg.append(_NO_SUCH_ENTITY_WITH_KEY);
+
+ msg.append("companyId=");
+ msg.append(companyId);
+
+ msg.append(", key=");
+ msg.append(key);
+
+ msg.append(StringPool.CLOSE_CURLY_BRACE);
+
+ if (_log.isWarnEnabled()) {
+ _log.warn(msg.toString());
+ }
+
+ throw new NoSuchApiSettingException(msg.toString());
+ }
+
+ return apiSetting;
+ }
+
+ /**
+ * Returns the api setting where companyId = ? and key = ? or returns null
if it could not be found. Uses the finder cache.
+ *
+ * @param companyId the company ID
+ * @param key the key
+ * @return the matching api setting, or null
if a matching api setting could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public ApiSetting fetchByCompanyIdKey(long companyId, long key)
+ throws SystemException {
+ return fetchByCompanyIdKey(companyId, key, true);
+ }
+
+ /**
+ * Returns the api setting where companyId = ? and key = ? or returns null
if it could not be found, optionally using the finder cache.
+ *
+ * @param companyId the company ID
+ * @param key the key
+ * @param retrieveFromCache whether to use the finder cache
+ * @return the matching api setting, or null
if a matching api setting could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public ApiSetting fetchByCompanyIdKey(long companyId, long key,
+ boolean retrieveFromCache) throws SystemException {
+ Object[] finderArgs = new Object[] { companyId, key };
+
+ Object result = null;
+
+ if (retrieveFromCache) {
+ result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_COMPANYIDKEY,
+ finderArgs, this);
+ }
+
+ if (result instanceof ApiSetting) {
+ ApiSetting apiSetting = (ApiSetting)result;
+
+ if ((companyId != apiSetting.getCompanyId()) ||
+ (key != apiSetting.getKey())) {
+ result = null;
+ }
+ }
+
+ if (result == null) {
+ StringBundler query = new StringBundler(4);
+
+ query.append(_SQL_SELECT_APISETTING_WHERE);
+
+ query.append(_FINDER_COLUMN_COMPANYIDKEY_COMPANYID_2);
+
+ query.append(_FINDER_COLUMN_COMPANYIDKEY_KEY_2);
+
+ String sql = query.toString();
+
+ Session session = null;
+
+ try {
+ session = openSession();
+
+ Query q = session.createQuery(sql);
+
+ QueryPos qPos = QueryPos.getInstance(q);
+
+ qPos.add(companyId);
+
+ qPos.add(key);
+
+ List+ * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. + *
+ */ + @Override + public void clearCache() { + if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { + CacheRegistryUtil.clear(ApiSettingImpl.class.getName()); + } + + EntityCacheUtil.clearCache(ApiSettingImpl.class.getName()); + + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + } + + /** + * Clears the cache for the api setting. + * + *+ * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. + *
+ */ + @Override + public void clearCache(ApiSetting apiSetting) { + EntityCacheUtil.removeResult(ApiSettingModelImpl.ENTITY_CACHE_ENABLED, + ApiSettingImpl.class, apiSetting.getPrimaryKey()); + + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); + FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + clearUniqueFindersCache(apiSetting); + } + + @Override + public void clearCache(Listnull
if it could not be found.
+ *
+ * @param primaryKey the primary key of the api setting
+ * @return the api setting, or null
if a api setting with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public ApiSetting fetchByPrimaryKey(Serializable primaryKey)
+ throws SystemException {
+ ApiSetting apiSetting = (ApiSetting)EntityCacheUtil.getResult(ApiSettingModelImpl.ENTITY_CACHE_ENABLED,
+ ApiSettingImpl.class, primaryKey);
+
+ if (apiSetting == _nullApiSetting) {
+ return null;
+ }
+
+ if (apiSetting == null) {
+ Session session = null;
+
+ try {
+ session = openSession();
+
+ apiSetting = (ApiSetting)session.get(ApiSettingImpl.class,
+ primaryKey);
+
+ if (apiSetting != null) {
+ cacheResult(apiSetting);
+ }
+ else {
+ EntityCacheUtil.putResult(ApiSettingModelImpl.ENTITY_CACHE_ENABLED,
+ ApiSettingImpl.class, primaryKey, _nullApiSetting);
+ }
+ }
+ catch (Exception e) {
+ EntityCacheUtil.removeResult(ApiSettingModelImpl.ENTITY_CACHE_ENABLED,
+ ApiSettingImpl.class, primaryKey);
+
+ throw processException(e);
+ }
+ finally {
+ closeSession(session);
+ }
+ }
+
+ return apiSetting;
+ }
+
+ /**
+ * Returns the api setting with the primary key or returns null
if it could not be found.
+ *
+ * @param id the primary key of the api setting
+ * @return the api setting, or null
if a api setting with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public ApiSetting fetchByPrimaryKey(long id) throws SystemException {
+ return fetchByPrimaryKey((Serializable)id);
+ }
+
+ /**
+ * Returns all the api settings.
+ *
+ * @return the api settings
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public List
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, 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 it.mwg.sicilia.sue.model.impl.ApiSettingModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
null
)
+ * @return the ordered range of api settings
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public Listnull
if it could not be found. Uses the finder cache.
+ * Returns the sportello where comuneId = ? or returns null
if it could not be found. Uses the finder cache.
*
- * @param loginName the login name
+ * @param comuneId the comune ID
* @return the matching sportello, or null
if a matching sportello could not be found
* @throws SystemException if a system exception occurred
*/
@Override
- public Sportello fetchByLoginName(String loginName)
- throws SystemException {
- return fetchByLoginName(loginName, true);
+ public Sportello fetchByComuneId(long comuneId) throws SystemException {
+ return fetchByComuneId(comuneId, true);
}
/**
- * Returns the sportello where loginName = ? or returns null
if it could not be found, optionally using the finder cache.
+ * Returns the sportello where comuneId = ? or returns null
if it could not be found, optionally using the finder cache.
*
- * @param loginName the login name
+ * @param comuneId the comune ID
* @param retrieveFromCache whether to use the finder cache
* @return the matching sportello, or null
if a matching sportello could not be found
* @throws SystemException if a system exception occurred
*/
@Override
- public Sportello fetchByLoginName(String loginName,
- boolean retrieveFromCache) throws SystemException {
- Object[] finderArgs = new Object[] { loginName };
+ public Sportello fetchByComuneId(long comuneId, boolean retrieveFromCache)
+ throws SystemException {
+ Object[] finderArgs = new Object[] { comuneId };
Object result = null;
if (retrieveFromCache) {
- result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_LOGINNAME,
+ result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_COMUNEID,
finderArgs, this);
}
if (result instanceof Sportello) {
Sportello sportello = (Sportello)result;
- if (!Validator.equals(loginName, sportello.getLoginName())) {
+ if ((comuneId != sportello.getComuneId())) {
result = null;
}
}
@@ -175,19 +171,7 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl