diff --git a/src/java/com/samskivert/jdbc/depot/DepotRepository.java b/src/java/com/samskivert/jdbc/depot/DepotRepository.java index adf3932..0dd0811 100644 --- a/src/java/com/samskivert/jdbc/depot/DepotRepository.java +++ b/src/java/com/samskivert/jdbc/depot/DepotRepository.java @@ -732,7 +732,7 @@ public abstract class DepotRepository }); // now delete using that primary key set - PrimaryKeySet pwhere = new PrimaryKeySet(type, keys); + KeySet pwhere = new KeySet(type, keys); return deleteAll(type, pwhere, pwhere); } diff --git a/src/java/com/samskivert/jdbc/depot/FindAllQuery.java b/src/java/com/samskivert/jdbc/depot/FindAllQuery.java index fa45f57..dd6619e 100644 --- a/src/java/com/samskivert/jdbc/depot/FindAllQuery.java +++ b/src/java/com/samskivert/jdbc/depot/FindAllQuery.java @@ -147,7 +147,7 @@ public abstract class FindAllQuery throws SQLException { _builder.newQuery(new SelectClause(_type, _marsh.getFieldNames(), - new PrimaryKeySet(_type, keys))); + new KeySet(_type, keys))); PreparedStatement stmt = _builder.prepare(conn); try { ResultSet rs = stmt.executeQuery(); diff --git a/src/java/com/samskivert/jdbc/depot/PrimaryKeySet.java b/src/java/com/samskivert/jdbc/depot/KeySet.java similarity index 92% rename from src/java/com/samskivert/jdbc/depot/PrimaryKeySet.java rename to src/java/com/samskivert/jdbc/depot/KeySet.java index 71d4ba7..d3bec2c 100644 --- a/src/java/com/samskivert/jdbc/depot/PrimaryKeySet.java +++ b/src/java/com/samskivert/jdbc/depot/KeySet.java @@ -33,17 +33,17 @@ import com.samskivert.jdbc.depot.operator.Logic; * Contains a set of primary keys that match a set of persistent records. This is used internally * in Depot when decomposing queries into two parts: first a query for the primary keys that * identify the records that match a free-form query and then another query that operates on the - * previously identified keys. The keys obtained in the first query are used to create a - * PrimaryKeySet and modifications and deletons using this set will automatically flush the - * appropriate records from the cache. + * previously identified keys. The keys obtained in the first query are used to create a KeySet and + * modifications and deletons using this set will automatically flush the appropriate records from + * the cache. */ -public class PrimaryKeySet extends WhereClause +public class KeySet extends WhereClause implements SQLExpression, ValidatingCacheInvalidator { /** * Creates a set from the supplied primary keys. */ - public PrimaryKeySet (Class pClass, Set> keys) + public KeySet (Class pClass, Set> keys) { _pClass = pClass; _keys = keys; @@ -132,7 +132,7 @@ public class PrimaryKeySet extends WhereClause if (obj == null || getClass() != obj.getClass()) { return false; } - return _condition.equals(((PrimaryKeySet) obj)._condition); + return _condition.equals(((KeySet) obj)._condition); } @Override diff --git a/src/java/com/samskivert/jdbc/depot/KeyUtil.java b/src/java/com/samskivert/jdbc/depot/KeyUtil.java index 69aea6e..61b0ac1 100644 --- a/src/java/com/samskivert/jdbc/depot/KeyUtil.java +++ b/src/java/com/samskivert/jdbc/depot/KeyUtil.java @@ -29,7 +29,7 @@ import java.util.Map; import com.samskivert.jdbc.depot.annotation.Id; /** - * Simple utility methods used by {@link Key} and {@link PrimaryKeySet}. + * Simple utility methods used by {@link Key} and {@link KeySet}. */ public class KeyUtil {