net.sf.dc.db
Class Query

java.lang.Object
  extended bynet.sf.dc.db.Query

public class Query
extends java.lang.Object

Creates a query String by using the QueryOptions, the QueryWhat, the QueryConditions and the query type

Since:
1.3
Version:
0.5
Author:
Robert Jan van der Waals

Field Summary
static int _CREATE
           
static int _DELETE
           
static int _INSERT
           
static int _SELECT
           
static int _UNDEFINED
           
static int _UPDATE
           
 
Constructor Summary
Query(int queryType, DcObject dco, QueryOptions options, RequestCollection requestors)
          Creates a new Query object.
 
Method Summary
 void finalize()
           
 java.lang.String getObjectID()
           
 java.lang.String[] getQueries()
           
 int getQueryType()
          Returns the query type
 RequestCollection getRequestors()
          Returns the requestors
 boolean getSilence()
          Specifies whether the query should report events to the log and the UI
 boolean isBatch()
          Indicates if this query is part of a batch
 boolean isEndOfBatch()
          Indicates if this query is the end of a batch
 void setBatch(boolean endOfBatch)
          Sets this query as being part of a batch
 void setSilence(boolean silence)
          Sets the query to silent.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_UNDEFINED

public static final int _UNDEFINED
See Also:
Constant Field Values

_UPDATE

public static final int _UPDATE
See Also:
Constant Field Values

_CREATE

public static final int _CREATE
See Also:
Constant Field Values

_INSERT

public static final int _INSERT
See Also:
Constant Field Values

_SELECT

public static final int _SELECT
See Also:
Constant Field Values

_DELETE

public static final int _DELETE
See Also:
Constant Field Values
Constructor Detail

Query

public Query(int queryType,
             DcObject dco,
             QueryOptions options,
             RequestCollection requestors)
Creates a new Query object. In this object the condition values and their fields are stored, the columns of the object, the options, the query type and the requestors of the query (which might want the query to result in an action) The public query types are not all there is to it, depending on the query options, a subtype is set (only in case of select queries) From these values a query string is created

Method Detail

setBatch

public void setBatch(boolean endOfBatch)
Sets this query as being part of a batch

Parameters:
endOfBatch - last of the batch y/n

isBatch

public boolean isBatch()
Indicates if this query is part of a batch


isEndOfBatch

public boolean isEndOfBatch()
Indicates if this query is the end of a batch


getObjectID

public java.lang.String getObjectID()

getQueryType

public int getQueryType()
Returns the query type


getSilence

public boolean getSilence()
Specifies whether the query should report events to the log and the UI


setSilence

public void setSilence(boolean silence)
Sets the query to silent. Silent means that no events are logged

Parameters:
silence - specifies if the query should run silently

getRequestors

public RequestCollection getRequestors()
Returns the requestors


getQueries

public java.lang.String[] getQueries()

finalize

public void finalize()
              throws java.lang.Throwable
Throws:
java.lang.Throwable