com.google.api.ads.dfp.axis.v201203
Class Statement

java.lang.Object
  extended by com.google.api.ads.dfp.axis.v201203.Statement
All Implemented Interfaces:
Serializable

public class Statement
extends Object
implements Serializable

Captures the WHERE, ORDER BY and LIMIT clauses of a PQL query. Statements are typically used to retrieve objects of a predefined domain type, which makes SELECT clause unnecessary.

An example query text might be "WHERE status = 'ACTIVE' ORDER BY id LIMIT 30".

Statements also support bind variables. These are substitutes for literals and can be thought of as input parameters to a PQL query.

An example of such a query might be "WHERE id = :idValue".

If using an API version newer than V201010, the value for the variable idValue must then be set with an object of type Value and is one of NumberValue, TextValue or BooleanValue.

If using an API version older than or equal to V201010, the value for the variable idValue must then be set with an object of type Param and is one of DoubleParam, LongParam or StringParam.

See Also:
Serialized Form

Constructor Summary
Statement()
           
Statement(String query, String_ValueMapEntry[] values)
           
 
Method Summary
 boolean equals(Object obj)
           
static org.apache.axis.encoding.Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType)
          Get Custom Deserializer
 String getQuery()
          Gets the query value for this Statement.
static org.apache.axis.encoding.Serializer getSerializer(String mechType, Class _javaType, QName _xmlType)
          Get Custom Serializer
static org.apache.axis.description.TypeDesc getTypeDesc()
          Return type metadata object
 String_ValueMapEntry[] getValues()
          Gets the values value for this Statement.
 String_ValueMapEntry getValues(int i)
           
 int hashCode()
           
 void setQuery(String query)
          Sets the query value for this Statement.
 void setValues(int i, String_ValueMapEntry _value)
           
 void setValues(String_ValueMapEntry[] values)
          Sets the values value for this Statement.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Statement

public Statement()

Statement

public Statement(String query,
                 String_ValueMapEntry[] values)
Method Detail

getQuery

public String getQuery()
Gets the query value for this Statement.

Returns:
query * Holds the query in PQL syntax. The syntax is:
[WHERE {[AND | OR] ...}]
[ORDER BY [ASC | DESC]]
[LIMIT {[,] } | { OFFSET }]


     := {< | <= | > | >= | = | != }

     := {< | <= | > | >= | = | != }
:= IN
:= IS NULL
:= :


setQuery

public void setQuery(String query)
Sets the query value for this Statement.

Parameters:
query - * Holds the query in PQL syntax. The syntax is:
[WHERE {[AND | OR] ...}]
[ORDER BY [ASC | DESC]]
[LIMIT {[,] } | { OFFSET }]


     := {< | <= | > | >= | = | != }

     := {< | <= | > | >= | = | != }
:= IN
:= IS NULL
:= :


getValues

public String_ValueMapEntry[] getValues()
Gets the values value for this Statement.

Returns:
values * Holds keys and values for bind variables and their values. The key is the name of the bind variable. The value is the literal value of the variable.

In the example "WHERE status = :bindStatus ORDER BY id LIMIT 30", the bind variable, represented by :bindStatus is named bindStatus, which would also be the parameter map key. The bind variable's value would be represented by a parameter map value of type TextValue. The final result, for example, would be an entry of "bindStatus" => StringParam("ACTIVE").


setValues

public void setValues(String_ValueMapEntry[] values)
Sets the values value for this Statement.

Parameters:
values - * Holds keys and values for bind variables and their values. The key is the name of the bind variable. The value is the literal value of the variable.

In the example "WHERE status = :bindStatus ORDER BY id LIMIT 30", the bind variable, represented by :bindStatus is named bindStatus, which would also be the parameter map key. The bind variable's value would be represented by a parameter map value of type TextValue. The final result, for example, would be an entry of "bindStatus" => StringParam("ACTIVE").


getValues

public String_ValueMapEntry getValues(int i)

setValues

public void setValues(int i,
                      String_ValueMapEntry _value)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getTypeDesc

public static org.apache.axis.description.TypeDesc getTypeDesc()
Return type metadata object


getSerializer

public static org.apache.axis.encoding.Serializer getSerializer(String mechType,
                                                                Class _javaType,
                                                                QName _xmlType)
Get Custom Serializer


getDeserializer

public static org.apache.axis.encoding.Deserializer getDeserializer(String mechType,
                                                                    Class _javaType,
                                                                    QName _xmlType)
Get Custom Deserializer



Copyright © 2012. All Rights Reserved.