| java.lang.Object com.uwyn.rife.database.DbQueryManager com.uwyn.rife.resources.DatabaseResources
All known Subclasses: com.uwyn.rife.resources.databasedrivers.generic,
DatabaseResources | abstract public class DatabaseResources extends DbQueryManager implements ResourceFinder,ResourceWriter(Code) | | This class offers ResourceFinder and ResourceWriter
capabilities for resources that are stored in a database. The relevant database
is specified through a Datasource/code> instance at construction.
While the table can be configured through the TABLE_RESOURCES
configuration setting, the structure of the table is fixed. It can be
installed with the install() method and removed with the
remove() method. The latter will implicitely erase all the
resources that have been stored in the database table.
author: Geert Bevin (gbevin[remove] at uwyn dot com) version: $Revision: 3634 $ See Also: com.uwyn.rife.resources.ResourceFinder since: 1.0 |
Method Summary | |
protected void | _addResource(Insert addResource, String name, String content) | protected String | _getContent(Select getResourceContent, URL resource, String encoding) | protected long | _getModificationTime(Select getResourceModified, URL resource) | protected URL | _getResource(Select hasResource, String name) | protected boolean | _install(CreateTable createTable) | protected boolean | _remove(DropTable dropTable) | protected boolean | _removeResource(Delete removeResource, String name) | protected boolean | _updateResource(Update updateResource, String name, String content) | protected ResultType | _useStream(Select getResourceContent, URL resource, InputStreamUser user) | public String | getContent(String name) | public String | getContent(String name, String encoding) | public String | getContent(URL resource) | public long | getModificationTime(String name) | abstract public boolean | install() Installs the database structure that's needed to store and retrieve
resources in and from a database. | abstract public boolean | remove() Removes the database structure that's needed to store and retrieve
resources in and from a database. | public ResultType | useStream(String name, InputStreamUser user) |
COLUMN_CONTENT | final protected static String COLUMN_CONTENT(Code) | | |
COLUMN_MODIFIED | final protected static String COLUMN_MODIFIED(Code) | | |
DatabaseResources | protected DatabaseResources(Datasource datasource)(Code) | | Creates a new instance according to the provided datasource.
Parameters: datasource - the Datasource instance that defines thedatabase that will be used as resources storage. since: 1.0 |
_getModificationTime | protected long _getModificationTime(Select getResourceModified, URL resource)(Code) | | |
Methods inherited from com.uwyn.rife.database.DbQueryManager | public Object clone()(Code)(Java Doc) public boolean executeFetchAll(ReadQuery query, DbRowProcessor rowProcessor) throws DatabaseException(Code)(Java Doc) public boolean executeFetchAll(ReadQuery query, DbRowProcessor rowProcessor, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public List<BeanType> executeFetchAllBeans(ReadQuery query, Class<BeanType> beanClass) throws DatabaseException(Code)(Java Doc) public List<BeanType> executeFetchAllBeans(ReadQuery query, Class<BeanType> beanClass, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public boolean executeFetchFirst(ReadQuery query, DbRowProcessor rowProcessor) throws DatabaseException(Code)(Java Doc) public boolean executeFetchFirst(ReadQuery query, DbRowProcessor rowProcessor, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public BeanType executeFetchFirstBean(ReadQuery query, Class<BeanType> beanClass) throws DatabaseException(Code)(Java Doc) public BeanType executeFetchFirstBean(ReadQuery query, Class<BeanType> beanClass, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public boolean executeGetFirstBoolean(ReadQuery query) throws DatabaseException(Code)(Java Doc) public boolean executeGetFirstBoolean(ReadQuery query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public byte executeGetFirstByte(ReadQuery query) throws DatabaseException(Code)(Java Doc) public byte executeGetFirstByte(ReadQuery query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public byte[] executeGetFirstBytes(ReadQuery query) throws DatabaseException(Code)(Java Doc) public byte[] executeGetFirstBytes(ReadQuery query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public java.sql.Date executeGetFirstDate(ReadQuery query) throws DatabaseException(Code)(Java Doc) public java.sql.Date executeGetFirstDate(ReadQuery query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public java.sql.Date executeGetFirstDate(ReadQuery query, Calendar cal) throws DatabaseException(Code)(Java Doc) public java.sql.Date executeGetFirstDate(ReadQuery query, Calendar cal, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public double executeGetFirstDouble(ReadQuery query) throws DatabaseException(Code)(Java Doc) public double executeGetFirstDouble(ReadQuery query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public float executeGetFirstFloat(ReadQuery query) throws DatabaseException(Code)(Java Doc) public float executeGetFirstFloat(ReadQuery query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public int executeGetFirstInt(ReadQuery query) throws DatabaseException(Code)(Java Doc) public int executeGetFirstInt(ReadQuery query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public long executeGetFirstLong(ReadQuery query) throws DatabaseException(Code)(Java Doc) public long executeGetFirstLong(ReadQuery query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public short executeGetFirstShort(ReadQuery query) throws DatabaseException(Code)(Java Doc) public short executeGetFirstShort(ReadQuery query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public String executeGetFirstString(ReadQuery query) throws DatabaseException(Code)(Java Doc) public String executeGetFirstString(ReadQuery query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public java.sql.Time executeGetFirstTime(ReadQuery query) throws DatabaseException(Code)(Java Doc) public java.sql.Time executeGetFirstTime(ReadQuery query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public java.sql.Time executeGetFirstTime(ReadQuery query, Calendar cal) throws DatabaseException(Code)(Java Doc) public java.sql.Time executeGetFirstTime(ReadQuery query, Calendar cal, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public java.sql.Timestamp executeGetFirstTimestamp(ReadQuery query) throws DatabaseException(Code)(Java Doc) public java.sql.Timestamp executeGetFirstTimestamp(ReadQuery query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public java.sql.Timestamp executeGetFirstTimestamp(ReadQuery query, Calendar cal) throws DatabaseException(Code)(Java Doc) public java.sql.Timestamp executeGetFirstTimestamp(ReadQuery query, Calendar cal, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public boolean executeHasResultRows(ReadQuery query) throws DatabaseException(Code)(Java Doc) public boolean executeHasResultRows(ReadQuery query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public ResultType executeQuery(ReadQuery query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public ResultType executeQuery(ReadQuery query, DbResultSetHandler handler) throws DatabaseException(Code)(Java Doc) public DbStatement executeQuery(ReadQuery query) throws DatabaseException(Code)(Java Doc) public int executeUpdate(String sql) throws DatabaseException(Code)(Java Doc) public int executeUpdate(Query query) throws DatabaseException(Code)(Java Doc) public int executeUpdate(Query query, DbPreparedStatementHandler handler) throws DatabaseException(Code)(Java Doc) public ResultType executeUseFirstAsciiStream(ReadQuery query, InputStreamUser user) throws DatabaseException, InnerClassException(Code)(Java Doc) public ResultType executeUseFirstAsciiStream(ReadQuery query, InputStreamUser user, DbPreparedStatementHandler handler) throws DatabaseException, InnerClassException(Code)(Java Doc) public ResultType executeUseFirstBinaryStream(ReadQuery query, InputStreamUser user) throws DatabaseException, InnerClassException(Code)(Java Doc) public ResultType executeUseFirstBinaryStream(ReadQuery query, InputStreamUser user, DbPreparedStatementHandler handler) throws DatabaseException, InnerClassException(Code)(Java Doc) public ResultType executeUseFirstCharacterStream(ReadQuery query, ReaderUser user) throws DatabaseException, InnerClassException(Code)(Java Doc) public ResultType executeUseFirstCharacterStream(ReadQuery query, ReaderUser user, DbPreparedStatementHandler handler) throws DatabaseException, InnerClassException(Code)(Java Doc) public boolean fetch(ResultSet resultSet) throws DatabaseException(Code)(Java Doc) public boolean fetch(ResultSet resultSet, DbRowProcessor rowProcessor) throws DatabaseException(Code)(Java Doc) public boolean fetchAll(ResultSet resultSet, DbRowProcessor rowProcessor) throws DatabaseException(Code)(Java Doc) public DbConnection getConnection() throws DatabaseException(Code)(Java Doc) public Datasource getDatasource()(Code)(Java Doc) public ResultType inTransaction(DbTransactionUser user) throws InnerClassException, DatabaseException(Code)(Java Doc) public ResultType reserveConnection(DbConnectionUser user) throws InnerClassException, DatabaseException(Code)(Java Doc)
|
|
|