com.avaje.ebean
Class RawSql.Sql

java.lang.Object
  extended by com.avaje.ebean.RawSql.Sql
Enclosing class:
RawSql

public static final class RawSql.Sql
extends Object

Represents the sql part of the query. For parsed RawSql the sql is broken up so that Ebean can insert extra WHERE and HAVING expressions into the SQL.


Method Summary
 String getOrderBy()
          Return the SQL ORDER BY clause.
 String getPreFrom()
          Return the SQL prior to FROM clause.
 String getPreHaving()
          Return the SQL prior to HAVING clause.
 String getPreWhere()
          Return the SQL prior to WHERE clause.
 String getUnparsedSql()
          Return the SQL when it is unparsed.
 boolean isAndHavingExpr()
          Return true if there is already a HAVING clause and any extra having expressions start with AND.
 boolean isAndWhereExpr()
          Return true if there is already a WHERE clause and any extra where expressions start with AND.
 boolean isParsed()
          Return true if the SQL is left completely unmodified.
 int queryHash()
          Return a hash for this query.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

queryHash

public int queryHash()
Return a hash for this query.


toString

public String toString()
Overrides:
toString in class Object

isParsed

public boolean isParsed()
Return true if the SQL is left completely unmodified.

This means Ebean can't add WHERE or HAVING expressions into the query - it will be left completely unmodified.


getUnparsedSql

public String getUnparsedSql()
Return the SQL when it is unparsed.


getPreFrom

public String getPreFrom()
Return the SQL prior to FROM clause.


getPreWhere

public String getPreWhere()
Return the SQL prior to WHERE clause.


isAndWhereExpr

public boolean isAndWhereExpr()
Return true if there is already a WHERE clause and any extra where expressions start with AND.


getPreHaving

public String getPreHaving()
Return the SQL prior to HAVING clause.


isAndHavingExpr

public boolean isAndHavingExpr()
Return true if there is already a HAVING clause and any extra having expressions start with AND.


getOrderBy

public String getOrderBy()
Return the SQL ORDER BY clause.



Copyright © 2010. All Rights Reserved.