当前位置: 首页>>代码示例>>Java>>正文


Java QueryUtil类代码示例

本文整理汇总了Java中com.liferay.portal.kernel.dao.orm.QueryUtil的典型用法代码示例。如果您正苦于以下问题:Java QueryUtil类的具体用法?Java QueryUtil怎么用?Java QueryUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


QueryUtil类属于com.liferay.portal.kernel.dao.orm包,在下文中一共展示了QueryUtil类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getListDictGroupByDictItem

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
private String getListDictGroupByDictItem(
	DictItem dictItem, ServiceContext serviceContext) {

	List<String> result = new ArrayList<String>();
	LinkedHashMap<String, Object> params =
		new LinkedHashMap<String, Object>();
	DictcollectionInterface dictItemDataUtil = new DictCollectionActions();

	params.put("groupId", String.valueOf(dictItem.getGroupId()));
	params.put(
		DictItemGroupTerm.DICT_ITEM_ID,
		String.valueOf(dictItem.getDictItemId()));

	JSONObject jsonData = dictItemDataUtil.getDictItemsGroup(
		dictItem.getUserId(), dictItem.getCompanyId(),
		dictItem.getGroupId(), params, new Sort[] {}, QueryUtil.ALL_POS,
		QueryUtil.ALL_POS, serviceContext);
	try {

		// TODO template commented
		// @SuppressWarnings("unchecked")
		List<Document> listResults = (List<Document>) jsonData.get("data");

		for (Document document : listResults) {

			result.add(document.get(DictGroupTerm.GROUP_CODE).toString());

		}

	}
	catch (Exception e) {

		_log.error(e);
	}

	return String.join(",", result);

}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:39,代码来源:AdminPortlet.java

