Enhydra 5.1 API

org.webdocwf.util.genericstore.data
Class AttributeBoolValueQuery

java.lang.Object
  |
  +--org.webdocwf.util.genericstore.data.AttributeBoolValueQuery
All Implemented Interfaces:
Query

public class AttributeBoolValueQuery
extends java.lang.Object
implements Query

AttributeBoolValueQuery is used to query the ATTRIBUTEBOOLVALUE table in the database. It returns objects of type AttributeBoolValueDO.

General usage:

In DODS: Create a Data Object named "Dog", and create an Attribute named "Name", and set that Attribute to "Can be queried." DODS will then generate the method DogQuery.setQueryName().

In your Business Layer, prepare the query:

             DogQuery dq = new DogQuery();
             dq.setQueryName("Rex")
             if ( Rex is a reserved name )
                 dq.requireUniqueInstance();
 
Then, get the query results one of two ways:

#1:

             String names = "";
             DogDO[] dogs = dq.getDOArray();
             for ( int i = 0; i < dogs.length; i++ ) {
                 names += dogs[i].getName() + " ";
             }
 
or #2:
             String names = "";
             DogDO dog;
             while ( null != ( dog = dq.getNextDO() ) ) {
                 names += dog.getName() + " ";
             }
 

Note: If requireUniqueInstance() was called, then getDOArray() or getNextDO() will throw an exception if more than one "Rex" was found.

Note: Results of the query will come from the Data Object cache if: - The cache is available. - Matches were found in the cache. - No other tables (Data Objects of other types) were involved in the query. This can happen if you extend the DogQuery class and you make calls to the QueryBuilder object to add SQL involving other tables. If any of these conditions is not true, then any results from the query will come from the database.

To reuse the query object, call:

             dq.reset();
 

Version:
$Revision: 1.2 $
Author:
administrator

Constructor Summary
AttributeBoolValueQuery()
          Public constructor.
AttributeBoolValueQuery(User usr)
          Constructor for Query with security
 
Method Summary
 void addOrderByATTRIBUTEDEFINITIONOID()
          Add ATTRIBUTEDEFINITIONOID to the ORDER BY clause.
 void addOrderByATTRIBUTEDEFINITIONOID(boolean direction_flag)
          Add ATTRIBUTEDEFINITIONOID to the ORDER BY clause.
 void addOrderByBOOLVALUE()
          Add BOOLVALUE to the ORDER BY clause.
 void addOrderByBOOLVALUE(boolean direction_flag)
          Add BOOLVALUE to the ORDER BY clause.
 void addOrderByGENERICOBJECTOID()
          Add GENERICOBJECTOID to the ORDER BY clause.
 void addOrderByGENERICOBJECTOID(boolean direction_flag)
          Add GENERICOBJECTOID to the ORDER BY clause.
static void assertQueryAccess(User usr)
          Ensure that the given user is allowed to create a query
 void assertQueryAttrATTRIBUTEDEFINITIONOIDAccess(AttributeDefinitionDO x, boolean exact, User usr)
          Deprecated. Instead use assertQueryAttrATTRIBUTEDEFINITIONOIDAccess(org.webdocwf.util.genericstore.data.AttributeDefinitionDO x, String cmp_op, org.webdocwf.dods.access.User usr ) WebDocWf extension
 void assertQueryAttrATTRIBUTEDEFINITIONOIDAccess(AttributeDefinitionDO x, java.lang.String cmp_op, User usr)
          Ensure the given user is allowed to query the attribute
 void assertQueryAttrATTRIBUTEDEFINITIONOIDAccess(AttributeDefinitionDO x, User usr)
          Ensure the given user is allowed to query the attribute
 void assertQueryAttrBOOLVALUEAccess(boolean x, boolean exact, User usr)
          Deprecated. Instead use assertQueryAttrBOOLVALUEAccess(boolean x, String cmp_op, org.webdocwf.dods.access.User usr ) WebDocWf extension
 void assertQueryAttrBOOLVALUEAccess(boolean x, java.lang.String cmp_op, User usr)
          Ensure the given user is allowed to query the attribute
 void assertQueryAttrBOOLVALUEAccess(boolean x, User usr)
          Ensure the given user is allowed to query the attribute
 void assertQueryAttrGENERICOBJECTOIDAccess(GenericObjectDO x, boolean exact, User usr)
          Deprecated. Instead use assertQueryAttrGENERICOBJECTOIDAccess(org.webdocwf.util.genericstore.data.GenericObjectDO x, String cmp_op, org.webdocwf.dods.access.User usr ) WebDocWf extension
 void assertQueryAttrGENERICOBJECTOIDAccess(GenericObjectDO x, java.lang.String cmp_op, User usr)
          Ensure the given user is allowed to query the attribute
 void assertQueryAttrGENERICOBJECTOIDAccess(GenericObjectDO x, User usr)
          Ensure the given user is allowed to query the attribute
 void closeParen()
          Place a closing parenthesis in the WHERE clause.
 boolean containsWildcards(java.lang.String dbSearchValue)
          Check whether a string contains DB wildcards
 java.lang.String convertUserSearchValue(java.lang.String userSearchValue)
          Convert a String with user wildcards into a string with DB wildcards
 java.sql.ResultSet executeQuery(DBConnection conn)
          Method to query objects from the database.
 int getCount()
          Get the rowcount of the query If possible, do it without reading all rows
 int getDatabaseLimit()
          Get the database limit of the query
 boolean getDatabaseLimitExceeded()
          Get the database limit exceeded flag of the query
 AttributeBoolValueDO[] getDOArray()
          Return array of DOs constructed from ResultSet returned by query.
 AttributeBoolValueDO getNextDO()
          Return successive DOs from array built from ResultSet returned by query.
 QueryBuilder getQueryBuilder()
          Returns the QueryBuilder that this AttributeBoolValueQuery uses to construct and execute database queries.
 int getReadSkip()
          Get the readSkip number of the query
 boolean getUnique()
          Get the unique flag of the query
 User getUser()
          Get the user of the query
 boolean getUserStringAppendWildcard()
           
 java.lang.String getUserStringSingleWildcard()
           
 java.lang.String getUserStringSingleWildcardEscape()
           
 boolean getUserStringTrim()
           
 java.lang.String getUserStringWildcard()
           
 java.lang.String getUserStringWildcardEscape()
           
