From 3fba685ca7159bb20027bf4edbace26a2562931a Mon Sep 17 00:00:00 2001 From: samskivert Date: Tue, 23 Sep 2008 17:17:05 +0000 Subject: [PATCH] Formatting tweaks. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2441 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- 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 95b9eb9b..45b73b17 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);