Sfoglia il codice sorgente

check if the user exists in scheduler at creation of instance

feature/kafka-integrator
E-A 1 anno 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. 68
      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. 339
      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="cadastralCode" type="String" db-name="cadastral_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="creationDate" type="Date" db-name="creation_date" />
<column name="lastUpdateDate" type="Date" db-name="last_update_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>
</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("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<Sportello> 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<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
public boolean getStato() {
return _stato;
@ -650,6 +740,9 @@ public class SportelloClp extends BaseModelImpl<Sportello> 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<Sportello> 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<Sportello> 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<Sportello> implements Sportello
@Override
public String toXmlString() {
StringBundler sb = new StringBundler(52);
StringBundler sb = new StringBundler(61);
sb.append("<model><model-name>");
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[");
sb.append(getDigitalHolderTaxCode());
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(
"<column><column-name>stato</column-name><column-value><![CDATA[");
sb.append(getStato());
@ -835,6 +946,9 @@ public class SportelloClp extends BaseModelImpl<Sportello> 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;

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);
/**
* 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.
*

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.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;

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("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<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) {
@ -429,6 +450,66 @@ public class SportelloWrapper implements Sportello, ModelWrapper<Sportello> {
_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.
*

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
* @return the matching sportellos
* @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
* @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 = &#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 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
* @return the matching sportello, or <code>null</code> 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 = &#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 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;.
* 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, or <code>null</code> if a matching sportello could not be found
* @param retrieveFromCache whether to use the finder cache
* @return the matching sportello, or <code>null</code> 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 = &#63; from the database.
* Removes the sportello where id = &#63; 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 = &#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
* @return the matching sportellos
* @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
* @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 = &#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 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
* @return the matching sportello, or <code>null</code> 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 = &#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);
return getPersistence().fetchById(id);
}
/**
* 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, or <code>null</code> if a matching sportello could not be found
* @param retrieveFromCache whether to use the finder cache
* @return the matching sportello, or <code>null</code> 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 = &#63; from the database.
* Removes the sportello where id = &#63; 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);
}
/**

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="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="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="creationDate" type="org.hibernate.type.TimestampType" column="creation_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="cadastralCode" 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="creationDate" 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">
<column name="DIGITAL_HOLDER_TAX_CODE" />
</basic>
<basic name="name" />
<basic name="surname" />
<basic name="address" />
<basic name="stato" />
<basic name="creationDate">
<column name="CREATION_DATE" />

68
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 {
List<Company> companies = CompanyLocalServiceUtil.getCompanies();
for (Company company : companies) {
System.out.println("get information from db and create an obj");
List<ScheduledActions> listSA = ScheduledActionsLocalServiceUtil.findAzioniDaSvolgere("PAESAGGISTICA", QueryUtil.ALL_POS,QueryUtil.ALL_POS);
for (ScheduledActions scheduledActions : listSA) {
Sportello sport = SportelloLocalServiceUtil.findById(scheduledActions.getShopId()).get(0);
Sportello sport = SportelloLocalServiceUtil.fetchSportello(scheduledActions.getShopId());
sport.getContext();
sport.getIpaCode();
if (scheduledActions.getRequestAction() == 2){
Comune comune = ComuneLocalServiceUtil.findByC_CP(
PortalUtil.getDefaultCompanyId(),
company.getCompanyId(),
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());*/
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());
}
}
}

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 {
@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<Sportello>,
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<Sportello>,
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<Sportello>,
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<Sportello>,
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<Sportello>,
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;

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 },
{ "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<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());
@ -228,6 +234,24 @@ public class SportelloModelImpl extends BaseModelImpl<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) {
@ -440,6 +464,51 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
_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<Sportello>
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<Sportello>
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<Sportello>
@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<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=");
@ -761,7 +863,7 @@ public class SportelloModelImpl extends BaseModelImpl<Sportello>
@Override
public String toXmlString() {
StringBundler sb = new StringBundler(52);
StringBundler sb = new StringBundler(61);
sb.append("<model><model-name>");
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[");
sb.append(getDigitalHolderTaxCode());
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(
"<column><column-name>stato</column-name><column-value><![CDATA[");
sb.append(getStato());
@ -855,6 +969,9 @@ public class SportelloModelImpl extends BaseModelImpl<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;

339
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,
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<Sportello>
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
* @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<Sportello> 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 = &#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>
* 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 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 <code>null</code> if a matching sportello could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public List<Sportello> 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 = &#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>
* 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 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
* @param retrieveFromCache whether to use the finder cache
* @return the matching sportello, or <code>null</code> if a matching sportello could not be found
* @throws SystemException if a system exception occurred
*/
@Override
public List<Sportello> 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<Sportello> list = (List<Sportello>)FinderCacheUtil.getResult(finderPath,
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;
break;
}
}
}
if (list == null) {
StringBundler query = null;
if (result instanceof Sportello) {
Sportello sportello = (Sportello)result;
if (orderByComparator != null) {
query = new StringBundler(3 +
(orderByComparator.getOrderByFields().length * 3));
if ((id != sportello.getId())) {
result = null;
}
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<Sportello>
qPos.add(id);
if (!pagination) {
list = (List<Sportello>)QueryUtil.list(q, getDialect(),
start, end, false);
List<Sportello> list = q.list();
Collections.sort(list);
list = new UnmodifiableList<Sportello>(list);
if (list.isEmpty()) {
FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ID,
finderArgs, list);
}
else {
list = (List<Sportello>)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<Sportello>
}
}
return list;
}
/**
* 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;
}
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 = &#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);
}
if (result instanceof List<?>) {
return null;
}
/**
* 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
*/
@Override
public Sportello findById_Last(long id, OrderByComparator orderByComparator)
throws NoSuchSportelloException, SystemException {
Sportello sportello = fetchById_Last(id, orderByComparator);
if (sportello != null) {
return sportello;
else {
return (Sportello)result;
}
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 last sportello in the ordered set where id = &#63;.
* Removes the sportello where id = &#63; from the database.
*
* @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
* @return the sportello that was removed
* @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;
}
public Sportello removeById(long id)
throws NoSuchSportelloException, SystemException {
Sportello sportello = findById(id);
/**
* 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);
}
return remove(sportello);
}
/**
@ -436,6 +309,9 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
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<Sportello>
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<Sportello>
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<Sportello>
boolean isNew = sportello.isNew();
SportelloModelImpl sportelloModelImpl = (SportelloModelImpl)sportello;
Session session = null;
try {
@ -645,26 +563,12 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl<Sportello>
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<Sportello>
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());

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

Caricamento…
Annulla
Salva