xmlBlaster 2.2.0 client API

org.xmlBlaster.util.queue.jdbc
Class XBStoreFactory

java.lang.Object
  extended by org.xmlBlaster.util.queue.jdbc.XBFactoryBase
      extended by org.xmlBlaster.util.queue.jdbc.XBFactory
          extended by org.xmlBlaster.util.queue.jdbc.XBStoreFactory

public class XBStoreFactory
extends XBFactory

Author:
Marcel Ruff, Michele Laghi

Field Summary
protected  java.lang.String pingSt
           
 
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
 
Constructor Summary
XBStoreFactory(java.lang.String prefix)
           
 
Method Summary
protected  void doInit(org.xmlBlaster.contrib.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)
           
 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 org.xmlBlaster.util.queue.jdbc.XBFactoryBase
getDbVendor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pingSt

protected java.lang.String pingSt
Constructor Detail

XBStoreFactory

public XBStoreFactory(java.lang.String prefix)
Method Detail

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(org.xmlBlaster.contrib.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 that
conn - The database connection to use
timeout - 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

xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.