Updated to new Depot world order.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5625 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
<!-- generates fields for persistent record classes -->
|
||||
<target name="genrecord" depends="prepare">
|
||||
<taskdef name="grecord" classname="com.samskivert.jdbc.depot.tools.GenRecordTask"
|
||||
<taskdef name="grecord" classname="com.samskivert.depot.tools.GenRecordTask"
|
||||
classpathref="classpath"/>
|
||||
<!-- make sure the record class files are all compiled -->
|
||||
<javac srcdir="src/java" destdir="${classes.dir}" debug="on" optimize="${build.optimize}"
|
||||
|
||||
@@ -35,33 +35,11 @@ import com.samskivert.depot.expression.ColumnExp;
|
||||
public class ConfigRecord extends PersistentRecord
|
||||
{
|
||||
// AUTO-GENERATED: FIELDS START
|
||||
/** The column identifier for the {@link #node} field. */
|
||||
public static final String NODE = "node";
|
||||
|
||||
/** The qualified column identifier for the {@link #node} field. */
|
||||
public static final ColumnExp NODE_C =
|
||||
new ColumnExp(ConfigRecord.class, NODE);
|
||||
|
||||
/** The column identifier for the {@link #object} field. */
|
||||
public static final String OBJECT = "object";
|
||||
|
||||
/** The qualified column identifier for the {@link #object} field. */
|
||||
public static final ColumnExp OBJECT_C =
|
||||
new ColumnExp(ConfigRecord.class, OBJECT);
|
||||
|
||||
/** The column identifier for the {@link #field} field. */
|
||||
public static final String FIELD = "field";
|
||||
|
||||
/** The qualified column identifier for the {@link #field} field. */
|
||||
public static final ColumnExp FIELD_C =
|
||||
new ColumnExp(ConfigRecord.class, FIELD);
|
||||
|
||||
/** The column identifier for the {@link #value} field. */
|
||||
public static final String VALUE = "value";
|
||||
|
||||
/** The qualified column identifier for the {@link #value} field. */
|
||||
public static final ColumnExp VALUE_C =
|
||||
new ColumnExp(ConfigRecord.class, VALUE);
|
||||
public static final Class<ConfigRecord> _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>(
|
||||
ConfigRecord.class,
|
||||
new String[] { NODE, OBJECT, FIELD },
|
||||
new ColumnExp[] { NODE, OBJECT, FIELD },
|
||||
new Comparable[] { node, object, field });
|
||||
}
|
||||
// AUTO-GENERATED: METHODS END
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ConfigRepository extends DepotRepository
|
||||
public HashMap<String, String> loadConfig (String node, String object)
|
||||
{
|
||||
HashMap<String, String> data = new HashMap<String, String>();
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -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<NodeRecord> _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>(
|
||||
NodeRecord.class,
|
||||
new String[] { NODE_NAME },
|
||||
new ColumnExp[] { NODE_NAME },
|
||||
new Comparable[] { nodeName });
|
||||
}
|
||||
// AUTO-GENERATED: METHODS END
|
||||
|
||||
Reference in New Issue
Block a user