static boolean hasQueryAccess(User usr)
          Check whether the given user is allowed to create a query
 boolean hasQueryAttrATTRIBUTEDEFINITIONOIDAccess(AttributeDefinitionDO x, boolean exact, User usr)
          Deprecated. Instead use hasQueryAttrATTRIBUTEDEFINITIONOIDAccess(org.webdocwf.util.genericstore.data.AttributeDefinitionDO x, String cmp_op, org.webdocwf.dods.access.User usr ) WebDocWf extension
 boolean hasQueryAttrATTRIBUTEDEFINITIONOIDAccess(AttributeDefinitionDO x, java.lang.String cmp_op, User usr)
          Check whether the given user is allowed to query the attribute
 boolean hasQueryAttrATTRIBUTEDEFINITIONOIDAccess(AttributeDefinitionDO x, User usr)
          Check whether the given user is allowed to query the attribute
 boolean hasQueryAttrBOOLVALUEAccess(boolean x, boolean exact, User usr)
          Deprecated. Instead use hasQueryAttrBOOLVALUEAccess(boolean x, String cmp_op, org.webdocwf.dods.access.User usr ) WebDocWf extension
 boolean hasQueryAttrBOOLVALUEAccess(boolean x, java.lang.String cmp_op, User usr)
          Check whether the given user is allowed to query the attribute
 boolean hasQueryAttrBOOLVALUEAccess(boolean x, User usr)
          Check whether the given user is allowed to query the attribute
 boolean hasQueryAttrGENERICOBJECTOIDAccess(GenericObjectDO x, boolean exact, User usr)
          Deprecated. Instead use hasQueryAttrGENERICOBJECTOIDAccess(org.webdocwf.util.genericstore.data.GenericObjectDO x, String cmp_op, org.webdocwf.dods.access.User usr ) WebDocWf extension
 boolean hasQueryAttrGENERICOBJECTOIDAccess(GenericObjectDO x, java.lang.String cmp_op, User usr)
          Check whether the given user is allowed to query the attribute
 boolean hasQueryAttrGENERICOBJECTOIDAccess(GenericObjectDO x, User usr)
          Check whether the given user is allowed to query the attribute
 void hitDatabase()
           
 java.lang.Object next(java.sql.ResultSet rs)
          WARNING! This method is disabled.
 void openParen()
          Place an open parenthesis in the WHERE clause.
 void or()
          Insert an OR between WHERE clauses.
 void requireUniqueInstance()
          Set "unique instance" assertion bit.
 void reset()
          Reset the query parameters.
 int selectCount()
          Get the rowcount of the query by using count(*) in the DB
 void setDatabaseLimit(int newLimit)
          Set the database limit of the query
 void setMaxRows(int maxRows)
          Limit the number of rows (DOs) returned.
 void setQueryATTRIBUTEDEFINITIONOID(AttributeDefinitionDO x)
          Set the ATTRIBUTEDEFINITIONOID to query
 void setQueryATTRIBUTEDEFINITIONOID(AttributeDefinitionDO x, boolean exact)
          Deprecated. Instead use setQueryATTRIBUTEDEFINITIONOID(org.webdocwf.util.genericstore.data.AttributeDefinitionDO x,String cmp_op)
 void setQueryATTRIBUTEDEFINITIONOID(AttributeDefinitionDO x, boolean exact, User usr)
          Deprecated. Instead use setQueryATTRIBUTEDEFINITIONOID(org.webdocwf.util.genericstore.data.AttributeDefinitionDO x,String cmp_op, org.webdocwf.dods.access.User usr) WebDocWf extension
 void setQueryATTRIBUTEDEFINITIONOID(AttributeDefinitionDO x, java.lang.String cmp_op)
          Set the ATTRIBUTEDEFINITIONOID to query, with a QueryBuilder comparison operator.
 void setQueryATTRIBUTEDEFINITIONOID(AttributeDefinitionDO x, java.lang.String cmp_op, User usr)
          Set the ATTRIBUTEDEFINITIONOID to query, with a QueryBuilder comparison operator.
 void setQueryATTRIBUTEDEFINITIONOID(AttributeDefinitionDO x, User usr)
          Set the ATTRIBUTEDEFINITIONOID to query.
 void setQueryBOOLVALUE(boolean x)
          Set the BOOLVALUE to query
 void setQueryBOOLVALUE(boolean x, boolean exact)
          Deprecated. Instead use setQueryBOOLVALUE(boolean x,String cmp_op)
 void setQueryBOOLVALUE(boolean x, boolean exact, User usr)
          Deprecated. Instead use setQueryBOOLVALUE(boolean x,String cmp_op, org.webdocwf.dods.access.User usr) WebDocWf extension
 void setQueryBOOLVALUE(boolean x, java.lang.String cmp_op)
          Set the BOOLVALUE to query, with a QueryBuilder comparison operator.
 void setQueryBOOLVALUE(boolean x, java.lang.String cmp_op, User usr)
          Set the BOOLVALUE to query, with a QueryBuilder comparison operator.
 void setQueryBOOLVALUE(boolean x, User usr)
          Set the BOOLVALUE to query.
 void setQueryGENERICOBJECTOID(GenericObjectDO x)
          Set the GENERICOBJECTOID to query
 void setQueryGENERICOBJECTOID(GenericObjectDO x, boolean exact)
          Deprecated. Instead use setQueryGENERICOBJECTOID(org.webdocwf.util.genericstore.data.GenericObjectDO x,String cmp_op)
 void setQueryGENERICOBJECTOID(GenericObjectDO x, boolean exact, User usr)
          Deprecated. Instead use setQueryGENERICOBJECTOID(org.webdocwf.util.genericstore.data.GenericObjectDO x,String cmp_op, org.webdocwf.dods.access.User usr) WebDocWf extension
 void setQueryGENERICOBJECTOID(GenericObjectDO x, java.lang.String cmp_op)
          Set the GENERICOBJECTOID to query, with a QueryBuilder comparison operator.
 void setQueryGENERICOBJECTOID(GenericObjectDO x, java.lang.String cmp_op, User usr)
          Set the GENERICOBJECTOID to query, with a QueryBuilder comparison operator.
 void setQueryGENERICOBJECTOID(GenericObjectDO x, User usr)
          Set the GENERICOBJECTOID to query.
 void setQueryHandle(java.lang.String handle)
          Set the object handle to query.
 void setQueryOId(ObjectId oid)
          Set the OID to query.
 void setReadSkip(int newReadSkip)
          Set the readSkip number of the query
 void setUnique(boolean newUnique)
          Set the unique flag of the query
 void setUserStringAppendWildcard(boolean userStringAppendWildcard)
           
 void setUserStringSingleWildcard(java.lang.String newUserStringSingleWildcard)
           
 void setUserStringSingleWildcardEscape(java.lang.String newUserStringSingleWildcardEscape)
           
 void setUserStringTrim(boolean userStringTrim)
           
 void setUserStringWildcard(java.lang.String newUserStringWildcard)
           
 void setUserStringWildcardEscape(java.lang.String newUserStringWildcardEscape)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeBoolValueQuery

