Sfoglia il codice sorgente

check if the user exists in scheduler at creation of instance

feature/kafka-integrator
E-A 2 anni fa
parent
commit
1f1e4824ed
  1. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/commons-logging.jar
  2. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/jstl-api.jar
  3. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/jstl-impl.jar
  4. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/log4j.jar
  5. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar
  6. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/schedulatore-portos-pratiche-portlet-service.jar
  7. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/util-bridges.jar
  8. BIN
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/util-taglib.jar
  9. 5
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service.xml
  10. 118
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloClp.java
  11. 45
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloModel.java
  12. 30
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloSoap.java
  13. 81
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/model/SportelloWrapper.java
  14. 94
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/service/persistence/SportelloPersistence.java
  15. 110
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/service/persistence/SportelloUtil.java
  16. 3
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml
  17. 3
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml
  18. 3
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml
  19. 86
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/integratore/IntegratoreSchedulato.java
  20. 56
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloCacheModel.java
  21. 123
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloModelImpl.java
  22. 341
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/persistence/SportelloPersistenceImpl.java
  23. 4
      liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/service.properties

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/commons-logging.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/jstl-api.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/jstl-impl.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/log4j.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/portos-bo-portlet-service.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/schedulatore-portos-pratiche-portlet-service.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/util-bridges.jar

File binario non mostrato.

BIN
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/lib/util-taglib.jar

File binario non mostrato.

5
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service.xml

@ -19,11 +19,14 @@
<column name="operation" type="String" db-name="operation" /> <column name="operation" type="String" db-name="operation" />
<column name="cadastralCode" type="String" db-name="cadastral_code" /> <column name="cadastralCode" type="String" db-name="cadastral_code" />
<column name="digitalHolderTaxCode" type="String" db-name="digital_holder_tax_code" /> <column name="digitalHolderTaxCode" type="String" db-name="digital_holder_tax_code" />
<column name="name" type="String" db-name="name" />
<column name="surname" type="String" db-name="surname" />
<column name="address" type="String" db-name="address" />
<column name="stato" type="boolean" db-name="stato" /> <column name="stato" type="boolean" db-name="stato" />
<column name="creationDate" type="Date" db-name="creation_date" /> <column name="creationDate" type="Date" db-name="creation_date" />
<column name="lastUpdateDate" type="Date" db-name="last_update_date" /> <column name="lastUpdateDate" type="Date" db-name="last_update_date" />
<column name="sentToPortosDate" type="Date" db-name="sent_to_portos_date" /> <column name="sentToPortosDate" type="Date" db-name="sent_to_portos_date" />
<finder return-type="Collection" name="Id"> <finder return-type="Sportello" name="Id" unique="true" db-index="false">
<finder-column name="id" /> <finder-column name="id" />
</finder> </finder>
</entity> </entity>

