本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例7: removeByUuid
import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
* Removes all the dict collections where uuid = ? 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);
}
}
示例8: removeByF_dictCollectionByGroup
import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
* Removes all the dict collections where groupId = ? 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);
}
}
示例9: removeByUuid
import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
* Removes all the votings where uuid = ? 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);
}
}
示例10: removeByUuid_C
import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
* Removes all the votings where uuid = ? and companyId = ? 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);
}
}
示例11: removeByUuid_C
import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
* Removes all the voting results where uuid = ? and companyId = ? 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);
}
}
示例12: removeByUuid
import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
* Removes all the dict items where uuid = ? 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);
}
}
示例13: removeByUuid_C
import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
* Removes all the dict items where uuid = ? and companyId = ? 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);
}
}
示例14: removeByF_dictCollectionId
import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
* Removes all the dict items where dictCollectionId = ? 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);
}
}
示例15: removeByF_dictItemByGroup
import com.liferay.portal.kernel.dao.orm.QueryUtil; //导入依赖的package包/类
/**
* Removes all the dict items where dictCollectionId = ? and groupId = ? 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);
}
}