public AttributeBoolValueQuery()
Public constructor.


AttributeBoolValueQuery

public AttributeBoolValueQuery(User usr)
                        throws AccessException
Constructor for Query with security

Parameters:
usr - The user for security check
Throws:
AccessException - The user is not allowed to create a query WebDocWf extension
Method Detail

assertQueryAccess

public static void assertQueryAccess(User usr)
                              throws AccessException
Ensure that the given user is allowed to create a query

Parameters:
usr - The user for security check
Throws:
AccessException - The user is not allowed to create a query WebDocWf extension

hasQueryAccess

public static boolean hasQueryAccess(User usr)
                              throws AccessEvalException
Check whether the given user is allowed to create a query

Parameters:
usr - The user for security check
Returns:
Whether the given user is allowed to create a query WebDocWf extension
AccessEvalException

getUser

public User getUser()
Get the user of the query

Returns:
The user of the query WebDocWf extension

setUnique

public void setUnique(boolean newUnique)
Set the unique flag of the query

Parameters:
newUnique - The unique flag for the query WebDocWf extension

getUnique

public boolean getUnique()
Get the unique flag of the query

Returns:
The unique flag of the query WebDocWf extension

setReadSkip

public void setReadSkip(int newReadSkip)
Set the readSkip number of the query


getReadSkip

public int getReadSkip()
Get the readSkip number of the query

Returns:
The number of rows which are skipped WebDocWf extension

setDatabaseLimit

public void setDatabaseLimit(int newLimit)
Set the database limit of the query

Parameters:
newLimit - The limit for the query WebDocWf extension

getDatabaseLimit

public int getDatabaseLimit()
Get the database limit of the query

Returns:
The database limit of the query WebDocWf extension

getDatabaseLimitExceeded

public boolean getDatabaseLimitExceeded()
Get the database limit exceeded flag of the query

Returns:
The database limit exceeded flag of the query True if there would have been more rows than the limit WebDocWf extension

hitDatabase

public void hitDatabase()

setUserStringWildcard

public void setUserStringWildcard(java.lang.String newUserStringWildcard)

setUserStringSingleWildcard

public void setUserStringSingleWildcard(java.lang.String newUserStringSingleWildcard)

setUserStringSingleWildcardEscape

public void setUserStringSingleWildcardEscape(java.lang.String newUserStringSingleWildcardEscape)

setUserStringWildcardEscape

public void setUserStringWildcardEscape(java.lang.String newUserStringWildcardEscape)

setUserStringAppendWildcard

public void setUserStringAppendWildcard(boolean userStringAppendWildcard)

setUserStringTrim

public void setUserStringTrim(boolean userStringTrim)

getUserStringWildcard

public java.lang.String getUserStringWildcard()

getUserStringSingleWildcard

public java.lang.String getUserStringSingleWildcard()

getUserStringSingleWildcardEscape

public java.lang.String getUserStringSingleWildcardEscape()

getUserStringWildcardEscape

public java.lang.String getUserStringWildcardEscape()

getUserStringAppendWildcard

public boolean getUserStringAppendWildcard()

getUserStringTrim

public boolean getUserStringTrim()

setMaxRows

public void setMaxRows(int maxRows)
                throws DataObjectException,
                       NonUniqueQueryException
Limit the number of rows (DOs) returned. NOTE: When setting a limit on rows returned by a query, you usually want to use a call to an addOrderBy method to cause the most interesting rows to be returned first.

Throws:
DataObjectException - If a database access error occurs.
NonUniqueQueryException - If too many rows were found.

getDOArray

