|
|
|
@ -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 = ?. |
|
|
|
|
* Returns the sportello where id = ? or throws a {@link portos.nextmind.NoSuchSportelloException} if it could not be found. |
|
|
|
|
* |
|
|
|
|
* @param id the ID |
|
|
|
|
* @return the matching sportellos |
|
|
|
|
* @return the matching sportello |
|
|
|
|
* @throws portos.nextmind.NoSuchSportelloException if a matching sportello could not be found |
|
|
|
|
* @throws SystemException if a system exception occurred |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public List<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 = ?. |
|
|
|
|
* |
|
|
|
|
* <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 = ? 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 = ?. |
|
|
|
|
* |
|
|
|
|
* <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 = ? 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 = ?. |
|
|
|
|
* |
|
|
|
|
* @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 = ?. |
|
|
|
|
* |
|
|
|
|
* @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 = ?. |
|
|
|
|
* |
|
|
|
|
* @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 = ?. |
|
|
|
|
* Removes the sportello where id = ? 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 = ? 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()); |
|
|
|
|