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


Java DynamicQueryFactoryUtil.forClass方法代码示例

本文整理汇总了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);
	}
}
 
开发者ID:jorgediaz-lr,项目名称:servicebuilder-reflection,代码行数:17,代码来源:ServicePersistedModelImpl.java

示例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;
}
 
开发者ID:fraunhoferfokus,项目名称:govapps,代码行数:18,代码来源:LoggingLocalServiceImpl.java

示例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;
	}
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:22,代码来源:ModuleLocalServiceImpl.java

示例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());
}
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:8,代码来源:RegionLocalServiceBaseImpl.java

示例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());
}
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:8,代码来源:CountryLocalServiceBaseImpl.java

示例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());
}
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:8,代码来源:FooLocalServiceBaseImpl.java

示例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());
}
 
开发者ID:fraunhoferfokus,项目名称:particity,代码行数:8,代码来源:AHOfferLocalServiceBaseImpl.java

示例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());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:8,代码来源:DossierDoc2TemplateLocalServiceBaseImpl.java

示例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());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:8,代码来源:PaymentConfigLocalServiceBaseImpl.java

示例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));
}
 
开发者ID:TelefonicaED,项目名称:liferaylms-portlet,代码行数:12,代码来源:LearningActivityResultLocalServiceImpl.java

示例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());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:8,代码来源:PaymentFileLocalServiceBaseImpl.java

示例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());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:8,代码来源:DossierStep2RoleLocalServiceBaseImpl.java

示例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());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:8,代码来源:StatisticByUserLocalServiceBaseImpl.java

示例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());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:8,代码来源:ProcessOrder2UserLocalServiceBaseImpl.java

示例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());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:8,代码来源:StatisticByAgencyLocalServiceBaseImpl.java


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