Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

DBObjectField Class Reference

#include <dbobject.hpp>

Inheritance diagram for DBObjectField:

Inheritance graph
[legend]
Collaboration diagram for DBObjectField:

Collaboration graph
[legend]
List of all members.

Detailed Description

Represents a DB mapped object field.

Definition at line 82 of file dbobject.hpp.

Public Methods

 DBObjectField (const char *p_pszName)
 Field's parent node. Constructor.

 DBObjectField (const DBOBJDefinitionField *p_pDBObjectFieldDef)
 Constructor.

 ~DBObjectField ()
 Destructor.

const char * getName () const
 Returns field name.

const char * getValue ()
 Returns field value.

bool isAttribute () const
 Returns true if the field is rendered as an attribute in the XML stream.

const DBOBJDefinitionFieldgetDefinition () const
 Returns field definition.

void setName (const char *p_pszName)
 Sets field value.

void setAttribute (bool p_fAttribute)
 Sets field value.

void setValue (const char *p_pszFieldValue)
 Sets field value.

void setParent (DBObjectNode *p_DBOBJParentNode)
 Sets field parent object.

void setDefinition (const DBOBJDefinitionField *p_pDBObjectFieldDef)
 Sets field definition.

void getXML (XMLStreamConsumer *p_pXMLBufOut)
 Outputs field's XML stream.

int getType () const
 Returns type of object.


Constructor & Destructor Documentation

BEGIN_XDFLENGINE_NS DBObjectField::DBObjectField const char *    p_pszName
 

Field's parent node. Constructor.

Parameters:
p_pDBObjectFieldDef (DBOBJDefinitionField*) Definition of the field.

Definition at line 56 of file dbobject.cpp.

References DEBUG_CREATE, and setName().

DBObjectField::DBObjectField const DBOBJDefinitionField   p_pDBObjectFieldDef
 

Constructor.

Parameters:
p_pDBObjectFieldDef (DBOBJDefinitionField*) Definition of the field.

Definition at line 73 of file dbobject.cpp.

References DEBUG_CREATE, and setDefinition().

DBObjectField::~DBObjectField  
 

Destructor.

Definition at line 90 of file dbobject.cpp.

References DEBUG_DEL, and releaseCharBuffer().


Member Function Documentation

const DBOBJDefinitionField * DBObjectField::getDefinition   const
 

Returns field definition.

Returns:
(DBOBJDefinitionField) Field definition.

Definition at line 186 of file dbobject.cpp.

References DEBUG_FUNC.

Referenced by DBOBJSetStreamer::buildINSERTStatement(), DBOBJSetStreamer::getFieldBindVar(), and DBOBJSetStreamer::getFieldValue().

const char * DBObjectField::getName   const
 

Returns field name.

Returns:
(string) Field name.

Definition at line 115 of file dbobject.cpp.

References DEBUG_ECHO, DEBUG_FUNC, and exportCharBuffer().

Referenced by DBObjectNode::addField(), DBOBJSetStreamer::getFieldBindVar(), and DBOBJSetStreamer::getSQLInsert().

int DBObjectField::getType   const [virtual]
 

Returns type of object.

Returns:
(int) type constant of objet.
Return values:
DBOBJECTTYPE_NODE for nodes.
DBOBJECTTYPE_FIELD for fields.

Implements DBObject.

Definition at line 105 of file dbobject.cpp.

References DBOBJECTTYPE_FIELD, and DEBUG_FUNC.

const char * DBObjectField::getValue  
 

Returns field value.

Returns:
(string) Field value.

Definition at line 126 of file dbobject.cpp.

References DBObjectNode::calculateRelValue(), copyCharBuffer(), DBOBJaction_Delete, DBOBJaction_Insert, DBOBJaction_Unspec, DBOBJaction_Update, DBOBJDEFFIELD_NOVALUE, DBOBJSetAction, DEBUG_FUNC, DBObjectNode::getAction(), DBOBJDefinitionField::getDValue(), DBOBJDefinitionField::getIValue(), DBOBJDefinitionField::getUValue(), DBOBJDefinitionField::getValue(), importCharBuffer(), and releaseCharBuffer().

Referenced by DBOBJSetStreamer::getFieldValue(), getXML(), and DBOBJSetStreamer::sendRecordToDB().

void DBObjectField::getXML XMLStreamConsumer   p_pXMLBufOut
 

Outputs field's XML stream.

Parameters:
p_pXMLBufOut (XMLStreamBuffer*) XMLStreamBuffer to output the XML stream into.

Definition at line 195 of file dbobject.cpp.

References DEBUG_FUNC, and getValue().

Referenced by DBObjectNode::getXML().

bool DBObjectField::isAttribute   const
 

Returns true if the field is rendered as an attribute in the XML stream.

Returns:
(bool) TRUE if the field is rendered as an attribute.

Definition at line 177 of file dbobject.cpp.

References DEBUG_FUNC.

Referenced by DBObjectNode::getXML().

void DBObjectField::setAttribute bool    p_fAttribute
 

Sets field value.

Parameters:
p_strFieldValue (string) Field value.

Definition at line 228 of file dbobject.cpp.

References DEBUG_FUNC.

Referenced by setName().

void DBObjectField::setDefinition const DBOBJDefinitionField   p_pDBObjectFieldDef
 

Sets field definition.

Parameters:
p_pDBObjectFieldDef (DBOBJDefinitionField*) Definition of the field.

Definition at line 260 of file dbobject.cpp.

References DEBUG_FUNC, DBOBJDefinitionField::getName(), importCharBuffer(), and DBOBJDefinitionField::isAttribute().

Referenced by DBObjectField().

void DBObjectField::setName const char *    p_pszName
 

Sets field value.

Parameters:
p_strFieldValue (string) Field value.

Definition at line 216 of file dbobject.cpp.

References DBOBJDEFFIELD_ATTR, DEBUG_FUNC, importCharBuffer(), and setAttribute().

Referenced by DBObjectField().

void DBObjectField::setParent DBObjectNode   p_DBOBJParentNode
 

Sets field parent object.

Parameters:
p_DBOBJParentNode (DBObjectNode*) Parent object node.

Definition at line 250 of file dbobject.cpp.

References DEBUG_FUNC.

Referenced by DBObjectNode::addField(), and DBObjectNode::removeField().

void DBObjectField::setValue const char *    p_pszFieldValue
 

Sets field value.

Parameters:
p_strFieldValue (string) Field value.

Definition at line 239 of file dbobject.cpp.

References DEBUG_FUNC, and importCharBuffer().

Referenced by DBObjectSAXBuilder::startElement().


The documentation for this class was generated from the following files:
Generated on Sat Oct 4 13:23:39 2003 for XDFLengine by doxygen1.3-rc2