com.businessobjects.query
Interface QueryProperty


public interface QueryProperty

The QueryProperty interface specifies the name and value of a property for a query. For example, to set the maximum number of rows fetched by the query, you would set the name of a QueryProperty instance to "MaxRowFetched" and the value to an integer representing the maximum number of rows fetched.

To set a number of properties for a query, you create an array of QueryProperty objects, set the name and value for each element in the array, and then assign the array to a QuerySpecification instance using the QuerySpecification.setQueryPropertyArray method.

The following properties can be set:

Example: Setting the name and value for the query properties

        QueryProperty[] boQueryProperties = new QueryProperty[4];
        boQueryProperties[0] = QueryProperty.Factory.newInstance();
        boQueryProperties[1] = QueryProperty.Factory.newInstance();
        boQueryProperties[2] = QueryProperty.Factory.newInstance();
        boQueryProperties[3] = QueryProperty.Factory.newInstance();

 boQueryProperties[0].setName("DuplicatedRows");
        boQueryProperties[0].setValue("true");

        boQueryProperties[1].setName("MaxFetchedTime");
        boQueryProperties[1].setValue("1000");
        boQueryProperties[2].setName("MaxRowFetched");
        boQueryProperties[2].setValue("100");

        boQueryProperties[3].setName("ResetContextOnRefresh");
        boQueryProperties[3].setValue("true");
        boQuery.setQueryResultArray(boQueryResultObjects);
 boQuerySpec.setQueryPropertyArray(boQueryProperties);
        boQuerySpec.setQueryBase(boQuery);
 


Nested Class Summary
static class QueryProperty.Factory
          A class with methods for creating instances of the QueryProperty type.
 
Field Summary
static org.apache.xmlbeans.SchemaType type
          Internal Use Only.
 
Method Summary
 boolean getActivate()
           Checks whether the user is allowed to set a value to this query property.
 java.lang.String getName()
           Gets the name of the property represented by this QueryProperty instance.
 java.lang.String getValue()
           Gets the value for the property represented by this QueryProperty instance.
 void setActivate(boolean activate)
          Internal Use Only.
 void setName(java.lang.String name)
           Sets the name of the property represented by this QueryProperty instance.
 void setValue(java.lang.String value)
           Sets the value for the property represented by this QueryProperty instance.
 org.apache.xmlbeans.XmlBoolean xgetActivate()
          Internal Use Only.
 org.apache.xmlbeans.XmlString xgetName()
          Internal Use Only.
 org.apache.xmlbeans.XmlString xgetValue()
          Internal Use Only.
 void xsetActivate(org.apache.xmlbeans.XmlBoolean activate)
          Internal Use Only.
 void xsetName(org.apache.xmlbeans.XmlString name)
          Internal Use Only.
 void xsetValue(org.apache.xmlbeans.XmlString value)
          Internal Use Only.
 

Field Detail

type

static final org.apache.xmlbeans.SchemaType type

Internal Use Only.

Method Detail

getName

java.lang.String getName()

Gets the name of the property represented by this QueryProperty instance. Possible values are "DuplicatedRows", "MaxFetchedTime", "MaxRowFetched" and "ResetContextOnRefresh".

Returns:
the name of the property represented by this QueryProperty instance as a String

xgetName

org.apache.xmlbeans.XmlString xgetName()

Internal Use Only.


setName

void setName(java.lang.String name)

Sets the name of the property represented by this QueryProperty instance. Possible values are "DuplicatedRows", "MaxFetchedTime", "MaxRowFetched" and "ResetContextOnRefresh".

Parameters:
name - the name of the property represented by this QueryProperty instance as a String

xsetName

void xsetName(org.apache.xmlbeans.XmlString name)

Internal Use Only.


getActivate

boolean getActivate()

Checks whether the user is allowed to set a value to this query property.

Returns:
true if the user can set a value to this query property, otherwise false

xgetActivate

org.apache.xmlbeans.XmlBoolean xgetActivate()

Internal Use Only.


setActivate

void setActivate(boolean activate)

Internal Use Only.


xsetActivate

void xsetActivate(org.apache.xmlbeans.XmlBoolean activate)

Internal Use Only.


getValue

java.lang.String getValue()

Gets the value for the property represented by this QueryProperty instance. Even though the values for the properties are either int or boolean, this method returns the String representation of those values. For example, if you set the value of "DuplicatedRows" to "true" in this QueryProperty instance. The getValue method will return the String "true" (not the boolean true).

Returns:
a String that represents the value of the property represented by this QueryProperty instance

xgetValue

org.apache.xmlbeans.XmlString xgetValue()

Internal Use Only.


setValue

void setValue(java.lang.String value)

Sets the value for the property represented by this QueryProperty instance. Even though the values for the properties are either int or boolean values, this method must be passed a String representation of those values. For example, to set the value of "DuplicatedRows" to "true" for this QueryProperty instance, you must pass the String "true" to this method.

Parameters:
value - a String that represents the value of the property represented by this QueryProperty instance

xsetValue

void xsetValue(org.apache.xmlbeans.XmlString value)

Internal Use Only.