1 package org.apache.ojb.otm.states; 2 3 17 18 22 public class PersistentNew extends State 23 { 24 25 PersistentNew() 26 { 27 } 28 29 32 public String toString() 33 { 34 return "Persistent-new"; 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_NEW_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.TRANSIENT; 82 } 83 84 85 87 90 public boolean needsInsert() 91 { 92 return true; 93 } 94 95 } 96 | Popular Tags |