|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--j3.mssql.PersonSQL
JDBC database table access class
Table Name : Person
Catalog : J3Demo
Schema : dbo
All JDBC calls to the database object are in this class
Generated by JDatabase Wizard build 1466, 24-Oct-02 16:53:49
Field Summary | |
private java.sql.PreparedStatement |
myCurrentSelectStatement
Currently active select statment |
private java.sql.PreparedStatement |
myDeleteAllPreparedStatement
delete method prepared statement |
private java.sql.PreparedStatement |
myDeleteByEmailPreparedStatement
delete method prepared statement |
private java.sql.PreparedStatement |
myInsertPreparedStatement
insert method PreparedStatement |
private java.sql.ResultSet |
myResultSet
Class wide resultset used to extract data |
private java.sql.PreparedStatement |
mySelectAllPreparedStatement
Select method prepared statement |
private java.sql.PreparedStatement |
myUpdateByEmailPreparedStatement
Update method prepared statement |
Constructor Summary | |
PersonSQL()
|
Method Summary | |
PersonData |
absolute(int thePosition)
Retieves the row of data from the resultset at the given position 1 gets the first row, 2 the second.... -1 gets the last row, -2 gets the row before the last one.... |
void |
afterLast()
Set the current cursor position after the last row, if there is a resultset |
void |
beforeFirst()
Set the current cursor position beofre the first row, if there is a resultset |
void |
close()
close all open statements and resutlset, if open |
void |
closeDeleteAll()
Close the PreparedStatement for deleteAll if it is open |
void |
closeDeleteByEmail()
Close the PreparedStatement for deleteByEmail if it is open |
void |
closeInsert()
Close the PreparedStatement for insert if it is open |
void |
closeResultSet()
Closes the resultset member if open |
void |
closeSelectAll()
Close the PreparedStatement for selectAll if it is open Also closes the resultset member myResultSet if it is associated with this statement |
void |
closeUpdateByEmail()
Close the PreparedStatement for updateByEmail if it is open |
void |
deleteAll(java.sql.Connection theConnection)
Deletes records in the database |
void |
deleteByEmail(java.sql.Connection theConnection,
java.lang.String theEmail)
Deletes records in the database |
void |
deleteRow()
Delete the current row, if there is a resultset |
protected void |
finalize()
close any open statements and resultset |
PersonData |
first()
Retieves the first row of data from the resultset |
int |
getConcurrency()
Get the current resultset concurrency |
int |
getFetchDirection()
Get the current fetch direction |
int |
getFetchSize()
Get the current fetch size |
private PersonData |
getResultSetRecord()
Retieves the current row of data from the resultset |
int |
getRow()
Get the current row number |
int |
getType()
Get the current resultset scroll type |
void |
insert(java.sql.Connection theConnection,
PersonData theInsertData)
Creates a new record in the database |
void |
insertRow(PersonData theInsertData)
ResultSet insert method, only columns set for select and insert are inserted |
boolean |
isAfterLast()
Determine if the current cursor is after the last row in the resultset. |
boolean |
isBeforeFirst()
Determine if the current cursor is before the first row in the resultset. |
boolean |
isFirst()
Determine if the current cursor is on the first row in the resultset. |
boolean |
isLast()
Determine if the current cursor is at the last row in the resultset. |
PersonData |
last()
Retieves the first row of data from the resultset |
void |
moveToCurrentRow()
set the cursor to the remembered position, usually the current row, if there is a resultset |
void |
moveToInsertRow()
move the cursor to the insert position, if there is a resultset |
PersonData |
next()
Retieves the next row of data from the resultset |
PersonData |
previous()
Retieves the previous row of data from the resultset |
PersonData |
refreshRow()
Refreshes and retieves the current row of data from the resultset |
PersonData |
relative(int thePosition)
Retieves the relative row of data from the resultset. See JDBC docs (ResultSet) for a discussion of relative() with respect to beforeFirst,.... |
boolean |
rowDeleted()
Determine if the current row has been deleted, if the driver detects this. |
boolean |
rowInserted()
Determine if the current row has been inserted, if the driver detects this. |
boolean |
rowUpdated()
Determine if the current row has been updated, if the driver detects this. |
void |
selectAll(java.sql.Connection theConnection)
Selects records from the database |
void |
setFetchDirection(int theDirection)
Set the fetch direction on the reusltset, if there is one. |
void |
setFetchSize(int theSize)
Set the fetch size on the reusltset, if there is a resultset. A value of 0 lets the ResultSet determine the size to use |
void |
updateByEmail(java.sql.Connection theConnection,
PersonData theUpdateData,
java.lang.String theEmail)
updates records in the database |
void |
updateRow(PersonData theUpdateData)
ResultSet update method, only columns set for select and update are updated |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.sql.PreparedStatement myCurrentSelectStatement
private java.sql.PreparedStatement myDeleteAllPreparedStatement
private java.sql.PreparedStatement myDeleteByEmailPreparedStatement
private java.sql.PreparedStatement myInsertPreparedStatement
private java.sql.ResultSet myResultSet
private java.sql.PreparedStatement mySelectAllPreparedStatement
private java.sql.PreparedStatement myUpdateByEmailPreparedStatement
Constructor Detail |
public PersonSQL()
Method Detail |
public PersonData absolute(int thePosition) throws java.sql.SQLException
thePosition
- Position in the ResultSet to scroll tojava.sql.SQLException
- An unexpected JDBC event occurredpublic void afterLast() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic void beforeFirst() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic void close()
public void closeDeleteAll()
public void closeDeleteByEmail()
public void closeInsert()
public void closeResultSet()
public void closeSelectAll()
public void closeUpdateByEmail()
public void deleteAll(java.sql.Connection theConnection) throws java.sql.SQLException
theConnection
- The OPEN JDBC Connection used by this methodjava.sql.SQLException
- An unexpected JDBC event occurredpublic void deleteByEmail(java.sql.Connection theConnection, java.lang.String theEmail) throws java.sql.SQLException
theConnection
- The OPEN JDBC Connection used by this methodtheEmail
- parameter value Emailjava.sql.SQLException
- An unexpected JDBC event occurredpublic void deleteRow() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredprotected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- superclass could throw thispublic PersonData first() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic int getConcurrency() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurred or if there is no current ResultSetpublic int getFetchDirection() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic int getFetchSize() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredprivate PersonData getResultSetRecord() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic int getRow() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic int getType() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurred or if there is no current ResultSetpublic void insert(java.sql.Connection theConnection, PersonData theInsertData) throws java.sql.SQLException
theConnection
- The JDBC Connection to usetheInsertData
- The data used to create one recordjava.sql.SQLException
- An unexpected JDBC event occurredpublic void insertRow(PersonData theInsertData) throws java.sql.SQLException
theInsertData
- The data used to insert one recordjava.sql.SQLException
- The ResultSet is null, or an unexpected JDBC event occurredpublic boolean isAfterLast() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic boolean isBeforeFirst() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic boolean isFirst() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic boolean isLast() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic PersonData last() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic void moveToCurrentRow() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic void moveToInsertRow() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic PersonData next() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic PersonData previous() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic PersonData refreshRow() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic PersonData relative(int thePosition) throws java.sql.SQLException
thePosition
- Relative position (+ or -) in the ResultSet to scroll tojava.sql.SQLException
- An unexpected JDBC event occurredpublic boolean rowDeleted() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic boolean rowInserted() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic boolean rowUpdated() throws java.sql.SQLException
java.sql.SQLException
- An unexpected JDBC event occurredpublic void selectAll(java.sql.Connection theConnection) throws java.sql.SQLException
theConnection
- The OPEN JDBC connection to usejava.sql.SQLException
- An unexpected JDBC event occurredpublic void setFetchDirection(int theDirection) throws java.sql.SQLException
theDirection
- Fetch direction: ResultSet.FETCH_FORWARD or ResultSet.FETCH_REVERSEjava.sql.SQLException
- An unexpected JDBC event occurred, or the fetch direction is invalid (statmenet is forward only)public void setFetchSize(int theSize) throws java.sql.SQLException
theSize
- Fetch size: hint at the number of rows the ResultSet should fetch in one go.java.sql.SQLException
- An unexpected JDBC event occurred, or the fetch direction is invalid (statmenet is forward only)public void updateByEmail(java.sql.Connection theConnection, PersonData theUpdateData, java.lang.String theEmail) throws java.sql.SQLException
theConnection
- The OPEN JDBC connection to usetheUpdateData
- The data used to update the databasetheEmail
- parameter value Emailjava.sql.SQLException
- An unexpected JDBC event occurredpublic void updateRow(PersonData theUpdateData) throws java.sql.SQLException
theUpdateData
- The data used to insert one recordjava.sql.SQLException
- The ResultSet is null, or an unexpected JDBC event occurred
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |