edu.jhu.tmaj.database.sql
Class TwoSQLStatements

java.lang.Object
  extended by edu.jhu.tmaj.database.sql.TwoSQLStatements

public final class TwoSQLStatements
extends java.lang.Object

An INSERT statement in which a value is automatically assigned, and a SELECT statement that gets that value. For example, this class may represent the following two SQL queries:
insertSQL: INSERT INTO Projects (ProjectName) VALUES ('my new project')
selectSQL: SELECT MAX(ProjectID) FROM Projects;
ProjectID is an autoIncremented variable.
The SELECT statement will return its value if executing after the INSERT statement.


Constructor Summary
TwoSQLStatements(java.lang.String insertSQL, java.lang.String selectSQL)
           
 
Method Summary
 java.lang.String getInsertSQL()
          Returns the INSERT SQL statement.
 java.lang.String getSelectSQL()
          Returns the SELECT SQL statement that will get the auto-incremented value in the INSERT statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwoSQLStatements

public TwoSQLStatements(java.lang.String insertSQL,
                        java.lang.String selectSQL)
Method Detail

getInsertSQL

public java.lang.String getInsertSQL()
Returns the INSERT SQL statement.


getSelectSQL

public java.lang.String getSelectSQL()
Returns the SELECT SQL statement that will get the auto-incremented value in the INSERT statement.