本文整理汇总了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;
}
示例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;
}
示例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;
}