xmlBlaster 2.1.0 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
private static int FLAG1
           
private  java.lang.String getAllOfTypeSt
           
private  java.lang.String getByNameSt
           
private static int ID
           
private static java.util.logging.Logger log
           
private static int NODE
           
protected  java.lang.String pingSt
           
private static int POSTFIX
           
private static int REF_COUNTED
           
private static int TYPE
           
 
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(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 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

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
Constructor Detail

XBStoreFactory

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

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 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.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.