- 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:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user