From f33a376f7e746ebef716fdbcbfe10c670ca1b39c Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 23 Sep 2008 17:17:05 +0000 Subject: [PATCH] Formatting tweaks. --- src/java/com/samskivert/jdbc/depot/DepotRepository.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/java/com/samskivert/jdbc/depot/DepotRepository.java b/src/java/com/samskivert/jdbc/depot/DepotRepository.java index 95b9eb9..45b73b1 100644 --- a/src/java/com/samskivert/jdbc/depot/DepotRepository.java +++ b/src/java/com/samskivert/jdbc/depot/DepotRepository.java @@ -388,21 +388,16 @@ public abstract class DepotRepository protected int update (T record, final String... modifiedFields) throws DatabaseException { - @SuppressWarnings("unchecked") - Class pClass = (Class) record.getClass(); - + @SuppressWarnings("unchecked") Class pClass = (Class) record.getClass(); requireNotComputed(pClass, "updatePartial"); DepotMarshaller marsh = _ctx.getMarshaller(pClass); - Key key = marsh.getPrimaryKey(record); - if (key == null) { throw new IllegalArgumentException("Can't update record with null primary key."); } UpdateClause update = new UpdateClause(pClass, key, modifiedFields, record); - final SQLBuilder builder = _ctx.getSQLBuilder(DepotTypes.getDepotTypes(_ctx, update)); builder.newQuery(update);