1 19 package org.apache.cayenne.intercept; 20 21 import org.apache.cayenne.DataChannel; 22 import org.apache.cayenne.ObjectContext; 23 import org.apache.cayenne.QueryResponse; 24 import org.apache.cayenne.event.EventManager; 25 import org.apache.cayenne.graph.GraphDiff; 26 import org.apache.cayenne.map.EntityResolver; 27 import org.apache.cayenne.query.Query; 28 29 36 public class DataChannelDecorator implements DataChannel { 37 38 protected DataChannel channel; 39 40 protected DataChannelDecorator() { 41 42 } 43 44 public DataChannelDecorator(DataChannel channel) { 45 setChannel(channel); 46 } 47 48 public EntityResolver getEntityResolver() { 49 return channel.getEntityResolver(); 50 } 51 52 public EventManager getEventManager() { 53 return channel.getEventManager(); 54 } 55 56 public QueryResponse onQuery(ObjectContext originatingContext, Query query) { 57 return channel.onQuery(originatingContext, query); 58 } 59 60 public GraphDiff onSync( 61 ObjectContext originatingContext, 62 GraphDiff changes, 63 int syncType) { 64 return channel.onSync(originatingContext, changes, syncType); 65 } 66 67 public DataChannel getChannel() { 68 return channel; 69 } 70 71 public void setChannel(DataChannel channel) { 72 this.channel = channel; 74 } 75 } 76 | Popular Tags |