|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.infoset.content.JDBCContentStore
public class JDBCContentStore
INTERNAL: Content store implementation on top of JDBC that uses a non-native sequence generator to generate keys.
Field Summary | |
---|---|
protected java.sql.Connection |
conn
|
protected KeyGeneratorIF |
keygen
|
protected java.lang.String |
sql_get
|
protected java.lang.String |
sql_put
|
protected java.lang.String |
sql_remove
|
Constructor Summary | |
---|---|
JDBCContentStore(java.sql.Connection conn,
ConnectionFactoryIF connfactory)
|
|
JDBCContentStore(java.sql.Connection conn,
ConnectionFactoryIF connfactory,
java.lang.String tblname,
java.lang.String keyname,
java.lang.String valname)
|
Method Summary | |
---|---|
int |
add(ContentInputStream data)
INTERNAL: Creates an entry for the specified data value. |
int |
add(java.io.InputStream data,
int length)
INTERNAL: Creates an entry for the specified data value. |
void |
close()
INTERNAL: Closes the content store. |
boolean |
containsKey(int key)
INTERNAL: Returns true if the content store contains an entry with the specified key. |
protected int |
generateId()
|
ContentInputStream |
get(int key)
INTERNAL: Gets the data value associated with the specified key. |
static ContentStoreIF |
getInstance(TopicMapIF topicmap)
|
protected void |
init(java.lang.String tblname,
java.lang.String keyname,
java.lang.String valname)
|
protected int |
readLength(java.io.InputStream stream)
|
boolean |
remove(int key)
INTERNAL: Removes the entry associated with the key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.sql.Connection conn
protected KeyGeneratorIF keygen
protected java.lang.String sql_get
protected java.lang.String sql_put
protected java.lang.String sql_remove
Constructor Detail |
---|
public JDBCContentStore(java.sql.Connection conn, ConnectionFactoryIF connfactory)
public JDBCContentStore(java.sql.Connection conn, ConnectionFactoryIF connfactory, java.lang.String tblname, java.lang.String keyname, java.lang.String valname)
Method Detail |
---|
public static ContentStoreIF getInstance(TopicMapIF topicmap)
protected void init(java.lang.String tblname, java.lang.String keyname, java.lang.String valname)
public boolean containsKey(int key) throws ContentStoreException
ContentStoreIF
containsKey
in interface ContentStoreIF
ContentStoreException
public ContentInputStream get(int key) throws ContentStoreException
ContentStoreIF
get
in interface ContentStoreIF
ContentStoreException
protected int readLength(java.io.InputStream stream) throws java.io.IOException
java.io.IOException
protected int generateId()
public int add(ContentInputStream data) throws ContentStoreException
ContentStoreIF
add
in interface ContentStoreIF
ContentStoreException
public int add(java.io.InputStream data, int length) throws ContentStoreException
ContentStoreIF
add
in interface ContentStoreIF
ContentStoreException
public boolean remove(int key) throws ContentStoreException
ContentStoreIF
remove
in interface ContentStoreIF
ContentStoreException
public void close() throws ContentStoreException
ContentStoreIF
close
in interface ContentStoreIF
ContentStoreException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |