Document index use.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4808 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -67,7 +67,6 @@ public class ConfigRecord extends PersistentRecord
|
|||||||
@Column(name="NODE", length=64)
|
@Column(name="NODE", length=64)
|
||||||
public String node;
|
public String node;
|
||||||
|
|
||||||
/** The code of the stat. */
|
|
||||||
@Id
|
@Id
|
||||||
@Column(name="OBJECT", length=128)
|
@Column(name="OBJECT", length=128)
|
||||||
public String object;
|
public String object;
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ public class ConfigRepository extends DepotRepository
|
|||||||
throws PersistenceException
|
throws PersistenceException
|
||||||
{
|
{
|
||||||
HashMap<String,String> data = new HashMap<String,String>();
|
HashMap<String,String> data = new HashMap<String,String>();
|
||||||
|
// INDEX: Left-most primary key fields.
|
||||||
Where where = new Where(ConfigRecord.OBJECT_C, object, ConfigRecord.NODE_C, node);
|
Where where = new Where(ConfigRecord.OBJECT_C, object, ConfigRecord.NODE_C, node);
|
||||||
for (ConfigRecord record : findAll(ConfigRecord.class, where)) {
|
for (ConfigRecord record : findAll(ConfigRecord.class, where)) {
|
||||||
data.put(record.field, record.value.toString());
|
data.put(record.field, record.value.toString());
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ public class NodeRepository extends DepotRepository
|
|||||||
public void deleteNode (String nodeName)
|
public void deleteNode (String nodeName)
|
||||||
throws PersistenceException
|
throws PersistenceException
|
||||||
{
|
{
|
||||||
|
// INDEX: Full primary key.
|
||||||
delete(NodeRecord.class, nodeName);
|
delete(NodeRecord.class, nodeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user