net.nplus1.anduril.server.persistence
Class BaseQueryCommand

java.lang.Object
  extended bynet.nplus1.anduril.server.persistence.BaseQueryCommand
Direct Known Subclasses:
QueryStatus, TaskListCommand, TimeCardListCommand

public class BaseQueryCommand
extends java.lang.Object


Field Summary
protected  java.sql.PreparedStatement pstatement
           
protected  java.sql.ResultSet rowSet
           
 
Constructor Summary
BaseQueryCommand()
           
BaseQueryCommand(java.lang.String sql)
           
BaseQueryCommand(java.lang.String dsName, java.lang.String sql)
           
 
Method Summary
 void execute()
          Execute the query command.
protected  void init(java.lang.String sql)
          Initialize default db connection and custom query statement.
protected  void init(java.lang.String dsName, java.lang.String sql)
          Initialize database connection and query statement.
 boolean next()
          Move to the next result record.
 void release()
          Release any resources tied up during execution and/or data retrieval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pstatement

protected java.sql.PreparedStatement pstatement

rowSet

protected java.sql.ResultSet rowSet
Constructor Detail

BaseQueryCommand

public BaseQueryCommand()

BaseQueryCommand

public BaseQueryCommand(java.lang.String sql)
                 throws QueryCommandException

BaseQueryCommand

public BaseQueryCommand(java.lang.String dsName,
                        java.lang.String sql)
                 throws QueryCommandException
Method Detail

init

protected void init(java.lang.String dsName,
                    java.lang.String sql)
             throws QueryCommandException
Initialize database connection and query statement.

Throws:
QueryCommandException

init

protected void init(java.lang.String sql)
             throws QueryCommandException
Initialize default db connection and custom query statement.

Throws:
QueryCommandException

execute

public void execute()
             throws QueryCommandException
Execute the query command.

Throws:
QueryCommandException

next

public boolean next()
             throws QueryCommandException
Move to the next result record.

Throws:
QueryCommandException

release

public void release()
             throws java.sql.SQLException
Release any resources tied up during execution and/or data retrieval.

Throws:
java.sql.SQLException