1 56 package org.objectstyle.cayenne; 57 58 69 public class PersistenceState { 70 71 75 public static String persistenceStateName(int persistenceState) { 76 switch (persistenceState) { 77 case PersistenceState.TRANSIENT : 78 return "transient"; 79 case PersistenceState.NEW : 80 return "new"; 81 case PersistenceState.MODIFIED : 82 return "modified"; 83 case PersistenceState.COMMITTED : 84 return "committed"; 85 case PersistenceState.HOLLOW : 86 return "hollow"; 87 case PersistenceState.DELETED : 88 return "deleted"; 89 default : 90 return "unknown"; 91 } 92 } 93 94 97 public static final int TRANSIENT = 1; 98 99 102 public static final int NEW = 2; 103 104 108 public static final int COMMITTED = 3; 109 110 111 115 public static final int MODIFIED = 4; 116 117 123 public static final int HOLLOW = 5; 124 125 127 public static final int DELETED = 6; 128 } 129 130 | Popular Tags |