diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/commons-logging.jar b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/commons-logging.jar deleted file mode 100644 index 8758a96b..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/commons-logging.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/jstl-api.jar b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/jstl-api.jar deleted file mode 100644 index 80a5737f..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/jstl-api.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/jstl-impl.jar b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/jstl-impl.jar deleted file mode 100644 index e5a9342f..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/jstl-impl.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/log4j.jar b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/log4j.jar deleted file mode 100644 index 068867eb..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/log4j.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar new file mode 100644 index 00000000..fdad23ea Binary files /dev/null and b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/schedulatore-portos-pratiche-portlet-service.jar b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/schedulatore-portos-pratiche-portlet-service.jar index f5fdc69d..e7e88671 100644 Binary files a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/schedulatore-portos-pratiche-portlet-service.jar and b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/schedulatore-portos-pratiche-portlet-service.jar differ diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/util-bridges.jar b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/util-bridges.jar deleted file mode 100644 index 7d7435fe..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/util-bridges.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/util-taglib.jar b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/util-taglib.jar deleted file mode 100644 index 6d182ade..00000000 Binary files a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/util-taglib.jar and /dev/null differ diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service.xml index 97b0f490..a0e53ccf 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service.xml @@ -19,11 +19,14 @@ + + + - + diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloClp.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloClp.java index 7afa6849..a8463036 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloClp.java +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloClp.java @@ -85,6 +85,9 @@ public class SportelloClp extends BaseModelImpl implements Sportello attributes.put("operation", getOperation()); attributes.put("cadastralCode", getCadastralCode()); attributes.put("digitalHolderTaxCode", getDigitalHolderTaxCode()); + attributes.put("name", getName()); + attributes.put("surname", getSurname()); + attributes.put("address", getAddress()); attributes.put("stato", getStato()); attributes.put("creationDate", getCreationDate()); attributes.put("lastUpdateDate", getLastUpdateDate()); @@ -168,6 +171,24 @@ public class SportelloClp extends BaseModelImpl implements Sportello setDigitalHolderTaxCode(digitalHolderTaxCode); } + String name = (String)attributes.get("name"); + + if (name != null) { + setName(name); + } + + String surname = (String)attributes.get("surname"); + + if (surname != null) { + setSurname(surname); + } + + String address = (String)attributes.get("address"); + + if (address != null) { + setAddress(address); + } + Boolean stato = (Boolean)attributes.get("stato"); if (stato != null) { @@ -471,6 +492,75 @@ public class SportelloClp extends BaseModelImpl implements Sportello } } + @Override + public String getName() { + return _name; + } + + @Override + public void setName(String name) { + _name = name; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setName", String.class); + + method.invoke(_sportelloRemoteModel, name); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public String getSurname() { + return _surname; + } + + @Override + public void setSurname(String surname) { + _surname = surname; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setSurname", String.class); + + method.invoke(_sportelloRemoteModel, surname); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + + @Override + public String getAddress() { + return _address; + } + + @Override + public void setAddress(String address) { + _address = address; + + if (_sportelloRemoteModel != null) { + try { + Class clazz = _sportelloRemoteModel.getClass(); + + Method method = clazz.getMethod("setAddress", String.class); + + method.invoke(_sportelloRemoteModel, address); + } + catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + } + @Override public boolean getStato() { return _stato; @@ -650,6 +740,9 @@ public class SportelloClp extends BaseModelImpl implements Sportello clone.setOperation(getOperation()); clone.setCadastralCode(getCadastralCode()); clone.setDigitalHolderTaxCode(getDigitalHolderTaxCode()); + clone.setName(getName()); + clone.setSurname(getSurname()); + clone.setAddress(getAddress()); clone.setStato(getStato()); clone.setCreationDate(getCreationDate()); clone.setLastUpdateDate(getLastUpdateDate()); @@ -706,7 +799,7 @@ public class SportelloClp extends BaseModelImpl implements Sportello @Override public String toString() { - StringBundler sb = new StringBundler(33); + StringBundler sb = new StringBundler(39); sb.append("{id="); sb.append(getId()); @@ -732,6 +825,12 @@ public class SportelloClp extends BaseModelImpl implements Sportello sb.append(getCadastralCode()); sb.append(", digitalHolderTaxCode="); sb.append(getDigitalHolderTaxCode()); + sb.append(", name="); + sb.append(getName()); + sb.append(", surname="); + sb.append(getSurname()); + sb.append(", address="); + sb.append(getAddress()); sb.append(", stato="); sb.append(getStato()); sb.append(", creationDate="); @@ -747,7 +846,7 @@ public class SportelloClp extends BaseModelImpl implements Sportello @Override public String toXmlString() { - StringBundler sb = new StringBundler(52); + StringBundler sb = new StringBundler(61); sb.append(""); sb.append("portos.nextmind.model.Sportello"); @@ -801,6 +900,18 @@ public class SportelloClp extends BaseModelImpl implements Sportello "digitalHolderTaxCode"); + sb.append( + "name"); + sb.append( + "surname"); + sb.append( + "address"); sb.append( "stato implements Sportello private String _operation; private String _cadastralCode; private String _digitalHolderTaxCode; + private String _name; + private String _surname; + private String _address; private boolean _stato; private Date _creationDate; private Date _lastUpdateDate; diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloModel.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloModel.java index 0a91748c..39fa74ef 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloModel.java +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloModel.java @@ -238,6 +238,51 @@ public interface SportelloModel extends BaseModel { */ public void setDigitalHolderTaxCode(String digitalHolderTaxCode); + /** + * Returns the name of this sportello. + * + * @return the name of this sportello + */ + @AutoEscape + public String getName(); + + /** + * Sets the name of this sportello. + * + * @param name the name of this sportello + */ + public void setName(String name); + + /** + * Returns the surname of this sportello. + * + * @return the surname of this sportello + */ + @AutoEscape + public String getSurname(); + + /** + * Sets the surname of this sportello. + * + * @param surname the surname of this sportello + */ + public void setSurname(String surname); + + /** + * Returns the address of this sportello. + * + * @return the address of this sportello + */ + @AutoEscape + public String getAddress(); + + /** + * Sets the address of this sportello. + * + * @param address the address of this sportello + */ + public void setAddress(String address); + /** * Returns the stato of this sportello. * diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloSoap.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloSoap.java index 8201b864..ab4797ae 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloSoap.java +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloSoap.java @@ -42,6 +42,9 @@ public class SportelloSoap implements Serializable { soapModel.setOperation(model.getOperation()); soapModel.setCadastralCode(model.getCadastralCode()); soapModel.setDigitalHolderTaxCode(model.getDigitalHolderTaxCode()); + soapModel.setName(model.getName()); + soapModel.setSurname(model.getSurname()); + soapModel.setAddress(model.getAddress()); soapModel.setStato(model.getStato()); soapModel.setCreationDate(model.getCreationDate()); soapModel.setLastUpdateDate(model.getLastUpdateDate()); @@ -194,6 +197,30 @@ public class SportelloSoap implements Serializable { _digitalHolderTaxCode = digitalHolderTaxCode; } + public String getName() { + return _name; + } + + public void setName(String name) { + _name = name; + } + + public String getSurname() { + return _surname; + } + + public void setSurname(String surname) { + _surname = surname; + } + + public String getAddress() { + return _address; + } + + public void setAddress(String address) { + _address = address; + } + public boolean getStato() { return _stato; } @@ -242,6 +269,9 @@ public class SportelloSoap implements Serializable { private String _operation; private String _cadastralCode; private String _digitalHolderTaxCode; + private String _name; + private String _surname; + private String _address; private boolean _stato; private Date _creationDate; private Date _lastUpdateDate; diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloWrapper.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloWrapper.java index bdd5b843..e0c82c0d 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloWrapper.java +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloWrapper.java @@ -61,6 +61,9 @@ public class SportelloWrapper implements Sportello, ModelWrapper { attributes.put("operation", getOperation()); attributes.put("cadastralCode", getCadastralCode()); attributes.put("digitalHolderTaxCode", getDigitalHolderTaxCode()); + attributes.put("name", getName()); + attributes.put("surname", getSurname()); + attributes.put("address", getAddress()); attributes.put("stato", getStato()); attributes.put("creationDate", getCreationDate()); attributes.put("lastUpdateDate", getLastUpdateDate()); @@ -144,6 +147,24 @@ public class SportelloWrapper implements Sportello, ModelWrapper { setDigitalHolderTaxCode(digitalHolderTaxCode); } + String name = (String)attributes.get("name"); + + if (name != null) { + setName(name); + } + + String surname = (String)attributes.get("surname"); + + if (surname != null) { + setSurname(surname); + } + + String address = (String)attributes.get("address"); + + if (address != null) { + setAddress(address); + } + Boolean stato = (Boolean)attributes.get("stato"); if (stato != null) { @@ -429,6 +450,66 @@ public class SportelloWrapper implements Sportello, ModelWrapper { _sportello.setDigitalHolderTaxCode(digitalHolderTaxCode); } + /** + * Returns the name of this sportello. + * + * @return the name of this sportello + */ + @Override + public java.lang.String getName() { + return _sportello.getName(); + } + + /** + * Sets the name of this sportello. + * + * @param name the name of this sportello + */ + @Override + public void setName(java.lang.String name) { + _sportello.setName(name); + } + + /** + * Returns the surname of this sportello. + * + * @return the surname of this sportello + */ + @Override + public java.lang.String getSurname() { + return _sportello.getSurname(); + } + + /** + * Sets the surname of this sportello. + * + * @param surname the surname of this sportello + */ + @Override + public void setSurname(java.lang.String surname) { + _sportello.setSurname(surname); + } + + /** + * Returns the address of this sportello. + * + * @return the address of this sportello + */ + @Override + public java.lang.String getAddress() { + return _sportello.getAddress(); + } + + /** + * Sets the address of this sportello. + * + * @param address the address of this sportello + */ + @Override + public void setAddress(java.lang.String address) { + _sportello.setAddress(address); + } + /** * Returns the stato of this sportello. * diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/service/persistence/SportelloPersistence.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/service/persistence/SportelloPersistence.java index e4e2b9ca..e1dc7bb8 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/service/persistence/SportelloPersistence.java +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/service/persistence/SportelloPersistence.java @@ -38,111 +38,49 @@ public interface SportelloPersistence extends BasePersistence { */ /** - * Returns all the sportellos where id = ?. + * Returns the sportello where id = ? or throws a {@link portos.nextmind.NoSuchSportelloException} if it could not be found. * * @param id the ID - * @return the matching sportellos - * @throws SystemException if a system exception occurred - */ - public java.util.List findById(long id) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns a range of all the sportellos where id = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, 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 portos.nextmind.model.impl.SportelloModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param id the ID - * @param start the lower bound of the range of sportellos - * @param end the upper bound of the range of sportellos (not inclusive) - * @return the range of matching sportellos - * @throws SystemException if a system exception occurred - */ - public java.util.List findById(long id, - int start, int end) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns an ordered range of all the sportellos where id = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, 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 portos.nextmind.model.impl.SportelloModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param id the ID - * @param start the lower bound of the range of sportellos - * @param end the upper bound of the range of sportellos (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching sportellos - * @throws SystemException if a system exception occurred - */ - public java.util.List findById(long id, - int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException; - - /** - * Returns the first sportello in the ordered set where id = ?. - * - * @param id the ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching sportello + * @return the matching sportello * @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found * @throws SystemException if a system exception occurred */ - public portos.nextmind.model.Sportello findById_First(long id, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + public portos.nextmind.model.Sportello findById(long id) throws com.liferay.portal.kernel.exception.SystemException, portos.nextmind.NoSuchSportelloException; /** - * Returns the first sportello in the ordered set where id = ?. + * Returns the sportello where id = ? or returns null if it could not be found. Uses the finder cache. * * @param id the ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching sportello, or null if a matching sportello could not be found + * @return the matching sportello, or null if a matching sportello could not be found * @throws SystemException if a system exception occurred */ - public portos.nextmind.model.Sportello fetchById_First(long id, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + public portos.nextmind.model.Sportello fetchById(long id) throws com.liferay.portal.kernel.exception.SystemException; /** - * Returns the last sportello in the ordered set where id = ?. - * - * @param id the ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching sportello - * @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found - * @throws SystemException if a system exception occurred - */ - public portos.nextmind.model.Sportello findById_Last(long id, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - portos.nextmind.NoSuchSportelloException; - - /** - * Returns the last sportello in the ordered set where id = ?. + * Returns the sportello where id = ? or returns null if it could not be found, optionally using the finder cache. * * @param id the ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching sportello, or null if a matching sportello could not be found + * @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 portos.nextmind.model.Sportello fetchById_Last(long id, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + public portos.nextmind.model.Sportello fetchById(long id, + boolean retrieveFromCache) throws com.liferay.portal.kernel.exception.SystemException; /** - * Removes all the sportellos where id = ? from the database. + * Removes the sportello where id = ? from the database. * * @param id the ID + * @return the sportello that was removed * @throws SystemException if a system exception occurred */ - public void removeById(long id) - throws com.liferay.portal.kernel.exception.SystemException; + public portos.nextmind.model.Sportello removeById(long id) + throws com.liferay.portal.kernel.exception.SystemException, + portos.nextmind.NoSuchSportelloException; /** * Returns the number of sportellos where id = ?. diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/service/persistence/SportelloUtil.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/service/persistence/SportelloUtil.java index fb03fe28..83b03d59 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/service/persistence/SportelloUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/service/persistence/SportelloUtil.java @@ -111,126 +111,56 @@ public class SportelloUtil { } /** - * Returns all the sportellos where id = ?. + * Returns the sportello where id = ? or throws a {@link portos.nextmind.NoSuchSportelloException} if it could not be found. * * @param id the ID - * @return the matching sportellos - * @throws SystemException if a system exception occurred - */ - public static java.util.List findById( - long id) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findById(id); - } - - /** - * Returns a range of all the sportellos where id = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, 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 portos.nextmind.model.impl.SportelloModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param id the ID - * @param start the lower bound of the range of sportellos - * @param end the upper bound of the range of sportellos (not inclusive) - * @return the range of matching sportellos - * @throws SystemException if a system exception occurred - */ - public static java.util.List findById( - long id, int start, int end) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findById(id, start, end); - } - - /** - * Returns an ordered range of all the sportellos where id = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, 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 portos.nextmind.model.impl.SportelloModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

- * - * @param id the ID - * @param start the lower bound of the range of sportellos - * @param end the upper bound of the range of sportellos (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching sportellos - * @throws SystemException if a system exception occurred - */ - public static java.util.List findById( - long id, int start, int end, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().findById(id, start, end, orderByComparator); - } - - /** - * Returns the first sportello in the ordered set where id = ?. - * - * @param id the ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching sportello + * @return the matching sportello * @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found * @throws SystemException if a system exception occurred */ - public static portos.nextmind.model.Sportello findById_First(long id, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + public static portos.nextmind.model.Sportello findById(long id) throws com.liferay.portal.kernel.exception.SystemException, portos.nextmind.NoSuchSportelloException { - return getPersistence().findById_First(id, orderByComparator); + return getPersistence().findById(id); } /** - * Returns the first sportello in the ordered set where id = ?. + * Returns the sportello where id = ? or returns null if it could not be found. Uses the finder cache. * * @param id the ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching sportello, or null if a matching sportello could not be found + * @return the matching sportello, or null if a matching sportello could not be found * @throws SystemException if a system exception occurred */ - public static portos.nextmind.model.Sportello fetchById_First(long id, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + public static portos.nextmind.model.Sportello fetchById(long id) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchById_First(id, orderByComparator); - } - - /** - * Returns the last sportello in the ordered set where id = ?. - * - * @param id the ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching sportello - * @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found - * @throws SystemException if a system exception occurred - */ - public static portos.nextmind.model.Sportello findById_Last(long id, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) - throws com.liferay.portal.kernel.exception.SystemException, - portos.nextmind.NoSuchSportelloException { - return getPersistence().findById_Last(id, orderByComparator); + return getPersistence().fetchById(id); } /** - * Returns the last sportello in the ordered set where id = ?. + * Returns the sportello where id = ? or returns null if it could not be found, optionally using the finder cache. * * @param id the ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching sportello, or null if a matching sportello could not be found + * @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 portos.nextmind.model.Sportello fetchById_Last(long id, - com.liferay.portal.kernel.util.OrderByComparator orderByComparator) + public static portos.nextmind.model.Sportello fetchById(long id, + boolean retrieveFromCache) throws com.liferay.portal.kernel.exception.SystemException { - return getPersistence().fetchById_Last(id, orderByComparator); + return getPersistence().fetchById(id, retrieveFromCache); } /** - * Removes all the sportellos where id = ? from the database. + * Removes the sportello where id = ? from the database. * * @param id the ID + * @return the sportello that was removed * @throws SystemException if a system exception occurred */ - public static void removeById(long id) - throws com.liferay.portal.kernel.exception.SystemException { - getPersistence().removeById(id); + public static portos.nextmind.model.Sportello removeById(long id) + throws com.liferay.portal.kernel.exception.SystemException, + portos.nextmind.NoSuchSportelloException { + return getPersistence().removeById(id); } /** diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml index e4088f3a..1f43d2a5 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml @@ -48,6 +48,9 @@ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml index d27ef7d9..346e954f 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml @@ -35,6 +35,9 @@ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml index a0421dd2..6280f0ce 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml @@ -94,6 +94,9 @@ + + + diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/integratore/IntegratoreSchedulato.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/integratore/IntegratoreSchedulato.java index a3735966..518a4ac2 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/integratore/IntegratoreSchedulato.java +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/integratore/IntegratoreSchedulato.java @@ -6,23 +6,23 @@ import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.messaging.Message; import com.liferay.portal.kernel.messaging.MessageListener; import com.liferay.portal.kernel.messaging.MessageListenerException; -import com.liferay.portal.kernel.util.HttpUtil; -import com.liferay.portal.kernel.util.ParamUtil; +import com.liferay.portal.model.Company; +import com.liferay.portal.model.RoleConstants; +import com.liferay.portal.model.User; +import com.liferay.portal.service.CompanyLocalServiceUtil; +import com.liferay.portal.service.RoleLocalServiceUtil; import com.liferay.portal.service.ServiceContext; -import com.liferay.portal.service.ServiceContextFactory; - -/*import it.tref.liferay.portos.fe.portlet.DettPratica; -import it.tref.liferay.portos.fe.portlet.Territorio;*/ - - - -import com.liferay.portal.service.ServiceContextUtil; +import com.liferay.portal.service.UserLocalServiceUtil; import com.liferay.portal.util.PortalUtil; import it.tref.liferay.portos.bo.model.Comune; +import it.tref.liferay.portos.bo.model.DettPratica; +import it.tref.liferay.portos.bo.model.IntPratica; import it.tref.liferay.portos.bo.model.Territorio; import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil; +import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil; +import it.tref.liferay.portos.bo.service.persistence.DettPraticaUtil; import java.util.List; @@ -49,31 +49,51 @@ public class IntegratoreSchedulato implements MessageListener { e.printStackTrace(); } } - + public enum RequestAction { + QUEUE,ORDER,UNPROMPTED,DELIVER,CONSUME + } public void getPraticaInformation(Message message) throws SystemException, PortalException, Exception { - System.out.println("get information from db and create an obj"); - List listSA = ScheduledActionsLocalServiceUtil.findAzioniDaSvolgere("PAESAGGISTICA", QueryUtil.ALL_POS,QueryUtil.ALL_POS); - for (ScheduledActions scheduledActions : listSA) { - Sportello sport = SportelloLocalServiceUtil.findById(scheduledActions.getShopId()).get(0); - sport.getContext(); - sport.getIpaCode(); + List companies = CompanyLocalServiceUtil.getCompanies(); + for (Company company : companies) { - Comune comune = ComuneLocalServiceUtil.findByC_CP( - PortalUtil.getDefaultCompanyId(), - sport.getCadastralCode()).get(0); - long comuneId = comune.getComuneId(); - Territorio territorio = TerritorioLocalServiceUtil.findByComuneId(comuneId, 0, 1).get(0); - String tipoProcedura = sport.getProceedingType(); - String successURL = sport.getUrl(); - ServiceContext serviceContext = ServiceContextUtil.getInstance(request); - DettPratica dettPratica = DettPraticaServiceUtil.addDettPratica(territorio.getTerritorioId(), tipoProcedura, - serviceContext); - successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "mvcPath", - "/html/fascicolofe/edit_fascicolo.jsp"); - successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "dettPraticaId", - String.valueOf(dettPratica.getDettPraticaId())); - response.sendRedirect(successURL); - System.out.println(scheduledActions.getRequestAction());*/ + System.out.println("get information from db and create an obj"); + List listSA = ScheduledActionsLocalServiceUtil.findAzioniDaSvolgere("PAESAGGISTICA", QueryUtil.ALL_POS,QueryUtil.ALL_POS); + for (ScheduledActions scheduledActions : listSA) { + Sportello sport = SportelloLocalServiceUtil.fetchSportello(scheduledActions.getShopId()); + sport.getContext(); + sport.getIpaCode(); + if (scheduledActions.getRequestAction() == 2){ + Comune comune = ComuneLocalServiceUtil.findByC_CP( + company.getCompanyId(), + sport.getCadastralCode()).get(0); + long comuneId = comune.getComuneId(); + Territorio territorio = TerritorioLocalServiceUtil.findByComuneId(comuneId, 0, 1).get(0); + String tipoProcedura = sport.getProceedingType(); + User user = UserLocalServiceUtil.fetchUserByScreenName(company.getCompanyId(), sport.getDigitalHolderTaxCode()); + if (user == null) { + long userIdAdmin = UserLocalServiceUtil.getRoleUsers( + RoleLocalServiceUtil.getRole(company.getCompanyId(), RoleConstants.ADMINISTRATOR).getRoleId()).get(0).getUserId(); + ServiceContext userServiceContext = new ServiceContext(); + userServiceContext.setScopeGroupId(territorio.getGroupId()); + userServiceContext.setCompanyId(company.getCompanyId()); + userServiceContext.setUserId(userIdAdmin); + //TODO creare utente quando oggetto modificato che comprende + /*user = UserLocalServiceUtil.addUser(creatorUserId, company.getCompanyId(), autoPassword, password1, password2, + autoScreenName, sport.getDigitalHolderTaxCode(), emailAddress, facebookId, openId, locale, sport.getName(), + middleName, sport.getSurname(), prefixId, suffixId, true, 0, + 0, 1980, jobTitle, new long[]{territorio.getGroupId()}, organizationIds, + roleIds, new long[]{territorio.getGroupId()}, false, userServiceContext);*/ + } + ServiceContext serviceContext = new ServiceContext(); + serviceContext.setScopeGroupId(territorio.getGroupId()); + serviceContext.setCompanyId(company.getCompanyId()); + serviceContext.setUserId(user.getUserId()); + IntPratica newIntestazione = IntPraticaLocalServiceUtil.addIntPratica( + territorio.getTerritorioId(), tipoProcedura, new ServiceContext()); + } + System.out.println(scheduledActions.getRequestAction()); + System.out.println(sport.getUrl()); + } } } diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloCacheModel.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloCacheModel.java index e4a17859..f1f94cc2 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloCacheModel.java +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloCacheModel.java @@ -38,7 +38,7 @@ public class SportelloCacheModel implements CacheModel, Externalizable { @Override public String toString() { - StringBundler sb = new StringBundler(33); + StringBundler sb = new StringBundler(39); sb.append("{id="); sb.append(id); @@ -64,6 +64,12 @@ public class SportelloCacheModel implements CacheModel, sb.append(cadastralCode); sb.append(", digitalHolderTaxCode="); sb.append(digitalHolderTaxCode); + sb.append(", name="); + sb.append(name); + sb.append(", surname="); + sb.append(surname); + sb.append(", address="); + sb.append(address); sb.append(", stato="); sb.append(stato); sb.append(", creationDate="); @@ -160,6 +166,27 @@ public class SportelloCacheModel implements CacheModel, sportelloImpl.setDigitalHolderTaxCode(digitalHolderTaxCode); } + if (name == null) { + sportelloImpl.setName(StringPool.BLANK); + } + else { + sportelloImpl.setName(name); + } + + if (surname == null) { + sportelloImpl.setSurname(StringPool.BLANK); + } + else { + sportelloImpl.setSurname(surname); + } + + if (address == null) { + sportelloImpl.setAddress(StringPool.BLANK); + } + else { + sportelloImpl.setAddress(address); + } + sportelloImpl.setStato(stato); if (creationDate == Long.MIN_VALUE) { @@ -202,6 +229,9 @@ public class SportelloCacheModel implements CacheModel, operation = objectInput.readUTF(); cadastralCode = objectInput.readUTF(); digitalHolderTaxCode = objectInput.readUTF(); + name = objectInput.readUTF(); + surname = objectInput.readUTF(); + address = objectInput.readUTF(); stato = objectInput.readBoolean(); creationDate = objectInput.readLong(); lastUpdateDate = objectInput.readLong(); @@ -290,6 +320,27 @@ public class SportelloCacheModel implements CacheModel, objectOutput.writeUTF(digitalHolderTaxCode); } + if (name == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(name); + } + + if (surname == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(surname); + } + + if (address == null) { + objectOutput.writeUTF(StringPool.BLANK); + } + else { + objectOutput.writeUTF(address); + } + objectOutput.writeBoolean(stato); objectOutput.writeLong(creationDate); objectOutput.writeLong(lastUpdateDate); @@ -308,6 +359,9 @@ public class SportelloCacheModel implements CacheModel, public String operation; public String cadastralCode; public String digitalHolderTaxCode; + public String name; + public String surname; + public String address; public boolean stato; public long creationDate; public long lastUpdateDate; diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloModelImpl.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloModelImpl.java index b6fd93ed..f1eafcd0 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloModelImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloModelImpl.java @@ -71,12 +71,15 @@ public class SportelloModelImpl extends BaseModelImpl { "operation", Types.VARCHAR }, { "cadastral_code", Types.VARCHAR }, { "digital_holder_tax_code", Types.VARCHAR }, + { "name", Types.VARCHAR }, + { "surname", Types.VARCHAR }, + { "address", Types.VARCHAR }, { "stato", Types.BOOLEAN }, { "creation_date", Types.TIMESTAMP }, { "last_update_date", Types.TIMESTAMP }, { "sent_to_portos_date", Types.TIMESTAMP } }; - public static final String TABLE_SQL_CREATE = "create table sportello (id LONG not null primary key,application VARCHAR(75) null,client_id VARCHAR(75) null,context VARCHAR(75) null,instance_id VARCHAR(75) null,ipa_code VARCHAR(75) null,proceeding_type VARCHAR(75) null,url VARCHAR(75) null,content_type VARCHAR(75) null,operation VARCHAR(75) null,cadastral_code VARCHAR(75) null,digital_holder_tax_code VARCHAR(75) null,stato BOOLEAN,creation_date DATE null,last_update_date DATE null,sent_to_portos_date DATE null)"; + public static final String TABLE_SQL_CREATE = "create table sportello (id LONG not null primary key,application VARCHAR(75) null,client_id VARCHAR(75) null,context VARCHAR(75) null,instance_id VARCHAR(75) null,ipa_code VARCHAR(75) null,proceeding_type VARCHAR(75) null,url VARCHAR(75) null,content_type VARCHAR(75) null,operation VARCHAR(75) null,cadastral_code VARCHAR(75) null,digital_holder_tax_code VARCHAR(75) null,name VARCHAR(75) null,surname VARCHAR(75) null,address VARCHAR(75) null,stato BOOLEAN,creation_date DATE null,last_update_date DATE null,sent_to_portos_date DATE null)"; public static final String TABLE_SQL_DROP = "drop table sportello"; public static final String ORDER_BY_JPQL = " ORDER BY sportello.id ASC"; public static final String ORDER_BY_SQL = " ORDER BY sportello.id ASC"; @@ -145,6 +148,9 @@ public class SportelloModelImpl extends BaseModelImpl attributes.put("operation", getOperation()); attributes.put("cadastralCode", getCadastralCode()); attributes.put("digitalHolderTaxCode", getDigitalHolderTaxCode()); + attributes.put("name", getName()); + attributes.put("surname", getSurname()); + attributes.put("address", getAddress()); attributes.put("stato", getStato()); attributes.put("creationDate", getCreationDate()); attributes.put("lastUpdateDate", getLastUpdateDate()); @@ -228,6 +234,24 @@ public class SportelloModelImpl extends BaseModelImpl setDigitalHolderTaxCode(digitalHolderTaxCode); } + String name = (String)attributes.get("name"); + + if (name != null) { + setName(name); + } + + String surname = (String)attributes.get("surname"); + + if (surname != null) { + setSurname(surname); + } + + String address = (String)attributes.get("address"); + + if (address != null) { + setAddress(address); + } + Boolean stato = (Boolean)attributes.get("stato"); if (stato != null) { @@ -440,6 +464,51 @@ public class SportelloModelImpl extends BaseModelImpl _digitalHolderTaxCode = digitalHolderTaxCode; } + @Override + public String getName() { + if (_name == null) { + return StringPool.BLANK; + } + else { + return _name; + } + } + + @Override + public void setName(String name) { + _name = name; + } + + @Override + public String getSurname() { + if (_surname == null) { + return StringPool.BLANK; + } + else { + return _surname; + } + } + + @Override + public void setSurname(String surname) { + _surname = surname; + } + + @Override + public String getAddress() { + if (_address == null) { + return StringPool.BLANK; + } + else { + return _address; + } + } + + @Override + public void setAddress(String address) { + _address = address; + } + @Override public boolean getStato() { return _stato; @@ -528,6 +597,9 @@ public class SportelloModelImpl extends BaseModelImpl sportelloImpl.setOperation(getOperation()); sportelloImpl.setCadastralCode(getCadastralCode()); sportelloImpl.setDigitalHolderTaxCode(getDigitalHolderTaxCode()); + sportelloImpl.setName(getName()); + sportelloImpl.setSurname(getSurname()); + sportelloImpl.setAddress(getAddress()); sportelloImpl.setStato(getStato()); sportelloImpl.setCreationDate(getCreationDate()); sportelloImpl.setLastUpdateDate(getLastUpdateDate()); @@ -686,6 +758,30 @@ public class SportelloModelImpl extends BaseModelImpl sportelloCacheModel.digitalHolderTaxCode = null; } + sportelloCacheModel.name = getName(); + + String name = sportelloCacheModel.name; + + if ((name != null) && (name.length() == 0)) { + sportelloCacheModel.name = null; + } + + sportelloCacheModel.surname = getSurname(); + + String surname = sportelloCacheModel.surname; + + if ((surname != null) && (surname.length() == 0)) { + sportelloCacheModel.surname = null; + } + + sportelloCacheModel.address = getAddress(); + + String address = sportelloCacheModel.address; + + if ((address != null) && (address.length() == 0)) { + sportelloCacheModel.address = null; + } + sportelloCacheModel.stato = getStato(); Date creationDate = getCreationDate(); @@ -720,7 +816,7 @@ public class SportelloModelImpl extends BaseModelImpl @Override public String toString() { - StringBundler sb = new StringBundler(33); + StringBundler sb = new StringBundler(39); sb.append("{id="); sb.append(getId()); @@ -746,6 +842,12 @@ public class SportelloModelImpl extends BaseModelImpl sb.append(getCadastralCode()); sb.append(", digitalHolderTaxCode="); sb.append(getDigitalHolderTaxCode()); + sb.append(", name="); + sb.append(getName()); + sb.append(", surname="); + sb.append(getSurname()); + sb.append(", address="); + sb.append(getAddress()); sb.append(", stato="); sb.append(getStato()); sb.append(", creationDate="); @@ -761,7 +863,7 @@ public class SportelloModelImpl extends BaseModelImpl @Override public String toXmlString() { - StringBundler sb = new StringBundler(52); + StringBundler sb = new StringBundler(61); sb.append(""); sb.append("portos.nextmind.model.Sportello"); @@ -815,6 +917,18 @@ public class SportelloModelImpl extends BaseModelImpl "digitalHolderTaxCode"); + sb.append( + "name"); + sb.append( + "surname"); + sb.append( + "address"); sb.append( "stato private String _operation; private String _cadastralCode; private String _digitalHolderTaxCode; + private String _name; + private String _surname; + private String _address; private boolean _stato; private Date _creationDate; private Date _lastUpdateDate; diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/persistence/SportelloPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/persistence/SportelloPersistenceImpl.java index ccaabd3d..f575a386 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/persistence/SportelloPersistenceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/persistence/SportelloPersistenceImpl.java @@ -85,18 +85,9 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, SportelloModelImpl.FINDER_CACHE_ENABLED, Long.class, FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); - public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_ID = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, + public static final FinderPath FINDER_PATH_FETCH_BY_ID = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, SportelloModelImpl.FINDER_CACHE_ENABLED, SportelloImpl.class, - FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findById", - new String[] { - Long.class.getName(), - - Integer.class.getName(), Integer.class.getName(), - OrderByComparator.class.getName() - }); - public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ID = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, - SportelloModelImpl.FINDER_CACHE_ENABLED, SportelloImpl.class, - FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findById", + FINDER_CLASS_NAME_ENTITY, "fetchById", new String[] { Long.class.getName() }, SportelloModelImpl.ID_COLUMN_BITMASK); public static final FinderPath FINDER_PATH_COUNT_BY_ID = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, @@ -105,105 +96,85 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl new String[] { Long.class.getName() }); /** - * Returns all the sportellos where id = ?. + * Returns the sportello where id = ? or throws a {@link portos.nextmind.NoSuchSportelloException} if it could not be found. * * @param id the ID - * @return the matching sportellos + * @return the matching sportello + * @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found * @throws SystemException if a system exception occurred */ @Override - public List findById(long id) throws SystemException { - return findById(id, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); + public Sportello findById(long id) + throws NoSuchSportelloException, SystemException { + Sportello sportello = fetchById(id); + + if (sportello == null) { + StringBundler msg = new StringBundler(4); + + msg.append(_NO_SUCH_ENTITY_WITH_KEY); + + msg.append("id="); + msg.append(id); + + msg.append(StringPool.CLOSE_CURLY_BRACE); + + if (_log.isWarnEnabled()) { + _log.warn(msg.toString()); + } + + throw new NoSuchSportelloException(msg.toString()); + } + + return sportello; } /** - * Returns a range of all the sportellos where id = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, 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 portos.nextmind.model.impl.SportelloModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

+ * Returns the sportello where id = ? or returns null if it could not be found. Uses the finder cache. * * @param id the ID - * @param start the lower bound of the range of sportellos - * @param end the upper bound of the range of sportellos (not inclusive) - * @return the range of matching sportellos + * @return the matching sportello, or null if a matching sportello could not be found * @throws SystemException if a system exception occurred */ @Override - public List findById(long id, int start, int end) - throws SystemException { - return findById(id, start, end, null); + public Sportello fetchById(long id) throws SystemException { + return fetchById(id, true); } /** - * Returns an ordered range of all the sportellos where id = ?. - * - *

- * Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, 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 portos.nextmind.model.impl.SportelloModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. - *

+ * Returns the sportello where id = ? or returns null if it could not be found, optionally using the finder cache. * * @param id the ID - * @param start the lower bound of the range of sportellos - * @param end the upper bound of the range of sportellos (not inclusive) - * @param orderByComparator the comparator to order the results by (optionally null) - * @return the ordered range of matching sportellos + * @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 List findById(long id, int start, int end, - OrderByComparator orderByComparator) throws SystemException { - boolean pagination = true; - FinderPath finderPath = null; - Object[] finderArgs = null; + public Sportello fetchById(long id, boolean retrieveFromCache) + throws SystemException { + Object[] finderArgs = new Object[] { id }; - if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && - (orderByComparator == null)) { - pagination = false; - finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ID; - finderArgs = new Object[] { id }; - } - else { - finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_ID; - finderArgs = new Object[] { id, start, end, orderByComparator }; - } + Object result = null; - List list = (List)FinderCacheUtil.getResult(finderPath, - finderArgs, this); + if (retrieveFromCache) { + result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_ID, + finderArgs, this); + } - if ((list != null) && !list.isEmpty()) { - for (Sportello sportello : list) { - if ((id != sportello.getId())) { - list = null; + if (result instanceof Sportello) { + Sportello sportello = (Sportello)result; - break; - } + if ((id != sportello.getId())) { + result = null; } } - if (list == null) { - StringBundler query = null; - - if (orderByComparator != null) { - query = new StringBundler(3 + - (orderByComparator.getOrderByFields().length * 3)); - } - else { - query = new StringBundler(3); - } + if (result == null) { + StringBundler query = new StringBundler(3); query.append(_SQL_SELECT_SPORTELLO_WHERE); query.append(_FINDER_COLUMN_ID_ID_2); - if (orderByComparator != null) { - appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, - orderByComparator); - } - else - if (pagination) { - query.append(SportelloModelImpl.ORDER_BY_JPQL); - } - String sql = query.toString(); Session session = null; @@ -217,25 +188,27 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl qPos.add(id); - if (!pagination) { - list = (List)QueryUtil.list(q, getDialect(), - start, end, false); + List list = q.list(); - Collections.sort(list); - - list = new UnmodifiableList(list); + if (list.isEmpty()) { + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ID, + finderArgs, list); } else { - list = (List)QueryUtil.list(q, getDialect(), - start, end); - } + Sportello sportello = list.get(0); - cacheResult(list); + result = sportello; - FinderCacheUtil.putResult(finderPath, finderArgs, list); + cacheResult(sportello); + + if ((sportello.getId() != id)) { + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ID, + finderArgs, sportello); + } + } } catch (Exception e) { - FinderCacheUtil.removeResult(finderPath, finderArgs); + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_ID, finderArgs); throw processException(e); } @@ -244,127 +217,27 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl } } - return list; - } - - /** - * Returns the first sportello in the ordered set where id = ?. - * - * @param id the ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching sportello - * @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Sportello findById_First(long id, OrderByComparator orderByComparator) - throws NoSuchSportelloException, SystemException { - Sportello sportello = fetchById_First(id, orderByComparator); - - if (sportello != null) { - return sportello; + if (result instanceof List) { + return null; } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("id="); - msg.append(id); - - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSportelloException(msg.toString()); - } - - /** - * Returns the first sportello in the ordered set where id = ?. - * - * @param id the ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the first matching sportello, or null if a matching sportello could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Sportello fetchById_First(long id, - OrderByComparator orderByComparator) throws SystemException { - List list = findById(id, 0, 1, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); + else { + return (Sportello)result; } - - return null; } /** - * Returns the last sportello in the ordered set where id = ?. + * Removes the sportello where id = ? from the database. * * @param id the ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching sportello - * @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found + * @return the sportello that was removed * @throws SystemException if a system exception occurred */ @Override - public Sportello findById_Last(long id, OrderByComparator orderByComparator) + public Sportello removeById(long id) throws NoSuchSportelloException, SystemException { - Sportello sportello = fetchById_Last(id, orderByComparator); - - if (sportello != null) { - return sportello; - } - - StringBundler msg = new StringBundler(4); - - msg.append(_NO_SUCH_ENTITY_WITH_KEY); - - msg.append("id="); - msg.append(id); + Sportello sportello = findById(id); - msg.append(StringPool.CLOSE_CURLY_BRACE); - - throw new NoSuchSportelloException(msg.toString()); - } - - /** - * Returns the last sportello in the ordered set where id = ?. - * - * @param id the ID - * @param orderByComparator the comparator to order the set by (optionally null) - * @return the last matching sportello, or null if a matching sportello could not be found - * @throws SystemException if a system exception occurred - */ - @Override - public Sportello fetchById_Last(long id, OrderByComparator orderByComparator) - throws SystemException { - int count = countById(id); - - if (count == 0) { - return null; - } - - List list = findById(id, count - 1, count, orderByComparator); - - if (!list.isEmpty()) { - return list.get(0); - } - - return null; - } - - /** - * Removes all the sportellos where id = ? from the database. - * - * @param id the ID - * @throws SystemException if a system exception occurred - */ - @Override - public void removeById(long id) throws SystemException { - for (Sportello sportello : findById(id, QueryUtil.ALL_POS, - QueryUtil.ALL_POS, null)) { - remove(sportello); - } + return remove(sportello); } /** @@ -436,6 +309,9 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl EntityCacheUtil.putResult(SportelloModelImpl.ENTITY_CACHE_ENABLED, SportelloImpl.class, sportello.getPrimaryKey(), sportello); + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ID, + new Object[] { sportello.getId() }, sportello); + sportello.resetOriginalValues(); } @@ -492,6 +368,8 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); + + clearUniqueFindersCache(sportello); } @Override @@ -502,6 +380,48 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl for (Sportello sportello : sportellos) { EntityCacheUtil.removeResult(SportelloModelImpl.ENTITY_CACHE_ENABLED, SportelloImpl.class, sportello.getPrimaryKey()); + + clearUniqueFindersCache(sportello); + } + } + + protected void cacheUniqueFindersCache(Sportello sportello) { + if (sportello.isNew()) { + Object[] args = new Object[] { sportello.getId() }; + + FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_ID, args, + Long.valueOf(1)); + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ID, args, sportello); + } + else { + SportelloModelImpl sportelloModelImpl = (SportelloModelImpl)sportello; + + if ((sportelloModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_ID.getColumnBitmask()) != 0) { + Object[] args = new Object[] { sportello.getId() }; + + FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_ID, args, + Long.valueOf(1)); + FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ID, args, + sportello); + } + } + } + + protected void clearUniqueFindersCache(Sportello sportello) { + SportelloModelImpl sportelloModelImpl = (SportelloModelImpl)sportello; + + Object[] args = new Object[] { sportello.getId() }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ID, args); + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_ID, args); + + if ((sportelloModelImpl.getColumnBitmask() & + FINDER_PATH_FETCH_BY_ID.getColumnBitmask()) != 0) { + args = new Object[] { sportelloModelImpl.getOriginalId() }; + + FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ID, args); + FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_ID, args); } } @@ -616,8 +536,6 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl boolean isNew = sportello.isNew(); - SportelloModelImpl sportelloModelImpl = (SportelloModelImpl)sportello; - Session session = null; try { @@ -645,26 +563,12 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); } - else { - if ((sportelloModelImpl.getColumnBitmask() & - FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ID.getColumnBitmask()) != 0) { - Object[] args = new Object[] { sportelloModelImpl.getOriginalId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ID, - args); - - args = new Object[] { sportelloModelImpl.getId() }; - - FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ID, args); - FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ID, - args); - } - } - EntityCacheUtil.putResult(SportelloModelImpl.ENTITY_CACHE_ENABLED, SportelloImpl.class, sportello.getPrimaryKey(), sportello); + clearUniqueFindersCache(sportello); + cacheUniqueFindersCache(sportello); + return sportello; } @@ -690,6 +594,9 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl sportelloImpl.setOperation(sportello.getOperation()); sportelloImpl.setCadastralCode(sportello.getCadastralCode()); sportelloImpl.setDigitalHolderTaxCode(sportello.getDigitalHolderTaxCode()); + sportelloImpl.setName(sportello.getName()); + sportelloImpl.setSurname(sportello.getSurname()); + sportelloImpl.setAddress(sportello.getAddress()); sportelloImpl.setStato(sportello.isStato()); sportelloImpl.setCreationDate(sportello.getCreationDate()); sportelloImpl.setLastUpdateDate(sportello.getLastUpdateDate()); diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/service.properties index 45a8b24e..da84e56a 100644 --- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_ss - build.number=30 - build.date=1683123283855 + build.number=33 + build.date=1683709486797 build.auto.upgrade=true ##