#include <librets/MetadataTable.h>
Public Types | |
enum | DataType { BOOLEAN, CHARACTER, DATE, DATE_TIME, TIME, TINY, SMALL, INT, LONG, DECIMAL } |
Data types for tables. More... | |
enum | Interpretation { NUMBER, CURRENCY, LOOKUP, LOOKUP_MULTI, LOOKUP_BITSTRING, LOOKUP_BITMASK, NO_INTERPRETATION } |
enum | Alignment { LEFT, RIGHT, CENTER, JUSTIFY, NO_ALIGNMENT } |
enum | Units { FEET, METERS, SQUARE_FEET, SQUARE_METERS, ACRES, HECTARES, NO_UNITS } |
Public Member Functions | |
virtual MetadataType | GetType () const |
Always returns TABLE. | |
virtual std::string | GetId () const |
Returns the ID attribute. | |
std::string | GetSystemName () const |
Returns the system name for this field. | |
std::string | GetStandardName () const |
Returns the standard name for this field. | |
std::string | GetLongName () const |
Returns the long, descriptive name for this field. | |
std::string | GetDBName () const |
Returns the DB name for this field. | |
std::string | GetShortName () const |
Return the short name for this field. | |
int | GetMaximumLength () const |
Return the maximum length for this field. | |
DataType | GetDataType () const |
Returns the data type for this field. | |
int | GetPrecision () const |
Returns the maximum length of this field, in characters. | |
bool | IsSearchable () const |
Returns true if this field is searchable. | |
Interpretation | GetInterpretation () const |
Returns the intepretation of this field. | |
Alignment | GetAlignment () const |
Return the alignment of this field. | |
bool | UseSeparator () const |
Return whether or not this field uses a separator. | |
std::string | GetEditMaskId () const |
Return the edit mask ID for this field. | |
std::string | GetLookupName () const |
Return the lookup name for this field. | |
int | GetMaxSelect () const |
Return the Max Select value for this field. | |
Units | GetUnits () const |
Return the units type for this field. | |
int | GetIndex () const |
Return the index for this field. | |
int | GetMinimum () const |
Get the minimum value for this field. | |
std::string | GetMinimumAsString () const |
Get the minimum value for this field as a string. | |
int | GetMaximum () const |
Get the maximum value for this field. | |
std::string | GetMaximumAsString () const |
Get the maximum value for this field as a string. | |
int | GetDefault () const |
Get the default value for this field. | |
int | GetRequired () const |
Get whether or not this is a required field for searching. | |
std::string | GetSearchHelpId () const |
Get the Search Help ID. | |
bool | IsUnique () const |
Get whether or not this field is supposed to be unique. | |
bool | UpdatesModTimeStamp () const |
Returns true if changes to this field update the class's ModTimeStamp field. | |
std::string | GetForeignKey () const |
When nonblank, indicate that this field is normally populated via this foreign key. | |
std::string | GetForeignField () const |
Returns the SystemName from the child record accessed via the specified foreign key. | |
bool | GetKeyRetrievalQuery () const |
Returns true when this field may be included in a query that uses the Key optional argument. | |
bool | GetKeyRetrievalSelect () const |
Returns true when this field may be included in the Select list of a query that uses the option Key argument. | |
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. | |
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 |
typedef MetadataType Type [inherited] |
enum Alignment |
enum DataType |
Data types for tables.
enum Interpretation |
enum MetadataType [inherited] |
Metadata types.
enum Units |
virtual bool Equals | ( | const RetsObject * | object | ) | const [virtual, inherited] |
Alignment GetAlignment | ( | ) | const |
Return the alignment of this field.
StringVector GetAttributeNames | ( | ) | const [inherited] |
Returns all attirbute names.
bool GetBoolAttribute | ( | std::string | attributeName, | |
bool | defaultValue = false | |||
) | const [inherited] |
Returns the value of an attribute as a boolean.
attributeName | A string containing the name of the attribute. | |
defaultValue | The value to use if the attribute does not exist. |
DataType GetDataType | ( | ) | const |
Returns the data type for this field.
std::string GetDBName | ( | ) | const |
Returns the DB name for this field.
int GetDefault | ( | ) | const |
Get the default value for this field.
std::string GetEditMaskId | ( | ) | const |
Return the edit mask ID for this field.
std::string GetForeignField | ( | ) | const |
Returns the SystemName
from the child record accessed via the specified foreign key.
SystemName
of the foreign key for the child. std::string GetForeignKey | ( | ) | const |
When nonblank, indicate that this field is normally populated via this foreign key.
virtual std::string GetId | ( | ) | const [virtual] |
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.
Reimplemented from MetadataElement.
int GetIndex | ( | ) | const |
Return the index for this field.
int GetIntAttribute | ( | std::string | attributeName, | |
int | defaultValue = 0 | |||
) | const [inherited] |
Returns the value of an attribute as an integer.
attributeName | A string containing the name of the attribute. | |
defaultValue | The value to use if the attribute does not exist. |
Interpretation GetInterpretation | ( | ) | const |
Returns the intepretation of this field.
bool GetKeyRetrievalQuery | ( | ) | const |
Returns true
when this field may be included in a query that uses the Key
optional argument.
true
when may be used with Key
optional argument. bool GetKeyRetrievalSelect | ( | ) | const |
Returns true
when this field may be included in the Select
list of a query that uses the option Key
argument.
true
when may be used in Select
list. std::string GetLevel | ( | ) | const [inherited] |
Returns the level of the current metadata element.
std::string GetLongName | ( | ) | const |
Returns the long, descriptive name for this field.
std::string GetLookupName | ( | ) | const |
Return the lookup name for this field.
int GetMaximum | ( | ) | const |
Get the maximum value for this field.
std::string GetMaximumAsString | ( | ) | const |
Get the maximum value for this field as a string.
This is a workaround to allow the ability to fetch maximum values for floating point fields. It is up to the user code to handle the parsing of this value.
int GetMaximumLength | ( | ) | const |
Return the maximum length for this field.
int GetMaxSelect | ( | ) | const |
Return the Max Select value for this field.
std::string GetMetadataEntryID | ( | ) | const [inherited] |
Returns the MetadataEntryId for the element.
int GetMinimum | ( | ) | const |
Get the minimum value for this field.
std::string GetMinimumAsString | ( | ) | const |
Get the minimum value for this field as a string.
This is a workaround to allow the ability to fetch minimum values for floating point fields. It is up to the user code to handle the parsing of this value.
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.
int GetPrecision | ( | ) | const |
Returns the maximum length of this field, in characters.
For numeric fields, this is the display length rather than the storage length, and iuncludes all formatting such as the sign, decimal point, commas or other insertion edits.
int GetRequired | ( | ) | const |
Get whether or not this is a required field for searching.
std::string GetSearchHelpId | ( | ) | const |
Get the Search Help ID.
std::string GetShortName | ( | ) | const |
Return the short name for this field.
std::string GetStandardName | ( | ) | const |
Returns the standard name for this field.
If this table has no standard name, then an empty string is returned.
std::string GetStringAttribute | ( | std::string | attributeName, | |
std::string | defaultValue = "" | |||
) | const [inherited] |
Returns the value of an attribute.
attributeName | A string containing the name of the attribute. | |
defaultValue | The value to use if the attribute does not exist. |
std::string GetSystemName | ( | ) | const |
Returns the system name for this field.
virtual MetadataType GetType | ( | ) | const [virtual] |
Units GetUnits | ( | ) | const |
Return the units type for this field.
bool IsSearchable | ( | ) | const |
Returns true
if this field is searchable.
true
if this field is searchable bool IsUnique | ( | ) | const |
Get whether or not this field is supposed to be unique.
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.
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.
level | A string containing the level. |
std::string ToString | ( | ) | const [inherited] |
bool UpdatesModTimeStamp | ( | ) | const |
Returns true
if changes to this field update the class's ModTimeStamp field.
true
if changes update ModTimeStamp. bool UseSeparator | ( | ) | const |
Return whether or not this field uses a separator.
StringMap mAttributes [protected, inherited] |
std::string mLevel [protected, inherited] |