1 19 20 package org.apache.cayenne; 21 22 import java.io.Serializable ; 23 import java.util.Collection ; 24 import java.util.List ; 25 26 import org.apache.cayenne.graph.GraphManager; 27 import org.apache.cayenne.map.EntityResolver; 28 import org.apache.cayenne.query.Query; 29 30 37 public interface ObjectContext extends Serializable { 38 39 43 EntityResolver getEntityResolver(); 44 45 49 Collection newObjects(); 50 51 55 Collection deletedObjects(); 56 57 61 Collection modifiedObjects(); 62 63 66 Collection uncommittedObjects(); 67 68 78 Persistent localObject(ObjectId id, Object prototype); 79 80 84 Persistent newObject(Class persistentClass); 85 86 94 void registerNewObject(Object object); 95 96 102 void deleteObject(Object object) throws DeleteDenyException; 103 104 112 void prepareForAccess(Persistent object, String property, boolean lazyFaulting); 113 114 117 void prepareForAccess(Persistent object, String property); 118 119 124 void propertyChanged( 125 Persistent object, 126 String property, 127 Object oldValue, 128 Object newValue); 129 130 135 void commitChanges(); 136 137 141 void commitChangesToParent(); 142 143 147 void rollbackChanges(); 148 149 154 void rollbackChangesLocally(); 155 156 159 List performQuery(Query query); 160 161 164 QueryResponse performGenericQuery(Query query); 165 166 169 GraphManager getGraphManager(); 170 171 174 DataChannel getChannel(); 175 } 176 | Popular Tags |