org.codehaus.wadi.core.store
Class DatabaseStore

java.lang.Object
  extended by org.codehaus.wadi.core.store.DatabaseStore
All Implemented Interfaces:
Store

public class DatabaseStore
extends java.lang.Object
implements Store

Version:
$Revision: 2440 $
Author:
Jules Gosnell

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.codehaus.wadi.core.store.Store
Store.Putter
 
Field Summary
static java.lang.String DEFAULT_BLOB_TYPE_NAME
           
static java.lang.String PGSQL_LOB_TYPE_NAME
           
 
Constructor Summary
DatabaseStore(javax.sql.DataSource dataSource, java.lang.String table, boolean build, boolean accessOnLoad)
           
DatabaseStore(javax.sql.DataSource dataSource, java.lang.String table, java.lang.String lobTypeName, boolean build, boolean accessOnLoad)
           
DatabaseStore(javax.sql.DataSource dataSource, java.lang.String createTableDDL, java.lang.String selectAllSQL, java.lang.String selectMotableBodySQL, java.lang.String deleteAllSQL, java.lang.String insertMotableSQL, java.lang.String updateMotableSQL, java.lang.String deleteMotableSQL, boolean build, boolean accessOnLoad)
           
 
Method Summary
 void clean()
           
protected  void clean(java.sql.Connection conn)
           
protected  void closeConnection(java.sql.Connection c)
           
protected  void closeResultSet(java.sql.ResultSet rs)
           
protected  void closeStatement(java.sql.Statement s)
           
 Motable create()
           
 void delete(Motable motable)
           
protected  void delete(Motable motable, java.sql.Connection conn)
           
protected  java.sql.Connection getConnection()
           
protected  void init()
           
 void insert(Motable motable)
           
 void load(Store.Putter putter)
           
protected  void load(Store.Putter putter, java.sql.Connection conn)
           
protected  Motable load(Store.Putter putter, long time, java.sql.ResultSet rs, java.sql.Connection conn)
           
 byte[] loadBody(Motable motable)
           
protected  byte[] loadBody(java.sql.ResultSet rs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BLOB_TYPE_NAME

public static final java.lang.String DEFAULT_BLOB_TYPE_NAME
See Also:
Constant Field Values

PGSQL_LOB_TYPE_NAME

public static final java.lang.String PGSQL_LOB_TYPE_NAME
See Also:
Constant Field Values
Constructor Detail

DatabaseStore

public DatabaseStore(javax.sql.DataSource dataSource,
                     java.lang.String table,
                     boolean build,
                     boolean accessOnLoad)

DatabaseStore

public DatabaseStore(javax.sql.DataSource dataSource,
                     java.lang.String table,
                     java.lang.String lobTypeName,
                     boolean build,
                     boolean accessOnLoad)

DatabaseStore

public DatabaseStore(javax.sql.DataSource dataSource,
                     java.lang.String createTableDDL,
                     java.lang.String selectAllSQL,
                     java.lang.String selectMotableBodySQL,
                     java.lang.String deleteAllSQL,
                     java.lang.String insertMotableSQL,
                     java.lang.String updateMotableSQL,
                     java.lang.String deleteMotableSQL,
                     boolean build,
                     boolean accessOnLoad)
Method Detail

clean

public void clean()
Specified by:
clean in interface Store

load

public void load(Store.Putter putter)
Specified by:
load in interface Store

loadBody

public byte[] loadBody(Motable motable)
                throws java.lang.Exception
Specified by:
loadBody in interface Store
Throws:
java.lang.Exception

insert

public void insert(Motable motable)
            throws java.lang.Exception
Specified by:
insert in interface Store
Throws:
java.lang.Exception

delete

public void delete(Motable motable)
Specified by:
delete in interface Store

create

public Motable create()
Specified by:
create in interface Store

getConnection

protected java.sql.Connection getConnection()
                                     throws java.sql.SQLException
Throws:
java.sql.SQLException

init

protected void init()

loadBody

protected byte[] loadBody(java.sql.ResultSet rs)
                   throws java.sql.SQLException
Throws:
java.sql.SQLException

load

protected void load(Store.Putter putter,
                    java.sql.Connection conn)

load

protected Motable load(Store.Putter putter,
                       long time,
                       java.sql.ResultSet rs,
                       java.sql.Connection conn)

clean

protected void clean(java.sql.Connection conn)

delete

protected void delete(Motable motable,
                      java.sql.Connection conn)

closeResultSet

protected void closeResultSet(java.sql.ResultSet rs)

closeStatement

protected void closeStatement(java.sql.Statement s)

closeConnection

protected void closeConnection(java.sql.Connection c)


Copyright © 2011. All Rights Reserved.