|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.util.queue.jdbc.XBFactoryBase org.xmlBlaster.util.queue.jdbc.XBFactory
public abstract class XBFactory
Field Summary | |
---|---|
protected java.lang.String |
base
|
protected java.lang.String |
countSt
|
protected java.lang.String |
createSt
|
protected java.lang.String |
deleteAllSt
|
protected java.lang.String |
deleteCompleteSt
|
protected java.lang.String |
deleteSt
|
protected java.lang.String |
deleteTransientsSt
|
protected java.lang.String |
dropSt
|
protected java.lang.String |
getAllSt
|
protected java.lang.String |
getCompleteSt
|
protected java.lang.String |
getFirstEntriesSt
|
protected java.lang.String |
getNumOfAllSt
|
protected java.lang.String |
getSt
|
protected java.lang.String |
inList
|
protected java.lang.String |
insertSt
|
private static java.util.logging.Logger |
log
|
protected java.lang.String |
prefix
|
protected java.lang.String |
table
|
private java.lang.String |
tableNameDefault
|
private static boolean |
useBinary
|
private static boolean |
useString
|
private static boolean |
useString2
|
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 | |
---|---|
XBFactory(java.lang.String prefix,
java.lang.String name)
xbmeatid NUMBER(20) primary key, xbdurable char default 'F' not null, xbrefcount NUMBER(10), xbbytesize NUMBER(10), xbdatatype varchar(32) default '' not null, xbflag1 varchar(32) default '', xbmsgqos clob default '', xbmsgcont blob default '', xbmsgkey clob default '' |
Method Summary | |
---|---|
protected boolean |
checkSameStore(XBStore store,
XBEntry entry)
|
long |
count(XBStore store,
java.sql.Connection conn,
int timeout)
Deletes the specified entries. |
boolean |
create(java.sql.Connection conn)
Returns true if the table has been created, false otherwise. |
int |
delete(long storeId,
long id,
java.sql.Connection conn,
int timeout)
|
long |
deleteList(XBStore store,
java.sql.Connection conn,
XBEntry[] entries,
int maxStLength,
int maxNumSt,
boolean commitInBetween,
int timeout)
Deletes the specified entries. |
int |
deleteTransients(long storeId,
java.sql.Connection conn,
int timeout)
|
boolean |
drop(java.sql.Connection conn)
Returns true if it could delete the table, false otherwise. |
private boolean |
exists(java.sql.Connection conn)
Checks if the table already exists, the check is done against the meta data. |
static void |
fillDbCol(java.sql.PreparedStatement preStatement,
int index,
java.lang.String value)
String/VARCHAR/CLOB helper to avoid NULL and to take care on Umlauts/UTF-8 |
protected abstract long |
getByteSize(java.sql.ResultSet rs,
int offset)
|
static java.lang.String |
getDbCol(java.sql.ResultSet rs,
int index)
String/VARCHAR/CLOB helper to avoid NULL and to take care on Umlauts/UTF-8 |
java.util.List<XBEntry> |
getList(XBStore store,
java.sql.Connection conn,
XBEntry[] entries,
int maxStLength,
int maxNumSt,
int timeout)
Gets the specified entries. |
EntryCount |
getNumOfAll(XBStore store,
java.sql.Connection conn)
Gets the real number of entries. |
I_Info |
init(I_Info origInfo)
|
protected static boolean |
isTrue(java.lang.String asTxt)
|
protected void |
prepareDefaultStatements()
This method must be implemented in all underlying extentions to this class. |
protected static byte[] |
readStream(java.io.InputStream inStream)
|
protected abstract XBEntry |
rsToEntry(XBStore store,
java.sql.ResultSet rs)
|
protected java.util.List<java.lang.String> |
whereInStatement(java.lang.String reqPrefix,
XBEntry[] entries,
int maxStatementLength,
int maxNumStatements)
The prefix is the initial part of the SQL update/query. |
Methods inherited from class org.xmlBlaster.util.queue.jdbc.XBFactoryBase |
---|
doInit, getDbVendor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.logging.Logger log
protected java.lang.String insertSt
protected java.lang.String getSt
protected java.lang.String getAllSt
protected java.lang.String getCompleteSt
protected java.lang.String deleteAllSt
protected java.lang.String deleteCompleteSt
protected java.lang.String deleteTransientsSt
protected java.lang.String getFirstEntriesSt
protected java.lang.String getNumOfAllSt
protected java.lang.String deleteSt
protected java.lang.String createSt
protected java.lang.String countSt
protected java.lang.String dropSt
protected java.lang.String prefix
protected java.lang.String table
private java.lang.String tableNameDefault
protected java.lang.String inList
protected java.lang.String base
private static final boolean useString
private static final boolean useString2
private static final boolean useBinary
Constructor Detail |
---|
public XBFactory(java.lang.String prefix, java.lang.String name)
xbmeatid NUMBER(20) primary key, xbdurable char default 'F' not null, xbrefcount NUMBER(10), xbbytesize NUMBER(10), xbdatatype varchar(32) default '' not null, xbflag1 varchar(32) default '', xbmsgqos clob default '', xbmsgcont blob default '', xbmsgkey clob default ''
Method Detail |
---|
public final I_Info init(I_Info origInfo) throws XmlBlasterException
init
in class XBFactoryBase
XmlBlasterException
public int delete(long storeId, long id, java.sql.Connection conn, int timeout) throws java.sql.SQLException
java.sql.SQLException
public int deleteTransients(long storeId, java.sql.Connection conn, int timeout) throws java.sql.SQLException
java.sql.SQLException
protected abstract XBEntry rsToEntry(XBStore store, java.sql.ResultSet rs) throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException
private final boolean exists(java.sql.Connection conn) throws java.sql.SQLException
conn
-
java.sql.SQLException
public boolean create(java.sql.Connection conn) throws java.sql.SQLException
conn
-
java.sql.SQLException
public final boolean drop(java.sql.Connection conn) throws java.sql.SQLException
conn
-
java.sql.SQLException
protected static final byte[] readStream(java.io.InputStream inStream) throws java.io.IOException
java.io.IOException
public static final java.lang.String getDbCol(java.sql.ResultSet rs, int index) throws java.sql.SQLException, java.io.IOException
preStatement
- index
- value
-
java.sql.SQLException
java.io.IOException
public static final void fillDbCol(java.sql.PreparedStatement preStatement, int index, java.lang.String value) throws java.sql.SQLException, java.io.UnsupportedEncodingException
preStatement
- index
- value
-
java.sql.SQLException
java.io.UnsupportedEncodingException
protected void prepareDefaultStatements()
protected final java.util.List<java.lang.String> whereInStatement(java.lang.String reqPrefix, XBEntry[] entries, int maxStatementLength, int maxNumStatements)
public long deleteList(XBStore store, java.sql.Connection conn, XBEntry[] entries, int maxStLength, int maxNumSt, boolean commitInBetween, int timeout) throws java.sql.SQLException
store
- the store to use.the
- connection to be used.ids
- the array containing all ids to delete.
java.sql.SQLException
public long count(XBStore store, java.sql.Connection conn, int timeout) throws java.sql.SQLException
store
- the store to use.the
- connection to be used.ids
- the array containing all ids to delete.
java.sql.SQLException
public java.util.List<XBEntry> getList(XBStore store, java.sql.Connection conn, XBEntry[] entries, int maxStLength, int maxNumSt, int timeout) throws java.sql.SQLException, java.io.IOException
store
- the store to use.the
- connection to be used.ids
- the array containing all ids to delete.
java.sql.SQLException
java.io.IOException
protected abstract long getByteSize(java.sql.ResultSet rs, int offset) throws java.sql.SQLException
java.sql.SQLException
public final EntryCount getNumOfAll(XBStore store, java.sql.Connection conn) throws java.sql.SQLException
java.sql.SQLException
protected static final boolean isTrue(java.lang.String asTxt)
protected final boolean checkSameStore(XBStore store, XBEntry entry)
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |