
jodd.db.DbSessionProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jodd-db Show documentation
Show all versions of jodd-db Show documentation
Jodd DB is efficient and thin database facade; DbOom is convenient database object mapper.
// Copyright (c) 2003-2012, Jodd Team (jodd.org). All Rights Reserved.
package jodd.db;
/**
* Provide {@link DbSession} when requested by {@link DbQuery}.
* Important: DbSessionProvider
implementations
* should NOT create new db sessions! DbSession
should
* be already created and somehow assigned to DbSessionProvider
* implementation. User must control session opening and closing,
* and not DbSessionProvider
, as we can not figure
* weather connection should be closed after closing a query;
* or still hold on open for the next query.
*/
public interface DbSessionProvider {
/**
* Returns {@link DbSession}. May throws an exception
* if session can not be provided.
*/
DbSession getDbSession();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy