org.codehaus.wadi.impl
Class DatabaseStore

java.lang.Object
  extended byorg.codehaus.wadi.impl.DatabaseStore
All Implemented Interfaces:
Config, DatabaseMotableConfig, Store, StoreMotableConfig

public class DatabaseStore
extends Object
implements Store, DatabaseMotableConfig


Nested Class Summary
 
Nested classes inherited from class org.codehaus.wadi.Store
Store.Putter
 
Field Summary
protected  boolean _build
           
protected  DataSource _dataSource
           
protected  String _label
           
protected  Log _log
           
protected  boolean _reusingStore
           
protected  String _table
           
protected  boolean _useNIO
           
 
Constructor Summary
DatabaseStore(String label, DataSource dataSource, String table, boolean useNIO, boolean reusingStore, boolean build)
           
 
Method Summary
 void clean()
           
 StoreMotable create()
           
 void delete(Connection connection, Motable motable)
           
 void destroy()
           
 Connection getConnection()
           
 DataSource getDataSource()
           
 String getDescription()
           
 String getLabel()
           
 boolean getReusingStore()
           
 String getStartInfo()
           
 String getTable()
           
 boolean getUseNIO()
           
 void init()
           
 void insert(Connection connection, Motable motable, Object body)
           
 void load(Store.Putter putter, boolean accessOnLoad)
           
 Object loadBody(Connection connection, Motable motable)
           
 void loadHeader(Connection connection, Motable motable)
           
 void update(Connection connection, Motable motable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log

protected final Log _log

_label

protected final String _label

_dataSource

protected final DataSource _dataSource

_table

protected final String _table

_useNIO

protected final boolean _useNIO

_reusingStore

protected final boolean _reusingStore

_build

protected final boolean _build
Constructor Detail

DatabaseStore

public DatabaseStore(String label,
                     DataSource dataSource,
                     String table,
                     boolean useNIO,
                     boolean reusingStore,
                     boolean build)
Method Detail

getLabel

public String getLabel()
Specified by:
getLabel in interface DatabaseMotableConfig

getDataSource

public DataSource getDataSource()
Specified by:
getDataSource in interface DatabaseMotableConfig

getConnection

public Connection getConnection()
                         throws SQLException
Throws:
SQLException

getTable

public String getTable()
Specified by:
getTable in interface DatabaseMotableConfig

getReusingStore

public boolean getReusingStore()
Specified by:
getReusingStore in interface DatabaseMotableConfig

init

public void init()
          throws SQLException
Throws:
SQLException

destroy

public void destroy()
             throws SQLException
Throws:
SQLException

clean

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

load

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

loadHeader

public void loadHeader(Connection connection,
                       Motable motable)
Specified by:
loadHeader in interface DatabaseMotableConfig

loadBody

public Object loadBody(Connection connection,
                       Motable motable)
                throws Exception
Specified by:
loadBody in interface DatabaseMotableConfig
Throws:
Exception

update

public void update(Connection connection,
                   Motable motable)
            throws Exception
Specified by:
update in interface DatabaseMotableConfig
Throws:
Exception

insert

public void insert(Connection connection,
                   Motable motable,
                   Object body)
            throws Exception
Specified by:
insert in interface DatabaseMotableConfig
Throws:
Exception

delete

public void delete(Connection connection,
                   Motable motable)
Specified by:
delete in interface DatabaseMotableConfig

getStartInfo

public String getStartInfo()
Specified by:
getStartInfo in interface Store

getDescription

public String getDescription()
Specified by:
getDescription in interface Store

create

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

getUseNIO

public boolean getUseNIO()
Specified by:
getUseNIO in interface StoreMotableConfig


Copyright © 2004-2008 Core Developers Network Ltd.. All Rights Reserved.