findById(long id)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
+ /**
+ * Returns a range of all the sportellos where id = ?.
+ *
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link portos.nextmind.model.impl.SportelloModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ *
+ * @param id the ID
+ * @param start the lower bound of the range of sportellos
+ * @param end the upper bound of the range of sportellos (not inclusive)
+ * @return the range of matching sportellos
+ * @throws SystemException if a system exception occurred
+ */
+ public java.util.List findById(long id,
+ int start, int end)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
+ /**
+ * Returns an ordered range of all the sportellos where id = ?.
+ *
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link portos.nextmind.model.impl.SportelloModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ *
+ * @param id the ID
+ * @param start the lower bound of the range of sportellos
+ * @param end the upper bound of the range of sportellos (not inclusive)
+ * @param orderByComparator the comparator to order the results by (optionally null
)
+ * @return the ordered range of matching sportellos
+ * @throws SystemException if a system exception occurred
+ */
+ public java.util.List findById(long id,
+ int start, int end,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
+ /**
+ * Returns the first sportello in the ordered set where id = ?.
+ *
+ * @param id the ID
+ * @param orderByComparator the comparator to order the set by (optionally null
)
+ * @return the first matching sportello
+ * @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)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ portos.nextmind.NoSuchSportelloException;
+
+ /**
+ * Returns the first sportello in the ordered set where id = ?.
+ *
+ * @param id the ID
+ * @param orderByComparator the comparator to order the set by (optionally null
)
+ * @return the first matching sportello, or null
if a matching sportello could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public portos.nextmind.model.Sportello fetchById_First(long id,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
+ /**
+ * Returns the last sportello in the ordered set where id = ?.
+ *
+ * @param id the ID
+ * @param orderByComparator the comparator to order the set by (optionally null
)
+ * @return the last matching sportello
+ * @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public portos.nextmind.model.Sportello findById_Last(long id,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ portos.nextmind.NoSuchSportelloException;
+
+ /**
+ * Returns the last sportello in the ordered set where id = ?.
+ *
+ * @param id the ID
+ * @param orderByComparator the comparator to order the set by (optionally null
)
+ * @return the last matching sportello, or null
if a matching sportello could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public portos.nextmind.model.Sportello fetchById_Last(long id,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
+ /**
+ * Removes all the sportellos where id = ? from the database.
+ *
+ * @param id the ID
+ * @throws SystemException if a system exception occurred
+ */
+ public void removeById(long id)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
+ /**
+ * Returns the number of sportellos where id = ?.
+ *
+ * @param id the ID
+ * @return the number of matching sportellos
+ * @throws SystemException if a system exception occurred
+ */
+ public int countById(long id)
+ throws com.liferay.portal.kernel.exception.SystemException;
+
/**
* Caches the sportello in the entity cache if it is enabled.
*
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/service/persistence/SportelloUtil.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/service/persistence/SportelloUtil.java
index fc255b22..fb03fe28 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/service/persistence/SportelloUtil.java
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/service/portos/nextmind/service/persistence/SportelloUtil.java
@@ -110,6 +110,141 @@ public class SportelloUtil {
return getPersistence().update(sportello, serviceContext);
}
+ /**
+ * Returns all the sportellos where id = ?.
+ *
+ * @param id the ID
+ * @return the matching sportellos
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List findById(
+ long id) throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().findById(id);
+ }
+
+ /**
+ * Returns a range of all the sportellos where id = ?.
+ *
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link portos.nextmind.model.impl.SportelloModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ *
+ * @param id the ID
+ * @param start the lower bound of the range of sportellos
+ * @param end the upper bound of the range of sportellos (not inclusive)
+ * @return the range of matching sportellos
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List findById(
+ long id, int start, int end)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().findById(id, start, end);
+ }
+
+ /**
+ * Returns an ordered range of all the sportellos where id = ?.
+ *
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link portos.nextmind.model.impl.SportelloModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ *
+ * @param id the ID
+ * @param start the lower bound of the range of sportellos
+ * @param end the upper bound of the range of sportellos (not inclusive)
+ * @param orderByComparator the comparator to order the results by (optionally null
)
+ * @return the ordered range of matching sportellos
+ * @throws SystemException if a system exception occurred
+ */
+ public static java.util.List findById(
+ long id, int start, int end,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().findById(id, start, end, orderByComparator);
+ }
+
+ /**
+ * Returns the first sportello in the ordered set where id = ?.
+ *
+ * @param id the ID
+ * @param orderByComparator the comparator to order the set by (optionally null
)
+ * @return the first matching sportello
+ * @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)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ portos.nextmind.NoSuchSportelloException {
+ return getPersistence().findById_First(id, orderByComparator);
+ }
+
+ /**
+ * Returns the first sportello in the ordered set where id = ?.
+ *
+ * @param id the ID
+ * @param orderByComparator the comparator to order the set by (optionally null
)
+ * @return the first matching sportello, or null
if a matching sportello could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static portos.nextmind.model.Sportello fetchById_First(long id,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().fetchById_First(id, orderByComparator);
+ }
+
+ /**
+ * Returns the last sportello in the ordered set where id = ?.
+ *
+ * @param id the ID
+ * @param orderByComparator the comparator to order the set by (optionally null
)
+ * @return the last matching sportello
+ * @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static portos.nextmind.model.Sportello findById_Last(long id,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException,
+ portos.nextmind.NoSuchSportelloException {
+ return getPersistence().findById_Last(id, orderByComparator);
+ }
+
+ /**
+ * Returns the last sportello in the ordered set where id = ?.
+ *
+ * @param id the ID
+ * @param orderByComparator the comparator to order the set by (optionally null
)
+ * @return the last matching sportello, or null
if a matching sportello could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public static portos.nextmind.model.Sportello fetchById_Last(long id,
+ com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().fetchById_Last(id, orderByComparator);
+ }
+
+ /**
+ * Removes all the sportellos where id = ? from the database.
+ *
+ * @param id the ID
+ * @throws SystemException if a system exception occurred
+ */
+ public static void removeById(long id)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ getPersistence().removeById(id);
+ }
+
+ /**
+ * Returns the number of sportellos where id = ?.
+ *
+ * @param id the ID
+ * @return the number of matching sportellos
+ * @throws SystemException if a system exception occurred
+ */
+ public static int countById(long id)
+ throws com.liferay.portal.kernel.exception.SystemException {
+ return getPersistence().countById(id);
+ }
+
/**
* Caches the sportello in the entity cache if it is enabled.
*
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml
index 0c9e279a..e4088f3a 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-hbm.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml
index fc834093..d27ef7d9 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-model-hints.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml
index 8e7d1faa..a0421dd2 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/META-INF/portlet-orm.xml
@@ -45,7 +45,9 @@
-
+
+
+
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/integratore/IntegratoreSchedulato.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/integratore/IntegratoreSchedulato.java
index b0555dd5..a3735966 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/integratore/IntegratoreSchedulato.java
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/integratore/IntegratoreSchedulato.java
@@ -6,10 +6,30 @@ 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.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.util.PortalUtil;
+
+import it.tref.liferay.portos.bo.model.Comune;
+import it.tref.liferay.portos.bo.model.Territorio;
+import it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil;
+import it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil;
+
import java.util.List;
import portos.nextmind.model.ScheduledActions;
+import portos.nextmind.model.Sportello;
import portos.nextmind.service.ScheduledActionsLocalServiceUtil;
+import portos.nextmind.service.SportelloLocalServiceUtil;
public class IntegratoreSchedulato implements MessageListener {
@@ -32,9 +52,28 @@ public class IntegratoreSchedulato implements MessageListener {
public void getPraticaInformation(Message message) throws SystemException, PortalException, Exception {
System.out.println("get information from db and create an obj");
- List listSA = ScheduledActionsLocalServiceUtil.findAzioniDaSvolgere(QueryUtil.ALL_POS,QueryUtil.ALL_POS);
+ List listSA = ScheduledActionsLocalServiceUtil.findAzioniDaSvolgere("PAESAGGISTICA", QueryUtil.ALL_POS,QueryUtil.ALL_POS);
for (ScheduledActions scheduledActions : listSA) {
- System.out.println(scheduledActions.getRequestAction());
+ Sportello sport = SportelloLocalServiceUtil.findById(scheduledActions.getShopId()).get(0);
+ sport.getContext();
+ sport.getIpaCode();
+
+ Comune comune = ComuneLocalServiceUtil.findByC_CP(
+ PortalUtil.getDefaultCompanyId(),
+ sport.getCadastralCode()).get(0);
+ long comuneId = comune.getComuneId();
+ Territorio territorio = TerritorioLocalServiceUtil.findByComuneId(comuneId, 0, 1).get(0);
+ String tipoProcedura = sport.getProceedingType();
+ String successURL = sport.getUrl();
+ ServiceContext serviceContext = ServiceContextUtil.getInstance(request);
+ DettPratica dettPratica = DettPraticaServiceUtil.addDettPratica(territorio.getTerritorioId(), tipoProcedura,
+ serviceContext);
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "mvcPath",
+ "/html/fascicolofe/edit_fascicolo.jsp");
+ successURL = HttpUtil.addParameter(successURL, response.getNamespace() + "dettPraticaId",
+ String.valueOf(dettPratica.getDettPraticaId()));
+ response.sendRedirect(successURL);
+ System.out.println(scheduledActions.getRequestAction());*/
}
}
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/ScheduledActionsCacheModel.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/ScheduledActionsCacheModel.java
index cd7e8502..087cd683 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/ScheduledActionsCacheModel.java
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/ScheduledActionsCacheModel.java
@@ -38,8 +38,8 @@ public class ScheduledActionsCacheModel implements CacheModel,
public String toString() {
StringBundler sb = new StringBundler(13);
- sb.append("{shop_id=");
- sb.append(shop_id);
+ sb.append("{shopId=");
+ sb.append(shopId);
sb.append(", requestAction=");
sb.append(requestAction);
sb.append(", headers=");
@@ -59,7 +59,7 @@ public class ScheduledActionsCacheModel implements CacheModel,
public ScheduledActions toEntityModel() {
ScheduledActionsImpl scheduledActionsImpl = new ScheduledActionsImpl();
- scheduledActionsImpl.setShop_id(shop_id);
+ scheduledActionsImpl.setShopId(shopId);
scheduledActionsImpl.setRequestAction(requestAction);
if (headers == null) {
@@ -86,7 +86,7 @@ public class ScheduledActionsCacheModel implements CacheModel,
@Override
public void readExternal(ObjectInput objectInput) throws IOException {
- shop_id = objectInput.readLong();
+ shopId = objectInput.readLong();
requestAction = objectInput.readInt();
headers = objectInput.readUTF();
errorLog = objectInput.readUTF();
@@ -97,7 +97,7 @@ public class ScheduledActionsCacheModel implements CacheModel,
@Override
public void writeExternal(ObjectOutput objectOutput)
throws IOException {
- objectOutput.writeLong(shop_id);
+ objectOutput.writeLong(shopId);
objectOutput.writeInt(requestAction);
if (headers == null) {
@@ -118,7 +118,7 @@ public class ScheduledActionsCacheModel implements CacheModel,
objectOutput.writeLong(intPraticaId);
}
- public long shop_id;
+ public long shopId;
public int requestAction;
public String headers;
public String errorLog;
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/ScheduledActionsModelImpl.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/ScheduledActionsModelImpl.java
index a6747986..0cd8603c 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/ScheduledActionsModelImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/ScheduledActionsModelImpl.java
@@ -67,7 +67,7 @@ public class ScheduledActionsModelImpl extends BaseModelImpl
};
public static final String TABLE_SQL_CREATE = "create table scheduled_actions (shop_id LONG not null primary key,request_action INTEGER,headers VARCHAR(75) null,error_log VARCHAR(75) null,error_flag BOOLEAN,int_pratica_id LONG)";
public static final String TABLE_SQL_DROP = "drop table scheduled_actions";
- public static final String ORDER_BY_JPQL = " ORDER BY scheduledActions.shop_id ASC";
+ public static final String ORDER_BY_JPQL = " ORDER BY scheduledActions.shopId ASC";
public static final String ORDER_BY_SQL = " ORDER BY scheduled_actions.shop_id ASC";
public static final String DATA_SOURCE = "suesuapDataSource";
public static final String SESSION_FACTORY = "suesuapSessionFactory";
@@ -82,7 +82,7 @@ public class ScheduledActionsModelImpl extends BaseModelImpl
"value.object.column.bitmask.enabled.portos.nextmind.model.ScheduledActions"),
true);
public static long INTPRATICAID_COLUMN_BITMASK = 1L;
- public static long SHOP_ID_COLUMN_BITMASK = 2L;
+ public static long SHOPID_COLUMN_BITMASK = 2L;
public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
"lock.expiration.time.portos.nextmind.model.ScheduledActions"));
@@ -91,17 +91,17 @@ public class ScheduledActionsModelImpl extends BaseModelImpl
@Override
public long getPrimaryKey() {
- return _shop_id;
+ return _shopId;
}
@Override
public void setPrimaryKey(long primaryKey) {
- setShop_id(primaryKey);
+ setShopId(primaryKey);
}
@Override
public Serializable getPrimaryKeyObj() {
- return _shop_id;
+ return _shopId;
}
@Override
@@ -123,7 +123,7 @@ public class ScheduledActionsModelImpl extends BaseModelImpl
public Map getModelAttributes() {
Map attributes = new HashMap();
- attributes.put("shop_id", getShop_id());
+ attributes.put("shopId", getShopId());
attributes.put("requestAction", getRequestAction());
attributes.put("headers", getHeaders());
attributes.put("errorLog", getErrorLog());
@@ -135,10 +135,10 @@ public class ScheduledActionsModelImpl extends BaseModelImpl
@Override
public void setModelAttributes(Map attributes) {
- Long shop_id = (Long)attributes.get("shop_id");
+ Long shopId = (Long)attributes.get("shopId");
- if (shop_id != null) {
- setShop_id(shop_id);
+ if (shopId != null) {
+ setShopId(shopId);
}
Integer requestAction = (Integer)attributes.get("requestAction");
@@ -173,13 +173,13 @@ public class ScheduledActionsModelImpl extends BaseModelImpl
}
@Override
- public long getShop_id() {
- return _shop_id;
+ public long getShopId() {
+ return _shopId;
}
@Override
- public void setShop_id(long shop_id) {
- _shop_id = shop_id;
+ public void setShopId(long shopId) {
+ _shopId = shopId;
}
@Override
@@ -290,7 +290,7 @@ public class ScheduledActionsModelImpl extends BaseModelImpl
public Object clone() {
ScheduledActionsImpl scheduledActionsImpl = new ScheduledActionsImpl();
- scheduledActionsImpl.setShop_id(getShop_id());
+ scheduledActionsImpl.setShopId(getShopId());
scheduledActionsImpl.setRequestAction(getRequestAction());
scheduledActionsImpl.setHeaders(getHeaders());
scheduledActionsImpl.setErrorLog(getErrorLog());
@@ -359,7 +359,7 @@ public class ScheduledActionsModelImpl extends BaseModelImpl
public CacheModel toCacheModel() {
ScheduledActionsCacheModel scheduledActionsCacheModel = new ScheduledActionsCacheModel();
- scheduledActionsCacheModel.shop_id = getShop_id();
+ scheduledActionsCacheModel.shopId = getShopId();
scheduledActionsCacheModel.requestAction = getRequestAction();
@@ -390,8 +390,8 @@ public class ScheduledActionsModelImpl extends BaseModelImpl
public String toString() {
StringBundler sb = new StringBundler(13);
- sb.append("{shop_id=");
- sb.append(getShop_id());
+ sb.append("{shopId=");
+ sb.append(getShopId());
sb.append(", requestAction=");
sb.append(getRequestAction());
sb.append(", headers=");
@@ -416,8 +416,8 @@ public class ScheduledActionsModelImpl extends BaseModelImpl
sb.append("");
sb.append(
- "shop_idshopId");
sb.append(
"requestAction
private static Class>[] _escapedModelInterfaces = new Class[] {
ScheduledActions.class
};
- private long _shop_id;
+ private long _shopId;
private int _requestAction;
private String _headers;
private String _errorLog;
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloModelImpl.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloModelImpl.java
index 78bbd815..b6fd93ed 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloModelImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/model/impl/SportelloModelImpl.java
@@ -89,7 +89,10 @@ public class SportelloModelImpl extends BaseModelImpl
public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
"value.object.finder.cache.enabled.portos.nextmind.model.Sportello"),
true);
- public static final boolean COLUMN_BITMASK_ENABLED = false;
+ public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
+ "value.object.column.bitmask.enabled.portos.nextmind.model.Sportello"),
+ true);
+ public static long ID_COLUMN_BITMASK = 1L;
public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
"lock.expiration.time.portos.nextmind.model.Sportello"));
@@ -257,9 +260,21 @@ public class SportelloModelImpl extends BaseModelImpl
@Override
public void setId(long id) {
+ _columnBitmask |= ID_COLUMN_BITMASK;
+
+ if (!_setOriginalId) {
+ _setOriginalId = true;
+
+ _originalId = _id;
+ }
+
_id = id;
}
+ public long getOriginalId() {
+ return _originalId;
+ }
+
@Override
public String getApplication() {
if (_application == null) {
@@ -470,6 +485,10 @@ public class SportelloModelImpl extends BaseModelImpl
_sentToPortosDate = sentToPortosDate;
}
+ public long getColumnBitmask() {
+ return _columnBitmask;
+ }
+
@Override
public ExpandoBridge getExpandoBridge() {
return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
@@ -563,6 +582,13 @@ public class SportelloModelImpl extends BaseModelImpl
@Override
public void resetOriginalValues() {
+ SportelloModelImpl sportelloModelImpl = this;
+
+ sportelloModelImpl._originalId = sportelloModelImpl._id;
+
+ sportelloModelImpl._setOriginalId = false;
+
+ sportelloModelImpl._columnBitmask = 0;
}
@Override
@@ -816,6 +842,8 @@ public class SportelloModelImpl extends BaseModelImpl
Sportello.class
};
private long _id;
+ private long _originalId;
+ private boolean _setOriginalId;
private String _application;
private String _clientId;
private String _context;
@@ -831,5 +859,6 @@ public class SportelloModelImpl extends BaseModelImpl
private Date _creationDate;
private Date _lastUpdateDate;
private Date _sentToPortosDate;
+ private long _columnBitmask;
private Sportello _escapedModel;
}
\ No newline at end of file
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/base/ScheduledActionsLocalServiceBaseImpl.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/base/ScheduledActionsLocalServiceBaseImpl.java
index 10908553..827b911f 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/base/ScheduledActionsLocalServiceBaseImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/base/ScheduledActionsLocalServiceBaseImpl.java
@@ -84,27 +84,27 @@ public abstract class ScheduledActionsLocalServiceBaseImpl
/**
* Creates a new scheduled actions with the primary key. Does not add the scheduled actions to the database.
*
- * @param shop_id the primary key for the new scheduled actions
+ * @param shopId the primary key for the new scheduled actions
* @return the new scheduled actions
*/
@Override
- public ScheduledActions createScheduledActions(long shop_id) {
- return scheduledActionsPersistence.create(shop_id);
+ public ScheduledActions createScheduledActions(long shopId) {
+ return scheduledActionsPersistence.create(shopId);
}
/**
* Deletes the scheduled actions with the primary key from the database. Also notifies the appropriate model listeners.
*
- * @param shop_id the primary key of the scheduled actions
+ * @param shopId the primary key of the scheduled actions
* @return the scheduled actions that was removed
* @throws PortalException if a scheduled actions with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
@Indexable(type = IndexableType.DELETE)
@Override
- public ScheduledActions deleteScheduledActions(long shop_id)
+ public ScheduledActions deleteScheduledActions(long shopId)
throws PortalException, SystemException {
- return scheduledActionsPersistence.remove(shop_id);
+ return scheduledActionsPersistence.remove(shopId);
}
/**
@@ -215,23 +215,23 @@ public abstract class ScheduledActionsLocalServiceBaseImpl
}
@Override
- public ScheduledActions fetchScheduledActions(long shop_id)
+ public ScheduledActions fetchScheduledActions(long shopId)
throws SystemException {
- return scheduledActionsPersistence.fetchByPrimaryKey(shop_id);
+ return scheduledActionsPersistence.fetchByPrimaryKey(shopId);
}
/**
* Returns the scheduled actions with the primary key.
*
- * @param shop_id the primary key of the scheduled actions
+ * @param shopId the primary key of the scheduled actions
* @return the scheduled actions
* @throws PortalException if a scheduled actions with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
@Override
- public ScheduledActions getScheduledActions(long shop_id)
+ public ScheduledActions getScheduledActions(long shopId)
throws PortalException, SystemException {
- return scheduledActionsPersistence.findByPrimaryKey(shop_id);
+ return scheduledActionsPersistence.findByPrimaryKey(shopId);
}
@Override
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/base/ScheduledActionsLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/base/ScheduledActionsLocalServiceClpInvoker.java
index 56bb396f..24317398 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/base/ScheduledActionsLocalServiceClpInvoker.java
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/base/ScheduledActionsLocalServiceClpInvoker.java
@@ -128,7 +128,7 @@ public class ScheduledActionsLocalServiceClpInvoker {
_methodName49 = "findAzioniDaSvolgere";
- _methodParameterTypes49 = new String[] { "int", "int" };
+ _methodParameterTypes49 = new String[] { "java.lang.String", "int", "int" };
}
public Object invokeMethod(String name, String[] parameterTypes,
@@ -252,8 +252,9 @@ public class ScheduledActionsLocalServiceClpInvoker {
if (_methodName49.equals(name) &&
Arrays.deepEquals(_methodParameterTypes49, parameterTypes)) {
- return ScheduledActionsLocalServiceUtil.findAzioniDaSvolgere(((Integer)arguments[0]).intValue(),
- ((Integer)arguments[1]).intValue());
+ return ScheduledActionsLocalServiceUtil.findAzioniDaSvolgere((java.lang.String)arguments[0],
+ ((Integer)arguments[1]).intValue(),
+ ((Integer)arguments[2]).intValue());
}
throw new UnsupportedOperationException();
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/base/SportelloLocalServiceClpInvoker.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/base/SportelloLocalServiceClpInvoker.java
index abaff7ec..eb6bf247 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/base/SportelloLocalServiceClpInvoker.java
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/base/SportelloLocalServiceClpInvoker.java
@@ -107,6 +107,10 @@ public class SportelloLocalServiceClpInvoker {
_methodName41 = "setBeanIdentifier";
_methodParameterTypes41 = new String[] { "java.lang.String" };
+
+ _methodName46 = "findById";
+
+ _methodParameterTypes46 = new String[] { "long" };
}
public Object invokeMethod(String name, String[] parameterTypes,
@@ -210,6 +214,11 @@ public class SportelloLocalServiceClpInvoker {
return null;
}
+ if (_methodName46.equals(name) &&
+ Arrays.deepEquals(_methodParameterTypes46, parameterTypes)) {
+ return SportelloLocalServiceUtil.findById(((Long)arguments[0]).longValue());
+ }
+
throw new UnsupportedOperationException();
}
@@ -249,4 +258,6 @@ public class SportelloLocalServiceClpInvoker {
private String[] _methodParameterTypes40;
private String _methodName41;
private String[] _methodParameterTypes41;
+ private String _methodName46;
+ private String[] _methodParameterTypes46;
}
\ No newline at end of file
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/impl/ScheduledActionsLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/impl/ScheduledActionsLocalServiceImpl.java
index aa453107..aa22eab4 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/impl/ScheduledActionsLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/impl/ScheduledActionsLocalServiceImpl.java
@@ -59,9 +59,10 @@ public class ScheduledActionsLocalServiceImpl
}
@SuppressWarnings("unchecked")
- public List findAzioniDaSvolgere(int start, int end) throws SystemException{
+ public List findAzioniDaSvolgere(String context,int start, int end) throws SystemException{
DynamicQuery dq = scheduledActionsLocalService.dynamicQuery();
dq.add(RestrictionsFactoryUtil.eq("intPraticaId", 0));
+ dq.add(RestrictionsFactoryUtil.eq("context", context));
return (List)scheduledActionsLocalService.dynamicQuery(dq,start,end);
}
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/impl/SportelloLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/impl/SportelloLocalServiceImpl.java
index 58fd80c0..cca92a92 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/impl/SportelloLocalServiceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/impl/SportelloLocalServiceImpl.java
@@ -14,6 +14,14 @@
package portos.nextmind.service.impl;
+import com.liferay.portal.kernel.dao.orm.DynamicQuery;
+import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil;
+import com.liferay.portal.kernel.exception.SystemException;
+
+import java.util.List;
+
+import portos.nextmind.model.ScheduledActions;
+import portos.nextmind.model.Sportello;
import portos.nextmind.service.base.SportelloLocalServiceBaseImpl;
/**
@@ -36,4 +44,7 @@ public class SportelloLocalServiceImpl extends SportelloLocalServiceBaseImpl {
*
* Never reference this interface directly. Always use {@link portos.nextmind.service.SportelloLocalServiceUtil} to access the sportello local service.
*/
+ public List findById(long id) throws SystemException{
+ return sportelloPersistence.findById(id);
+ }
}
\ No newline at end of file
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/persistence/ScheduledActionsPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/persistence/ScheduledActionsPersistenceImpl.java
index 6ae3173f..8c0386fc 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/persistence/ScheduledActionsPersistenceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/persistence/ScheduledActionsPersistenceImpl.java
@@ -375,7 +375,7 @@ public class ScheduledActionsPersistenceImpl extends BasePersistenceImplnull)
* @return the previous, current, and next scheduled actions
@@ -383,10 +383,10 @@ public class ScheduledActionsPersistenceImpl extends BasePersistenceImplnull if it could not be found.
*
- * @param shop_id the primary key of the scheduled actions
+ * @param shopId the primary key of the scheduled actions
* @return the scheduled actions, or null
if a scheduled actions with the primary key could not be found
* @throws SystemException if a system exception occurred
*/
@Override
- public ScheduledActions fetchByPrimaryKey(long shop_id)
+ public ScheduledActions fetchByPrimaryKey(long shopId)
throws SystemException {
- return fetchByPrimaryKey((Serializable)shop_id);
+ return fetchByPrimaryKey((Serializable)shopId);
}
/**
@@ -1185,7 +1185,8 @@ public class ScheduledActionsPersistenceImpl extends BasePersistenceImpl _badColumnNames = SetUtil.fromArray(new String[] {
- "requestAction", "errorLog", "errorFlag", "intPraticaId"
+ "shopId", "requestAction", "errorLog", "errorFlag",
+ "intPraticaId"
});
private static ScheduledActions _nullScheduledActions = new ScheduledActionsImpl() {
@Override
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/persistence/SportelloPersistenceImpl.java b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/persistence/SportelloPersistenceImpl.java
index e129c0fa..ccaabd3d 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/persistence/SportelloPersistenceImpl.java
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/portos/nextmind/service/persistence/SportelloPersistenceImpl.java
@@ -19,6 +19,7 @@ import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
import com.liferay.portal.kernel.dao.orm.FinderPath;
import com.liferay.portal.kernel.dao.orm.Query;
+import com.liferay.portal.kernel.dao.orm.QueryPos;
import com.liferay.portal.kernel.dao.orm.QueryUtil;
import com.liferay.portal.kernel.dao.orm.Session;
import com.liferay.portal.kernel.exception.SystemException;
@@ -31,6 +32,7 @@ import com.liferay.portal.kernel.util.PropsKeys;
import com.liferay.portal.kernel.util.PropsUtil;
import com.liferay.portal.kernel.util.SetUtil;
import com.liferay.portal.kernel.util.StringBundler;
+import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.util.UnmodifiableList;
import com.liferay.portal.model.CacheModel;
@@ -83,6 +85,342 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl
public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED,
SportelloModelImpl.FINDER_CACHE_ENABLED, Long.class,
FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]);
+ public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_ID = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED,
+ 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",
+ new String[] { Long.class.getName() },
+ SportelloModelImpl.ID_COLUMN_BITMASK);
+ public static final FinderPath FINDER_PATH_COUNT_BY_ID = new FinderPath(SportelloModelImpl.ENTITY_CACHE_ENABLED,
+ SportelloModelImpl.FINDER_CACHE_ENABLED, Long.class,
+ FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countById",
+ new String[] { Long.class.getName() });
+
+ /**
+ * Returns all the sportellos where id = ?.
+ *
+ * @param id the ID
+ * @return the matching sportellos
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public List findById(long id) throws SystemException {
+ return findById(id, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
+ }
+
+ /**
+ * Returns a range of all the sportellos where id = ?.
+ *
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link portos.nextmind.model.impl.SportelloModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ *
+ * @param id the ID
+ * @param start the lower bound of the range of sportellos
+ * @param end the upper bound of the range of sportellos (not inclusive)
+ * @return the range of matching sportellos
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public List findById(long id, int start, int end)
+ throws SystemException {
+ return findById(id, start, end, null);
+ }
+
+ /**
+ * Returns an ordered range of all the sportellos where id = ?.
+ *
+ *
+ * Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link portos.nextmind.model.impl.SportelloModelImpl}. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
+ *
+ *
+ * @param id the ID
+ * @param start the lower bound of the range of sportellos
+ * @param end the upper bound of the range of sportellos (not inclusive)
+ * @param orderByComparator the comparator to order the results by (optionally null
)
+ * @return the ordered range of matching sportellos
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public List findById(long id, int start, int end,
+ OrderByComparator orderByComparator) throws SystemException {
+ boolean pagination = true;
+ FinderPath finderPath = null;
+ Object[] finderArgs = null;
+
+ if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
+ (orderByComparator == null)) {
+ pagination = false;
+ finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ID;
+ finderArgs = new Object[] { id };
+ }
+ else {
+ finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_ID;
+ finderArgs = new Object[] { id, start, end, orderByComparator };
+ }
+
+ List list = (List)FinderCacheUtil.getResult(finderPath,
+ 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 (orderByComparator != null) {
+ query = new StringBundler(3 +
+ (orderByComparator.getOrderByFields().length * 3));
+ }
+ else {
+ 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;
+
+ try {
+ session = openSession();
+
+ Query q = session.createQuery(sql);
+
+ QueryPos qPos = QueryPos.getInstance(q);
+
+ qPos.add(id);
+
+ if (!pagination) {
+ list = (List)QueryUtil.list(q, getDialect(),
+ start, end, false);
+
+ Collections.sort(list);
+
+ list = new UnmodifiableList(list);
+ }
+ else {
+ list = (List)QueryUtil.list(q, getDialect(),
+ start, end);
+ }
+
+ cacheResult(list);
+
+ FinderCacheUtil.putResult(finderPath, finderArgs, list);
+ }
+ catch (Exception e) {
+ FinderCacheUtil.removeResult(finderPath, finderArgs);
+
+ throw processException(e);
+ }
+ finally {
+ closeSession(session);
+ }
+ }
+
+ return list;
+ }
+
+ /**
+ * Returns the first sportello in the ordered set where id = ?.
+ *
+ * @param id the ID
+ * @param orderByComparator the comparator to order the set by (optionally null
)
+ * @return the first matching sportello
+ * @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public Sportello findById_First(long id, OrderByComparator orderByComparator)
+ throws NoSuchSportelloException, SystemException {
+ Sportello sportello = fetchById_First(id, orderByComparator);
+
+ if (sportello != null) {
+ return sportello;
+ }
+
+ StringBundler msg = new StringBundler(4);
+
+ msg.append(_NO_SUCH_ENTITY_WITH_KEY);
+
+ msg.append("id=");
+ msg.append(id);
+
+ msg.append(StringPool.CLOSE_CURLY_BRACE);
+
+ throw new NoSuchSportelloException(msg.toString());
+ }
+
+ /**
+ * Returns the first sportello in the ordered set where id = ?.
+ *
+ * @param id the ID
+ * @param orderByComparator the comparator to order the set by (optionally null
)
+ * @return the first matching sportello, or null
if a matching sportello could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public Sportello fetchById_First(long id,
+ OrderByComparator orderByComparator) throws SystemException {
+ List list = findById(id, 0, 1, orderByComparator);
+
+ if (!list.isEmpty()) {
+ return list.get(0);
+ }
+
+ return null;
+ }
+
+ /**
+ * Returns the last sportello in the ordered set where id = ?.
+ *
+ * @param id the ID
+ * @param orderByComparator the comparator to order the set by (optionally null
)
+ * @return the last matching sportello
+ * @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public Sportello findById_Last(long id, OrderByComparator orderByComparator)
+ throws NoSuchSportelloException, SystemException {
+ Sportello sportello = fetchById_Last(id, orderByComparator);
+
+ if (sportello != null) {
+ return sportello;
+ }
+
+ StringBundler msg = new StringBundler(4);
+
+ msg.append(_NO_SUCH_ENTITY_WITH_KEY);
+
+ msg.append("id=");
+ msg.append(id);
+
+ msg.append(StringPool.CLOSE_CURLY_BRACE);
+
+ throw new NoSuchSportelloException(msg.toString());
+ }
+
+ /**
+ * Returns the last sportello in the ordered set where id = ?.
+ *
+ * @param id the ID
+ * @param orderByComparator the comparator to order the set by (optionally null
)
+ * @return the last matching sportello, or null
if a matching sportello could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public Sportello fetchById_Last(long id, OrderByComparator orderByComparator)
+ throws SystemException {
+ int count = countById(id);
+
+ if (count == 0) {
+ return null;
+ }
+
+ List list = findById(id, count - 1, count, orderByComparator);
+
+ if (!list.isEmpty()) {
+ return list.get(0);
+ }
+
+ return null;
+ }
+
+ /**
+ * Removes all the sportellos where id = ? from the database.
+ *
+ * @param id the ID
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public void removeById(long id) throws SystemException {
+ for (Sportello sportello : findById(id, QueryUtil.ALL_POS,
+ QueryUtil.ALL_POS, null)) {
+ remove(sportello);
+ }
+ }
+
+ /**
+ * Returns the number of sportellos where id = ?.
+ *
+ * @param id the ID
+ * @return the number of matching sportellos
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public int countById(long id) throws SystemException {
+ FinderPath finderPath = FINDER_PATH_COUNT_BY_ID;
+
+ Object[] finderArgs = new Object[] { id };
+
+ Long count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,
+ this);
+
+ if (count == null) {
+ StringBundler query = new StringBundler(2);
+
+ query.append(_SQL_COUNT_SPORTELLO_WHERE);
+
+ query.append(_FINDER_COLUMN_ID_ID_2);
+
+ String sql = query.toString();
+
+ Session session = null;
+
+ try {
+ session = openSession();
+
+ Query q = session.createQuery(sql);
+
+ QueryPos qPos = QueryPos.getInstance(q);
+
+ qPos.add(id);
+
+ count = (Long)q.uniqueResult();
+
+ FinderCacheUtil.putResult(finderPath, finderArgs, count);
+ }
+ catch (Exception e) {
+ FinderCacheUtil.removeResult(finderPath, finderArgs);
+
+ throw processException(e);
+ }
+ finally {
+ closeSession(session);
+ }
+ }
+
+ return count.intValue();
+ }
+
+ private static final String _FINDER_COLUMN_ID_ID_2 = "sportello.id = ?";
public SportelloPersistenceImpl() {
setModelClass(Sportello.class);
@@ -278,6 +616,8 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl
boolean isNew = sportello.isNew();
+ SportelloModelImpl sportelloModelImpl = (SportelloModelImpl)sportello;
+
Session session = null;
try {
@@ -301,10 +641,27 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl
FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
- if (isNew) {
+ if (isNew || !SportelloModelImpl.COLUMN_BITMASK_ENABLED) {
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);
@@ -651,9 +1008,12 @@ public class SportelloPersistenceImpl extends BasePersistenceImpl
}
private static final String _SQL_SELECT_SPORTELLO = "SELECT sportello FROM Sportello sportello";
+ private static final String _SQL_SELECT_SPORTELLO_WHERE = "SELECT sportello FROM Sportello sportello WHERE ";
private static final String _SQL_COUNT_SPORTELLO = "SELECT COUNT(sportello) FROM Sportello sportello";
+ private static final String _SQL_COUNT_SPORTELLO_WHERE = "SELECT COUNT(sportello) FROM Sportello sportello WHERE ";
private static final String _ORDER_BY_ENTITY_ALIAS = "sportello.";
private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No Sportello exists with the primary key ";
+ private static final String _NO_SUCH_ENTITY_WITH_KEY = "No Sportello exists with the key {";
private static final boolean _HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE = GetterUtil.getBoolean(PropsUtil.get(
PropsKeys.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE));
private static Log _log = LogFactoryUtil.getLog(SportelloPersistenceImpl.class);
diff --git a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/service.properties
index 64d77ccc..45a8b24e 100644
--- a/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/service.properties
+++ b/liferay-plugins-sdk-6.2/portlets/schedulatore-portos-pratiche-portlet/docroot/WEB-INF/src/service.properties
@@ -13,8 +13,8 @@
##
build.namespace=portos_ss
- build.number=23
- build.date=1683108076366
+ build.number=30
+ build.date=1683123283855
build.auto.upgrade=true
##