diff --git a/src/java/com/samskivert/jdbc/depot/Key.java b/src/java/com/samskivert/jdbc/depot/Key.java index a5ad529..651c8b7 100644 --- a/src/java/com/samskivert/jdbc/depot/Key.java +++ b/src/java/com/samskivert/jdbc/depot/Key.java @@ -44,7 +44,7 @@ public class Key extends Where implements CacheKey, CacheInvalidator { /** - * Constructs a new single-column {@code Key} with the given value. + * Constructs a new single-column {@code Key} with the given value. */ public Key (Class pClass, String ix, Comparable val) { @@ -77,17 +77,17 @@ public class Key extends Where // TODO: make Where an interface so we don't have to do this ugly super call super(null); _pClass = pClass; - + if (fields.length != values.length) { throw new IllegalArgumentException("Field and Value arrays must be of equal length."); } - + // build a local map of field name -> field value Map map = new HashMap(); for (int i = 0; i < fields.length; i ++) { map.put(fields[i], values[i]); } - + // then introspect on the persistent record and iterate over its actual fields _fields = new ArrayList(fields.length); _values = new ArrayList(fields.length); @@ -95,7 +95,7 @@ public class Key extends Where // look for @Id fields if (field.getAnnotation(Id.class) != null) { String fName = field.getName(); - // make sure we were provided with a value for this primary key field + // make sure we were provided with a value for this primary key field if (map.containsKey(fName) == false) { throw new IllegalArgumentException("Missing value for key field: " + fName); } @@ -110,7 +110,7 @@ public class Key extends Where "Non-key columns given: " + StringUtil.join(map.keySet().toArray(), ", ")); } } - + // from QueryClause public Collection> getClassSet () { @@ -143,7 +143,7 @@ public class Key extends Where } return argIdx; } - + // from CacheKey public String getCacheId () { @@ -192,7 +192,7 @@ public class Key extends Where return builder.toString(); } - + protected Class _pClass; protected ArrayList _fields; protected ArrayList _values;