示例2: doGetSummary

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
@Override
protected Summary doGetSummary(Document document, Locale locale, String snippet, PortletRequest portletRequest,
		PortletResponse portletResponse) throws Exception {
	Summary summary = createSummary(document);

	summary.setMaxContentLength(QueryUtil.ALL_POS);

	return summary;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:10,代码来源:ServiceInfoIndexer.java

示例3: doGetSummary

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
@Override
protected Summary doGetSummary(
	Document document, Locale locale, String snippet,
	PortletRequest portletRequest, PortletResponse portletResponse) {

	Summary summary = createSummary(document);

	summary.setMaxContentLength(QueryUtil.ALL_POS);
	
	return summary;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:12,代码来源:DictItemIndexer.java

示例4: doGetSummary

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
@Override
protected Summary doGetSummary(
	Document document, Locale locale, String snippet,
	PortletRequest portletRequest, PortletResponse portletResponse) {

	Summary summary = createSummary(document);

	summary.setMaxContentLength(QueryUtil.ALL_POS);

	return summary;
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:12,代码来源:CommentIndexer.java

示例5: generateServiceInfos

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
private List<JSONObject> generateServiceInfos(ServiceContext serviceContext, String domainCode) {

		List<JSONObject> serviceInfos = new ArrayList<>();

		ServiceInfoActions serviceInfoActions = new ServiceInfoActionsImpl();

		LinkedHashMap<String, Object> params = new LinkedHashMap<>();
		params.put(Field.GROUP_ID, String.valueOf(serviceContext.getScopeGroupId()));
		params.put(ServiceInfoTerm.DOMAIN_CODE, domainCode);

		JSONObject serviceInfoJson = serviceInfoActions.getServiceInfos(serviceContext.getUserId(),
				serviceContext.getCompanyId(), serviceContext.getScopeGroupId(), params, null, QueryUtil.ALL_POS,
				QueryUtil.ALL_POS, serviceContext);

		List<ServiceInfoModel> serviceInfoList = ServiceInfoUtils
				.mappingToServiceInfoResultModel((List<Document>) serviceInfoJson.get("data"), serviceContext);

		if (Validator.isNotNull(serviceInfoList)) {
			for (ServiceInfoModel serviceInfo : serviceInfoList) {
				JSONObject serviceInfoJsonObj = JSONFactoryUtil.createJSONObject();

				serviceInfoJsonObj.put("serviceCode", serviceInfo.getServiceCode());
				serviceInfoJsonObj.put("serviceName", serviceInfo.getServiceName());

				serviceInfoJsonObj.put("serviceConfigs", generateServiceConfigs(serviceInfo.getServiceConfigs()));

				serviceInfos.add(serviceInfoJsonObj);
			}
		}

		return serviceInfos;
	}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:33,代码来源:ServiceConfigManagementImpl.java

示例6: getCategoryList

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
 * Get Category list
 * 
 * @param resourceRequest
 * @param resourceResponse
 * @return
 * @throws PortalException
 */
private String getCategoryList(ResourceRequest resourceRequest, ResourceResponse resourceResponse)
		throws PortalException {

	JSONArray jsonArray = JSONFactoryUtil.createJSONArray();

	long vocabularyId = ParamUtil.getLong(resourceRequest, "vocabularyId",0);
	
	if (_log.isDebugEnabled()) {
		_log.debug("Vocabulary Id <" + String.valueOf(vocabularyId) + ">");
	}

	List<AssetCategory> categories = 
		_assetCategoryLocalService.getVocabularyCategories(
			vocabularyId,
			QueryUtil.ALL_POS,
			QueryUtil.ALL_POS,
			null
		);

	for (AssetCategory category : categories) {
		JSONObject curUserJSONObject = JSONFactoryUtil.createJSONObject();

		if (_log.isDebugEnabled()) {
			_log.debug("Category name <" + category.getName() + ">");
			_log.debug(category.toString());
			_log.debug("----------");
		}

		curUserJSONObject.put("categoryId", category.getCategoryId());
		curUserJSONObject.put("categoryName", category.getName());

		jsonArray.put(curUserJSONObject);
	}

	return jsonArray.toJSONString();
}
 
开发者ID:yasuflatland-lf,项目名称:liferay-dummy-factory,代码行数:45,代码来源:CategoryMVCResourceCommand.java

示例7: removeByUuid

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
 * Removes all the dict collections where uuid = &#63; from the database.
 *
 * @param uuid the uuid
 */
@Override
public void removeByUuid(String uuid) {
	for (DictCollection dictCollection : findByUuid(uuid,
			QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
		remove(dictCollection);
	}
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:13,代码来源:DictCollectionPersistenceImpl.java

示例8: removeByF_dictCollectionByGroup

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
 * Removes all the dict collections where groupId = &#63; from the database.
 *
 * @param groupId the group ID
 */
@Override
public void removeByF_dictCollectionByGroup(long groupId) {
	for (DictCollection dictCollection : findByF_dictCollectionByGroup(
			groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
		remove(dictCollection);
	}
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:13,代码来源:DictCollectionPersistenceImpl.java

示例9: removeByUuid

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
 * Removes all the votings where uuid = &#63; from the database.
 *
 * @param uuid the uuid
 */
@Override
public void removeByUuid(String uuid) {
	for (Voting voting : findByUuid(uuid, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null)) {
		remove(voting);
	}
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:13,代码来源:VotingPersistenceImpl.java

示例10: removeByUuid_C

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
 * Removes all the votings where uuid = &#63; and companyId = &#63; from the database.
 *
 * @param uuid the uuid
 * @param companyId the company ID
 */
@Override
public void removeByUuid_C(String uuid, long companyId) {
	for (Voting voting : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null)) {
		remove(voting);
	}
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:14,代码来源:VotingPersistenceImpl.java

示例11: removeByUuid_C

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
 * Removes all the voting results where uuid = &#63; and companyId = &#63; from the database.
 *
 * @param uuid the uuid
 * @param companyId the company ID
 */
@Override
public void removeByUuid_C(String uuid, long companyId) {
	for (VotingResult votingResult : findByUuid_C(uuid, companyId,
			QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
		remove(votingResult);
	}
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:14,代码来源:VotingResultPersistenceImpl.java

示例12: removeByUuid

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
 * Removes all the dict items where uuid = &#63; from the database.
 *
 * @param uuid the uuid
 */
@Override
public void removeByUuid(String uuid) {
	for (DictItem dictItem : findByUuid(uuid, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null)) {
		remove(dictItem);
	}
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:13,代码来源:DictItemPersistenceImpl.java

示例13: removeByUuid_C

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
 * Removes all the dict items where uuid = &#63; and companyId = &#63; from the database.
 *
 * @param uuid the uuid
 * @param companyId the company ID
 */
@Override
public void removeByUuid_C(String uuid, long companyId) {
	for (DictItem dictItem : findByUuid_C(uuid, companyId,
			QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
		remove(dictItem);
	}
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:14,代码来源:DictItemPersistenceImpl.java

示例14: removeByF_dictCollectionId

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
 * Removes all the dict items where dictCollectionId = &#63; from the database.
 *
 * @param dictCollectionId the dict collection ID
 */
@Override
public void removeByF_dictCollectionId(long dictCollectionId) {
	for (DictItem dictItem : findByF_dictCollectionId(dictCollectionId,
			QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
		remove(dictItem);
	}
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:13,代码来源:DictItemPersistenceImpl.java

示例15: removeByF_dictItemByGroup

import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
 * Removes all the dict items where dictCollectionId = &#63; and groupId = &#63; from the database.
 *
 * @param dictCollectionId the dict collection ID
 * @param groupId the group ID
 */
@Override
public void removeByF_dictItemByGroup(long dictCollectionId, long groupId) {
	for (DictItem dictItem : findByF_dictItemByGroup(dictCollectionId,
			groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
		remove(dictItem);
	}
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:14,代码来源:DictItemPersistenceImpl.java


注:本文中的com.liferay.portal.kernel.dao.orm.QueryUtil类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。