Formatting tweaks.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2441 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2008-09-23 17:17:05 +00:00
parent 52fa489fe5
commit 3fba685ca7
@@ -388,21 +388,16 @@ public abstract class DepotRepository
protected <T extends PersistentRecord> int update (T record, final String... modifiedFields)
throws DatabaseException
{
@SuppressWarnings("unchecked")
Class<T> pClass = (Class<T>) record.getClass();
@SuppressWarnings("unchecked") Class<T> pClass = (Class<T>) record.getClass();
requireNotComputed(pClass, "updatePartial");
DepotMarshaller<T> marsh = _ctx.getMarshaller(pClass);
Key<T> key = marsh.getPrimaryKey(record);
if (key == null) {
throw new IllegalArgumentException("Can't update record with null primary key.");
}
UpdateClause<T> update = new UpdateClause<T>(pClass, key, modifiedFields, record);
final SQLBuilder builder = _ctx.getSQLBuilder(DepotTypes.getDepotTypes(_ctx, update));
builder.newQuery(update);