| 
Esri Geoportal Server 1.0 
 | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.gpt.framework.sql.BaseDao
public class BaseDao
Super-class for a database access object.
| Constructor Summary | |
|---|---|
protected  | 
BaseDao()
Default constructor.  | 
  | 
BaseDao(RequestContext requestContext)
Constructs with an associated request context.  | 
| Method Summary | |
|---|---|
protected  void | 
appendExpression(StringBuffer whereClause,
                 String expression)
Appends an expression to an SQL where clause.  | 
protected  String | 
appendValueFilter(StringBuffer whereClause,
                  String field,
                  String value,
                  boolean forceLike)
Appends a value filter to an SQL where clause.  | 
static void | 
closeResultSet(ResultSet rs)
Closes result set.  | 
static void | 
closeStatement(Statement st)
Closes a statement.  | 
 ApplicationConfiguration | 
getApplicationConfiguration()
Gets the application configuration.  | 
 RequestContext | 
getRequestContext()
Gets the associated request context.  | 
protected  void | 
logExpression(String expression)
Logs a SQL expression.  | 
protected  ManagedConnection | 
returnConnection()
Returns a managed connection to the default database.  | 
 void | 
setRequestContext(RequestContext requestContext)
Sets the associated request context.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
protected BaseDao()
public BaseDao(RequestContext requestContext)
requestContext - the request context| Method Detail | 
|---|
public ApplicationConfiguration getApplicationConfiguration()
public RequestContext getRequestContext()
public void setRequestContext(RequestContext requestContext)
requestContext - the request context
protected void appendExpression(StringBuffer whereClause,
                                String expression)
whereClause - the where clauseexpression - the expression
protected String appendValueFilter(StringBuffer whereClause,
                                   String field,
                                   String value,
                                   boolean forceLike)
 This is intended for use within a PreparedStatement. The appended
 filter will have the following forms:
 
field = ?
 
field LIKE ?
 
 The value returned should be bound within the PreparedStatement:
 
preparedStatement.setString(n,value)
whereClause - the where clausefield - the fieldvalue - the field valueforceLike - if true force an SQL LIKE
public static void closeStatement(Statement st)
st - the JDBC Statement to closepublic static void closeResultSet(ResultSet rs)
rs - result set to closeprotected void logExpression(String expression)
expression - the expression to log
protected ManagedConnection returnConnection()
                                      throws SQLException
SQLException - if an exception occurs while establishing 
         the connection
  | 
Esri Geoportal Server 1.0 
 | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||