Package net.ontopia.infoset.content
Class JDBCContentStore
java.lang.Object
net.ontopia.infoset.content.JDBCContentStore
- All Implemented Interfaces:
ContentStoreIF
INTERNAL: Content store implementation on top of JDBC that uses a
non-native sequence generator to generate keys.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Connectionprotected KeyGeneratorIFprotected Stringprotected Stringprotected String -
Constructor Summary
ConstructorsConstructorDescriptionJDBCContentStore(Connection conn, ConnectionFactoryIF connfactory) JDBCContentStore(Connection conn, ConnectionFactoryIF connfactory, String tblname, String keyname, String valname) -
Method Summary
Modifier and TypeMethodDescriptionintadd(InputStream data, int length) INTERNAL: Creates an entry for the specified data value.intadd(ContentInputStream data) INTERNAL: Creates an entry for the specified data value.voidclose()INTERNAL: Closes the content store.booleancontainsKey(int key) INTERNAL: Returns true if the content store contains an entry with the specified key.protected intget(int key) INTERNAL: Gets the data value associated with the specified key.static ContentStoreIFgetInstance(TopicMapIF topicmap) protected voidprotected intreadLength(InputStream stream) booleanremove(int key) INTERNAL: Removes the entry associated with the key.
-
Field Details
-
conn
-
keygen
-
sql_get
-
sql_put
-
sql_remove
-
-
Constructor Details
-
JDBCContentStore
-
JDBCContentStore
public JDBCContentStore(Connection conn, ConnectionFactoryIF connfactory, String tblname, String keyname, String valname)
-
-
Method Details
-
getInstance
-
init
-
containsKey
Description copied from interface:ContentStoreIFINTERNAL: Returns true if the content store contains an entry with the specified key.- Specified by:
containsKeyin interfaceContentStoreIF- Throws:
ContentStoreException
-
get
Description copied from interface:ContentStoreIFINTERNAL: Gets the data value associated with the specified key.- Specified by:
getin interfaceContentStoreIF- Throws:
ContentStoreException
-
readLength
- Throws:
IOException
-
generateId
protected int generateId() -
add
Description copied from interface:ContentStoreIFINTERNAL: Creates an entry for the specified data value.- Specified by:
addin interfaceContentStoreIF- Throws:
ContentStoreException
-
add
Description copied from interface:ContentStoreIFINTERNAL: Creates an entry for the specified data value.- Specified by:
addin interfaceContentStoreIF- Throws:
ContentStoreException
-
remove
Description copied from interface:ContentStoreIFINTERNAL: Removes the entry associated with the key. If the key is not present the call has no effect.- Specified by:
removein interfaceContentStoreIF- Returns:
- true if the key was present; false otherwise
- Throws:
ContentStoreException
-
close
Description copied from interface:ContentStoreIFINTERNAL: Closes the content store. This allows all internal resources to be released.- Specified by:
closein interfaceContentStoreIF- Throws:
ContentStoreException
-