public class

DynamicsCrmWhereManager

extends Object
implements DynamicsCrmWhereComponent
java.lang.Object
   ↳ org.mule.module.dynamicscrm.query.where.DynamicsCrmWhereManager

Class Overview

Manager for the composite that generates the part of the WHERE for the query. It uses a firstComposite as the head of the WHERE, and a lastComposite as the current position in the composites for aggregation and decendence of levels on endPrecedence

Summary

Fields
private DynamicsCrmWhereComponent firstComposite
private DynamicsCrmWhereComposite lastComposite
Public Constructors
DynamicsCrmWhereManager()
Public Methods
void and()
Define the comparation of the \
void beginExpression()
A beginExpression means the first \.
void comparison(String operator, String field, String value)
Adds a comparison element that is represented by DynamicsCrmWhereLeaf and is translated as a \
void endPrecedence()
An end of precedence means go back to the previous \
String getQueryXml()
void initPrecedence()
A new precedence means a new \.
void or()
Define the comparation of the \
void release()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.mule.module.dynamicscrm.query.where.DynamicsCrmWhereComponent

Fields

private DynamicsCrmWhereComponent firstComposite

private DynamicsCrmWhereComposite lastComposite

Public Constructors

public DynamicsCrmWhereManager ()

Public Methods

public void and ()

Define the comparation of the \

Throws
DynamicsCrmQueryException By rule, the Dynamics CRM Query Language only allows one comparation per \, if it detects another comparation different from the first one in the same block, it throws this exception

Ex. WHERE a=1 AND b=2 OR c=3 throws an exception.

For solving this problem use agruppator

Ex. WHERE a=1 AND (b=2 OR c=3)

public void beginExpression ()

A beginExpression means the first \. This is managed by the DynamicsCrmWhereComposite of the composite

public void comparison (String operator, String field, String value)

Adds a comparison element that is represented by DynamicsCrmWhereLeaf and is translated as a \

Parameters
operator The operator for the condition
field The name of the field
value The value to compare to

public void endPrecedence ()

An end of precedence means go back to the previous \

public String getQueryXml ()

public void initPrecedence ()

A new precedence means a new \. This is managed by the DynamicsCrmWhereComposite of the composite

public void or ()

Define the comparation of the \

Throws
DynamicsCrmQueryException By rule, the Dynamics CRM Query Language only allows one comparation per \, if it detects another comparation different from the first one in the same block, it throws this exception

Ex. WHERE a=1 AND b=2 OR c=3 throws an exception.

For solving this problem use agruppator

Ex. WHERE a=1 AND (b=2 OR c=3)

public void release ()