MetadataUpdateType Class Reference

MetadataUpdateType is an implementation of MetadataElement that represents Update Type metadata. More...

#include <librets/MetadataUpdateType.h>

Inheritance diagram for MetadataUpdateType:

MetadataElement RetsObject

List of all members.

Public Types

enum  MetadataType {
  SYSTEM, RESOURCE, CLASS, TABLE,
  UPDATE, UPDATE_TYPE, OBJECT, SEARCH_HELP,
  EDIT_MASK, LOOKUP, LOOKUP_TYPE, UPDATE_HELP,
  VALIDATION_LOOKUP, VALIDATION_LOOKUP_TYPE, VALIDATION_EXTERNAL, VALIDATION_EXTERNAL_TYPE,
  VALIDATION_EXPRESSION, FOREIGN_KEY
}
 Metadata types. More...
typedef MetadataType Type

Public Member Functions

virtual MetadataType GetType () const
 Always returns UPDATE_TYPE.
std::string GetSystemName () const
 Return the SystemName for this Update Type.
int GetSequence () const
 Return the sequence number of this field.
std::string GetAttributes () const
 Return the Attributes for this field.
std::string GetDefault () const
 Return the default value for this field.
std::string GetValidationExpressionID () const
 Return a string containing the ValidationExpressionID for this field.
std::string GetValidationLookupName () const
 Return the ValidationLookupName for this field.
std::string GetValidationExternalName () const
 Return the ValidationExternalName for this field.
int GetMaxUpdate () const
 Return the maximum number of values that may be specified for the field.
StringVector GetAttributeNames () const
 Returns all attirbute names.
std::string GetStringAttribute (std::string attributeName, std::string defaultValue="") const
 Returns the value of an attribute.
int GetIntAttribute (std::string attributeName, int defaultValue=0) const
 Returns the value of an attribute as an integer.
bool GetBoolAttribute (std::string attributeName, bool defaultValue=false) const
 Returns the value of an attribute as a boolean.
void SetAttribute (std::string attributeName, std::string attributeValue)
 Set the value of an attribute.
virtual std::string GetId () const
 Returns the ID attribute.
std::string GetLevel () const
 Returns the level of the current metadata element.
void SetLevel (std::string level)
 Set the level for the current metadata element.
std::string GetPath () const
 Returns the path of this element.
std::string GetMetadataEntryID () const
 Returns the MetadataEntryId for the element.
virtual std::ostream & Print (std::ostream &outputStream) const
 Prints the attribute in a standard form for debugging and error reporting.
std::string ToString () const
virtual bool Equals (const RetsObject *object) const

Protected Attributes

StringMap mAttributes
std::string mLevel


Detailed Description

MetadataUpdateType is an implementation of MetadataElement that represents Update Type metadata.

Member Typedef Documentation

typedef MetadataType Type [inherited]


Member Enumeration Documentation

enum MetadataType [inherited]

Metadata types.

Enumerator:
SYSTEM  System metadata.

RESOURCE  Resource metadata.

CLASS  Class metadata.

TABLE  Table metadata.

UPDATE  Update metadata.

UPDATE_TYPE  Update type metadata.

OBJECT  Object metadata.

SEARCH_HELP  Search help metadata.

EDIT_MASK  Edit mask metadata.

LOOKUP  Lookup metadata.

LOOKUP_TYPE  Lookup type metadata.

UPDATE_HELP  Update help metadata.

VALIDATION_LOOKUP  Validation lookup metadata.

VALIDATION_LOOKUP_TYPE  Validation lookup type metadata.

VALIDATION_EXTERNAL  Validation external metadata.

VALIDATION_EXTERNAL_TYPE  Validation external type metadata.

VALIDATION_EXPRESSION  Validation expression metadata.

FOREIGN_KEY  Foreign key metadata.


Member Function Documentation

virtual bool Equals ( const RetsObject object  )  const [virtual, inherited]

StringVector GetAttributeNames (  )  const [inherited]

Returns all attirbute names.