public AttributeBoolValueDO[] getDOArray()
                                  throws DataObjectException,
                                         NonUniqueQueryException
Return array of DOs constructed from ResultSet returned by query.

Throws:
DataObjectException - If a database access error occurs.
NonUniqueQueryException - If too many rows were found.

getNextDO

public AttributeBoolValueDO getNextDO()
                               throws DataObjectException,
                                      NonUniqueQueryException
Return successive DOs from array built from ResultSet returned by query.

Throws:
DataObjectException - If a database access error occurs.
NonUniqueQueryException - If too many rows were found.

setQueryOId

public void setQueryOId(ObjectId oid)
Set the OID to query. WARNING! This method assumes that table ATTRIBUTEBOOLVALUE has a column named "oid". This method is called from the DO classes to retrieve an object by id.

Parameters:
oid - The object id to query.

setQueryHandle

public void setQueryHandle(java.lang.String handle)
                    throws ObjectIdException
Set the object handle to query. This is a variant of setQueryOId().

Parameters:
handle - The string version of the id to query.
ObjectIdException

requireUniqueInstance

public void requireUniqueInstance()
Set "unique instance" assertion bit. The first call to the next() method will throw an exception if more than one object was found.


reset

public void reset()
Reset the query parameters.


executeQuery

public java.sql.ResultSet executeQuery(DBConnection conn)
                                throws java.sql.SQLException
Method to query objects from the database. The following call in runQuery() dbQuery.query( this ); causes the dbQuery object to invoke executeQuery()

Specified by:
executeQuery in interface Query
Parameters:
conn - Handle to database connection.
Throws:
java.sql.SQLException - If a database access error occurs.

next

public java.lang.Object next(java.sql.ResultSet rs)
                      throws java.sql.SQLException,
                             ObjectIdException
WARNING! This method is disabled. It's implementation is forced by the Query interface. This method is disabled for 2 reasons: 1) the getDOArray() and getNextDO() methods are better because they return DOs instead of JDBC objects. 2) the createExisting() method throws an exception that we cannot reasonably handle here, and that we cannot throw from here.

Specified by:
next in interface Query
Parameters:
rs - JDBC result set from which the next object will be instantiated.
Throws:
java.sql.SQLException - If a database access error occurs.
ObjectIdException - If an invalid object id was queried from the database.

convertUserSearchValue

public java.lang.String convertUserSearchValue(java.lang.String userSearchValue)
Convert a String with user wildcards into a string with DB wildcards

Parameters:
userSearchValue - The string with user wildcards
Returns:
The string with DB wildcards WebDocWf extension

containsWildcards

public boolean containsWildcards(java.lang.String dbSearchValue)
Check whether a string contains DB wildcards

Parameters:
dbSearchValue - The string with possible DB wildcards
Returns:
Whether a string contains DB wildcards WebDocWf extension

getCount

public int getCount()
             throws NonUniqueQueryException,
                    DataObjectException,
                    java.sql.SQLException,
                    DatabaseManagerException
Get the rowcount of the query If possible, do it without reading all rows

Returns:
The row count WebDocWf extension
NonUniqueQueryException
DataObjectException
java.sql.SQLException
DatabaseManagerException

selectCount

public int selectCount()
                throws java.sql.SQLException,
                       DatabaseManagerException
Get the rowcount of the query by using count(*) in the DB

Returns:
The row count WebDocWf extension
java.sql.SQLException
DatabaseManagerException

setQueryATTRIBUTEDEFINITIONOID

public void setQueryATTRIBUTEDEFINITIONOID(AttributeDefinitionDO x,
                                           java.lang.String cmp_op)
                                    throws DataObjectException,
                                           QueryException
Set the ATTRIBUTEDEFINITIONOID to query, with a QueryBuilder comparison operator.

Parameters:
x - The ATTRIBUTEDEFINITIONOID of the ATTRIBUTEBOOLVALUE to query.
cmp_op - QueryBuilder comparison operator to use.
Throws:
DataObjectException - If a database access error occurs.
QueryException - If comparison operator is inappropriate (e.g. CASE_SENSITIVE_CONTAINS on an integer field).

setQueryATTRIBUTEDEFINITIONOID

public void setQueryATTRIBUTEDEFINITIONOID(AttributeDefinitionDO x,
                                           boolean exact)
                                    throws DataObjectException,
                                           QueryException
Deprecated. Instead use setQueryATTRIBUTEDEFINITIONOID(org.webdocwf.util.genericstore.data.AttributeDefinitionDO x,String cmp_op)

Set the ATTRIBUTEDEFINITIONOID to query.

Parameters:
x - The ATTRIBUTEDEFINITIONOID of the ATTRIBUTEBOOLVALUE to query.
exact - to use matches or not
Throws:
DataObjectException - If a database access error occurs.
QueryException

setQueryATTRIBUTEDEFINITIONOID

public void setQueryATTRIBUTEDEFINITIONOID(AttributeDefinitionDO x)
                                    throws DataObjectException,
                                           QueryException
Set the ATTRIBUTEDEFINITIONOID to query

Parameters:
x - The ATTRIBUTEDEFINITIONOID of the ATTRIBUTEBOOLVALUE to query.
Throws:
DataObjectException - If a database access error occurs.
QueryException

addOrderByATTRIBUTEDEFINITIONOID

public void addOrderByATTRIBUTEDEFINITIONOID(boolean direction_flag)
Add ATTRIBUTEDEFINITIONOID to the ORDER BY clause.

Parameters:
direction_flag - True for ascending order, false for descending

addOrderByATTRIBUTEDEFINITIONOID

