diff --git a/build.xml b/build.xml index 6808c805a..cb4302030 100644 --- a/build.xml +++ b/build.xml @@ -22,7 +22,7 @@ - _R = ConfigRecord.class; + public static final ColumnExp NODE = colexp(_R, "node"); + public static final ColumnExp OBJECT = colexp(_R, "object"); + public static final ColumnExp FIELD = colexp(_R, "field"); + public static final ColumnExp VALUE = colexp(_R, "value"); // AUTO-GENERATED: FIELDS END public static final int SCHEMA_VERSION = 2; @@ -107,7 +85,7 @@ public class ConfigRecord extends PersistentRecord { return new Key( ConfigRecord.class, - new String[] { NODE, OBJECT, FIELD }, + new ColumnExp[] { NODE, OBJECT, FIELD }, new Comparable[] { node, object, field }); } // AUTO-GENERATED: METHODS END diff --git a/src/java/com/threerings/admin/server/persist/ConfigRepository.java b/src/java/com/threerings/admin/server/persist/ConfigRepository.java index f1ab6a44a..8fa1957c4 100644 --- a/src/java/com/threerings/admin/server/persist/ConfigRepository.java +++ b/src/java/com/threerings/admin/server/persist/ConfigRepository.java @@ -50,7 +50,7 @@ public class ConfigRepository extends DepotRepository public HashMap loadConfig (String node, String object) { HashMap data = new HashMap(); - Where where = new Where(ConfigRecord.OBJECT_C, object, ConfigRecord.NODE_C, node); + Where where = new Where(ConfigRecord.OBJECT, object, ConfigRecord.NODE, node); for (ConfigRecord record : findAll(ConfigRecord.class, where)) { data.put(record.field, record.value); } diff --git a/src/java/com/threerings/presents/peer/server/persist/NodeRecord.java b/src/java/com/threerings/presents/peer/server/persist/NodeRecord.java index 479fac60b..62f0c9650 100644 --- a/src/java/com/threerings/presents/peer/server/persist/NodeRecord.java +++ b/src/java/com/threerings/presents/peer/server/persist/NodeRecord.java @@ -39,40 +39,12 @@ import com.samskivert.depot.expression.ColumnExp; public class NodeRecord extends PersistentRecord { // AUTO-GENERATED: FIELDS START - /** The column identifier for the {@link #nodeName} field. */ - public static final String NODE_NAME = "nodeName"; - - /** The qualified column identifier for the {@link #nodeName} field. */ - public static final ColumnExp NODE_NAME_C = - new ColumnExp(NodeRecord.class, NODE_NAME); - - /** The column identifier for the {@link #hostName} field. */ - public static final String HOST_NAME = "hostName"; - - /** The qualified column identifier for the {@link #hostName} field. */ - public static final ColumnExp HOST_NAME_C = - new ColumnExp(NodeRecord.class, HOST_NAME); - - /** The column identifier for the {@link #publicHostName} field. */ - public static final String PUBLIC_HOST_NAME = "publicHostName"; - - /** The qualified column identifier for the {@link #publicHostName} field. */ - public static final ColumnExp PUBLIC_HOST_NAME_C = - new ColumnExp(NodeRecord.class, PUBLIC_HOST_NAME); - - /** The column identifier for the {@link #port} field. */ - public static final String PORT = "port"; - - /** The qualified column identifier for the {@link #port} field. */ - public static final ColumnExp PORT_C = - new ColumnExp(NodeRecord.class, PORT); - - /** The column identifier for the {@link #lastUpdated} field. */ - public static final String LAST_UPDATED = "lastUpdated"; - - /** The qualified column identifier for the {@link #lastUpdated} field. */ - public static final ColumnExp LAST_UPDATED_C = - new ColumnExp(NodeRecord.class, LAST_UPDATED); + public static final Class _R = NodeRecord.class; + public static final ColumnExp NODE_NAME = colexp(_R, "nodeName"); + public static final ColumnExp HOST_NAME = colexp(_R, "hostName"); + public static final ColumnExp PUBLIC_HOST_NAME = colexp(_R, "publicHostName"); + public static final ColumnExp PORT = colexp(_R, "port"); + public static final ColumnExp LAST_UPDATED = colexp(_R, "lastUpdated"); // AUTO-GENERATED: FIELDS END /** Increment this value if you modify the definition of this persistent @@ -135,7 +107,7 @@ public class NodeRecord extends PersistentRecord { return new Key( NodeRecord.class, - new String[] { NODE_NAME }, + new ColumnExp[] { NODE_NAME }, new Comparable[] { nodeName }); } // AUTO-GENERATED: METHODS END