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 -->
|
<!-- generates fields for persistent record classes -->
|
||||||
<target name="genrecord" depends="prepare">
|
<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"/>
|
classpathref="classpath"/>
|
||||||
<!-- make sure the record class files are all compiled -->
|
<!-- make sure the record class files are all compiled -->
|
||||||
<javac srcdir="src/java" destdir="${classes.dir}" debug="on" optimize="${build.optimize}"
|
<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
|
public class ConfigRecord extends PersistentRecord
|
||||||
{
|
{
|
||||||
// AUTO-GENERATED: FIELDS START
|
// AUTO-GENERATED: FIELDS START
|
||||||
/** The column identifier for the {@link #node} field. */
|
public static final Class<ConfigRecord> _R = ConfigRecord.class;
|
||||||
public static final String NODE = "node";
|
public static final ColumnExp NODE = colexp(_R, "node");
|
||||||
|
public static final ColumnExp OBJECT = colexp(_R, "object");
|
||||||
/** The qualified column identifier for the {@link #node} field. */
|
public static final ColumnExp FIELD = colexp(_R, "field");
|
||||||
public static final ColumnExp NODE_C =
|
public static final ColumnExp VALUE = colexp(_R, "value");
|
||||||
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);
|
|
||||||
// AUTO-GENERATED: FIELDS END
|
// AUTO-GENERATED: FIELDS END
|
||||||
|
|
||||||
public static final int SCHEMA_VERSION = 2;
|
public static final int SCHEMA_VERSION = 2;
|
||||||
@@ -107,7 +85,7 @@ public class ConfigRecord extends PersistentRecord
|
|||||||
{
|
{
|
||||||
return new Key<ConfigRecord>(
|
return new Key<ConfigRecord>(
|
||||||
ConfigRecord.class,
|
ConfigRecord.class,
|
||||||
new String[] { NODE, OBJECT, FIELD },
|
new ColumnExp[] { NODE, OBJECT, FIELD },
|
||||||
new Comparable[] { node, object, field });
|
new Comparable[] { node, object, field });
|
||||||
}
|
}
|
||||||
// AUTO-GENERATED: METHODS END
|
// AUTO-GENERATED: METHODS END
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class ConfigRepository extends DepotRepository
|
|||||||
public HashMap<String, String> loadConfig (String node, String object)
|
public HashMap<String, String> loadConfig (String node, String object)
|
||||||
{
|
{
|
||||||
HashMap<String, String> data = new HashMap<String, String>();
|
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)) {
|
for (ConfigRecord record : findAll(ConfigRecord.class, where)) {
|
||||||
data.put(record.field, record.value);
|
data.put(record.field, record.value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,40 +39,12 @@ import com.samskivert.depot.expression.ColumnExp;
|
|||||||
public class NodeRecord extends PersistentRecord
|
public class NodeRecord extends PersistentRecord
|
||||||
{
|
{
|
||||||
// AUTO-GENERATED: FIELDS START
|
// AUTO-GENERATED: FIELDS START
|
||||||
/** The column identifier for the {@link #nodeName} field. */
|
public static final Class<NodeRecord> _R = NodeRecord.class;
|
||||||
public static final String NODE_NAME = "nodeName";
|
public static final ColumnExp NODE_NAME = colexp(_R, "nodeName");
|
||||||
|
public static final ColumnExp HOST_NAME = colexp(_R, "hostName");
|
||||||
/** The qualified column identifier for the {@link #nodeName} field. */
|
public static final ColumnExp PUBLIC_HOST_NAME = colexp(_R, "publicHostName");
|
||||||
public static final ColumnExp NODE_NAME_C =
|
public static final ColumnExp PORT = colexp(_R, "port");
|
||||||
new ColumnExp(NodeRecord.class, NODE_NAME);
|
public static final ColumnExp LAST_UPDATED = colexp(_R, "lastUpdated");
|
||||||
|
|
||||||
/** 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);
|
|
||||||
// AUTO-GENERATED: FIELDS END
|
// AUTO-GENERATED: FIELDS END
|
||||||
|
|
||||||
/** Increment this value if you modify the definition of this persistent
|
/** Increment this value if you modify the definition of this persistent
|
||||||
@@ -135,7 +107,7 @@ public class NodeRecord extends PersistentRecord
|
|||||||
{
|
{
|
||||||
return new Key<NodeRecord>(
|
return new Key<NodeRecord>(
|
||||||
NodeRecord.class,
|
NodeRecord.class,
|
||||||
new String[] { NODE_NAME },
|
new ColumnExp[] { NODE_NAME },
|
||||||
new Comparable[] { nodeName });
|
new Comparable[] { nodeName });
|
||||||
}
|
}
|
||||||
// AUTO-GENERATED: METHODS END
|
// AUTO-GENERATED: METHODS END
|
||||||
|
|||||||
Reference in New Issue
Block a user