public void addOrderByATTRIBUTEDEFINITIONOID()
Add ATTRIBUTEDEFINITIONOID to the ORDER BY clause. This convenience method assumes ascending order.


setQueryATTRIBUTEDEFINITIONOID

public void setQueryATTRIBUTEDEFINITIONOID(AttributeDefinitionDO x,
                                           boolean exact,
                                           User usr)
                                    throws DataObjectException,
                                           QueryException,
                                           AccessException
Deprecated. Instead use setQueryATTRIBUTEDEFINITIONOID(org.webdocwf.util.genericstore.data.AttributeDefinitionDO x,String cmp_op, org.webdocwf.dods.access.User usr) WebDocWf extension

Set the ATTRIBUTEDEFINITIONOID to query.

Parameters:
x - The ATTRIBUTEDEFINITIONOID of the ATTRIBUTEBOOLVALUE to query.
exact - to use matches or not
usr - The user for security check
Throws:
DataObjectException - If a database access error occurs.
AccessException - The user is not allowed to query this attribute
QueryException

setQueryATTRIBUTEDEFINITIONOID

public void setQueryATTRIBUTEDEFINITIONOID(AttributeDefinitionDO x,
                                           User usr)
                                    throws DataObjectException,
                                           QueryException,
                                           AccessException
Set the ATTRIBUTEDEFINITIONOID to query.

Parameters:
x - The ATTRIBUTEDEFINITIONOID of the ATTRIBUTEBOOLVALUE to query.
usr - The user for security check
Throws:
DataObjectException - If a database access error occurs.
AccessException - The user is not allowed to query this attribute WebDocWf extension
QueryException

setQueryATTRIBUTEDEFINITIONOID

public void setQueryATTRIBUTEDEFINITIONOID(AttributeDefinitionDO x,
                                           java.lang.String cmp_op,
                                           User usr)
                                    throws DataObjectException,
                                           QueryException,
                                           AccessException
Set the ATTRIBUTEDEFINITIONOID to query, with a QueryBuilder comparison operator.

Parameters:
x - The ATTRIBUTEDEFINITIONOID of the ATTRIBUTEBOOLVALUE to query.
cmp_op - QueryBuilder comparison operator to use.
usr - The user for security check
Throws:
DataObjectException - If a database access error occurs.
QueryException - If comparison operator is inappropriate (e.g. CASE_SENSITIVE_CONTAINS on an integer field). WebDocWf extension
AccessException

assertQueryAttrATTRIBUTEDEFINITIONOIDAccess

public void assertQueryAttrATTRIBUTEDEFINITIONOIDAccess(AttributeDefinitionDO x,
                                                        boolean exact,
                                                        User usr)
                                                 throws AccessException
Deprecated. Instead use assertQueryAttrATTRIBUTEDEFINITIONOIDAccess(org.webdocwf.util.genericstore.data.AttributeDefinitionDO x, String cmp_op, org.webdocwf.dods.access.User usr ) WebDocWf extension

Ensure the given user is allowed to query the attribute

Parameters:
x - The ATTRIBUTEDEFINITIONOID of the ATTRIBUTEBOOLVALUE to query.
exact - to use matches or not
usr - The user for security check
Throws:
AccessException - The user is not allowed to query this attribute

assertQueryAttrATTRIBUTEDEFINITIONOIDAccess

public void assertQueryAttrATTRIBUTEDEFINITIONOIDAccess(AttributeDefinitionDO x,
                                                        java.lang.String cmp_op,
                                                        User usr)
                                                 throws AccessException
Ensure the given user is allowed to query the attribute

Parameters:
x - The ATTRIBUTEDEFINITIONOID of the ATTRIBUTEBOOLVALUE to query.
cmp_op - QueryBuilder comparison operator to use.
usr - The user for security check
Throws:
AccessException - The user is not allowed to query this attribute WebDocWf extension

assertQueryAttrATTRIBUTEDEFINITIONOIDAccess

public void assertQueryAttrATTRIBUTEDEFINITIONOIDAccess(AttributeDefinitionDO x,
                                                        User usr)
                                                 throws AccessException
Ensure the given user is allowed to query the attribute

Parameters:
x - The ATTRIBUTEDEFINITIONOID of the ATTRIBUTEBOOLVALUE to query.
usr - The user for security check
Throws:
AccessException - The user is not allowed to query this attribute WebDocWf extension

hasQueryAttrATTRIBUTEDEFINITIONOIDAccess

public boolean hasQueryAttrATTRIBUTEDEFINITIONOIDAccess(AttributeDefinitionDO x,
                                                        boolean exact,
                                                        User usr)
                                                 throws AccessEvalException
Deprecated. Instead use hasQueryAttrATTRIBUTEDEFINITIONOIDAccess(org.webdocwf.util.genericstore.data.AttributeDefinitionDO x, String cmp_op, org.webdocwf.dods.access.User usr ) WebDocWf extension

Check whether the given user is allowed to query the attribute

Parameters:
x - The ATTRIBUTEDEFINITIONOID of the ATTRIBUTEBOOLVALUE to query.
exact - to use matches or not
usr - The user for security check
Returns:
Whether the given user is allowed to query the attribute
AccessEvalException

hasQueryAttrATTRIBUTEDEFINITIONOIDAccess

public boolean hasQueryAttrATTRIBUTEDEFINITIONOIDAccess(AttributeDefinitionDO x,
                                                        java.lang.String cmp_op,
                                                        User usr)
                                                 throws AccessEvalException
Check whether the given user is allowed to query the attribute

Parameters:
x - The ATTRIBUTEDEFINITIONOID of the ATTRIBUTEBOOLVALUE to query.
cmp_op - QueryBuilder comparison operator to use.
usr - The user for security check
Returns:
Whether the given user is allowed to query the attribute WebDocWf extension
AccessEvalException