118
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<Sportello> implements Sportello
attributes.put("operation", getOperation()); attributes.put("operation", getOperation());
attributes.put("cadastralCode", getCadastralCode()); attributes.put("cadastralCode", getCadastralCode());
attributes.put("digitalHolderTaxCode", getDigitalHolderTaxCode()); attributes.put("digitalHolderTaxCode", getDigitalHolderTaxCode());
attributes.put("name", getName());
attributes.put("surname", getSurname());
attributes.put("address", getAddress());
attributes.put("stato", getStato()); attributes.put("stato", getStato());
attributes.put("creationDate", getCreationDate()); attributes.put("creationDate", getCreationDate());
attributes.put("lastUpdateDate", getLastUpdateDate()); attributes.put("lastUpdateDate", getLastUpdateDate());
@ -168,6 +171,24 @@ public class SportelloClp extends BaseModelImpl<Sportello> implements Sportello
setDigitalHolderTaxCode(digitalHolderTaxCode); 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"); Boolean stato = (Boolean)attributes.get("stato");
if (stato != null) { if (stato != null) {
@ -471,6 +492,75 @@ public class SportelloClp extends BaseModelImpl<Sportello> 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 @Override
public boolean getStato() { public boolean getStato() {
return _stato; return _stato;
@ -650,6 +740,9 @@ public class SportelloClp extends BaseModelImpl<Sportello> implements Sportello
clone.setOperation(getOperation()); clone.setOperation(getOperation());
clone.setCadastralCode(getCadastralCode()); clone.setCadastralCode(getCadastralCode());
clone.setDigitalHolderTaxCode(getDigitalHolderTaxCode()); clone.setDigitalHolderTaxCode(getDigitalHolderTaxCode());
clone.setName(getName());
clone.setSurname(getSurname());
clone.setAddress(getAddress());
clone.setStato(getStato()); clone.setStato(getStato());
clone.setCreationDate(getCreationDate()); clone.setCreationDate(getCreationDate());
clone.setLastUpdateDate(getLastUpdateDate()); clone.setLastUpdateDate(getLastUpdateDate());
@ -706,7 +799,7 @@ public class SportelloClp extends BaseModelImpl<Sportello> implements Sportello
@Override @Override
public String toString() { public String toString() {
StringBundler sb = new StringBundler(33); StringBundler sb = new StringBundler(39);
sb.append("{id="); sb.append("{id=");
sb.append(getId()); sb.append(getId());
@ -732,6 +825,12 @@ public class SportelloClp extends BaseModelImpl<Sportello> implements Sportello
sb.append(getCadastralCode()); sb.append(getCadastralCode());
sb.append(", digitalHolderTaxCode="); sb.append(", digitalHolderTaxCode=");
sb.append(getDigitalHolderTaxCode()); 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(", stato=");
sb.append(getStato()); sb.append(getStato());
sb.append(", creationDate="); sb.append(", creationDate=");
@ -747,7 +846,7 @@ public class SportelloClp extends BaseModelImpl<Sportello> implements Sportello
@Override @Override
public String toXmlString() { public String toXmlString() {
StringBundler sb = new StringBundler(52); StringBundler sb = new StringBundler(61);
sb.append("<model><model-name>"); sb.append("<model><model-name>");
sb.append("portos.nextmind.model.Sportello"); sb.append("portos.nextmind.model.Sportello");
@ -801,6 +900,18 @@ public class SportelloClp extends BaseModelImpl<Sportello> implements Sportello
"<column><column-name>digitalHolderTaxCode</column-name><column-value><![CDATA["); "<column><column-name>digitalHolderTaxCode</column-name><column-value><![CDATA[");
sb.append(getDigitalHolderTaxCode()); sb.append(getDigitalHolderTaxCode());
sb.append("]]></column-value></column>"); sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>name</column-name><column-value><![CDATA[");
sb.append(getName());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>surname</column-name><column-value><![CDATA[");
sb.append(getSurname());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>address</column-name><column-value><![CDATA[");
sb.append(getAddress());
sb.append("]]></column-value></column>");
sb.append( sb.append(
"<column><column-name>stato</column-name><column-value><![CDATA["); "<column><column-name>stato</column-name><column-value><![CDATA[");
sb.append(getStato()); sb.append(getStato());
@ -835,6 +946,9 @@ public class SportelloClp extends BaseModelImpl<Sportello> implements Sportello
private String _operation; private String _operation;
private String _cadastralCode; private String _cadastralCode;
private String _digitalHolderTaxCode; private String _digitalHolderTaxCode;
private String _name;
private String _surname;
private String _address;
private boolean _stato; private boolean _stato;
private Date _creationDate; private Date _creationDate;
private Date _lastUpdateDate; private Date _lastUpdateDate;

45
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<Sportello> {
*/ */
public void setDigitalHolderTaxCode(String digitalHolderTaxCode); 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. * Returns the stato of this sportello.
* *

30
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.setOperation(model.getOperation());
soapModel.setCadastralCode(model.getCadastralCode()); soapModel.setCadastralCode(model.getCadastralCode());
soapModel.setDigitalHolderTaxCode(model.getDigitalHolderTaxCode()); soapModel.setDigitalHolderTaxCode(model.getDigitalHolderTaxCode());
soapModel.setName(model.getName());
soapModel.setSurname(model.getSurname());
soapModel.setAddress(model.getAddress());
soapModel.setStato(model.getStato()); soapModel.setStato(model.getStato());
soapModel.setCreationDate(model.getCreationDate()); soapModel.setCreationDate(model.getCreationDate());
soapModel.setLastUpdateDate(model.getLastUpdateDate()); soapModel.setLastUpdateDate(model.getLastUpdateDate());
@ -194,6 +197,30 @@ public class SportelloSoap implements Serializable {
_digitalHolderTaxCode = digitalHolderTaxCode; _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() { public boolean getStato() {
return _stato; return _stato;
} }
@ -242,6 +269,9 @@ public class SportelloSoap implements Serializable {
private String _operation; private String _operation;
private String _cadastralCode; private String _cadastralCode;
private String _digitalHolderTaxCode; private String _digitalHolderTaxCode;
private String _name;
private String _surname;
private String _address;
private boolean _stato; private boolean _stato;
private Date _creationDate; private Date _creationDate;
private Date _lastUpdateDate; private Date _lastUpdateDate;

81
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<Sportello> {
attributes.put("operation", getOperation()); attributes.put("operation", getOperation());
attributes.put("cadastralCode", getCadastralCode()); attributes.put("cadastralCode", getCadastralCode());
attributes.put("digitalHolderTaxCode", getDigitalHolderTaxCode()); attributes.put("digitalHolderTaxCode", getDigitalHolderTaxCode());
attributes.put("name", getName());
attributes.put("surname", getSurname());
attributes.put("address", getAddress());
attributes.put("stato", getStato()); attributes.put("stato", getStato());
attributes.put("creationDate", getCreationDate()); attributes.put("creationDate", getCreationDate());
attributes.put("lastUpdateDate", getLastUpdateDate()); attributes.put("lastUpdateDate", getLastUpdateDate());
@ -144,6 +147,24 @@ public class SportelloWrapper implements Sportello, ModelWrapper<Sportello> {
setDigitalHolderTaxCode(digitalHolderTaxCode); 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"); Boolean stato = (Boolean)attributes.get("stato");
if (stato != null) { if (stato != null) {
@ -429,6 +450,66 @@ public class SportelloWrapper implements Sportello, ModelWrapper<Sportello> {
_sportello.setDigitalHolderTaxCode(digitalHolderTaxCode); _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. * Returns the stato of this sportello.
* *

94
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<Sportello> {
*/ */
/** /**
* Returns all the sportellos where id = &#63;. * Returns the sportello where id = &#63; or throws a {@link portos.nextmind.NoSuchSportelloException} if it could not be found.
* *
* @param id the ID * @param id the ID
* @return the matching sportellos * @return the matching sportello
* @throws SystemException if a system exception occurred
*/
public java.util.List<portos.nextmind.model.Sportello> findById(long id)
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Returns a range of all the sportellos where id = &#63;.
*
* <p>
* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> 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 <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
* </p>
*
* @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<portos.nextmind.model.Sportello> findById(long id,
int start, int end)
throws com.liferay.portal.kernel.exception.SystemException;
/**
* Returns an ordered range of all the sportellos where id = &#63;.
*
* <p>
* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> 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 <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
* </p>
*
* @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 <code>null</code>)
* @return the ordered range of matching sportellos
* @throws SystemException if a system exception occurred
*/
public java.util.List<portos.nextmind.model.Sportello> 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 = &#63;.
*
* @param id the ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching sportello
* @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found * @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public portos.nextmind.model.Sportello findById_First(long id, public portos.nextmind.model.Sportello findById(long id)
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException, throws com.liferay.portal.kernel.exception.SystemException,
portos.nextmind.NoSuchSportelloException; portos.nextmind.NoSuchSportelloException;
/** /**
* Returns the first sportello in the ordered set where id = &#63;. * Returns the sportello where id = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
* *
* @param id the ID * @param id the ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the matching sportello, or <code>null</code> if a matching sportello could not be found
* @return the first matching sportello, or <code>null</code> if a matching sportello could not be found
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public portos.nextmind.model.Sportello fetchById_First(long id, public portos.nextmind.model.Sportello fetchById(long id)
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException; throws com.liferay.portal.kernel.exception.SystemException;
/** /**
* Returns the last sportello in the ordered set where id = &#63;. * Returns the sportello where id = &#63; or returns <code>null</code> 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 <code>null</code>)
* @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 = &#63;.
* *
* @param id the ID * @param id the ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @param retrieveFromCache whether to use the finder cache
* @return the last matching sportello, or <code>null</code> if a matching sportello could not be found * @return the matching sportello, or <code>null</code> if a matching sportello could not be found
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public portos.nextmind.model.Sportello fetchById_Last(long id, public portos.nextmind.model.Sportello fetchById(long id,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator) boolean retrieveFromCache)
throws com.liferay.portal.kernel.exception.SystemException; throws com.liferay.portal.kernel.exception.SystemException;
/** /**
* Removes all the sportellos where id = &#63; from the database. * Removes the sportello where id = &#63; from the database.
* *
* @param id the ID * @param id the ID
* @return the sportello that was removed
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public void removeById(long id) public portos.nextmind.model.Sportello removeById(long id)
throws com.liferay.portal.kernel.exception.SystemException; throws com.liferay.portal.kernel.exception.SystemException,
portos.nextmind.NoSuchSportelloException;
/** /**
* Returns the number of sportellos where id = &#63;. * Returns the number of sportellos where id = &#63;.

110
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 = &#63;. * Returns the sportello where id = &#63; or throws a {@link portos.nextmind.NoSuchSportelloException} if it could not be found.
* *
* @param id the ID * @param id the ID
* @return the matching sportellos * @return the matching sportello
* @throws SystemException if a system exception occurred
*/
public static java.util.List<portos.nextmind.model.Sportello> findById(
long id) throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findById(id);
}
/**
* Returns a range of all the sportellos where id = &#63;.
*
* <p>
* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> 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 <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
* </p>
*
* @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<portos.nextmind.model.Sportello> 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 = &#63;.
*
* <p>
* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> 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 <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
* </p>
*
* @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 <code>null</code>)
* @return the ordered range of matching sportellos
* @throws SystemException if a system exception occurred
*/
public static java.util.List<portos.nextmind.model.Sportello> 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 = &#63;.
*
* @param id the ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching sportello
* @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found * @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public static portos.nextmind.model.Sportello findById_First(long id, public static portos.nextmind.model.Sportello findById(long id)
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException, throws com.liferay.portal.kernel.exception.SystemException,
portos.nextmind.NoSuchSportelloException { portos.nextmind.NoSuchSportelloException {
return getPersistence().findById_First(id, orderByComparator); return getPersistence().findById(id);
} }
/** /**
* Returns the first sportello in the ordered set where id = &#63;. * Returns the sportello where id = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
* *
* @param id the ID * @param id the ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the matching sportello, or <code>null</code> if a matching sportello could not be found
* @return the first matching sportello, or <code>null</code> if a matching sportello could not be found
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public static portos.nextmind.model.Sportello fetchById_First(long id, public static portos.nextmind.model.Sportello fetchById(long id)
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException { throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().fetchById_First(id, orderByComparator); return getPersistence().fetchById(id);
}
/**
* Returns the last sportello in the ordered set where id = &#63;.
*
* @param id the ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @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);
} }
/** /**
* Returns the last sportello in the ordered set where id = &#63;. * Returns the sportello where id = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
* *
* @param id the ID * @param id the ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @param retrieveFromCache whether to use the finder cache
* @return the last matching sportello, or <code>null</code> if a matching sportello could not be found * @return the matching sportello, or <code>null</code> if a matching sportello could not be found
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public static portos.nextmind.model.Sportello fetchById_Last(long id, public static portos.nextmind.model.Sportello fetchById(long id,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator) boolean retrieveFromCache)
throws com.liferay.portal.kernel.exception.SystemException { throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().fetchById_Last(id, orderByComparator); return getPersistence().fetchById(id, retrieveFromCache);
} }
/** /**
* Removes all the sportellos where id = &#63; from the database. * Removes the sportello where id = &#63; from the database.
* *
* @param id the ID * @param id the ID
* @return the sportello that was removed
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
public static void removeById(long id) public static portos.nextmind.model.Sportello removeById(long id)
throws com.liferay.portal.kernel.exception.SystemException { throws com.liferay.portal.kernel.exception.SystemException,
getPersistence().removeById(id); portos.nextmind.NoSuchSportelloException {
return getPersistence().removeById(id);
} }
/** /**

3
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml

@ -48,6 +48,9 @@
<property name="operation" type="com.liferay.portal.dao.orm.hibernate.StringType" /> <property name="operation" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="cadastralCode" type="com.liferay.portal.dao.orm.hibernate.StringType" column="cadastral_code" /> <property name="cadastralCode" type="com.liferay.portal.dao.orm.hibernate.StringType" column="cadastral_code" />
<property name="digitalHolderTaxCode" type="com.liferay.portal.dao.orm.hibernate.StringType" column="digital_holder_tax_code" /> <property name="digitalHolderTaxCode" type="com.liferay.portal.dao.orm.hibernate.StringType" column="digital_holder_tax_code" />
<property name="name" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="surname" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="address" type="com.liferay.portal.dao.orm.hibernate.StringType" />
<property name="stato" type="com.liferay.portal.dao.orm.hibernate.BooleanType" /> <property name="stato" type="com.liferay.portal.dao.orm.hibernate.BooleanType" />
<property name="creationDate" type="org.hibernate.type.TimestampType" column="creation_date" /> <property name="creationDate" type="org.hibernate.type.TimestampType" column="creation_date" />
<property name="lastUpdateDate" type="org.hibernate.type.TimestampType" column="last_update_date" /> <property name="lastUpdateDate" type="org.hibernate.type.TimestampType" column="last_update_date" />

3
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml

@ -35,6 +35,9 @@
<field name="operation" type="String" /> <field name="operation" type="String" />
<field name="cadastralCode" type="String" /> <field name="cadastralCode" type="String" />
<field name="digitalHolderTaxCode" type="String" /> <field name="digitalHolderTaxCode" type="String" />
<field name="name" type="String" />
<field name="surname" type="String" />
<field name="address" type="String" />
<field name="stato" type="boolean" /> <field name="stato" type="boolean" />
<field name="creationDate" type="Date" /> <field name="creationDate" type="Date" />
<field name="lastUpdateDate" type="Date" /> <field name="lastUpdateDate" type="Date" />

3
liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml

@ -94,6 +94,9 @@
<basic name="digitalHolderTaxCode"> <basic name="digitalHolderTaxCode">
<column name="DIGITAL_HOLDER_TAX_CODE" /> <column name="DIGITAL_HOLDER_TAX_CODE" />
</basic> </basic>
<basic name="name" />
<basic name="surname" />
<basic name="address" />
<basic name="stato" /> <basic name="stato" />
<basic name="creationDate"> <basic name="creationDate">
<column name="CREATION_DATE" /> <column name="CREATION_DATE" />

86
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.Message;
import com.liferay.portal.kernel.messaging.MessageListener; import com.liferay.portal.kernel.messaging.MessageListener;
import com.liferay.portal.kernel.messaging.MessageListenerException; import com.liferay.portal.kernel.messaging.MessageListenerException;
import com.liferay.portal.kernel.util.HttpUtil; import com.liferay.portal.model.Company;
import com.liferay.portal.kernel.util.ParamUtil; 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.ServiceContext;
import com.liferay.portal.service.ServiceContextFactory; import com.liferay.portal.service.UserLocalServiceUtil;
/*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.util.PortalUtil; import com.liferay.portal.util.PortalUtil;
import it.tref.liferay.portos.bo.model.Comune; 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.model.Territorio;
import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil; 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.TerritorioLocalServiceUtil;
import it.tref.liferay.portos.bo.service.persistence.DettPraticaUtil;
import java.util.List; import java.util.List;
@ -49,31 +49,51 @@ public class IntegratoreSchedulato implements MessageListener {
e.printStackTrace(); e.printStackTrace();
} }
} }
public enum RequestAction {
QUEUE,ORDER,UNPROMPTED,DELIVER,CONSUME
}
public void getPraticaInformation(Message message) throws SystemException, PortalException, Exception { public void getPraticaInformation(Message message) throws SystemException, PortalException, Exception {
System.out.println("get information from db and create an obj"); List<Company> companies = CompanyLocalServiceUtil.getCompanies();
List<ScheduledActions> listSA = ScheduledActionsLocalServiceUtil.findAzioniDaSvolgere("PAESAGGISTICA", QueryUtil.ALL_POS,QueryUtil.ALL_POS); for (Company company : companies) {
for (ScheduledActions scheduledActions : listSA) {
Sportello sport = SportelloLocalServiceUtil.findById(scheduledActions.getShopId()).get(0);
sport.getContext();
sport.getIpaCode();
Comune comune = ComuneLocalServiceUtil.findByC_CP( System.out.println("get information from db and create an obj");
PortalUtil.getDefaultCompanyId(), List<ScheduledActions> listSA = ScheduledActionsLocalServiceUtil.findAzioniDaSvolgere("PAESAGGISTICA", QueryUtil.ALL_POS,QueryUtil.ALL_POS);
sport.getCadastralCode()).get(0); for (ScheduledActions scheduledActions : listSA) {
long comuneId = comune.getComuneId(); Sportello sport = SportelloLocalServiceUtil.fetchSportello(scheduledActions.getShopId());
Territorio territorio = TerritorioLocalServiceUtil.findByComuneId(comuneId, 0, 1).get(0); sport.getContext();
String tipoProcedura = sport.getProceedingType(); sport.getIpaCode();
String successURL = sport.getUrl(); if (scheduledActions.getRequestAction() == 2){
ServiceContext serviceContext = ServiceContextUtil.getInstance(request); Comune comune = ComuneLocalServiceUtil.findByC_CP(
DettPratica dettPratica = DettPraticaServiceUtil.addDettPratica(territorio.getTerritorioId(), tipoProcedura, company.getCompanyId(),
serviceContext); sport.getCadastralCode()).get(0);
successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "mvcPath", long comuneId = comune.getComuneId();
"/html/fascicolofe/edit_fascicolo.jsp"); Territorio territorio = TerritorioLocalServiceUtil.findByComuneId(comuneId, 0, 1).get(0);
successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "dettPraticaId", String tipoProcedura = sport.getProceedingType();
String.valueOf(dettPratica.getDettPraticaId())); User user = UserLocalServiceUtil.fetchUserByScreenName(company.getCompanyId(), sport.getDigitalHolderTaxCode());
response.sendRedirect(successURL); if (user == null) {
System.out.println(scheduledActions.getRequestAction());*/ 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());
}
} }
} }

56
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<Sportello>,
Externalizable { Externalizable {
@Override @Override
public String toString() { public String toString() {
StringBundler sb = new StringBundler(33); StringBundler sb = new StringBundler(39);
sb.append("{id="); sb.append("{id=");
sb.append(id); sb.append(id);
@ -64,6 +64,12 @@ public class SportelloCacheModel implements CacheModel<Sportello>,
sb.append(cadastralCode); sb.append(cadastralCode);
sb.append(", digitalHolderTaxCode="); sb.append(", digitalHolderTaxCode=");
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(stato); sb.append(stato);
sb.append(", creationDate="); sb.append(", creationDate=");
@ -160,6 +166,27 @@ public class SportelloCacheModel implements CacheModel<Sportello>,
sportelloImpl.setDigitalHolderTaxCode(digitalHolderTaxCode); 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); sportelloImpl.setStato(stato);
if (creationDate == Long.MIN_VALUE) { if (creationDate == Long.MIN_VALUE) {
@ -202,6 +229,9 @@ public class SportelloCacheModel implements CacheModel<Sportello>,
operation = objectInput.readUTF(); operation = objectInput.readUTF();
cadastralCode = objectInput.readUTF(); cadastralCode = objectInput.readUTF();
digitalHolderTaxCode = objectInput.readUTF(); digitalHolderTaxCode = objectInput.readUTF();
name = objectInput.readUTF();
surname = objectInput.readUTF();
address = objectInput.readUTF();
stato = objectInput.readBoolean(); stato = objectInput.readBoolean();
creationDate = objectInput.readLong(); creationDate = objectInput.readLong();
lastUpdateDate = objectInput.readLong(); lastUpdateDate = objectInput.readLong();
@ -290,6 +320,27 @@ public class SportelloCacheModel implements CacheModel<Sportello>,
objectOutput.writeUTF(digitalHolderTaxCode); 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.writeBoolean(stato);
objectOutput.writeLong(creationDate); objectOutput.writeLong(creationDate);
objectOutput.writeLong(lastUpdateDate); objectOutput.writeLong(lastUpdateDate);
@ -308,6 +359,9 @@ public class SportelloCacheModel implements CacheModel<Sportello>,
public String operation; public String operation;
public String cadastralCode; public String cadastralCode;
public String digitalHolderTaxCode; public String digitalHolderTaxCode;
public String name;
public String surname;
public String address;
public boolean stato; public boolean stato;
public long creationDate; public long creationDate;
public long lastUpdateDate; public long lastUpdateDate;

123
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<Sportello>
{ "operation", Types.VARCHAR }, { "operation", Types.VARCHAR },
{ "cadastral_code", Types.VARCHAR }, { "cadastral_code", Types.VARCHAR },
{ "digital_holder_tax_code", Types.VARCHAR }, { "digital_holder_tax_code", Types.VARCHAR },
{ "name", Types.VARCHAR },
{ "surname", Types.VARCHAR },
{ "address", Types.VARCHAR },
{ "stato", Types.BOOLEAN }, { "stato", Types.BOOLEAN },
{ "creation_date", Types.TIMESTAMP }, { "creation_date", Types.TIMESTAMP },
{ "last_update_date", Types.TIMESTAMP }, { "last_update_date", Types.TIMESTAMP },
{ "sent_to_portos_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 TABLE_SQL_DROP = "drop table sportello";
public static final String ORDER_BY_JPQL = " ORDER BY sportello.id ASC"; public static final String ORDER_BY_JPQL = " ORDER BY sportello.id ASC";
public static final String ORDER_BY_SQL = " 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<Sportello>
attributes.put("operation", getOperation()); attributes.put("operation", getOperation());
attributes.put("cadastralCode", getCadastralCode()); attributes.put("cadastralCode", getCadastralCode());
attributes.put("digitalHolderTaxCode", getDigitalHolderTaxCode()); attributes.put("digitalHolderTaxCode", getDigitalHolderTaxCode());
attributes.put("name", getName());
attributes.put("surname", getSurname());
attributes.put("address", getAddress());
attributes.put("stato", getStato()); attributes.put("stato", getStato());
attributes.put("creationDate", getCreationDate()); attributes.put("creationDate", getCreationDate());
attributes.put("lastUpdateDate", getLastUpdateDate()); attributes.put("lastUpdateDate", getLastUpdateDate());
@ -228,6 +234,24 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
setDigitalHolderTaxCode(digitalHolderTaxCode); 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"); Boolean stato = (Boolean)attributes.get("stato");
if (stato != null) { if (stato != null) {
@ -440,6 +464,51 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
_digitalHolderTaxCode = digitalHolderTaxCode; _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 @Override
public boolean getStato() { public boolean getStato() {
return _stato; return _stato;
@ -528,6 +597,9 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
sportelloImpl.setOperation(getOperation()); sportelloImpl.setOperation(getOperation());
sportelloImpl.setCadastralCode(getCadastralCode()); sportelloImpl.setCadastralCode(getCadastralCode());
sportelloImpl.setDigitalHolderTaxCode(getDigitalHolderTaxCode()); sportelloImpl.setDigitalHolderTaxCode(getDigitalHolderTaxCode());
sportelloImpl.setName(getName());
sportelloImpl.setSurname(getSurname());
sportelloImpl.setAddress(getAddress());
sportelloImpl.setStato(getStato()); sportelloImpl.setStato(getStato());
sportelloImpl.setCreationDate(getCreationDate()); sportelloImpl.setCreationDate(getCreationDate());
sportelloImpl.setLastUpdateDate(getLastUpdateDate()); sportelloImpl.setLastUpdateDate(getLastUpdateDate());
@ -686,6 +758,30 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
sportelloCacheModel.digitalHolderTaxCode = null; 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(); sportelloCacheModel.stato = getStato();
Date creationDate = getCreationDate(); Date creationDate = getCreationDate();
@ -720,7 +816,7 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
@Override @Override
public String toString() { public String toString() {
StringBundler sb = new StringBundler(33); StringBundler sb = new StringBundler(39);
sb.append("{id="); sb.append("{id=");
sb.append(getId()); sb.append(getId());
@ -746,6 +842,12 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
sb.append(getCadastralCode()); sb.append(getCadastralCode());
sb.append(", digitalHolderTaxCode="); sb.append(", digitalHolderTaxCode=");
sb.append(getDigitalHolderTaxCode()); 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(", stato=");
sb.append(getStato()); sb.append(getStato());
sb.append(", creationDate="); sb.append(", creationDate=");
@ -761,7 +863,7 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
@Override @Override
public String toXmlString() { public String toXmlString() {
StringBundler sb = new StringBundler(52); StringBundler sb = new StringBundler(61);
sb.append("<model><model-name>"); sb.append("<model><model-name>");
sb.append("portos.nextmind.model.Sportello"); sb.append("portos.nextmind.model.Sportello");
@ -815,6 +917,18 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
"<column><column-name>digitalHolderTaxCode</column-name><column-value><![CDATA["); "<column><column-name>digitalHolderTaxCode</column-name><column-value><![CDATA[");
sb.append(getDigitalHolderTaxCode()); sb.append(getDigitalHolderTaxCode());
sb.append("]]></column-value></column>"); sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>name</column-name><column-value><![CDATA[");
sb.append(getName());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>surname</column-name><column-value><![CDATA[");
sb.append(getSurname());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>address</column-name><column-value><![CDATA[");
sb.append(getAddress());
sb.append("]]></column-value></column>");
sb.append( sb.append(
"<column><column-name>stato</column-name><column-value><![CDATA["); "<column><column-name>stato</column-name><column-value><![CDATA[");
sb.append(getStato()); sb.append(getStato());
@ -855,6 +969,9 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
private String _operation; private String _operation;
private String _cadastralCode; private String _cadastralCode;
private String _digitalHolderTaxCode; private String _digitalHolderTaxCode;
private String _name;
private String _surname;
private String _address;
private boolean _stato; private boolean _stato;
private Date _creationDate; private Date _creationDate;
private Date _lastUpdateDate; private Date _lastUpdateDate;

341
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<Sportello>
public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED,
SportelloModelImpl.FINDER_CACHE_ENABLED, Long.class, SportelloModelImpl.FINDER_CACHE_ENABLED, Long.class,
FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]); 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, SportelloModelImpl.FINDER_CACHE_ENABLED, SportelloImpl.class,
FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findById", FINDER_CLASS_NAME_ENTITY, "fetchById",
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",
new String[] { Long.class.getName() }, new String[] { Long.class.getName() },
SportelloModelImpl.ID_COLUMN_BITMASK); SportelloModelImpl.ID_COLUMN_BITMASK);
public static final FinderPath FINDER_PATH_COUNT_BY_ID = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED, public static final FinderPath FINDER_PATH_COUNT_BY_ID = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED,
@ -105,105 +96,85 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
new String[] { Long.class.getName() }); new String[] { Long.class.getName() });
/** /**
* Returns all the sportellos where id = &#63;. * Returns the sportello where id = &#63; or throws a {@link portos.nextmind.NoSuchSportelloException} if it could not be found.
* *
* @param id the ID * @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 * @throws SystemException if a system exception occurred
*/ */
@Override @Override
public List<Sportello> findById(long id) throws SystemException { public Sportello findById(long id)
return findById(id, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); 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 = &#63;. * Returns the sportello where id = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
*
* <p>
* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> 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 <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
* </p>
* *
* @param id the ID * @param id the ID
* @param start the lower bound of the range of sportellos * @return the matching sportello, or <code>null</code> if a matching sportello could not be found
* @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 * @throws SystemException if a system exception occurred
*/ */
@Override @Override
public List<Sportello> findById(long id, int start, int end) public Sportello fetchById(long id) throws SystemException {
throws SystemException { return fetchById(id, true);
return findById(id, start, end, null);
} }
/** /**
* Returns an ordered range of all the sportellos where id = &#63;. * Returns the sportello where id = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
*
* <p>
* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> 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 <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
* </p>
* *
* @param id the ID * @param id the ID
* @param start the lower bound of the range of sportellos * @param retrieveFromCache whether to use the finder cache
* @param end the upper bound of the range of sportellos (not inclusive) * @return the matching sportello, or <code>null</code> if a matching sportello could not be found
* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
* @return the ordered range of matching sportellos
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
@Override @Override
public List<Sportello> findById(long id, int start, int end, public Sportello fetchById(long id, boolean retrieveFromCache)
OrderByComparator orderByComparator) throws SystemException { throws SystemException {
boolean pagination = true; Object[] finderArgs = new Object[] { id };
FinderPath finderPath = null;
Object[] finderArgs = null;
if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && Object result = null;
(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 };
}
List<Sportello> list = (List<Sportello>)FinderCacheUtil.getResult(finderPath, if (retrieveFromCache) {
finderArgs, this); result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_ID,
finderArgs, this);
}
if ((list != null) && !list.isEmpty()) { if (result instanceof Sportello) {
for (Sportello sportello : list) { Sportello sportello = (Sportello)result;
if ((id != sportello.getId())) {
list = null;
break; if ((id != sportello.getId())) {
} result = null;
} }
} }
if (list == null) { if (result == null) {
StringBundler query = null; StringBundler query = new StringBundler(3);
if (orderByComparator != null) {
query = new StringBundler(3 +
(orderByComparator.getOrderByFields().length * 3));
}
else {
query = new StringBundler(3);
}
query.append(_SQL_SELECT_SPORTELLO_WHERE); query.append(_SQL_SELECT_SPORTELLO_WHERE);
query.append(_FINDER_COLUMN_ID_ID_2); 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(); String sql = query.toString();
Session session = null; Session session = null;
@ -217,25 +188,27 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
qPos.add(id); qPos.add(id);
if (!pagination) { List<Sportello> list = q.list();
list = (List<Sportello>)QueryUtil.list(q, getDialect(),
start, end, false);
Collections.sort(list); if (list.isEmpty()) {
FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ID,
list = new UnmodifiableList<Sportello>(list); finderArgs, list);
} }
else { else {
list = (List<Sportello>)QueryUtil.list(q, getDialect(), Sportello sportello = list.get(0);
start, end);
}
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) { catch (Exception e) {
FinderCacheUtil.removeResult(finderPath, finderArgs); FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_ID, finderArgs);
throw processException(e); throw processException(e);
} }
@ -244,127 +217,27 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
} }
} }
return list; if (result instanceof List<?>) {
} return null;
/**
* Returns the first sportello in the ordered set where id = &#63;.
*
* @param id the ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @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;
} }
else {
StringBundler msg = new StringBundler(4); return (Sportello)result;
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 = &#63;.
*
* @param id the ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching sportello, or <code>null</code> 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<Sportello> list = findById(id, 0, 1, orderByComparator);
if (!list.isEmpty()) {
return list.get(0);
} }
return null;
} }
/** /**
* Returns the last sportello in the ordered set where id = &#63;. * Removes the sportello where id = &#63; from the database.
* *
* @param id the ID * @param id the ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the sportello that was removed
* @return the last matching sportello
* @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found
* @throws SystemException if a system exception occurred * @throws SystemException if a system exception occurred
*/ */
@Override @Override
public Sportello findById_Last(long id, OrderByComparator orderByComparator) public Sportello removeById(long id)
throws NoSuchSportelloException, SystemException { throws NoSuchSportelloException, SystemException {
Sportello sportello = fetchById_Last(id, orderByComparator); Sportello sportello = findById(id);
if (sportello != null) {
return sportello;
}
StringBundler msg = new StringBundler(4);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("id=");
msg.append(id);
msg.append(StringPool.CLOSE_CURLY_BRACE); return remove(sportello);
throw new NoSuchSportelloException(msg.toString());
}
/**
* Returns the last sportello in the ordered set where id = &#63;.
*
* @param id the ID
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching sportello, or <code>null</code> 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<Sportello> list = findById(id, count - 1, count, orderByComparator);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
}
/**
* Removes all the sportellos where id = &#63; 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);
}
} }
/** /**
@ -436,6 +309,9 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
EntityCacheUtil.putResult(SportelloModelImpl.ENTITY_CACHE_ENABLED, EntityCacheUtil.putResult(SportelloModelImpl.ENTITY_CACHE_ENABLED,
SportelloImpl.class, sportello.getPrimaryKey(), sportello); SportelloImpl.class, sportello.getPrimaryKey(), sportello);
FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ID,
new Object[] { sportello.getId() }, sportello);
sportello.resetOriginalValues(); sportello.resetOriginalValues();
} }
@ -492,6 +368,8 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
clearUniqueFindersCache(sportello);
} }
@Override @Override
@ -502,6 +380,48 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
for (Sportello sportello : sportellos) { for (Sportello sportello : sportellos) {
EntityCacheUtil.removeResult(SportelloModelImpl.ENTITY_CACHE_ENABLED, EntityCacheUtil.removeResult(SportelloModelImpl.ENTITY_CACHE_ENABLED,
SportelloImpl.class, sportello.getPrimaryKey()); 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<Sportello>
boolean isNew = sportello.isNew(); boolean isNew = sportello.isNew();
SportelloModelImpl sportelloModelImpl = (SportelloModelImpl)sportello;
Session session = null; Session session = null;
try { try {
@ -645,26 +563,12 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); 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, EntityCacheUtil.putResult(SportelloModelImpl.ENTITY_CACHE_ENABLED,
SportelloImpl.class, sportello.getPrimaryKey(), sportello); SportelloImpl.class, sportello.getPrimaryKey(), sportello);
clearUniqueFindersCache(sportello);
cacheUniqueFindersCache(sportello);
return sportello; return sportello;
} }
@ -690,6 +594,9 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
sportelloImpl.setOperation(sportello.getOperation()); sportelloImpl.setOperation(sportello.getOperation());
sportelloImpl.setCadastralCode(sportello.getCadastralCode()); sportelloImpl.setCadastralCode(sportello.getCadastralCode());
sportelloImpl.setDigitalHolderTaxCode(sportello.getDigitalHolderTaxCode()); sportelloImpl.setDigitalHolderTaxCode(sportello.getDigitalHolderTaxCode());
sportelloImpl.setName(sportello.getName());
sportelloImpl.setSurname(sportello.getSurname());
sportelloImpl.setAddress(sportello.getAddress());
sportelloImpl.setStato(sportello.isStato()); sportelloImpl.setStato(sportello.isStato());
sportelloImpl.setCreationDate(sportello.getCreationDate()); sportelloImpl.setCreationDate(sportello.getCreationDate());
sportelloImpl.setLastUpdateDate(sportello.getLastUpdateDate()); sportelloImpl.setLastUpdateDate(sportello.getLastUpdateDate());

4
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.namespace=portos_ss
build.number=30 build.number=33
build.date=1683123283855 build.date=1683709486797
build.auto.upgrade=true build.auto.upgrade=true
## ##

Caricamento…
Annulla
Salva