1 19 20 package org.apache.cayenne; 21 22 import org.apache.cayenne.event.EventManager; 23 import org.apache.cayenne.event.EventSubject; 24 import org.apache.cayenne.graph.GraphDiff; 25 import org.apache.cayenne.map.EntityResolver; 26 import org.apache.cayenne.query.Query; 27 28 35 public interface DataChannel { 36 37 42 public static final int FLUSH_NOCASCADE_SYNC = 1; 43 44 50 public static final int FLUSH_CASCADE_SYNC = 2; 51 52 56 public static final int ROLLBACK_CASCADE_SYNC = 3; 57 58 public static final EventSubject GRAPH_CHANGED_SUBJECT = EventSubject.getSubject( 59 DataChannel.class, 60 "graphChanged"); 61 62 public static final EventSubject GRAPH_FLUSHED_SUBJECT = EventSubject.getSubject( 63 DataChannel.class, 64 "graphFlushed"); 65 66 public static final EventSubject GRAPH_ROLLEDBACK_SUBJECT = EventSubject.getSubject( 67 DataChannel.class, 68 "graphRolledback"); 69 70 74 EventManager getEventManager(); 75 76 79 EntityResolver getEntityResolver(); 80 81 89 QueryResponse onQuery(ObjectContext originatingContext, Query query); 90 91 100 GraphDiff onSync(ObjectContext originatingContext, GraphDiff changes, int syncType); 101 } 102 | Popular Tags |