home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Visual Cafe Pro v1.0 / SOURCE.BIN / RowState.java < prev    next >
Encoding:
Java Source  |  1997-06-19  |  929 b   |  36 lines

  1. /*
  2.  * RowState.java   1.0   12 Jan 1997
  3.  *
  4.  * Copyright (c) 1996 Krumel & Associates, Inc.  All Rights Reserved.
  5.  *
  6.  * This software is provided as is.  Krumel & Associates shall not be liable
  7.  * for any damages suffered by licensee as a result of using, modifying or
  8.  * distributing this software or its derivatives.
  9.  */
  10.  
  11. package symantec.itools.db.awt;
  12.  
  13. public class RowState {
  14.     int         state;
  15.  
  16.     public final static int CLEAN = 0;
  17.     public final static int NEW = 1;
  18.     public final static int MODIFIED = 2;
  19.     public final static int DELETED = 3;
  20.  
  21.     public int getState() { return state; }
  22.  
  23.     public void markClean() { state = CLEAN; }
  24.  
  25.     public void markNew() { state = NEW; }
  26.  
  27.     public void markModified() {
  28.         if (state != NEW || state != DELETED)  {
  29.             state = MODIFIED;
  30.         }
  31.     }
  32.  
  33.     public void markDeleted() {
  34.         state = DELETED;
  35.     }
  36. }