org.xmlBlaster.util.queue.jdbc
Class XBMeatFactory
java.lang.Object
org.xmlBlaster.util.queue.jdbc.XBFactoryBase
org.xmlBlaster.util.queue.jdbc.XBFactory
org.xmlBlaster.util.queue.jdbc.XBMeatFactory
public class XBMeatFactory
- extends XBFactory
Maps the database table XBMEAT to this java bean.
- 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 |
boolean |
create(java.sql.Connection conn)
Returns true if the table has been created, false otherwise. |
protected void |
doInit(org.xmlBlaster.contrib.I_Info info)
|
XBMeat |
get(XBStore store,
long id,
java.sql.Connection conn,
int timeout)
|
protected long |
getByteSize(java.sql.ResultSet rs,
int offset)
|
java.util.List<XBMeat> |
getFirstMeatEntries(XBStore store,
java.sql.Connection conn,
long numOfEntries,
long numOfBytes,
int timeout)
|
void |
incrementRefCounters(XBStore store,
XBMeat meat,
long increment,
java.sql.Connection conn,
int timeout)
|
void |
insert(XBMeat xbMeat,
java.sql.Connection conn,
int timeout)
Inserts an entry in the database |
protected void |
prepareDefaultStatements()
This method must be implemented in all underlying extentions to this class. |
protected XBMeat |
rsToEntry(XBStore store,
java.sql.ResultSet rs)
|
void |
update(XBMeat xbMeat,
java.sql.Connection conn,
int timeout)
Updates the XBMeat object. |
void |
updateRefCounters(XBStore store,
XBMeat xbMeat,
java.sql.Connection conn,
int timeout)
Updates the XBMeat object. |
Methods inherited from class org.xmlBlaster.util.queue.jdbc.XBFactory |
checkSameStore, count, 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 |
XBMeatFactory
public XBMeatFactory(java.lang.String prefix)
prepareDefaultStatements
protected void prepareDefaultStatements()
- Description copied from class:
XBFactory
- This method must be implemented in all underlying extentions to this class. It returns (for the different
database vendors a default for the creation of the table.
- Overrides:
prepareDefaultStatements
in class XBFactory
doInit
protected void doInit(org.xmlBlaster.contrib.I_Info info)
- Specified by:
doInit
in class XBFactoryBase
create
public boolean create(java.sql.Connection conn)
throws java.sql.SQLException
- Description copied from class:
XBFactory
- Returns true if the table has been created, false otherwise. It returns false for example
if the table existed already, in which case it is not newly created.
- Overrides:
create
in class XBFactory
- Returns:
-
- Throws:
java.sql.SQLException
insert
public void insert(XBMeat xbMeat,
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 use 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
updateRefCounters
public void updateRefCounters(XBStore store,
XBMeat xbMeat,
java.sql.Connection conn,
int timeout)
throws java.sql.SQLException
- Updates the XBMeat object. If qos, flag or
- Parameters:
table
- xbMeat
- conn
-
- Throws:
java.sql.SQLException
update
public void update(XBMeat xbMeat,
java.sql.Connection conn,
int timeout)
throws java.sql.SQLException,
java.io.IOException
- Updates the XBMeat object. If qos, flag or
- Parameters:
table
- xbMeat
- conn
-
- Throws:
java.sql.SQLException
java.io.IOException
incrementRefCounters
public void incrementRefCounters(XBStore store,
XBMeat meat,
long increment,
java.sql.Connection conn,
int timeout)
throws java.sql.SQLException,
java.io.IOException
- Throws:
java.sql.SQLException
java.io.IOException
rsToEntry
protected XBMeat 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
get
public XBMeat get(XBStore store,
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
getFirstMeatEntries
public java.util.List<XBMeat> getFirstMeatEntries(XBStore store,
java.sql.Connection conn,
long numOfEntries,
long numOfBytes,
int timeout)
throws java.sql.SQLException,
java.io.IOException
- Parameters:
store
- conn
- numOfEntries
- numOfBytes
- timeout
-
- Returns:
-
- Throws:
java.sql.SQLException
java.io.IOException
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.