List of usage examples for com.liferay.portal.kernel.util StringPool OPEN_PARENTHESIS
String OPEN_PARENTHESIS
To view the source code for com.liferay.portal.kernel.util StringPool OPEN_PARENTHESIS.
Click Source Link
From source file:com.liferay.knowledgebase.service.persistence.KBArticlePersistenceImpl.java
License:Open Source License
/** * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. * * @param groupId the group ID//www .ja v a2 s .c o m * @param parentResourcePrimKey the parent resource prim key * @param sectionses the sectionses * @param main the main * @return the number of matching k b articles * @throws SystemException if a system exception occurred */ public int countByG_P_S_M(long groupId, long parentResourcePrimKey, String[] sectionses, boolean main) throws SystemException { Object[] finderArgs = new Object[] { groupId, parentResourcePrimKey, StringUtil.merge(sectionses), main }; Long count = (Long) FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_M, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(); query.append(_SQL_COUNT_KBARTICLE_WHERE); boolean conjunctionable = false; if (conjunctionable) { query.append(WHERE_AND); } query.append(_FINDER_COLUMN_G_P_S_M_GROUPID_5); conjunctionable = true; if (conjunctionable) { query.append(WHERE_AND); } query.append(_FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_5); conjunctionable = true; if ((sectionses == null) || (sectionses.length > 0)) { if (conjunctionable) { query.append(WHERE_AND); } query.append(StringPool.OPEN_PARENTHESIS); for (int i = 0; i < sectionses.length; i++) { String sections = sectionses[i]; if (sections == null) { query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_4); } else { if (sections.equals(StringPool.BLANK)) { query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_6); } else { query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_5); } } if ((i + 1) < sectionses.length) { query.append(WHERE_OR); } } query.append(StringPool.CLOSE_PARENTHESIS); conjunctionable = true; } if (conjunctionable) { query.append(WHERE_AND); } query.append(_FINDER_COLUMN_G_P_S_M_MAIN_5); conjunctionable = true; String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(groupId); qPos.add(parentResourcePrimKey); if (sectionses != null) { qPos.add(sectionses); } qPos.add(main); count = (Long) q.uniqueResult(); } catch (Exception e) { throw processException(e); } finally { if (count == null) { count = Long.valueOf(0); } FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_M, finderArgs, count); closeSession(session); } } return count.intValue(); }
From source file:com.liferay.knowledgebase.service.persistence.KBArticlePersistenceImpl.java
License:Open Source License
/** * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and main = ?. * * @param groupId the group ID/*from w ww .j a v a 2 s .c o m*/ * @param parentResourcePrimKey the parent resource prim key * @param sectionses the sectionses * @param main the main * @return the number of matching k b articles that the user has permission to view * @throws SystemException if a system exception occurred */ public int filterCountByG_P_S_M(long groupId, long parentResourcePrimKey, String[] sectionses, boolean main) throws SystemException { if (!InlineSQLHelperUtil.isEnabled(groupId)) { return countByG_P_S_M(groupId, parentResourcePrimKey, sectionses, main); } StringBundler query = new StringBundler(); query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); boolean conjunctionable = false; if (conjunctionable) { query.append(WHERE_AND); } query.append(_FINDER_COLUMN_G_P_S_M_GROUPID_5); conjunctionable = true; if (conjunctionable) { query.append(WHERE_AND); } query.append(_FINDER_COLUMN_G_P_S_M_PARENTRESOURCEPRIMKEY_5); conjunctionable = true; if ((sectionses == null) || (sectionses.length > 0)) { if (conjunctionable) { query.append(WHERE_AND); } query.append(StringPool.OPEN_PARENTHESIS); for (int i = 0; i < sectionses.length; i++) { String sections = sectionses[i]; if (sections == null) { query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_4); } else { if (sections.equals(StringPool.BLANK)) { query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_6); } else { query.append(_FINDER_COLUMN_G_P_S_M_SECTIONS_5); } } if ((i + 1) < sectionses.length) { query.append(WHERE_OR); } } query.append(StringPool.CLOSE_PARENTHESIS); conjunctionable = true; } if (conjunctionable) { query.append(WHERE_AND); } query.append(_FINDER_COLUMN_G_P_S_M_MAIN_5); conjunctionable = true; String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), KBArticle.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); Session session = null; try { session = openSession(); SQLQuery q = session.createSQLQuery(sql); q.addScalar(COUNT_COLUMN_NAME, com.liferay.portal.kernel.dao.orm.Type.LONG); QueryPos qPos = QueryPos.getInstance(q); qPos.add(groupId); qPos.add(parentResourcePrimKey); if (sectionses != null) { qPos.add(sectionses); } qPos.add(main); Long count = (Long) q.uniqueResult(); return count.intValue(); } catch (Exception e) { throw processException(e); } finally { closeSession(session); } }
From source file:com.liferay.knowledgebase.service.persistence.KBArticlePersistenceImpl.java
License:Open Source License
/** * Returns the number of k b articles where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. * * @param groupId the group ID/*from www.j a v a2 s. c o m*/ * @param parentResourcePrimKey the parent resource prim key * @param sectionses the sectionses * @param status the status * @return the number of matching k b articles * @throws SystemException if a system exception occurred */ public int countByG_P_S_S(long groupId, long parentResourcePrimKey, String[] sectionses, int status) throws SystemException { Object[] finderArgs = new Object[] { groupId, parentResourcePrimKey, StringUtil.merge(sectionses), status }; Long count = (Long) FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_S, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(); query.append(_SQL_COUNT_KBARTICLE_WHERE); boolean conjunctionable = false; if (conjunctionable) { query.append(WHERE_AND); } query.append(_FINDER_COLUMN_G_P_S_S_GROUPID_5); conjunctionable = true; if (conjunctionable) { query.append(WHERE_AND); } query.append(_FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_5); conjunctionable = true; if ((sectionses == null) || (sectionses.length > 0)) { if (conjunctionable) { query.append(WHERE_AND); } query.append(StringPool.OPEN_PARENTHESIS); for (int i = 0; i < sectionses.length; i++) { String sections = sectionses[i]; if (sections == null) { query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_4); } else { if (sections.equals(StringPool.BLANK)) { query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_6); } else { query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_5); } } if ((i + 1) < sectionses.length) { query.append(WHERE_OR); } } query.append(StringPool.CLOSE_PARENTHESIS); conjunctionable = true; } if (conjunctionable) { query.append(WHERE_AND); } query.append(_FINDER_COLUMN_G_P_S_S_STATUS_5); conjunctionable = true; String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(groupId); qPos.add(parentResourcePrimKey); if (sectionses != null) { qPos.add(sectionses); } qPos.add(status); count = (Long) q.uniqueResult(); } catch (Exception e) { throw processException(e); } finally { if (count == null) { count = Long.valueOf(0); } FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_G_P_S_S, finderArgs, count); closeSession(session); } } return count.intValue(); }
From source file:com.liferay.knowledgebase.service.persistence.KBArticlePersistenceImpl.java
License:Open Source License
/** * Returns the number of k b articles that the user has permission to view where groupId = ? and parentResourcePrimKey = ? and sections LIKE any ? and status = ?. * * @param groupId the group ID/*from ww w. j av a 2 s . c om*/ * @param parentResourcePrimKey the parent resource prim key * @param sectionses the sectionses * @param status the status * @return the number of matching k b articles that the user has permission to view * @throws SystemException if a system exception occurred */ public int filterCountByG_P_S_S(long groupId, long parentResourcePrimKey, String[] sectionses, int status) throws SystemException { if (!InlineSQLHelperUtil.isEnabled(groupId)) { return countByG_P_S_S(groupId, parentResourcePrimKey, sectionses, status); } StringBundler query = new StringBundler(); query.append(_FILTER_SQL_COUNT_KBARTICLE_WHERE); boolean conjunctionable = false; if (conjunctionable) { query.append(WHERE_AND); } query.append(_FINDER_COLUMN_G_P_S_S_GROUPID_5); conjunctionable = true; if (conjunctionable) { query.append(WHERE_AND); } query.append(_FINDER_COLUMN_G_P_S_S_PARENTRESOURCEPRIMKEY_5); conjunctionable = true; if ((sectionses == null) || (sectionses.length > 0)) { if (conjunctionable) { query.append(WHERE_AND); } query.append(StringPool.OPEN_PARENTHESIS); for (int i = 0; i < sectionses.length; i++) { String sections = sectionses[i]; if (sections == null) { query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_4); } else { if (sections.equals(StringPool.BLANK)) { query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_6); } else { query.append(_FINDER_COLUMN_G_P_S_S_SECTIONS_5); } } if ((i + 1) < sectionses.length) { query.append(WHERE_OR); } } query.append(StringPool.CLOSE_PARENTHESIS); conjunctionable = true; } if (conjunctionable) { query.append(WHERE_AND); } query.append(_FINDER_COLUMN_G_P_S_S_STATUS_5); conjunctionable = true; String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), KBArticle.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN, groupId); Session session = null; try { session = openSession(); SQLQuery q = session.createSQLQuery(sql); q.addScalar(COUNT_COLUMN_NAME, com.liferay.portal.kernel.dao.orm.Type.LONG); QueryPos qPos = QueryPos.getInstance(q); qPos.add(groupId); qPos.add(parentResourcePrimKey); if (sectionses != null) { qPos.add(sectionses); } qPos.add(status); Long count = (Long) q.uniqueResult(); return count.intValue(); } catch (Exception e) { throw processException(e); } finally { closeSession(session); } }
From source file:com.liferay.marketplace.app.manager.web.internal.util.MarketplaceAppManagerSearchUtil.java
License:Open Source License
protected static String getKeywordsRegex(String keywords) { keywords = StringUtil.replace(keywords, CharPool.SPACE, CharPool.PIPE); return StringPool.OPEN_PARENTHESIS + keywords + StringPool.CLOSE_PARENTHESIS; }
From source file:com.liferay.meeting.webex.util.TimeZoneUtil.java
License:Open Source License
public static TimeZoneType.Enum convert(String timeZoneString) { int x = timeZoneString.indexOf(StringPool.OPEN_PARENTHESIS); int y = timeZoneString.indexOf(StringPool.CLOSE_PARENTHESIS); if ((x == -1) || (y == -1)) { return null; }// ww w .j a v a2s.c om return _timeZoneTypeEnumsByShortName.get(timeZoneString.substring(x + 1, y)); }
From source file:com.liferay.meeting.webex.util.TimeZoneUtil.java
License:Open Source License
public void setTimeZones(Map<TimeZone, TimeZoneType.Enum> timeZoneTypeEnums) { for (Map.Entry<TimeZone, TimeZoneType.Enum> entry : timeZoneTypeEnums.entrySet()) { TimeZone timeZone = entry.getKey(); TimeZoneType.Enum timeZoneTypeEnum = entry.getValue(); _timeZones.put(timeZoneTypeEnum, timeZone); _timeZoneTypeEnumsByTimeZone.put(timeZone, timeZoneTypeEnum); String timeZoneTypeEnumString = timeZoneTypeEnum.toString(); int x = timeZoneTypeEnumString.indexOf(StringPool.OPEN_PARENTHESIS); int y = timeZoneTypeEnumString.indexOf(StringPool.CLOSE_PARENTHESIS); if ((x != -1) && (y != -1)) { String shortName = timeZoneTypeEnumString.substring(x + 1, y); _timeZoneTypeEnumsByShortName.put(shortName, timeZoneTypeEnum); }//from w w w . jav a2 s . c o m } }
From source file:com.liferay.microblogs.service.persistence.impl.MicroblogsEntryPersistenceImpl.java
License:Open Source License
/** * Returns an ordered range of all the microblogs entries that the user has permission to view where creatorClassNameId = ? and creatorClassPK = any ?. * * <p>//from w w w. j ava2 s . c o m * 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 com.liferay.microblogs.model.impl.MicroblogsEntryModelImpl}. 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 creatorClassNameId the creator class name ID * @param creatorClassPKs the creator class p ks * @param start the lower bound of the range of microblogs entries * @param end the upper bound of the range of microblogs entries (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching microblogs entries that the user has permission to view */ @Override public List<MicroblogsEntry> filterFindByCCNI_CCPK(long creatorClassNameId, long[] creatorClassPKs, int start, int end, OrderByComparator<MicroblogsEntry> orderByComparator) { if (!InlineSQLHelperUtil.isEnabled()) { return findByCCNI_CCPK(creatorClassNameId, creatorClassPKs, start, end, orderByComparator); } if (creatorClassPKs == null) { creatorClassPKs = new long[0]; } else { creatorClassPKs = ArrayUtil.unique(creatorClassPKs); } StringBundler query = new StringBundler(); if (getDB().isSupportsInlineDistinct()) { query.append(_FILTER_SQL_SELECT_MICROBLOGSENTRY_WHERE); } else { query.append(_FILTER_SQL_SELECT_MICROBLOGSENTRY_NO_INLINE_DISTINCT_WHERE_1); } query.append(_FINDER_COLUMN_CCNI_CCPK_CREATORCLASSNAMEID_2); if (creatorClassPKs.length > 0) { query.append(StringPool.OPEN_PARENTHESIS); query.append(_FINDER_COLUMN_CCNI_CCPK_CREATORCLASSPK_7); query.append(StringUtil.merge(creatorClassPKs)); query.append(StringPool.CLOSE_PARENTHESIS); query.append(StringPool.CLOSE_PARENTHESIS); } query.setStringAt(removeConjunction(query.stringAt(query.index() - 1)), query.index() - 1); if (!getDB().isSupportsInlineDistinct()) { query.append(_FILTER_SQL_SELECT_MICROBLOGSENTRY_NO_INLINE_DISTINCT_WHERE_2); } if (orderByComparator != null) { if (getDB().isSupportsInlineDistinct()) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator, true); } else { appendOrderByComparator(query, _ORDER_BY_ENTITY_TABLE, orderByComparator, true); } } else { if (getDB().isSupportsInlineDistinct()) { query.append(MicroblogsEntryModelImpl.ORDER_BY_JPQL); } else { query.append(MicroblogsEntryModelImpl.ORDER_BY_SQL); } } String sql = InlineSQLHelperUtil.replacePermissionCheck(query.toString(), MicroblogsEntry.class.getName(), _FILTER_ENTITY_TABLE_FILTER_PK_COLUMN); Session session = null; try { session = openSession(); SQLQuery q = session.createSynchronizedSQLQuery(sql); if (getDB().isSupportsInlineDistinct()) { q.addEntity(_FILTER_ENTITY_ALIAS, MicroblogsEntryImpl.class); } else { q.addEntity(_FILTER_ENTITY_TABLE, MicroblogsEntryImpl.class); } QueryPos qPos = QueryPos.getInstance(q); qPos.add(creatorClassNameId); return (List<MicroblogsEntry>) QueryUtil.list(q, getDialect(), start, end); } catch (Exception e) { throw processException(e); } finally { closeSession(session); } }
From source file:com.liferay.microblogs.service.persistence.impl.MicroblogsEntryPersistenceImpl.java
License:Open Source License
/** * Returns an ordered range of all the microblogs entries where creatorClassNameId = ? and creatorClassPK = any ?. * * <p>//from w w w .j a va2 s . c om * 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 com.liferay.microblogs.model.impl.MicroblogsEntryModelImpl}. 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 creatorClassNameId the creator class name ID * @param creatorClassPKs the creator class p ks * @param start the lower bound of the range of microblogs entries * @param end the upper bound of the range of microblogs entries (not inclusive) * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) * @return the ordered range of matching microblogs entries */ @Override public List<MicroblogsEntry> findByCCNI_CCPK(long creatorClassNameId, long[] creatorClassPKs, int start, int end, OrderByComparator<MicroblogsEntry> orderByComparator) { if (creatorClassPKs == null) { creatorClassPKs = new long[0]; } else { creatorClassPKs = ArrayUtil.unique(creatorClassPKs); } if (creatorClassPKs.length == 1) { return findByCCNI_CCPK(creatorClassNameId, creatorClassPKs[0], start, end, orderByComparator); } boolean pagination = true; Object[] finderArgs = null; if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && (orderByComparator == null)) { pagination = false; finderArgs = new Object[] { creatorClassNameId, StringUtil.merge(creatorClassPKs) }; } else { finderArgs = new Object[] { creatorClassNameId, StringUtil.merge(creatorClassPKs), start, end, orderByComparator }; } List<MicroblogsEntry> list = (List<MicroblogsEntry>) FinderCacheUtil .getResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_CCNI_CCPK, finderArgs, this); if ((list != null) && !list.isEmpty()) { for (MicroblogsEntry microblogsEntry : list) { if ((creatorClassNameId != microblogsEntry.getCreatorClassNameId()) || !ArrayUtil.contains(creatorClassPKs, microblogsEntry.getCreatorClassPK())) { list = null; break; } } } if (list == null) { StringBundler query = new StringBundler(); query.append(_SQL_SELECT_MICROBLOGSENTRY_WHERE); query.append(_FINDER_COLUMN_CCNI_CCPK_CREATORCLASSNAMEID_2); if (creatorClassPKs.length > 0) { query.append(StringPool.OPEN_PARENTHESIS); query.append(_FINDER_COLUMN_CCNI_CCPK_CREATORCLASSPK_7); query.append(StringUtil.merge(creatorClassPKs)); query.append(StringPool.CLOSE_PARENTHESIS); query.append(StringPool.CLOSE_PARENTHESIS); } query.setStringAt(removeConjunction(query.stringAt(query.index() - 1)), query.index() - 1); if (orderByComparator != null) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator); } else if (pagination) { query.append(MicroblogsEntryModelImpl.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(creatorClassNameId); if (!pagination) { list = (List<MicroblogsEntry>) QueryUtil.list(q, getDialect(), start, end, false); Collections.sort(list); list = Collections.unmodifiableList(list); } else { list = (List<MicroblogsEntry>) QueryUtil.list(q, getDialect(), start, end); } cacheResult(list); FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_CCNI_CCPK, finderArgs, list); } catch (Exception e) { FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_FIND_BY_CCNI_CCPK, finderArgs); throw processException(e); } finally { closeSession(session); } } return list; }
From source file:com.liferay.microblogs.service.persistence.impl.MicroblogsEntryPersistenceImpl.java
License:Open Source License
/** * Returns the number of microblogs entries where creatorClassNameId = ? and creatorClassPK = any ?. * * @param creatorClassNameId the creator class name ID * @param creatorClassPKs the creator class p ks * @return the number of matching microblogs entries *//*w w w. j a v a 2 s . c o m*/ @Override public int countByCCNI_CCPK(long creatorClassNameId, long[] creatorClassPKs) { if (creatorClassPKs == null) { creatorClassPKs = new long[0]; } else { creatorClassPKs = ArrayUtil.unique(creatorClassPKs); } Object[] finderArgs = new Object[] { creatorClassNameId, StringUtil.merge(creatorClassPKs) }; Long count = (Long) FinderCacheUtil.getResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_CCNI_CCPK, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(); query.append(_SQL_COUNT_MICROBLOGSENTRY_WHERE); query.append(_FINDER_COLUMN_CCNI_CCPK_CREATORCLASSNAMEID_2); if (creatorClassPKs.length > 0) { query.append(StringPool.OPEN_PARENTHESIS); query.append(_FINDER_COLUMN_CCNI_CCPK_CREATORCLASSPK_7); query.append(StringUtil.merge(creatorClassPKs)); query.append(StringPool.CLOSE_PARENTHESIS); query.append(StringPool.CLOSE_PARENTHESIS); } query.setStringAt(removeConjunction(query.stringAt(query.index() - 1)), query.index() - 1); String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(creatorClassNameId); count = (Long) q.uniqueResult(); FinderCacheUtil.putResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_CCNI_CCPK, finderArgs, count); } catch (Exception e) { FinderCacheUtil.removeResult(FINDER_PATH_WITH_PAGINATION_COUNT_BY_CCNI_CCPK, finderArgs); throw processException(e); } finally { closeSession(session); } } return count.intValue(); }