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


Java Projection类代码示例

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


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

示例1: executeDynamicQuery

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
public static List<?> executeDynamicQuery(
		Service service, Criterion criterion, Projection projection,
		List<Order> orders)
	throws Exception {

	DynamicQuery query = service.newDynamicQuery();

	if (projection != null) {
		query.setProjection(projection);
	}

	if (orders != null) {
		for (Order order : orders) {
			query.addOrder(order);
		}
	}

	if (criterion != null) {
		query.add(criterion);
	}

	return service.executeDynamicQuery(query);
}
 
开发者ID:jorgediaz-lr,项目名称:servicebuilder-reflection,代码行数:24,代码来源:ModelUtil.java

示例2: getSiteGroupIds

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public List<Long> getSiteGroupIds() {

	ModelFactory modelFactory = new ModelFactory();

	Model model = modelFactory.getModelObject(Group.class);

	Conjunction stagingSites = RestrictionsFactoryUtil.conjunction();
	stagingSites.add(model.getProperty("site").eq(false));
	stagingSites.add(model.getProperty("liveGroupId").ne(0L));

	Projection projection = model.getPropertyProjection("liveGroupId");

	List<Order> orders = Collections.singletonList(
		OrderFactoryUtil.asc("name"));

	try {
		return (List<Long>)model.executeDynamicQuery(
			stagingSites, projection, orders);
	}
	catch (Exception e) {
		if (_log.isWarnEnabled()) {
			_log.warn(e, e);
		}

		return new ArrayList<Long>();
	}
}
 
开发者ID:jorgediaz-lr,项目名称:staging-checker,代码行数:29,代码来源:StagingCheckerPortlet.java

示例3: executeDynamicQuery

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
@Override
public List<?> executeDynamicQuery(
		Criterion criterion, Projection projection)
	throws Exception {

	return executeDynamicQuery(criterion, projection, null);
}
 
开发者ID:jorgediaz-lr,项目名称:servicebuilder-reflection,代码行数:8,代码来源:ModelWrapper.java

示例4: getPropertyProjection

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
@Override
public Projection getPropertyProjection(String attribute) {

	String op = null;

	if (attribute.indexOf("(") > 0) {
		op = attribute.substring(0, attribute.indexOf("("));
		attribute = attribute.substring(
			attribute.indexOf("(") + 1, attribute.indexOf(")"));
	}

	return getPropertyProjection(attribute, op);
}
 
开发者ID:jorgediaz-lr,项目名称:servicebuilder-reflection,代码行数:14,代码来源:ModelImpl.java

示例5: getPropertyProjection

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
@Override
public Projection getPropertyProjection(String attribute) {
	return model.getPropertyProjection(attribute);
}
 
开发者ID:jorgediaz-lr,项目名称:servicebuilder-reflection,代码行数:5,代码来源:ModelWrapper.java

示例6: executeDynamicQuery

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
public List<?> executeDynamicQuery(
	Criterion criterion, Projection projection)
throws Exception;
 
开发者ID:jorgediaz-lr,项目名称:servicebuilder-reflection,代码行数:4,代码来源:Model.java

示例7: dynamicQueryCount

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
/**
 * Returns the number of rows that match the dynamic query.
 *
 * @param dynamicQuery the dynamic query
 * @param projection the projection to apply to the query
 * @return the number of rows that match the dynamic query
 * @throws SystemException if a system exception occurred
 */
