| java.lang.Object org.springframework.dao.support.DaoSupport org.springframework.orm.toplink.support.TopLinkDaoSupport
Method Summary | |
final protected void | checkDaoConfig() | final protected DataAccessException | convertTopLinkAccessException(TopLinkException ex) Convert the given TopLinkException to an appropriate exception from the
org.springframework.dao hierarchy. | protected TopLinkTemplate | createTopLinkTemplate(SessionFactory sessionFactory) Create a TopLinkTemplate for the given SessionFactory. | final protected Session | getSession() Get a TopLink Session, either from the current transaction or a new one.
The latter is only allowed if the "allowCreate" setting of this bean's
TopLinkTemplate is true.
Note that this is not meant to be invoked from TopLinkTemplate code
but rather just in plain TopLink code. Either rely on a thread-bound
Session (via TopLinkInterceptor), or use it in combination with
releaseSession .
In general, it is recommended to use TopLinkTemplate, either with
the provided convenience operations or with a custom TopLinkCallback
that provides you with a Session to work on. | final protected Session | getSession(boolean allowCreate) Get a TopLink Session, either from the current transaction or a new one.
The latter is only allowed if "allowCreate" is true.
Note that this is not meant to be invoked from TopLinkTemplate code
but rather just in plain TopLink code. Either rely on a thread-bound
Session (via TopLinkInterceptor), or use it in combination with
releaseSession .
In general, it is recommended to use TopLinkTemplate, either with
the provided convenience operations or with a custom TopLinkCallback
that provides you with a Session to work on. | final public SessionFactory | getSessionFactory() Return the TopLink SessionFactory used by this DAO. | final public TopLinkTemplate | getTopLinkTemplate() Return the TopLinkTemplate for this DAO,
pre-initialized with the SessionFactory or set explicitly. | final protected void | releaseSession(Session session) Close the given TopLink Session, created via this DAO's SessionFactory,
if it isn't bound to the thread. | final public void | setSessionFactory(SessionFactory sessionFactory) Set the TopLink SessionFactory to be used by this DAO. | final public void | setTopLinkTemplate(TopLinkTemplate topLinkTemplate) Set the TopLinkTemplate for this DAO explicitly,
as an alternative to specifying a SessionFactory. |
checkDaoConfig | final protected void checkDaoConfig()(Code) | | |
createTopLinkTemplate | protected TopLinkTemplate createTopLinkTemplate(SessionFactory sessionFactory)(Code) | | Create a TopLinkTemplate for the given SessionFactory.
Only invoked if populating the DAO with a SessionFactory reference!
Can be overridden in subclasses to provide a TopLinkTemplate instance
with different configuration, or a custom TopLinkTemplate subclass.
Parameters: sessionFactory - the TopLink SessionFactory to create a TopLinkTemplate for the new TopLinkTemplate instance See Also: TopLinkDaoSupport.setSessionFactory |
getSessionFactory | final public SessionFactory getSessionFactory()(Code) | | Return the TopLink SessionFactory used by this DAO.
|
getTopLinkTemplate | final public TopLinkTemplate getTopLinkTemplate()(Code) | | Return the TopLinkTemplate for this DAO,
pre-initialized with the SessionFactory or set explicitly.
|
Fields inherited from org.springframework.dao.support.DaoSupport | final protected Log logger(Code)(Java Doc)
|
|
|