本文整理汇总了Java中com.liferay.portal.kernel.dao.orm.QueryPos.add方法的典型用法代码示例。如果您正苦于以下问题:Java QueryPos.add方法的具体用法?Java QueryPos.add怎么用?Java QueryPos.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.liferay.portal.kernel.dao.orm.QueryPos
的用法示例。
在下文中一共展示了QueryPos.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: countByUuid
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of dict collections where uuid = ?.
*
* @param uuid the uuid
* @return the number of matching dict collections
*/
@Override
public int countByUuid(String uuid) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID;
Object[] finderArgs = new Object[] { uuid };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(2);
query.append(_SQL_COUNT_DICTCOLLECTION_WHERE);
boolean bindUuid = false;
if (uuid == null) {
query.append(_FINDER_COLUMN_UUID_UUID_1);
}
else if (uuid.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_UUID_UUID_3);
}
else {
bindUuid = true;
query.append(_FINDER_COLUMN_UUID_UUID_2);
}
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindUuid) {
qPos.add(uuid);
}
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
示例2: countByUuid_C
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of dict collections where uuid = ? and companyId = ?.
*
* @param uuid the uuid
* @param companyId the company ID
* @return the number of matching dict collections
*/
@Override
public int countByUuid_C(String uuid, long companyId) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C;
Object[] finderArgs = new Object[] { uuid, companyId };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(3);
query.append(_SQL_COUNT_DICTCOLLECTION_WHERE);
boolean bindUuid = false;
if (uuid == null) {
query.append(_FINDER_COLUMN_UUID_C_UUID_1);
}
else if (uuid.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_UUID_C_UUID_3);
}
else {
bindUuid = true;
query.append(_FINDER_COLUMN_UUID_C_UUID_2);
}
query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2);
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindUuid) {
qPos.add(uuid);
}
qPos.add(companyId);
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
示例3: countByUUID_G
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of dict groups where uuid = ? and groupId = ?.
*
* @param uuid the uuid
* @param groupId the group ID
* @return the number of matching dict groups
*/
@Override
public int countByUUID_G(String uuid, long groupId) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G;
Object[] finderArgs = new Object[] { uuid, groupId };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(3);
query.append(_SQL_COUNT_DICTGROUP_WHERE);
boolean bindUuid = false;
if (uuid == null) {
query.append(_FINDER_COLUMN_UUID_G_UUID_1);
}
else if (uuid.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_UUID_G_UUID_3);
}
else {
bindUuid = true;
query.append(_FINDER_COLUMN_UUID_G_UUID_2);
}
query.append(_FINDER_COLUMN_UUID_G_GROUPID_2);
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindUuid) {
qPos.add(uuid);
}
qPos.add(groupId);
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
示例4: countByUUID_G
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of dict item groups where uuid = ? and groupId = ?.
*
* @param uuid the uuid
* @param groupId the group ID
* @return the number of matching dict item groups
*/
@Override
public int countByUUID_G(String uuid, long groupId) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G;
Object[] finderArgs = new Object[] { uuid, groupId };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(3);
query.append(_SQL_COUNT_DICTITEMGROUP_WHERE);
boolean bindUuid = false;
if (uuid == null) {
query.append(_FINDER_COLUMN_UUID_G_UUID_1);
}
else if (uuid.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_UUID_G_UUID_3);
}
else {
bindUuid = true;
query.append(_FINDER_COLUMN_UUID_G_UUID_2);
}
query.append(_FINDER_COLUMN_UUID_G_GROUPID_2);
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindUuid) {
qPos.add(uuid);
}
qPos.add(groupId);
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
示例5: countByUuid
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of votings where uuid = ?.
*
* @param uuid the uuid
* @return the number of matching votings
*/
@Override
public int countByUuid(String uuid) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID;
Object[] finderArgs = new Object[] { uuid };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(2);
query.append(_SQL_COUNT_VOTING_WHERE);
boolean bindUuid = false;
if (uuid == null) {
query.append(_FINDER_COLUMN_UUID_UUID_1);
}
else if (uuid.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_UUID_UUID_3);
}
else {
bindUuid = true;
query.append(_FINDER_COLUMN_UUID_UUID_2);
}
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindUuid) {
qPos.add(uuid);
}
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
示例6: countByUUID_G
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of votings where uuid = ? and groupId = ?.
*
* @param uuid the uuid
* @param groupId the group ID
* @return the number of matching votings
*/
@Override
public int countByUUID_G(String uuid, long groupId) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G;
Object[] finderArgs = new Object[] { uuid, groupId };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(3);
query.append(_SQL_COUNT_VOTING_WHERE);
boolean bindUuid = false;
if (uuid == null) {
query.append(_FINDER_COLUMN_UUID_G_UUID_1);
}
else if (uuid.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_UUID_G_UUID_3);
}
else {
bindUuid = true;
query.append(_FINDER_COLUMN_UUID_G_UUID_2);
}
query.append(_FINDER_COLUMN_UUID_G_GROUPID_2);
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindUuid) {
qPos.add(uuid);
}
qPos.add(groupId);
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
示例7: countByUuid_C
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of votings where uuid = ? and companyId = ?.
*
* @param uuid the uuid
* @param companyId the company ID
* @return the number of matching votings
*/
@Override
public int countByUuid_C(String uuid, long companyId) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C;
Object[] finderArgs = new Object[] { uuid, companyId };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(3);
query.append(_SQL_COUNT_VOTING_WHERE);
boolean bindUuid = false;
if (uuid == null) {
query.append(_FINDER_COLUMN_UUID_C_UUID_1);
}
else if (uuid.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_UUID_C_UUID_3);
}
else {
bindUuid = true;
query.append(_FINDER_COLUMN_UUID_C_UUID_2);
}
query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2);
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindUuid) {
qPos.add(uuid);
}
qPos.add(companyId);
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
示例8: countByUuid
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of voting results where uuid = ?.
*
* @param uuid the uuid
* @return the number of matching voting results
*/
@Override
public int countByUuid(String uuid) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID;
Object[] finderArgs = new Object[] { uuid };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(2);
query.append(_SQL_COUNT_VOTINGRESULT_WHERE);
boolean bindUuid = false;
if (uuid == null) {
query.append(_FINDER_COLUMN_UUID_UUID_1);
}
else if (uuid.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_UUID_UUID_3);
}
else {
bindUuid = true;
query.append(_FINDER_COLUMN_UUID_UUID_2);
}
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindUuid) {
qPos.add(uuid);
}
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
示例9: countByUUID_G
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of voting results where uuid = ? and groupId = ?.
*
* @param uuid the uuid
* @param groupId the group ID
* @return the number of matching voting results
*/
@Override
public int countByUUID_G(String uuid, long groupId) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G;
Object[] finderArgs = new Object[] { uuid, groupId };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(3);
query.append(_SQL_COUNT_VOTINGRESULT_WHERE);
boolean bindUuid = false;
if (uuid == null) {
query.append(_FINDER_COLUMN_UUID_G_UUID_1);
}
else if (uuid.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_UUID_G_UUID_3);
}
else {
bindUuid = true;
query.append(_FINDER_COLUMN_UUID_G_UUID_2);
}
query.append(_FINDER_COLUMN_UUID_G_GROUPID_2);
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindUuid) {
qPos.add(uuid);
}
qPos.add(groupId);
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
示例10: countByUuid_C
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of voting results where uuid = ? and companyId = ?.
*
* @param uuid the uuid
* @param companyId the company ID
* @return the number of matching voting results
*/
@Override
public int countByUuid_C(String uuid, long companyId) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C;
Object[] finderArgs = new Object[] { uuid, companyId };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(3);
query.append(_SQL_COUNT_VOTINGRESULT_WHERE);
boolean bindUuid = false;
if (uuid == null) {
query.append(_FINDER_COLUMN_UUID_C_UUID_1);
}
else if (uuid.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_UUID_C_UUID_3);
}
else {
bindUuid = true;
query.append(_FINDER_COLUMN_UUID_C_UUID_2);
}
query.append(_FINDER_COLUMN_UUID_C_COMPANYID_2);
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindUuid) {
qPos.add(uuid);
}
qPos.add(companyId);
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
示例11: countByUuid
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of dict items where uuid = ?.
*
* @param uuid the uuid
* @return the number of matching dict items
*/
@Override
public int countByUuid(String uuid) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID;
Object[] finderArgs = new Object[] { uuid };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(2);
query.append(_SQL_COUNT_DICTITEM_WHERE);
boolean bindUuid = false;
if (uuid == null) {
query.append(_FINDER_COLUMN_UUID_UUID_1);
}
else if (uuid.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_UUID_UUID_3);
}
else {
bindUuid = true;
query.append(_FINDER_COLUMN_UUID_UUID_2);
}
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindUuid) {
qPos.add(uuid);
}
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
示例12: countByIC_DCI
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of dict items where itemCode = ? and dictCollectionId = ?.
*
* @param itemCode the item code
* @param dictCollectionId the dict collection ID
* @return the number of matching dict items
*/
@Override
public int countByIC_DCI(String itemCode, long dictCollectionId) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_IC_DCI;
Object[] finderArgs = new Object[] { itemCode, dictCollectionId };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(3);
query.append(_SQL_COUNT_DICTITEM_WHERE);
boolean bindItemCode = false;
if (itemCode == null) {
query.append(_FINDER_COLUMN_IC_DCI_ITEMCODE_1);
}
else if (itemCode.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_IC_DCI_ITEMCODE_3);
}
else {
bindItemCode = true;
query.append(_FINDER_COLUMN_IC_DCI_ITEMCODE_2);
}
query.append(_FINDER_COLUMN_IC_DCI_DICTCOLLECTIONID_2);
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindItemCode) {
qPos.add(itemCode);
}
qPos.add(dictCollectionId);
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
示例13: countByF_dictItemCode
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of dict items where itemCode = ? and groupId = ?.
*
* @param itemCode the item code
* @param groupId the group ID
* @return the number of matching dict items
*/
@Override
public int countByF_dictItemCode(String itemCode, long groupId) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_F_DICTITEMCODE;
Object[] finderArgs = new Object[] { itemCode, groupId };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(3);
query.append(_SQL_COUNT_DICTITEM_WHERE);
boolean bindItemCode = false;
if (itemCode == null) {
query.append(_FINDER_COLUMN_F_DICTITEMCODE_ITEMCODE_1);
}
else if (itemCode.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_F_DICTITEMCODE_ITEMCODE_3);
}
else {
bindItemCode = true;
query.append(_FINDER_COLUMN_F_DICTITEMCODE_ITEMCODE_2);
}
query.append(_FINDER_COLUMN_F_DICTITEMCODE_GROUPID_2);
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindItemCode) {
qPos.add(itemCode);
}
qPos.add(groupId);
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
示例14: countByF_dictItemCode_dictCollectionId
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of dict items where itemCode = ? and dictCollectionId = ? and groupId = ?.
*
* @param itemCode the item code
* @param dictCollectionId the dict collection ID
* @param groupId the group ID
* @return the number of matching dict items
*/
@Override
public int countByF_dictItemCode_dictCollectionId(String itemCode,
long dictCollectionId, long groupId) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_F_DICTITEMCODE_DICTCOLLECTIONID;
Object[] finderArgs = new Object[] { itemCode, dictCollectionId, groupId };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(4);
query.append(_SQL_COUNT_DICTITEM_WHERE);
boolean bindItemCode = false;
if (itemCode == null) {
query.append(_FINDER_COLUMN_F_DICTITEMCODE_DICTCOLLECTIONID_ITEMCODE_1);
}
else if (itemCode.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_F_DICTITEMCODE_DICTCOLLECTIONID_ITEMCODE_3);
}
else {
bindItemCode = true;
query.append(_FINDER_COLUMN_F_DICTITEMCODE_DICTCOLLECTIONID_ITEMCODE_2);
}
query.append(_FINDER_COLUMN_F_DICTITEMCODE_DICTCOLLECTIONID_DICTCOLLECTIONID_2);
query.append(_FINDER_COLUMN_F_DICTITEMCODE_DICTCOLLECTIONID_GROUPID_2);
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindItemCode) {
qPos.add(itemCode);
}
qPos.add(dictCollectionId);
qPos.add(groupId);
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
示例15: countByGC_GI_DCI
import com.liferay.portal.kernel.dao.orm.QueryPos; //导入方法依赖的package包/类
/**
* Returns the number of dict groups where groupCode = ? and groupId = ? and dictCollectionId = ?.
*
* @param groupCode the group code
* @param groupId the group ID
* @param dictCollectionId the dict collection ID
* @return the number of matching dict groups
*/
@Override
public int countByGC_GI_DCI(String groupCode, long groupId,
long dictCollectionId) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_GC_GI_DCI;
Object[] finderArgs = new Object[] { groupCode, groupId, dictCollectionId };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(4);
query.append(_SQL_COUNT_DICTGROUP_WHERE);
boolean bindGroupCode = false;
if (groupCode == null) {
query.append(_FINDER_COLUMN_GC_GI_DCI_GROUPCODE_1);
}
else if (groupCode.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_GC_GI_DCI_GROUPCODE_3);
}
else {
bindGroupCode = true;
query.append(_FINDER_COLUMN_GC_GI_DCI_GROUPCODE_2);
}
query.append(_FINDER_COLUMN_GC_GI_DCI_GROUPID_2);
query.append(_FINDER_COLUMN_GC_GI_DCI_DICTCOLLECTIONID_2);
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindGroupCode) {
qPos.add(groupCode);
}
qPos.add(groupId);
qPos.add(dictCollectionId);
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}