@Override
public long dynamicQueryCount(DynamicQuery dynamicQuery,
	Projection projection) throws SystemException {
	return dossierProcPersistence.countWithDynamicQuery(dynamicQuery,
		projection);
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:15,代码来源:DossierProcLocalServiceBaseImpl.java

示例8: dynamicQueryCount

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
/**
 * Returns the number of rows that match the dynamic query.
 *
 * @param dynamicQuery the dynamic query
 * @param projection the projection to apply to the query
 * @return the number of rows that match the dynamic query
 * @throws SystemException if a system exception occurred
 */
@Override
public long dynamicQueryCount(DynamicQuery dynamicQuery,
	Projection projection) throws SystemException {
	return statisticByDayPersistence.countWithDynamicQuery(dynamicQuery,
		projection);
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:15,代码来源:StatisticByDayLocalServiceBaseImpl.java

示例9: dynamicQueryCount

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
/**
 * Returns the number of rows that match the dynamic query.
 *
 * @param dynamicQuery the dynamic query
 * @param projection the projection to apply to the query
 * @return the number of rows that match the dynamic query
 * @throws SystemException if a system exception occurred
 */
@Override
public long dynamicQueryCount(DynamicQuery dynamicQuery,
	Projection projection) throws SystemException {
	return paymentConfigPersistence.countWithDynamicQuery(dynamicQuery,
		projection);
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:15,代码来源:PaymentConfigLocalServiceBaseImpl.java

示例10: dynamicQueryCount

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
/**
 * Returns the number of rows that match the dynamic query.
 *
 * @param dynamicQuery the dynamic query
 * @param projection the projection to apply to the query
 * @return the number of rows that match the dynamic query
 * @throws SystemException if a system exception occurred
 */
@Override
public long dynamicQueryCount(DynamicQuery dynamicQuery,
	Projection projection) throws SystemException {
	return profileDataPersistence.countWithDynamicQuery(dynamicQuery,
		projection);
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:15,代码来源:ProfileDataLocalServiceBaseImpl.java

示例11: dynamicQueryCount

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
/**
 * Returns the number of rows that match the dynamic query.
 *
 * @param dynamicQuery the dynamic query
 * @param projection the projection to apply to the query
 * @return the number of rows that match the dynamic query
 * @throws SystemException if a system exception occurred
 */
@Override
public long dynamicQueryCount(DynamicQuery dynamicQuery,
	Projection projection) throws SystemException {
	return dossierDoc2TemplatePersistence.countWithDynamicQuery(dynamicQuery,
		projection);
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:15,代码来源:DossierDoc2TemplateLocalServiceBaseImpl.java

示例12: dynamicQueryCount

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
/**
 * Returns the number of rows that match the dynamic query.
 *
 * @param dynamicQuery the dynamic query
 * @param projection the projection to apply to the query
 * @return the number of rows that match the dynamic query
 * @throws SystemException if a system exception occurred
 */
@Override
public long dynamicQueryCount(DynamicQuery dynamicQuery,
	Projection projection) throws SystemException {
	return docTemplatePersistence.countWithDynamicQuery(dynamicQuery,
		projection);
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:15,代码来源:DocTemplateLocalServiceBaseImpl.java

示例13: dynamicQueryCount

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
/**
 * Returns the number of rows that match the dynamic query.
 *
 * @param dynamicQuery the dynamic query
 * @param projection the projection to apply to the query
 * @return the number of rows that match the dynamic query
 * @throws SystemException if a system exception occurred
 */
@Override
public long dynamicQueryCount(DynamicQuery dynamicQuery,
	Projection projection) throws SystemException {
	return dossierFolder2RolePersistence.countWithDynamicQuery(dynamicQuery,
		projection);
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:15,代码来源:DossierFolder2RoleLocalServiceBaseImpl.java

示例14: dynamicQueryCount

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
/**
 * Returns the number of rows that match the dynamic query.
 *
 * @param dynamicQuery the dynamic query
 * @param projection the projection to apply to the query
 * @return the number of rows that match the dynamic query
 * @throws SystemException if a system exception occurred
 */
@Override
public long dynamicQueryCount(DynamicQuery dynamicQuery,
	Projection projection) throws SystemException {
	return paymentRequestPersistence.countWithDynamicQuery(dynamicQuery,
		projection);
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:15,代码来源:PaymentRequestLocalServiceBaseImpl.java

示例15: dynamicQueryCount

import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
/**
 * Returns the number of rows that match the dynamic query.
 *
 * @param dynamicQuery the dynamic query
 * @param projection the projection to apply to the query
 * @return the number of rows that match the dynamic query
 * @throws SystemException if a system exception occurred
 */
@Override
public long dynamicQueryCount(DynamicQuery dynamicQuery,
	Projection projection) throws SystemException {
	return dossierProcAgentPersistence.countWithDynamicQuery(dynamicQuery,
		projection);
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:15,代码来源:DossierProcAgentLocalServiceBaseImpl.java


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