org.outerj.xreporter.userentrystore
Class UserEntryStoreImpl

java.lang.Object
  extended byorg.outerj.xreporter.userentrystore.UserEntryStoreImpl
All Implemented Interfaces:
org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.thread.ThreadSafe, UserEntryStore

public class UserEntryStoreImpl
extends java.lang.Object
implements UserEntryStore, org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.activity.Initializable

Default implementation of the UserEntryStore role. This implementation uses a SQL table to store the entries persistently.


Field Summary
protected  java.util.Properties connectionProperties
           
protected  ConnectionProvider connectionProvider
           
protected  ConnectionProviderManager connectionProviderManager
           
protected  java.lang.String dropConditionStatement
           
protected  java.lang.String dropParameterStatement
           
protected static java.lang.String FUNCTION_CONDITION
           
protected static java.lang.String FUNCTION_PARAM
           
protected  java.lang.String insertConditionStatement
           
protected  java.lang.String insertParameterStatement
           
protected  java.lang.String selectConditionStatement
           
protected  java.lang.String selectParameterStatement
           
protected  java.lang.String updateParameterStatement
           
 
Fields inherited from interface org.outerj.xreporter.userentrystore.UserEntryStore
ROLE
 
Constructor Summary
UserEntryStoreImpl()
           
 
Method Summary
 void compose(org.apache.avalon.framework.component.ComponentManager componentManager)
           
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
 StoredCondition getCondition(User user, java.lang.String id, DataType dataType)
           
 java.lang.Object getParameter(User user, java.lang.String id, java.lang.String expectedType)
           
 void initialize()
           
 void removeCondition(User user, java.lang.String id)
           
 void removeParameter(User user, java.lang.String id)
           
 void storeCondition(User user, java.lang.String id, java.lang.String operator, java.lang.Object[] value, DataType dataType)
           
 void storeParameter(User user, java.lang.String id, java.lang.Object value, DataType dataType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connectionProperties

protected java.util.Properties connectionProperties

connectionProviderManager

protected ConnectionProviderManager connectionProviderManager

connectionProvider

protected ConnectionProvider connectionProvider

insertParameterStatement

protected java.lang.String insertParameterStatement

updateParameterStatement

protected java.lang.String updateParameterStatement

selectParameterStatement

protected java.lang.String selectParameterStatement

dropParameterStatement

protected java.lang.String dropParameterStatement

selectConditionStatement

protected java.lang.String selectConditionStatement

insertConditionStatement

protected java.lang.String insertConditionStatement

dropConditionStatement

protected java.lang.String dropConditionStatement

FUNCTION_PARAM

protected static final java.lang.String FUNCTION_PARAM
See Also:
Constant Field Values

FUNCTION_CONDITION

protected static final java.lang.String FUNCTION_CONDITION
See Also:
Constant Field Values
Constructor Detail

UserEntryStoreImpl

public UserEntryStoreImpl()
Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

compose

public void compose(org.apache.avalon.framework.component.ComponentManager componentManager)
             throws org.apache.avalon.framework.component.ComponentException
Specified by:
compose in interface org.apache.avalon.framework.component.Composable
Throws:
org.apache.avalon.framework.component.ComponentException

initialize

public void initialize()
                throws java.lang.Exception
Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception

storeParameter

public void storeParameter(User user,
                           java.lang.String id,
                           java.lang.Object value,
                           DataType dataType)
                    throws UserEntryStoreException
Specified by:
storeParameter in interface UserEntryStore
Throws:
UserEntryStoreException

getParameter

public java.lang.Object getParameter(User user,
                                     java.lang.String id,
                                     java.lang.String expectedType)
                              throws UserEntryStoreException
Specified by:
getParameter in interface UserEntryStore
Throws:
UserEntryStoreException

storeCondition

public void storeCondition(User user,
                           java.lang.String id,
                           java.lang.String operator,
                           java.lang.Object[] value,
                           DataType dataType)
                    throws UserEntryStoreException
Specified by:
storeCondition in interface UserEntryStore
Throws:
UserEntryStoreException

getCondition

public StoredCondition getCondition(User user,
                                    java.lang.String id,
                                    DataType dataType)
                             throws UserEntryStoreException
Specified by:
getCondition in interface UserEntryStore
Throws:
UserEntryStoreException

removeParameter

public void removeParameter(User user,
                            java.lang.String id)
                     throws UserEntryStoreException
Specified by:
removeParameter in interface UserEntryStore
Throws:
UserEntryStoreException

removeCondition

public void removeCondition(User user,
                            java.lang.String id)
                     throws UserEntryStoreException
Specified by:
removeCondition in interface UserEntryStore
Throws:
UserEntryStoreException