- Added a method to retireve only running nodes from a specific region

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6788 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Mark Johnson
2012-02-16 02:19:04 +00:00
parent 4753742757
commit 1117025e40
@@ -90,6 +90,18 @@ public class NodeRepository extends DepotRepository
return (conditions.isEmpty() ? query : query.where(conditions)).select();
}
/**
* Returns a list of nodes registered in the repository with the specified region that are not
* explicitly shut down.
*/
public List<NodeRecord> loadNodesFromRegion (String region)
{
return from(NodeRecord.class)
.noCache()
.where(NodeRecord.REGION.eq(region), Ops.not(NodeRecord.SHUTDOWN))
.select();
}
/**
* Updates the supplied node record, inserting it into the database if necessary.
*/