hasQueryAttrATTRIBUTEDEFINITIONOIDAccess

public boolean hasQueryAttrATTRIBUTEDEFINITIONOIDAccess(AttributeDefinitionDO x,
                                                        User usr)
                                                 throws AccessEvalException
Check whether the given user is allowed to query the attribute

Parameters:
x - The ATTRIBUTEDEFINITIONOID of the ATTRIBUTEBOOLVALUE to query.
usr - The user for security check
Returns:
Whether the given user is allowed to query the attribute WebDocWf extension
AccessEvalException

setQueryBOOLVALUE

public void setQueryBOOLVALUE(boolean x,
                              java.lang.String cmp_op)
                       throws DataObjectException,
                              QueryException
Set the BOOLVALUE to query, with a QueryBuilder comparison operator.

Parameters:
x - The BOOLVALUE of the ATTRIBUTEBOOLVALUE to query.
cmp_op - QueryBuilder comparison operator to use.
Throws:
DataObjectException - If a database access error occurs.
QueryException - If comparison operator is inappropriate (e.g. CASE_SENSITIVE_CONTAINS on an integer field).

setQueryBOOLVALUE

public void setQueryBOOLVALUE(boolean x,
                              boolean exact)
                       throws DataObjectException,
                              QueryException
Deprecated. Instead use setQueryBOOLVALUE(boolean x,String cmp_op)

Set the BOOLVALUE to query.

Parameters:
x - The BOOLVALUE of the ATTRIBUTEBOOLVALUE to query.
exact - to use matches or not
Throws:
DataObjectException - If a database access error occurs.
QueryException

setQueryBOOLVALUE

public void setQueryBOOLVALUE(boolean x)
                       throws DataObjectException,
                              QueryException
Set the BOOLVALUE to query

Parameters:
x - The BOOLVALUE of the ATTRIBUTEBOOLVALUE to query.
Throws:
DataObjectException - If a database access error occurs.
QueryException

addOrderByBOOLVALUE

public void addOrderByBOOLVALUE(boolean direction_flag)
Add BOOLVALUE to the ORDER BY clause.

Parameters:
direction_flag - True for ascending order, false for descending

addOrderByBOOLVALUE

public void addOrderByBOOLVALUE()
Add BOOLVALUE to the ORDER BY clause. This convenience method assumes ascending order.


setQueryBOOLVALUE

public void setQueryBOOLVALUE(boolean x,
                              boolean exact,
                              User usr)
                       throws DataObjectException,
                              QueryException,
                              AccessException
Deprecated. Instead use setQueryBOOLVALUE(boolean x,String cmp_op, org.webdocwf.dods.access.User usr) WebDocWf extension

Set the BOOLVALUE to query.

Parameters:
x - The BOOLVALUE of the ATTRIBUTEBOOLVALUE to query.
exact - to use matches or not
usr - The user for security check
Throws:
DataObjectException - If a database access error occurs.
AccessException - The user is not allowed to query this attribute
QueryException

setQueryBOOLVALUE

public void setQueryBOOLVALUE(boolean x,
                              User usr)
                       throws DataObjectException,
                              QueryException,
                              AccessException
Set the BOOLVALUE to query.

Parameters:
x - The BOOLVALUE of the ATTRIBUTEBOOLVALUE to query.
usr - The user for security check
Throws:
DataObjectException - If a database access error occurs.
AccessException - The user is not allowed to query this attribute WebDocWf extension
QueryException

setQueryBOOLVALUE

public void setQueryBOOLVALUE(boolean x,
                              java.lang.String cmp_op,
                              User usr)
                       throws DataObjectException,
                              QueryException,
                              AccessException
Set the BOOLVALUE to query, with a QueryBuilder comparison operator.

Parameters:
x - The BOOLVALUE of the ATTRIBUTEBOOLVALUE to query.
cmp_op - QueryBuilder comparison operator to use.
usr - The user for security check
Throws:
DataObjectException - If a database access error occurs.
QueryException - If comparison operator is inappropriate (e.g. CASE_SENSITIVE_CONTAINS on an integer field). WebDocWf extension
AccessException

assertQueryAttrBOOLVALUEAccess

public void assertQueryAttrBOOLVALUEAccess(boolean x,
                                           boolean exact,
                                           User usr)
                                    throws AccessException
Deprecated. Instead use assertQueryAttrBOOLVALUEAccess(boolean x, String cmp_op, org.webdocwf.dods.access.User usr ) WebDocWf extension

Ensure the given user is allowed to query the attribute

Parameters:
x - The BOOLVALUE of the ATTRIBUTEBOOLVALUE to query.
exact - to use matches or not
usr - The user for security check
Throws:
AccessException - The user is not allowed to query this attribute

assertQueryAttrBOOLVALUEAccess

public void assertQueryAttrBOOLVALUEAccess(boolean x,
                                           java.lang.String cmp_op,
                                           User usr)
                                    throws AccessException
Ensure the given user is allowed to query the attribute

Parameters:
x - The BOOLVALUE of the ATTRIBUTEBOOLVALUE to query.
cmp_op - QueryBuilder comparison operator to use.
usr - The user for security check
Throws:
AccessException - The user is not allowed to query this attribute WebDocWf extension

assertQueryAttrBOOLVALUEAccess

public void assertQueryAttrBOOLVALUEAccess(boolean x,
                                           User usr)
                                    throws AccessException
Ensure the given user is allowed to query the attribute

Parameters:
x - The BOOLVALUE of the ATTRIBUTEBOOLVALUE to query.
usr - The user for security check
Throws:
AccessException - The user is not allowed to query this attribute WebDocWf extension

