Interface SQLInterceptorFactory
- All Known Implementing Classes:
NoopSQLInterceptorFactory
public interface SQLInterceptorFactory
SQLInterceptorFactory is responsible for generating SQLInterceptors when asked.
An instance of this class will be loaded from THE class path resource called "ofbiz-database.properties" and must have public no-arges constructor.
The factory is responsible for giving out SQLInterceptors. Its these objects that are used as call backs for
each SQL statement that is executed. An SQLInterceptor is asked for for every new SQL statement. So its up to the
factory to decide whether to allocate a new one, re-use them or make them stateless. But remember that new gen
allocation is blindingly fast, so the suggestion is to allocate a new one every time.
-
Method Summary
Modifier and TypeMethodDescriptionnewSQLInterceptor(String ofbizHelperName) This is called to generate a newSQLInterceptorready to be called back when SQL statements are executed.
-
Method Details
-
newSQLInterceptor
This is called to generate a newSQLInterceptorready to be called back when SQL statements are executed.- Parameters:
ofbizHelperName- the name of the OFBIZ entity helper eg a namedGenericHelper- Returns:
- an SQLInterceptor to use. If null is returned, then no interception is possible.
-