com.alarmpoint.servicemanager
Class ServiceManagerQuery

java.lang.Object
  extended by com.alarmpoint.servicemanager.ServiceManagerQuery

public class ServiceManagerQuery
extends java.lang.Object

A utility used to create queries suitable to be used in Service Manager web service calls

Author:
bneate

Constructor Summary
ServiceManagerQuery()
           
 
Method Summary
 void addQueryField(ServiceManagerQueryField queryField)
          Adds a field to this query
 void constructFromMap(java.util.Map<java.lang.String,java.lang.String> fieldMap)
          Create a new query to match the specified fields using the EQUALS operator
 ServiceManagerQueryLogic getLogic()
          Retrieve the query logic that will be used to construct the query
 java.lang.String getQuery()
          Construct a query by joining the query for each field using the query logic
 java.util.List<ServiceManagerQueryField> getQueryFields()
          Returns a list of fields that exist for this query
 void setLogic(ServiceManagerQueryLogic logic)
          Set the query logic that will be used to join query fields
 void setQueryFields(java.util.List<ServiceManagerQueryField> fields)
          Set the list of fields for this query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceManagerQuery

public ServiceManagerQuery()
Method Detail

constructFromMap

public void constructFromMap(java.util.Map<java.lang.String,java.lang.String> fieldMap)
Create a new query to match the specified fields using the EQUALS operator

Parameters:
fieldMap - A Map of fields and values to search with

addQueryField

public void addQueryField(ServiceManagerQueryField queryField)
Adds a field to this query

Parameters:
queryField - The query to be added

getQueryFields

public java.util.List<ServiceManagerQueryField> getQueryFields()
Returns a list of fields that exist for this query

Returns:
A list of fields for this query

setQueryFields

public void setQueryFields(java.util.List<ServiceManagerQueryField> fields)
Set the list of fields for this query

Parameters:
fields - The new list of fields

getQuery

public java.lang.String getQuery()
Construct a query by joining the query for each field using the query logic

Returns:
A Service Manager query

getLogic

public ServiceManagerQueryLogic getLogic()
Retrieve the query logic that will be used to construct the query

Returns:
The query logic for this query

setLogic

public void setLogic(ServiceManagerQueryLogic logic)
Set the query logic that will be used to join query fields

Parameters:
logic -