title: Programmatically get list of sites in Liferay
body: <p>I want to get the list of sites in Liferay, the same that appears at <a href="http://localhost:8080/group/control_panel/manage/-/sites/sites" rel="nofollow noreferrer">http://localhost:8080/group/control_panel/manage/-/sites/sites</a> :</p>
  
  <p><a href="https://i.stack.imgur.com/mAdqE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mAdqE.png" alt="Liferay sites"></a></p>
  
  <p>In SQL I would run <code>select * from Group_ WHERE site=1</code>.</p>
  
  <p>How to get the same thing in Java?</p>
  
  <p><a href="https://docs.liferay.com/portal/7.0-ga3/javadocs/portal-kernel/com/liferay/portal/kernel/service/GroupServiceUtil.html" rel="nofollow noreferrer">GroupServiceUtil</a> does not seem to have such a method.</p>
  
  <p>Note: My Java code is in a module running within Liferay, but not a portlet.</p>