From c8e5a3b413b44598837265bd3c612ab4d3241c41 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 27 May 2009 17:35:04 +0000 Subject: [PATCH] Covariance here makes it easier to use ImmutableMap. --- src/java/com/samskivert/depot/DepotRepository.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/java/com/samskivert/depot/DepotRepository.java b/src/java/com/samskivert/depot/DepotRepository.java index 266f22b..82a96e5 100644 --- a/src/java/com/samskivert/depot/DepotRepository.java +++ b/src/java/com/samskivert/depot/DepotRepository.java @@ -739,7 +739,8 @@ public abstract class DepotRepository * @throws DatabaseException if any problem is encountered communicating with the database. */ protected int updateLiteral ( - Class type, Comparable primaryKey, Map fieldsValues) + Class type, Comparable primaryKey, + Map fieldsValues) throws DatabaseException { Key key = _ctx.getMarshaller(type).makePrimaryKey(primaryKey); @@ -767,7 +768,7 @@ public abstract class DepotRepository */ protected int updateLiteral ( Class type, ColumnExp ix1, Comparable val1, ColumnExp ix2, Comparable val2, - Map fieldsValues) + Map fieldsValues) throws DatabaseException { Key key = new Key(type, ix1, val1, ix2, val2); @@ -796,7 +797,7 @@ public abstract class DepotRepository */ protected int updateLiteral ( Class type, ColumnExp ix1, Comparable val1, ColumnExp ix2, Comparable val2, - ColumnExp ix3, Comparable val3, Map fieldsValues) + ColumnExp ix3, Comparable val3, Map fieldsValues) throws DatabaseException { Key key = new Key(type, ix1, val1, ix2, val2, ix3, val3); @@ -826,7 +827,7 @@ public abstract class DepotRepository */ protected int updateLiteral ( Class type, final WhereClause key, CacheInvalidator invalidator, - Map fieldsValues) + Map fieldsValues) throws DatabaseException { requireNotComputed(type, "updateLiteral"); @@ -840,7 +841,7 @@ public abstract class DepotRepository final String[] fields = new String[fieldsValues.size()]; final SQLExpression[] values = new SQLExpression[fields.length]; int ii = 0; - for (Map.Entry entry : fieldsValues.entrySet()) { + for (Map.Entry entry : fieldsValues.entrySet()) { fields[ii] = entry.getKey().name; values[ii] = entry.getValue(); ii ++;