1 package org.apache.ojb.otm.states; 2 3 17 18 22 public class PersistentDeleted extends State 23 { 24 25 PersistentDeleted() 26 { 27 } 28 29 32 public String toString() 33 { 34 return "Persistent-deleted"; 35 } 36 37 39 42 public State makePersistent() 43 throws IllegalObjectStateException 44 { 45 return State.PERSISTENT_DIRTY; 46 } 47 48 51 public State deletePersistent() 52 throws IllegalObjectStateException 53 { 54 return this; 55 } 56 57 60 public State commit() 61 throws IllegalObjectStateException 62 { 63 return State.TRANSIENT; 64 } 65 66 69 public State rollback() 70 throws IllegalObjectStateException 71 { 72 return State.HOLLOW; 73 } 74 75 76 78 82 public boolean needsDelete() 83 { 84 return true; 85 } 86 87 public boolean isDeleted() 88 { 89 return true; 90 } 91 } 92 | Popular Tags |