com.hlcl.rql.as
Class DatabaseQuery

java.lang.Object
  extended by com.hlcl.rql.as.DatabaseQuery

public class DatabaseQuery
extends java.lang.Object

This class encapsulates an SQL statement and offer access to parts of the SELECT statement.

Author:
LEJAFR

Constructor Summary
DatabaseQuery(java.lang.String selectStatement)
          Creates a database query from the given SELECT statement.
 
Method Summary
 java.lang.String getSelectStatement()
          Returns the encapsulated SELECT statement.
 java.lang.String getWhereClause()
          Returns the whole where clause of this statement.
 java.lang.String getWhereClauseColumnValue(java.lang.String columnName, java.lang.String logicalDelimiter, java.lang.String operator)
          Returns value of the given columnName the where clause of this statement.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseQuery

public DatabaseQuery(java.lang.String selectStatement)
Creates a database query from the given SELECT statement.

Method Detail

getWhereClause

public java.lang.String getWhereClause()
Returns the whole where clause of this statement.


getSelectStatement

public java.lang.String getSelectStatement()
Returns the encapsulated SELECT statement.


getWhereClauseColumnValue

public java.lang.String getWhereClauseColumnValue(java.lang.String columnName,
                                                  java.lang.String logicalDelimiter,
                                                  java.lang.String operator)
Returns value of the given columnName the where clause of this statement.

Deliver the value HAPAGL for statement ... where matchcode_name = 'HAPAGL' and matchcode_suppl = 043" and given columnName = machcode_name and logicalDelimiter = and and operator = =

Returns null, if column name could not be found.