hasQueryAttrBOOLVALUEAccess

public boolean hasQueryAttrBOOLVALUEAccess(boolean x,
                                           boolean exact,
                                           User usr)
                                    throws AccessEvalException
Deprecated. Instead use hasQueryAttrBOOLVALUEAccess(boolean x, String cmp_op, org.webdocwf.dods.access.User usr ) WebDocWf extension

Check whether the given user is allowed to query the attribute

Parameters:
x - The BOOLVALUE of the ATTRIBUTEBOOLVALUE to query.
exact - to use matches or not
usr - The user for security check
Returns:
Whether the given user is allowed to query the attribute
AccessEvalException

hasQueryAttrBOOLVALUEAccess

public boolean hasQueryAttrBOOLVALUEAccess(boolean x,
                                           java.lang.String cmp_op,
                                           User usr)
                                    throws AccessEvalException
Check whether the given user is allowed to query the attribute

Parameters:
x - The BOOLVALUE of the ATTRIBUTEBOOLVALUE to query.
cmp_op - QueryBuilder comparison operator to use.
usr - The user for security check
Returns:
Whether the given user is allowed to query the attribute WebDocWf extension
AccessEvalException

hasQueryAttrBOOLVALUEAccess

public boolean hasQueryAttrBOOLVALUEAccess(boolean x,
                                           User usr)
                                    throws AccessEvalException
Check whether the given user is allowed to query the attribute

Parameters:
x - The BOOLVALUE of the ATTRIBUTEBOOLVALUE to query.
usr - The user for security check
Returns:
Whether the given user is allowed to query the attribute WebDocWf extension
AccessEvalException

setQueryGENERICOBJECTOID

public void setQueryGENERICOBJECTOID(GenericObjectDO x,
                                     java.lang.String cmp_op)
                              throws DataObjectException,
                                     QueryException
Set the GENERICOBJECTOID to query, with a QueryBuilder comparison operator.

Parameters:
x - The GENERICOBJECTOID of the ATTRIBUTEBOOLVALUE to query.
cmp_op - QueryBuilder comparison operator to use.
Throws:
DataObjectException - If a database access error occurs.
QueryException - If comparison operator is inappropriate (e.g. CASE_SENSITIVE_CONTAINS on an integer field).

setQueryGENERICOBJECTOID

public void setQueryGENERICOBJECTOID(GenericObjectDO x,
                                     boolean exact)
                              throws DataObjectException,
                                     QueryException
Deprecated. Instead use setQueryGENERICOBJECTOID(org.webdocwf.util.genericstore.data.GenericObjectDO x,String cmp_op)

Set the GENERICOBJECTOID to query.

Parameters:
x - The GENERICOBJECTOID of the ATTRIBUTEBOOLVALUE to query.
exact - to use matches or not
Throws:
DataObjectException - If a database access error occurs.
QueryException

setQueryGENERICOBJECTOID

public void setQueryGENERICOBJECTOID(GenericObjectDO x)
                              throws DataObjectException,
                                     QueryException
Set the GENERICOBJECTOID to query

Parameters:
x - The GENERICOBJECTOID of the ATTRIBUTEBOOLVALUE to query.
Throws:
DataObjectException - If a database access error occurs.
QueryException

addOrderByGENERICOBJECTOID

public void addOrderByGENERICOBJECTOID(boolean direction_flag)
Add GENERICOBJECTOID to the ORDER BY clause.

Parameters:
direction_flag - True for ascending order, false for descending

addOrderByGENERICOBJECTOID

public void addOrderByGENERICOBJECTOID()
Add GENERICOBJECTOID to the ORDER BY clause. This convenience method assumes ascending order.


setQueryGENERICOBJECTOID

public void setQueryGENERICOBJECTOID(GenericObjectDO x,
                                     boolean exact,
                                     User usr)
                              throws DataObjectException,
                                     QueryException,
                                     AccessException
Deprecated. Instead use setQueryGENERICOBJECTOID(org.webdocwf.util.genericstore.data.GenericObjectDO x,String cmp_op, org.webdocwf.dods.access.User usr) WebDocWf extension

Set the GENERICOBJECTOID to query.

Parameters:
x - The GENERICOBJECTOID of the ATTRIBUTEBOOLVALUE to query.
exact - to use matches or not
usr - The user for security check
Throws:
DataObjectException - If a database access error occurs.
AccessException - The user is not allowed to query this attribute
QueryException

setQueryGENERICOBJECTOID

public void setQueryGENERICOBJECTOID(GenericObjectDO x,
                                     User usr)
                              throws DataObjectException,
                                     QueryException,
                                     AccessException
Set the GENERICOBJECTOID to query.

Parameters:
x - The GENERICOBJECTOID of the ATTRIBUTEBOOLVALUE to query.
usr - The user for security check
Throws:
DataObjectException - If a database access error occurs.
AccessException - The user is not allowed to query this attribute WebDocWf extension
QueryException

setQueryGENERICOBJECTOID

public void setQueryGENERICOBJECTOID(GenericObjectDO x,
                                     java.lang.String cmp_op,
                                     User usr)
                              throws DataObjectException,
                                     QueryException,
                                     AccessException
Set the GENERICOBJECTOID to query, with a QueryBuilder comparison operator.

Parameters:
x - The GENERICOBJECTOID of the ATTRIBUTEBOOLVALUE to query.
cmp_op - QueryBuilder comparison operator to use.
usr - The user for security check
Throws:
DataObjectException - If a database access error occurs.
QueryException - If comparison operator is inappropriate (e.g. CASE_SENSITIVE_CONTAINS on an integer field). WebDocWf extension
AccessException

