org.apache.servicemix.store.jdbc
Class JdbcStore
java.lang.Object
org.apache.servicemix.store.jdbc.JdbcStore
- All Implemented Interfaces:
- Store
public class JdbcStore
- extends Object
- implements Store
|
Method Summary |
protected void |
close(Connection connection)
|
boolean |
hasFeature(String feature)
Returns true if the store implementation supports the given feature. |
Object |
load(String id)
Loads an object that has been previously stored under the specified key. |
String |
store(Object data)
Put an object into the store and return the unique id that
may be used at a later time to retrieve the object. |
void |
store(String id,
Object data)
Put an object in the store under the given id. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JdbcStore
public JdbcStore(JdbcStoreFactory factory,
String name)
hasFeature
public boolean hasFeature(String feature)
- Description copied from interface:
Store
- Returns true if the store implementation supports the given feature.
- Specified by:
hasFeature in interface Store
- Parameters:
feature - the feature to check
- Returns:
true if the feature is supported
store
public void store(String id,
Object data)
throws IOException
- Description copied from interface:
Store
- Put an object in the store under the given id.
This method must be used with caution and the behavior is
unspecified if an object already exist for the same id.
- Specified by:
store in interface Store
- Parameters:
id - the id of the object to storedata - the object to store
- Throws:
IOException - if an error occurs
store
public String store(Object data)
throws IOException
- Description copied from interface:
Store
- Put an object into the store and return the unique id that
may be used at a later time to retrieve the object.
- Specified by:
store in interface Store
- Parameters:
data - the object to store
- Returns:
- the id of the object stored
- Throws:
IOException - if an error occurs
load
public Object load(String id)
throws IOException
- Description copied from interface:
Store
- Loads an object that has been previously stored under the specified key.
The object is removed from the store.
- Specified by:
load in interface Store
- Parameters:
id - the id of the object
- Returns:
- the object, or
null> if the object could not be found
- Throws:
IOException - if an error occurs
close
protected void close(Connection connection)
throws IOException
- Throws:
IOException
Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.