[#2382] Let DAO reference a Configuration instead of an Executor
This commit is contained in:
parent
906df54303
commit
6d7eff66ce
@ -53,6 +53,14 @@ import org.jooq.exception.DataAccessException;
|
||||
*/
|
||||
public interface DAO<R extends TableRecord<R>, P, T> {
|
||||
|
||||
/**
|
||||
* Expose the configuration in whose context this <code>DAO</code> is
|
||||
* operating.
|
||||
*
|
||||
* @return the <code>DAO</code>'s underlying <code>Configuration</code>
|
||||
*/
|
||||
Configuration configuration();
|
||||
|
||||
/**
|
||||
* Performs an <code>INSERT</code> statement for a given POJO
|
||||
*
|
||||
|
||||
@ -80,12 +80,20 @@ public abstract class DAOImpl<R extends UpdatableRecord<R>, P, T> implements DAO
|
||||
}
|
||||
|
||||
/**
|
||||
* Inject an attached factory
|
||||
* Inject a configuration.
|
||||
* <p>
|
||||
* This method is maintained to be able to configure a <code>DAO</code>
|
||||
* using Spring. It is not exposed in the public API.
|
||||
*/
|
||||
public final void setConfiguration(Configuration configuration) {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Configuration configuration() {
|
||||
return configuration;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: DAO API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user