org.mule.transport.jdbc.store
Class JdbcObjectStore<T extends Serializable>

java.lang.Object
  extended by org.mule.util.store.AbstractMonitoredObjectStore<T>
      extended by org.mule.transport.jdbc.store.JdbcObjectStore<T>
All Implemented Interfaces:
Runnable, MuleContextAware, Disposable, Initialisable, ObjectStore<T>

public class JdbcObjectStore<T extends Serializable>
extends AbstractMonitoredObjectStore<T>


Field Summary
 
Fields inherited from class org.mule.util.store.AbstractMonitoredObjectStore
context, entryTTL, expirationInterval, logger, maxEntries, name, scheduler
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
JdbcObjectStore()
           
 
Method Summary
 boolean contains(Serializable key)
          Check whether the given Object is already registered with this store.
protected  void expire()
          
 String getDeleteQuery()
           
 String getDeleteQueryKey()
           
 String getInsertQuery()
           
 String getInsertQueryKey()
           
 JdbcConnector getJdbcConnector()
           
 String getSelectQuery()
           
 String getSelectQueryKey()
           
 TransactionConfig getTransactionConfig()
           
 boolean isPersistent()
          Is this store persistent?
 T remove(Serializable key)
          Remove the object with key.
 T retrieve(Serializable key)
          Retrieve the given Object.
 void setDeleteQueryKey(String deleteQueryKey)
           
 void setInsertQueryKey(String insertQueryKey)
           
 void setJdbcConnector(JdbcConnector jdbcConnector)
           
 void setSelectQueryKey(String selectQueryKey)
           
 void setTransactionConfig(TransactionConfig transactionConfig)
           
 void store(Serializable key, T value)
          Store the given Object.
 void store(Serializable key, T value, String[] parameters)
           
 
Methods inherited from class org.mule.util.store.AbstractMonitoredObjectStore
dispose, getEntryTTL, getExpirationInterval, getMaxEntries, getName, getScheduler, initialise, run, setEntryTTL, setExpirationInterval, setMaxEntries, setMuleContext, setName, setScheduler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcObjectStore

public JdbcObjectStore()
Method Detail

isPersistent

public boolean isPersistent()
Is this store persistent?

Returns:
true if this store is persistent

expire

protected void expire()

Specified by:
expire in class AbstractMonitoredObjectStore<T extends Serializable>

contains

public boolean contains(Serializable key)
                 throws ObjectStoreException
Check whether the given Object is already registered with this store.

Parameters:
key - the identifier of the object to check
Returns:
true if the key is stored or false no value was stored for the key.
Throws:
ObjectStoreException - if the given key is null.
ObjectStoreNotAvaliableException - if any implementation-specific error occured, e.g. when the store is not available

remove

public T remove(Serializable key)
                              throws ObjectStoreException
Remove the object with key.

Parameters:
key - the identifier of the object to remove.
Returns:
the object that was previously stored for the given key
Throws:
ObjectStoreException - if the given key is null or if the store is not available or any other implementation-specific error occured
ObjectDoesNotExistException - if no value for the given key was previously stored.

retrieve

public T retrieve(Serializable key)
                                throws ObjectStoreException
Retrieve the given Object.

Parameters:
key - the identifier of the object to retrieve.
Returns:
the object associated with the given key. If no object for the given key was found this method throws an ObjectDoesNotExistException.
Throws:
ObjectStoreException - if the given key is null.
ObjectStoreNotAvaliableException - if the store is not available or any other implementation-specific error occured.
ObjectDoesNotExistException - if no value for the given key was previously stored.

store

public void store(Serializable key,
                  T value,
                  String[] parameters)
           throws ObjectStoreException
Throws:
ObjectStoreException

store

public void store(Serializable key,
                  T value)
           throws ObjectStoreException
Store the given Object.

Parameters:
key - the identifier for value
value - the Object to store with key
Throws:
ObjectStoreException - if the given key cannot be stored or is null.
ObjectStoreNotAvaliableException - if the store is not available or any other implementation-specific error occured.
ObjectAlreadyExistsException - if an attempt is made to store an object for a key that already has an object associated.

getJdbcConnector

public JdbcConnector getJdbcConnector()

setJdbcConnector

public void setJdbcConnector(JdbcConnector jdbcConnector)

getTransactionConfig

public TransactionConfig getTransactionConfig()

setTransactionConfig

public void setTransactionConfig(TransactionConfig transactionConfig)

getInsertQuery

public String getInsertQuery()

getSelectQuery

public String getSelectQuery()

getDeleteQuery

public String getDeleteQuery()

getInsertQueryKey

public String getInsertQueryKey()

setInsertQueryKey

public void setInsertQueryKey(String insertQueryKey)

getSelectQueryKey

public String getSelectQueryKey()

setSelectQueryKey

public void setSelectQueryKey(String selectQueryKey)

getDeleteQueryKey

public String getDeleteQueryKey()

setDeleteQueryKey

public void setDeleteQueryKey(String deleteQueryKey)


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.