java.lang.Object
nectar.Service
nectar.data.DataAdapterService
nectar.data.mysql.MySqlAdapterService
- public class MySqlAdapterService
- extends nectar.data.DataAdapterService
|
Method Summary |
nectar.data.ConnectionHandle |
beginTransaction()
Signal the beggining of a Transaction. |
protected void |
closeStatement(java.sql.Statement s)
|
void |
commitTransaction(nectar.data.ConnectionHandle ch)
|
void |
delete(nectar.data.ConnectionHandle ch,
nectar.data.Delete delete)
|
void |
delete(nectar.data.Delete delete)
|
private void |
deleteInternal(java.sql.Statement stmt,
nectar.data.Delete delete)
|
protected java.sql.Statement |
getStatement()
|
void |
insert(nectar.data.ConnectionHandle ch,
nectar.data.Insert i)
|
void |
insert(nectar.data.ConnectionHandle ch,
nectar.data.Insert i,
boolean returnLastInsertId)
|
void |
insert(nectar.data.Insert i)
Performs an auto-commited insert. |
java.util.List |
readMultipleFieldMultipleRow(nectar.data.Query q)
Perfoms the query defined by the Query parameter Object, and returns the results
as a List of [field] => [(Object) value] HashMap's. |
java.util.HashMap |
readMultipleFieldSingleRow(nectar.data.Query q)
Perfoms the query defined by the Query parameter Object, and returns the results
as a [field] => [(Object) value] HashMap. |
java.util.List |
readSingleFieldMultipleRow(nectar.data.Query q)
Perfoms the query defined by the Query parameter Object, and returns the results
as a List of [(Object) value]'s. |
java.lang.Object |
readSingleFieldSingleRow(nectar.data.Query q)
Perfoms the query defined by the Query parameter Object, and returns the results
as the [(Object) value]. |
void |
rollbackTransaction(nectar.data.ConnectionHandle ch)
|
void |
update(nectar.data.ConnectionHandle ch,
nectar.data.Update update)
|
void |
update(nectar.data.Update update)
|
private void |
updateInternal(java.sql.Statement stmt,
nectar.data.Update update)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
queryRenderer
protected MysqlQueryRenderer queryRenderer
log
private static org.apache.commons.logging.Log log
MySqlAdapterService
public MySqlAdapterService()
- Creates a new instance of MySqlAdapter
getStatement
protected java.sql.Statement getStatement()
throws nectar.data.DataException
closeStatement
protected void closeStatement(java.sql.Statement s)
throws nectar.data.DataException
readSingleFieldSingleRow
public java.lang.Object readSingleFieldSingleRow(nectar.data.Query q)
throws nectar.data.DataException
- Description copied from class:
nectar.data.DataAdapterService
- Perfoms the query defined by the Query parameter Object, and returns the results
as the [(Object) value].
readMultipleFieldSingleRow
public java.util.HashMap readMultipleFieldSingleRow(nectar.data.Query q)
throws nectar.data.DataException
- Description copied from class:
nectar.data.DataAdapterService
- Perfoms the query defined by the Query parameter Object, and returns the results
as a [field] => [(Object) value] HashMap.
readMultipleFieldMultipleRow
public java.util.List readMultipleFieldMultipleRow(nectar.data.Query q)
throws nectar.data.DataException
- Description copied from class:
nectar.data.DataAdapterService
- Perfoms the query defined by the Query parameter Object, and returns the results
as a List of [field] => [(Object) value] HashMap's.
readSingleFieldMultipleRow
public java.util.List readSingleFieldMultipleRow(nectar.data.Query q)
throws nectar.data.DataException
- Description copied from class:
nectar.data.DataAdapterService
- Perfoms the query defined by the Query parameter Object, and returns the results
as a List of [(Object) value]'s.
insert
public void insert(nectar.data.Insert i)
throws nectar.data.DataException
- Performs an auto-commited insert.
insert
public void insert(nectar.data.ConnectionHandle ch,
nectar.data.Insert i)
throws nectar.data.DataException
insert
public void insert(nectar.data.ConnectionHandle ch,
nectar.data.Insert i,
boolean returnLastInsertId)
throws nectar.data.DataException
updateInternal
private void updateInternal(java.sql.Statement stmt,
nectar.data.Update update)
throws java.sql.SQLException
update
public void update(nectar.data.Update update)
throws nectar.data.DataException
update
public void update(nectar.data.ConnectionHandle ch,
nectar.data.Update update)
throws nectar.data.DataException
beginTransaction
public nectar.data.ConnectionHandle beginTransaction()
throws nectar.data.DataException
- Description copied from class:
nectar.data.DataAdapterService
- Signal the beggining of a Transaction. The returned ConnectionHandle holds an active Connection to the DataSource, and will buffer data updates sent to the DataAdapter until
commitTransaction is called.
You MUST absolutely liberate this connection with commitTransaction or rollbackTransaction, since the ConnectionHandle reserves a DataSource connection for exclusive use.
commitTransaction
public void commitTransaction(nectar.data.ConnectionHandle ch)
throws nectar.data.DataException
rollbackTransaction
public void rollbackTransaction(nectar.data.ConnectionHandle ch)
throws nectar.data.DataException
deleteInternal
private void deleteInternal(java.sql.Statement stmt,
nectar.data.Delete delete)
throws java.sql.SQLException
delete
public void delete(nectar.data.Delete delete)
throws nectar.data.DataException
delete
public void delete(nectar.data.ConnectionHandle ch,
nectar.data.Delete delete)
throws nectar.data.DataException