From 68394127582f8667afbadaf46176b8be2b96ef1d Mon Sep 17 00:00:00 2001 From: mdb Date: Sat, 11 May 2002 20:29:27 +0000 Subject: [PATCH] Added method to determine if any field has been modified. git-svn-id: https://samskivert.googlecode.com/svn/trunk@734 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../java/com/samskivert/jdbc/jora/FieldMask.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/projects/samskivert/src/java/com/samskivert/jdbc/jora/FieldMask.java b/projects/samskivert/src/java/com/samskivert/jdbc/jora/FieldMask.java index be9b469f..10052894 100644 --- a/projects/samskivert/src/java/com/samskivert/jdbc/jora/FieldMask.java +++ b/projects/samskivert/src/java/com/samskivert/jdbc/jora/FieldMask.java @@ -1,5 +1,5 @@ // -// $Id: FieldMask.java,v 1.1 2002/03/15 01:06:03 mdb Exp $ +// $Id: FieldMask.java,v 1.2 2002/05/11 20:29:27 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -59,6 +59,20 @@ public class FieldMask _modified = new boolean[dcount]; } + /** + * Returns true if any of the fields in this mask are modified. + */ + public final boolean isModified () + { + int mcount = _modified.length; + for (int ii = 0; ii < mcount; ii++) { + if (_modified[ii]) { + return true; + } + } + return false; + } + /** * Returns true if the field with the specified index is modified. */