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


Java Group.getPublicLayoutsPageCount方法代码示例

本文整理汇总了Java中com.liferay.portal.model.Group.getPublicLayoutsPageCount方法的典型用法代码示例。如果您正苦于以下问题:Java Group.getPublicLayoutsPageCount方法的具体用法?Java Group.getPublicLayoutsPageCount怎么用?Java Group.getPublicLayoutsPageCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.liferay.portal.model.Group的用法示例。


在下文中一共展示了Group.getPublicLayoutsPageCount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getComunidades

import com.liferay.portal.model.Group; //导入方法依赖的package包/类
@Override
protected List<Group> getComunidades(PortletRequest renderRequest, ThemeDisplay td) {
	List<Group> comunidades = Collections.<Group> emptyList();

	try {
		// Consulta feita na mão para evitar cache trashing
		DynamicQuery query = DynamicQueryFactoryUtil.forClass(Group.class, PortalClassLoaderUtil.getClassLoader());
		query.add(RestrictionsFactoryUtil.eq("companyId", td.getCompanyId()));
		query.add(RestrictionsFactoryUtil.eq("active", true));
		query.add(RestrictionsFactoryUtil.in("type", new Object[] {GroupConstants.TYPE_SITE_OPEN, GroupConstants.TYPE_SITE_RESTRICTED} ));
		query.add(RestrictionsFactoryUtil.not(RestrictionsFactoryUtil.in("name", new Object[] {GroupConstants.GUEST, GroupConstants.CONTROL_PANEL, ""})));
		query.add(RestrictionsFactoryUtil.ne("groupId", td.getScopeGroupId()));
		query.add(RestrictionsFactoryUtil.eq("classNameId", PortalUtil.getClassNameId(Group.class)));
		query.addOrder(OrderFactoryUtil.asc("name"));
		
		@SuppressWarnings("unchecked")
		List<Group> groups = GroupLocalServiceUtil.dynamicQuery(query) ;
		
		comunidades = new ArrayList<Group>(groups.size());
		for (Group grp : groups) {
			if (grp.getPublicLayoutsPageCount() != 0)
				comunidades.add(grp);
		}
	} catch (SystemException e) {
		_log.error(e);
	}
	return comunidades;
}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:29,代码来源:OutrasComunidades.java

示例2: getComunidadesAtivas

import com.liferay.portal.model.Group; //导入方法依赖的package包/类
private List<Group> getComunidadesAtivas(PortletRequest renderRequest, ThemeDisplay td) {

	List<Group> comunidades = Collections.<Group> emptyList();

	try {

	    DynamicQuery query = DynamicQueryFactoryUtil.forClass(Group.class, PortalClassLoaderUtil.getClassLoader());
	    query.add(RestrictionsFactoryUtil.eq("companyId", td.getCompanyId()));
	    query.add(RestrictionsFactoryUtil.eq("active", true));
	    query.add(RestrictionsFactoryUtil.in("type", new Object[] { GroupConstants.TYPE_SITE_OPEN, GroupConstants.TYPE_SITE_RESTRICTED }));
	    query.add(RestrictionsFactoryUtil.not(RestrictionsFactoryUtil.in("name", new Object[] { GroupConstants.GUEST, GroupConstants.CONTROL_PANEL, "" })));
	    // query.add(RestrictionsFactoryUtil.ne("groupId",
	    // td.getScopeGroupId()));
	    query.add(RestrictionsFactoryUtil.eq("classNameId", PortalUtil.getClassNameId(Group.class)));
	    query.addOrder(OrderFactoryUtil.desc("name"));

	    @SuppressWarnings("unchecked")
	    List<Group> groups = GroupLocalServiceUtil.dynamicQuery(query);

	    comunidades = new ArrayList<Group>(groups.size());

	    for (Group grp : groups) {

		if (grp.getPublicLayoutsPageCount() != 0) {
		    Boolean finished = (Boolean) grp.getExpandoBridge().getAttribute("Encerrada");
		    if (finished == null || !finished)
			comunidades.add(grp);
		}

	    }

	} catch (SystemException e) {
	    _log.error(e);
	}

	return comunidades;
    }
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:38,代码来源:TodasComunidades.java

示例3: getComunidadesEncerradas

import com.liferay.portal.model.Group; //导入方法依赖的package包/类
private List<Group> getComunidadesEncerradas(PortletRequest renderRequest, ThemeDisplay td) {

	List<Group> comunidades = Collections.<Group> emptyList();

	try {

	    DynamicQuery query = DynamicQueryFactoryUtil.forClass(Group.class, PortalClassLoaderUtil.getClassLoader());
	    query.add(RestrictionsFactoryUtil.eq("companyId", td.getCompanyId()));
	    query.add(RestrictionsFactoryUtil.eq("active", true));
	    query.add(RestrictionsFactoryUtil.in("type", new Object[] { GroupConstants.TYPE_SITE_OPEN, GroupConstants.TYPE_SITE_RESTRICTED }));
	    query.add(RestrictionsFactoryUtil.not(RestrictionsFactoryUtil.in("name", new Object[] { GroupConstants.GUEST, GroupConstants.CONTROL_PANEL, "" })));
	    // query.add(RestrictionsFactoryUtil.ne("groupId",
	    // td.getScopeGroupId()));
	    query.add(RestrictionsFactoryUtil.eq("classNameId", PortalUtil.getClassNameId(Group.class)));
	    query.addOrder(OrderFactoryUtil.desc("name"));

	    @SuppressWarnings("unchecked")
	    List<Group> groups = GroupLocalServiceUtil.dynamicQuery(query);

	    comunidades = new ArrayList<Group>(groups.size());

	    for (Group grp : groups) {
		if (grp.getPublicLayoutsPageCount() != 0) {
		    Boolean finished = (Boolean) grp.getExpandoBridge().getAttribute("Encerrada");
		    if (finished != null && finished)
			comunidades.add(grp);
		}
	    }

	} catch (SystemException e) {
	    _log.error(e);
	}

	return comunidades;
    }
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:36,代码来源:TodasComunidades.java


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