org.xmlBlaster.util.queue.jdbc
Class XBStoreFactory
java.lang.Object
org.xmlBlaster.util.queue.jdbc.XBFactoryBase
org.xmlBlaster.util.queue.jdbc.XBFactory
org.xmlBlaster.util.queue.jdbc.XBStoreFactory
public class XBStoreFactory
- extends XBFactory
- Author:
- Marcel Ruff, Michele Laghi
Fields inherited from class org.xmlBlaster.util.queue.jdbc.XBFactory |
base, countSt, createSt, deleteAllSt, deleteCompleteSt, deleteSt, deleteTransientsSt, dropSt, getAllSt, getCompleteSt, getFirstEntriesSt, getNumOfAllSt, getSt, inList, insertSt, prefix, table |
Fields inherited from class org.xmlBlaster.util.queue.jdbc.XBFactoryBase |
DB2, FIREBIRD, HSQLDB, LDBC, MYSQL, ORACLE, POSTGRES, SQLITE, SQLSERVER_2000, SQLSERVER_2005, UNKNOWN |
Method Summary |
protected void |
doInit(I_Info info)
|
XBStore |
get(long id,
java.sql.Connection conn,
int timeout)
|
java.util.List<XBStore> |
getAllOfType(java.lang.String node,
java.lang.String type,
java.sql.Connection conn,
int timeout)
|
XBStore |
getByName(java.lang.String node,
java.lang.String type,
java.lang.String postfix,
java.sql.Connection conn,
int timeout)
|
protected long |
getByteSize(java.sql.ResultSet rs,
int offset)
|
(package private) static java.lang.String |
getName()
|
void |
insert(XBStore xbStore,
java.sql.Connection conn,
int timeout)
Inserts an entry in the database |
void |
ping(java.sql.Connection conn,
int timeout)
|
protected void |
prepareDefaultStatements()
Old: xb_entries.queueName= |
protected XBEntry |
rsToEntry(XBStore store,
java.sql.ResultSet rs)
|
Methods inherited from class org.xmlBlaster.util.queue.jdbc.XBFactory |
checkSameStore, count, create, delete, deleteList, deleteTransients, drop, fillDbCol, getDbCol, getList, getNumOfAll, init, isTrue, readStream, whereInStatement |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static java.util.logging.Logger log
ID
private static final int ID
- See Also:
- Constant Field Values
NODE
private static final int NODE
- See Also:
- Constant Field Values
TYPE
private static final int TYPE
- See Also:
- Constant Field Values
POSTFIX
private static final int POSTFIX
- See Also:
- Constant Field Values
REF_COUNTED
private static final int REF_COUNTED
- See Also:
- Constant Field Values
FLAG1
private static final int FLAG1
- See Also:
- Constant Field Values
getByNameSt
private java.lang.String getByNameSt
getAllOfTypeSt
private java.lang.String getAllOfTypeSt
pingSt
protected java.lang.String pingSt
XBStoreFactory
public XBStoreFactory(java.lang.String prefix)
getName
static java.lang.String getName()
prepareDefaultStatements
protected void prepareDefaultStatements()
- Old: xb_entries.queueName=
callback_nodefwgwTestclientmarcel28 | UPDATE_REF
connection_testecsoftclientfwgwTest1 | connect
history_fwgwTestdevice_lkw5@basis_de_cfg | HISTORY_REF
history_fwgwTestHello | HISTORY_REF
history_fwgwTest__sys__remoteProperties | HISTORY_REF
history_fwgwTestTEST_TOPIC | HISTORY_REF
msgUnitStore_fwgwTestdevice_lkw5@basis_de_cfg | MSG_XML
msgUnitStore_fwgwTestfwauftrag | MSG_XML
msgUnitStore_fwgwTest__sys__remoteProperties | MSG_XML
msgUnitStore_fwgwTestTEST_TOPIC | MSG_XML
session_fwgwTestsubPersistence,1_0 | SESSION
subject_nodefwgwTestclient_monito | UPDATE_REF
topicStore_fwgwTest | TOPIC_XML
New:
xbnode=clusterNodeId="fwgwTest"
xbtype="history" | "msgUnitStore" | "session" | ...
xbpostfix="Testclient_monito"
- Overrides:
prepareDefaultStatements
in class XBFactory
doInit
protected void doInit(I_Info info)
- Specified by:
doInit
in class XBFactoryBase
rsToEntry
protected XBEntry rsToEntry(XBStore store,
java.sql.ResultSet rs)
throws java.sql.SQLException,
java.io.IOException
- Specified by:
rsToEntry
in class XBFactory
- Throws:
java.sql.SQLException
java.io.IOException
insert
public void insert(XBStore xbStore,
java.sql.Connection conn,
int timeout)
throws java.sql.SQLException,
java.io.IOException
- Inserts an entry in the database
- Parameters:
table
- xbMeat
- The object to store. Note thatconn
- The database connection to usetimeout
- the time in seconds it has to wait for a response. If less than 1 it is not
set.
- Throws:
java.sql.SQLException
- If an exception occurs in the backend. For example if the entry already
exists in the database.
java.io.IOException
get
public XBStore get(long id,
java.sql.Connection conn,
int timeout)
throws java.sql.SQLException,
java.io.IOException
- Parameters:
sql
- The select statement to use to fill the objects.conn
-
- Returns:
- null if the object has not been found or the object if it has been found on the backend.
- Throws:
java.sql.SQLException
java.io.IOException
getAllOfType
public java.util.List<XBStore> getAllOfType(java.lang.String node,
java.lang.String type,
java.sql.Connection conn,
int timeout)
throws java.sql.SQLException,
java.io.IOException
- Parameters:
sql
- The select statement to use to fill the objects.conn
-
- Returns:
- null if the object has not been found or the object if it has been found on the backend.
- Throws:
java.sql.SQLException
java.io.IOException
getByName
public XBStore getByName(java.lang.String node,
java.lang.String type,
java.lang.String postfix,
java.sql.Connection conn,
int timeout)
throws java.sql.SQLException,
java.io.IOException
- Parameters:
sql
- The select statement to use to fill the objects.conn
-
- Returns:
- null if the object has not been found or the object if it has been found on the backend.
- Throws:
java.sql.SQLException
java.io.IOException
ping
public void ping(java.sql.Connection conn,
int timeout)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getByteSize
protected long getByteSize(java.sql.ResultSet rs,
int offset)
throws java.sql.SQLException
- Specified by:
getByteSize
in class XBFactory
- Throws:
java.sql.SQLException
Copyright © 1999-2014 The xmlBlaster.org contributers.