UpdateRequest Class Reference

UpdateRequest contains the API that is used to set up and customer a RETS UPDATE transaciton. More...

#include <librets/UpdateRequest.h>

List of all members.

Public Member Functions

 UpdateRequest (std::string resourceName, std::string className)
 Create a new update request.
const std::string GetDelimiter ()
 Returns the current value of the delimiter for the current request.
void SetDelimiter (std::string delimiter)
 Sets the value of the delimiter for the current request.
const StringVector GetAllFields ()
 Returns a string vector containing the names of all fields.
const std::string GetField (std::string key)
 Returns the value for the given field.
void SetField (std::string key, std::string value)
 Set the name of a field and its value.
const std::string GetUpdateType ()
 Returns the current value of the update parameter for the request.
void SetUpdateType (std::string updateType)
 Set the value of the update type parameter for the current request.
const int GetValidateFlag ()
 Returns the current value of the validation flag for the current request.
void SetValidateFlag (int flag)
 Sets the validation flag for the current request.
const StringVector GetAllWarnings ()
 Returns a string vector containing the warning numbers.
const std::string GetWarningResponse (int warningNumber)
 Returns a string containing the user response for the given warning number.
const std::string GetWarningResponse (std::string warningNumber)
 Returns a string containing the user response for the given warning number.
void SetWarningResponse (int warningNumber, std::string userResponse)
 Set the warning number and response.
void SetWarningResponse (std::string warningNumber, std::string userResponse)
 Set the warning number and response.

Static Public Attributes

static const int UPDATE_OK = 0
 This requests the server update the record if there are no errors.
static const int AUTO_POPULATE = 1
 Validation will happen on the host.
static const int VALIDATE_ONLY = 2
 The server validates the record and returns any errors found.


Detailed Description

UpdateRequest contains the API that is used to set up and customer a RETS UPDATE transaciton.

Constructor & Destructor Documentation

UpdateRequest ( std::string  resourceName,
std::string  className 
)

Create a new update request.

Parameters:
resourceName RETS resource name
className RETS class name


Member Function Documentation

const StringVector GetAllFields (  ) 

Returns a string vector containing the names of all fields.

Returns:
A StringVector containing the names of all fields.

const StringVector GetAllWarnings (  ) 

Returns a string vector containing the warning numbers.

Returns:
A StringVector containing the warning numbers represented as strings.

const std::string GetDelimiter (  ) 

Returns the current value of the delimiter for the current request.

Returns:
A string containing the delimiter.

const std::string GetField ( std::string  key  ) 

Returns the value for the given field.

Parameters:
key A string containing the field name.
Returns:
A string containing the field value.

const std::string GetUpdateType (  ) 

Returns the current value of the update parameter for the request.

Returns:
A string containing the value of the update type.

const int GetValidateFlag (  ) 

Returns the current value of the validation flag for the current request.

Returns:
An integer representing the value of the validation flag.

const std::string GetWarningResponse ( std::string  warningNumber  ) 

Returns a string containing the user response for the given warning number.

Parameters:
warningNumber A string containing the warning number.
Returns:
A string containing the user response for the given warning number.

const std::string GetWarningResponse ( int  warningNumber  ) 

Returns a string containing the user response for the given warning number.

Parameters:
warningNumber An integer containing the warning number.
Returns:
A string containing the user response for the given warning number.

void SetDelimiter ( std::string  delimiter  ) 

Sets the value of the delimiter for the current request.

Parameters:
delimiter A string containing the delimiter value.

void SetField ( std::string  key,
std::string  value 
)

Set the name of a field and its value.

Parameters:
key A string containing the name of the field.
value A string containing the value for the field.

void SetUpdateType ( std::string  updateType  ) 

Set the value of the update type parameter for the current request.

Parameters:
updateType A string containing the value of the update type.

void SetValidateFlag ( int  flag  ) 

Sets the validation flag for the current request.

Parameters:
flag One of UPDATE_OK, AUTO_POPULATE or VALIDATE_ONLY.

void SetWarningResponse ( std::string  warningNumber,
std::string  userResponse 
)

Set the warning number and response.

Parameters:
warningNumber A string containing the warning number.
userResponse A string containing the user response.

void SetWarningResponse ( int  warningNumber,
std::string  userResponse 
)

Set the warning number and response.

Parameters:
warningNumber An integer containing the warning number.
userResponse A string containing the user response.


Member Data Documentation

const int AUTO_POPULATE = 1 [static]

Validation will happen on the host.

Any fields with the "Autopop" attribute will have their values set by the server and returned to the client. The record in the database is not updated. This gives the client the opportunity to get server populated data inserted into the record and returned to the client without updating the database.

const int UPDATE_OK = 0 [static]

This requests the server update the record if there are no errors.

const int VALIDATE_ONLY = 2 [static]

The server validates the record and returns any errors found.

It does not update the database if there are no errors found.


Generated by  doxygen