Returns:
all attribute names

std::string GetAttributes (  )  const

Return the Attributes for this field.

Returns:
A string containing a comma separated string of Update Attributes.

bool GetBoolAttribute ( std::string  attributeName,
bool  defaultValue = false 
) const [inherited]

Returns the value of an attribute as a boolean.

Parameters:
attributeName A string containing the name of the attribute.
defaultValue The value to use if the attribute does not exist.
Returns:
The value of the attribute as a boolean.

std::string GetDefault (  )  const

Return the default value for this field.

Returns:
A string containing the default value.

virtual std::string GetId (  )  const [virtual, inherited]

Returns the ID attribute.

The ID attribute is a non-empty and unique field used to identify this element within the scope of elements of the same type. Not all metadata elements have an identifying attribute. In these cases, an empty string is returned. The default implementation returns an empty string. Subclasses should override as needed.

Returns:
the ID attribute, if there is one

Reimplemented in MetadataClass, MetadataEditMask, MetadataLookup, MetadataLookupType, MetadataObject, MetadataResource, MetadataSearchHelp, MetadataTable, MetadataUpdate, and MetadataUpdateHelp.

Referenced by MetadataElementIdEqual::operator()().

int GetIntAttribute ( std::string  attributeName,
int  defaultValue = 0 
) const [inherited]

Returns the value of an attribute as an integer.

Parameters:
attributeName A string containing the name of the attribute.
defaultValue The value to use if the attribute does not exist.
Returns:
The value of the attribute as an integer.

std::string GetLevel (  )  const [inherited]

Returns the level of the current metadata element.

Returns:
A string containing the level.

int GetMaxUpdate (  )  const

Return the maximum number of values that may be specified for the field.

Returns:
An integer containing the maximum number of values.

std::string GetMetadataEntryID (  )  const [inherited]

Returns the MetadataEntryId for the element.

Returns:
MetadataEntryId

std::string GetPath (  )  const [inherited]

Returns the path of this element.

The path uniquely identifies this metadata element amongst all elements of the same type. Since this relies on the ID attribute, only those elements with an ID attribute have a non-empty path.

Returns:
the unique path

int GetSequence (  )  const

Return the sequence number of this field.

Returns:
An integer representing the sequence number for this field.

std::string GetStringAttribute ( std::string  attributeName,
std::string  defaultValue = "" 
) const [inherited]

Returns the value of an attribute.

Parameters:
attributeName A string containing the name of the attribute.
defaultValue The value to use if the attribute does not exist.
Returns:
The value of the attribute as a string.

std::string GetSystemName (  )  const

Return the SystemName for this Update Type.

Returns:
A string containing the SystemName.

virtual MetadataType GetType (  )  const [virtual]

Always returns UPDATE_TYPE.

Returns:
UPDATE_TYPE

Implements MetadataElement.

std::string GetValidationExpressionID (  )  const

Return a string containing the ValidationExpressionID for this field.

Returns:
A string containing the ValidationExpressionID.

std::string GetValidationExternalName (  )  const

Return the ValidationExternalName for this field.

Returns:
A string containing the ValidationExternalName.

std::string GetValidationLookupName (  )  const

Return the ValidationLookupName for this field.

Returns:
A string containing the ValidationLookupName.

virtual std::ostream& Print ( std::ostream &  outputStream  )  const [virtual, inherited]

Prints the attribute in a standard form for debugging and error reporting.

Reimplemented from RetsObject.

void SetAttribute ( std::string  attributeName,
std::string  attributeValue 
) [inherited]

Set the value of an attribute.

Parameters:
attributeName A string containing the name of the attribute.
attributeValue A string containing the value of the attribute.

void SetLevel ( std::string  level  )  [inherited]

Set the level for the current metadata element.

Parameters:
level A string containing the level.

std::string ToString (  )  const [inherited]


Member Data Documentation

StringMap mAttributes [protected, inherited]

std::string mLevel [protected, inherited]


Generated by  doxygen