本文整理汇总了Java中com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil.forClass方法的典型用法代码示例。如果您正苦于以下问题:Java DynamicQueryFactoryUtil.forClass方法的具体用法?Java DynamicQueryFactoryUtil.forClass怎么用?Java DynamicQueryFactoryUtil.forClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil
的用法示例。
在下文中一共展示了DynamicQueryFactoryUtil.forClass方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newDynamicQuery
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
public DynamicQuery newDynamicQuery(String alias) {
try {
Class<?> modelImplClass = getLiferayModelImplClass();
String className = modelImplClass.getName();
className = className.replace("ModelImpl", "Impl");
Class<?> clazz = getClassLoader().loadClass(className);
return DynamicQueryFactoryUtil.forClass(clazz, alias);
}
catch (ClassNotFoundException cnfe) {
throw new RuntimeException(cnfe);
}
}
示例2: getMostUsedSearchStringNotNull
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
public List<Logging> getMostUsedSearchStringNotNull() {
try {
DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(Logging.class);
Criterion criterion = RestrictionsFactoryUtil.not(RestrictionsFactoryUtil.like("searchString", "null"));
dynamicQuery.add(criterion);
Order defaultOrder = OrderFactoryUtil.desc("passel");
dynamicQuery.addOrder(defaultOrder);
return dynamicQuery(dynamicQuery);
} catch (SystemException e) {
e.printStackTrace();
}
return null;
}
示例3: getPreviusModule
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
public Module getPreviusModule(Module theModule) throws SystemException {
ClassLoader classLoader = (ClassLoader) PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), "portletClassLoader");
DynamicQuery dq=DynamicQueryFactoryUtil.forClass(Module.class, classLoader);
Criterion criterion=PropertyFactoryUtil.forName("ordern").lt(theModule.getOrdern());
dq.add(criterion);
criterion=PropertyFactoryUtil.forName("groupId").eq(theModule.getGroupId());
dq.add(criterion);
Order createOrder=OrderFactoryUtil.getOrderFactory().desc("ordern");
dq.addOrder(createOrder);
@SuppressWarnings("unchecked")
List<Module> modulesp=(List<Module>)moduleLocalService.dynamicQuery(dq,0,1);
if(modulesp!=null&& modulesp.size()>0)
{
return modulesp.get(0);
}
else
{
return null;
}
}
示例4: dynamicQuery
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
@Override
public DynamicQuery dynamicQuery() {
Class<?> clazz = getClass();
return DynamicQueryFactoryUtil.forClass(Region.class,
clazz.getClassLoader());
}
示例5: dynamicQuery
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
@Override
public DynamicQuery dynamicQuery() {
Class<?> clazz = getClass();
return DynamicQueryFactoryUtil.forClass(Country.class,
clazz.getClassLoader());
}
示例6: dynamicQuery
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
@Override
public DynamicQuery dynamicQuery() {
Class<?> clazz = getClass();
return DynamicQueryFactoryUtil.forClass(Foo.class,
clazz.getClassLoader());
}
示例7: dynamicQuery
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
@Override
public DynamicQuery dynamicQuery() {
Class<?> clazz = getClass();
return DynamicQueryFactoryUtil.forClass(AHOffer.class,
clazz.getClassLoader());
}
示例8: dynamicQuery
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
@Override
public DynamicQuery dynamicQuery() {
Class<?> clazz = getClass();
return DynamicQueryFactoryUtil.forClass(DossierDoc2Template.class,
clazz.getClassLoader());
}
示例9: dynamicQuery
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
@Override
public DynamicQuery dynamicQuery() {
Class<?> clazz = getClass();
return DynamicQueryFactoryUtil.forClass(PaymentConfig.class,
clazz.getClassLoader());
}
示例10: avgResult
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
public Double avgResult(long actId) throws SystemException
{
ClassLoader classLoader = (ClassLoader) PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(), "portletClassLoader");
DynamicQuery dq=DynamicQueryFactoryUtil.forClass(LearningActivityResult.class, classLoader);
Criterion criterion=PropertyFactoryUtil.forName("actId").eq(actId);
dq.add(criterion);
criterion=PropertyFactoryUtil.forName("endDate").isNotNull();
dq.add(criterion);
dq.setProjection(ProjectionFactoryUtil.avg("result"));
return (Double)(learningActivityResultPersistence.findWithDynamicQuery(dq).get(0));
}
示例11: dynamicQuery
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
@Override
public DynamicQuery dynamicQuery() {
Class<?> clazz = getClass();
return DynamicQueryFactoryUtil.forClass(PaymentFile.class,
clazz.getClassLoader());
}
示例12: dynamicQuery
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
@Override
public DynamicQuery dynamicQuery() {
Class<?> clazz = getClass();
return DynamicQueryFactoryUtil.forClass(DossierStep2Role.class,
clazz.getClassLoader());
}
示例13: dynamicQuery
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
@Override
public DynamicQuery dynamicQuery() {
Class<?> clazz = getClass();
return DynamicQueryFactoryUtil.forClass(StatisticByUser.class,
clazz.getClassLoader());
}
示例14: dynamicQuery
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
@Override
public DynamicQuery dynamicQuery() {
Class<?> clazz = getClass();
return DynamicQueryFactoryUtil.forClass(ProcessOrder2User.class,
clazz.getClassLoader());
}
示例15: dynamicQuery
import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil; //导入方法依赖的package包/类
@Override
public DynamicQuery dynamicQuery() {
Class<?> clazz = getClass();
return DynamicQueryFactoryUtil.forClass(StatisticByAgency.class,
clazz.getClassLoader());
}