ojb.broker.query
Class QueryBySQL

java.lang.Object
  |
  +--ojb.broker.query.QueryBySQL
All Implemented Interfaces:
Query, java.io.Serializable

public class QueryBySQL
extends java.lang.Object
implements Query

Version:
1.0
Author:
Jakob Braeuchi
See Also:
Serialized Form

Constructor Summary
QueryBySQL(java.lang.Class targetClass, java.lang.String anSQLStatement)
          Gets the sql.
 
Method Summary
 Criteria getCriteria()
          return the criteria of the query if present or null.
 java.lang.Object getExampleObject()
          return the template Object if present or null
 java.lang.Class getSearchClass()
          return the target class, representing the extend to be searched
 java.lang.String getSql()
           
 boolean isDistinct()
          return true if select DISTINCT should be used
 void setSql(java.lang.String sql)
          Sets the sql.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryBySQL

public QueryBySQL(java.lang.Class targetClass,
                  java.lang.String anSQLStatement)
Gets the sql.

Method Detail

getSql

public java.lang.String getSql()

setSql

public void setSql(java.lang.String sql)
Sets the sql.

Parameters:
sql - The sql to set

getCriteria

public Criteria getCriteria()
Description copied from interface: Query
return the criteria of the query if present or null.

Specified by:
getCriteria in interface Query

getExampleObject

public java.lang.Object getExampleObject()
Description copied from interface: Query
return the template Object if present or null

Specified by:
getExampleObject in interface Query

getSearchClass

public java.lang.Class getSearchClass()
Description copied from interface: Query
return the target class, representing the extend to be searched

Specified by:
getSearchClass in interface Query

isDistinct

public boolean isDistinct()
Description copied from interface: Query
return true if select DISTINCT should be used

Specified by:
isDistinct in interface Query

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Authors: Thomas Mahler and others. (C) 2000, 2001.
All rights reserved. Published under the Gnu Public License.
http://objectbridge.sourceforge.net
Version: 0.8.375, 2002-04-04