本文整理汇总了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);
}
示例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>();
}
}
示例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);
}
示例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);
}
示例5: getPropertyProjection
import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
@Override
public Projection getPropertyProjection(String attribute) {
return model.getPropertyProjection(attribute);
}
示例6: executeDynamicQuery
import com.liferay.portal.kernel.dao.orm.Projection; //导入依赖的package包/类
public List<?> executeDynamicQuery(
Criterion criterion, Projection projection)
throws Exception;
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}