Let the caller know if we refused to update for lack of change.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@736 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: UserRepository.java,v 1.22 2002/05/11 20:31:59 mdb Exp $
|
// $Id: UserRepository.java,v 1.23 2002/05/11 20:32:46 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -269,13 +269,16 @@ public class UserRepository extends JORARepository
|
|||||||
* Only fields that have been modified since it was loaded will be
|
* Only fields that have been modified since it was loaded will be
|
||||||
* written to the database and those fields will subsequently be
|
* written to the database and those fields will subsequently be
|
||||||
* marked clean once again.
|
* marked clean once again.
|
||||||
|
*
|
||||||
|
* @return true if the record was updated, false if the update was
|
||||||
|
* skipped because no fields in the user record were modified.
|
||||||
*/
|
*/
|
||||||
public void updateUser (final User user)
|
public boolean updateUser (final User user)
|
||||||
throws PersistenceException
|
throws PersistenceException
|
||||||
{
|
{
|
||||||
if (!user.getDirtyMask().isModified()) {
|
if (!user.getDirtyMask().isModified()) {
|
||||||
// nothing doing!
|
// nothing doing!
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
execute(new Operation () {
|
execute(new Operation () {
|
||||||
@@ -287,6 +290,8 @@ public class UserRepository extends JORARepository
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user