1 package org.apache.ojb.otm.states; 2 3 17 18 22 public class PersistentDirty extends State 23 { 24 25 PersistentDirty() 26 { 27 } 28 29 32 public String toString() 33 { 34 return "Persistent-dirty"; 35 } 36 37 39 42 public State markDirty() 43 throws IllegalObjectStateException 44 { 45 return this; 46 } 47 48 51 public State makePersistent() 52 throws IllegalObjectStateException 53 { 54 return this; 55 } 56 57 60 public State deletePersistent() 61 throws IllegalObjectStateException 62 { 63 return State.PERSISTENT_DELETED; 64 } 65 66 69 public State commit() 70 throws IllegalObjectStateException 71 { 72 return State.HOLLOW; 73 } 74 75 78 public State rollback() 79 throws IllegalObjectStateException 80 { 81 return State.HOLLOW; 82 } 83 84 public State refresh() 85 throws IllegalObjectStateException 86 { 87 return State.PERSISTENT_CLEAN; 88 } 89 90 92 95 public boolean needsUpdate() 96 { 97 return true; 98 } 99 100 } 101 | Popular Tags |