View Javadoc
1 /* 2 * Created on 2003-6-27 11:26:29 by joel guo 3 * 4 * vTradEx Information Technology Inc. 5 */ 6 package com.cyclops.dbdigger.model.base.table; 7 import org.apache.commons.lang.ObjectUtils; 8 /*** Add description <font color="red">HERE</font>! 9 * 10 * @author <a href="mailto:joeblack.guo@vtradex.com">joel guo</a> 11 * @since 2003-6-27 11:26:29 12 */ 13 public class BaseTableObject { 14 private boolean isChanged = false; 15 private boolean isNew = true; 16 /*** Method isChanged() 17 * @return boolean value 18 */ 19 public boolean isChanged() { 20 return isChanged; 21 } 22 /*** Method isNew() 23 * @return boolean value 24 */ 25 public boolean isNew() { 26 return isNew; 27 } 28 /*** Method setChanged() 29 * @param b boolean value 30 */ 31 public void setChanged(boolean b) { 32 isChanged = b; 33 } 34 /*** Method setNew() 35 * @param b boolean value 36 */ 37 public void setNew(boolean b) { 38 isNew = b; 39 } 40 /*** Method updateChangedFlag() 41 * @param oldValue Old int value 42 * @param newValue Old new Value 43 */ 44 protected void updateChangedFlag(int oldValue, int newValue) { 45 updateChangedFlag(new Integer(oldValue), new Integer(newValue)); 46 } 47 /*** Method updateChangedFlag() 48 * @param oldValue Old value of a property 49 * @param newValue New value of a property 50 */ 51 protected void updateChangedFlag(Object oldValue, Object newValue) { 52 if (!ObjectUtils.equals(oldValue, newValue)) { 53 setChanged(true); 54 } 55 } 56 }

This page was automatically generated by Maven