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