assertQueryAttrGENERICOBJECTOIDAccess

public void assertQueryAttrGENERICOBJECTOIDAccess(GenericObjectDO x,
                                                  boolean exact,
                                                  User usr)
                                           throws AccessException
Deprecated. Instead use assertQueryAttrGENERICOBJECTOIDAccess(org.webdocwf.util.genericstore.data.GenericObjectDO x, String cmp_op, org.webdocwf.dods.access.User usr ) WebDocWf extension

Ensure the given user is allowed to query the attribute

Parameters:
x - The GENERICOBJECTOID of the ATTRIBUTEBOOLVALUE to query.
exact - to use matches or not
usr - The user for security check
Throws:
AccessException - The user is not allowed to query this attribute

assertQueryAttrGENERICOBJECTOIDAccess

public void assertQueryAttrGENERICOBJECTOIDAccess(GenericObjectDO x,
                                                  java.lang.String cmp_op,
                                                  User usr)
                                           throws AccessException
Ensure the given user is allowed to query the attribute

Parameters:
x - The GENERICOBJECTOID of the ATTRIBUTEBOOLVALUE to query.
cmp_op - QueryBuilder comparison operator to use.
usr - The user for security check
Throws:
AccessException - The user is not allowed to query this attribute WebDocWf extension

assertQueryAttrGENERICOBJECTOIDAccess

public void assertQueryAttrGENERICOBJECTOIDAccess(GenericObjectDO x,
                                                  User usr)
                                           throws AccessException
Ensure the given user is allowed to query the attribute

Parameters:
x - The GENERICOBJECTOID of the ATTRIBUTEBOOLVALUE to query.
usr - The user for security check
Throws:
AccessException - The user is not allowed to query this attribute WebDocWf extension

hasQueryAttrGENERICOBJECTOIDAccess

public boolean hasQueryAttrGENERICOBJECTOIDAccess(GenericObjectDO x,
                                                  boolean exact,
                                                  User usr)
                                           throws AccessEvalException
Deprecated. Instead use hasQueryAttrGENERICOBJECTOIDAccess(org.webdocwf.util.genericstore.data.GenericObjectDO x, String cmp_op, org.webdocwf.dods.access.User usr ) WebDocWf extension

Check whether the given user is allowed to query the attribute

Parameters:
x - The GENERICOBJECTOID of the ATTRIBUTEBOOLVALUE to query.
exact - to use matches or not
usr - The user for security check
Returns:
Whether the given user is allowed to query the attribute
AccessEvalException

hasQueryAttrGENERICOBJECTOIDAccess

public boolean hasQueryAttrGENERICOBJECTOIDAccess(GenericObjectDO x,
                                                  java.lang.String cmp_op,
                                                  User usr)
                                           throws AccessEvalException
Check whether the given user is allowed to query the attribute

Parameters:
x - The GENERICOBJECTOID of the ATTRIBUTEBOOLVALUE to query.
cmp_op - QueryBuilder comparison operator to use.
usr - The user for security check
Returns:
Whether the given user is allowed to query the attribute WebDocWf extension
AccessEvalException

hasQueryAttrGENERICOBJECTOIDAccess

public boolean hasQueryAttrGENERICOBJECTOIDAccess(GenericObjectDO x,
                                                  User usr)
                                           throws AccessEvalException
Check whether the given user is allowed to query the attribute

Parameters:
x - The GENERICOBJECTOID of the ATTRIBUTEBOOLVALUE to query.
usr - The user for security check
Returns:
Whether the given user is allowed to query the attribute WebDocWf extension
AccessEvalException

getQueryBuilder

public QueryBuilder getQueryBuilder()
Returns the QueryBuilder that this AttributeBoolValueQuery uses to construct and execute database queries. AttributeBoolValueQuery.setQueryXXX methods use the QueryBuilder to append SQL expressions to the "WHERE" clause to be executed. The QueryBuilder.addEndClause method. can be used to append freeform SQL expressions to the WHERE clause, e.g. "ORDER BY name". Notes regarding cache-enabled DO classes: DO classes can be cache-enabled. If when using a AttributeBoolValueQuery, the application developer does not call getQueryBuilder, then AttributeBoolValueQuery.setQueryXXX methods simply prune the DO cache and return the remaining results. However, a QueryBuilder builds SELECT statements for execution by the actual database, and never searches the built-in cache for the DO. So, if the DO class is cache-enabled, and getQueryBuilder is called, this AttributeBoolValueQuery object ignores the cache and hits the actual database.


or

public void or()
Insert an OR between WHERE clauses. Example: find all the persons named Bob or Robert: PersonQuery pq = new PersonQuery(); pq.setQueryFirstName( "Bob" ); pq.or(); pq.setQueryFirstName( "Robert" ); Note: Calls to setQueryXxx methods are implicitly ANDed together, so the following example will always return nothing: PersonQuery pq = new PersonQuery(); pq.setQueryFirstName( "Bob" ); // AND automatically inserted here. pq.setQueryFirstName( "Robert" );

See Also:
to construct more elaborate queries.

openParen

public void openParen()
Place an open parenthesis in the WHERE clause. Example usage: find all the Bobs and Roberts who are 5 or 50 years old: PersonQuery pq = new PersonQuery(); pq.openParen(); pq.setQueryFirstName( "Bob" ); pq.or(); pq.setQueryFirstName( "Robert" ); pq.closeParen(); // AND automatically inserted here. pq.openParen(); pq.setQueryAge( 5 ); pq.or(); pq.setQueryAge( 50 ); pq.closeParen();

See Also:
to construct more elaborate queries.

closeParen

public void closeParen()
Place a closing parenthesis in the WHERE clause.


Enhydra 5.1 API