1 19 20 package org.apache.cayenne; 21 22 35 public class PersistenceState { 36 37 40 public static String persistenceStateName(int persistenceState) { 41 switch (persistenceState) { 42 case PersistenceState.TRANSIENT: 43 return "transient"; 44 case PersistenceState.NEW: 45 return "new"; 46 case PersistenceState.MODIFIED: 47 return "modified"; 48 case PersistenceState.COMMITTED: 49 return "committed"; 50 case PersistenceState.HOLLOW: 51 return "hollow"; 52 case PersistenceState.DELETED: 53 return "deleted"; 54 default: 55 return "unknown"; 56 } 57 } 58 59 63 public static final int TRANSIENT = 1; 64 65 70 public static final int NEW = 2; 71 72 77 public static final int COMMITTED = 3; 78 79 84 public static final int MODIFIED = 4; 85 86 92 public static final int HOLLOW = 5; 93 94 98 public static final int DELETED = 6; 99 } 100 | Popular Tags |