As of version 2.2, MetaModel has introduced an interceptor mechanism which allows you to add code to your DataContext that will be invoked before or after certain operations.
The interceptors are implemented as a decorating, logical DataContext around your physical DataContext. In the graph below the 5 types of interceptors are depicted:

To get a handle for an interceptable DataContext, use the Interceptors.intercept(...) method.
To apply an interceptor, implement one of the five interfaces:
Once you've implemented your interceptor, for instance a QueryInterceptor, add it to an InterceptableDataContext, like this:
public DataContext addMyInterceptor(DataContext dc) {
InterceptableDataContext interceptableDataContext = Interceptors.intercept(dc);
interceptableDataContext.addQueryInterceptor(new MyQueryInterceptor());
return interceptableDataContext;
}
The important part about this code snippet is, that it returns the InterceptableDataContext instance. Since this is itself also an implementation of the DataContext interface, you should be able to use this throughout your code without modifications.