title: Getting Groups which are Communities in Liferay
body: <p>I am trying to get all the groups which are communities in Liferay 5.2.x version.
  Currently I am doing the following.</p>
  
  <p>1) <code>List&lt;Group&gt; groups = GroupLocalServiceUtil.getGroups(0, groupCount)</code> --> Get all the existing groups</p>
  
  <p>2) Iterate over the groups list to check if the group is a community by using <code>group.isCommunity()</code>.</p>
  
  <p>Please suggest a way to get all the groups which are communities at one shot.</p>