Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
Tonido::DataSync::DataSyncRecord Class Reference

DataSyncRecord. More...

Inheritance diagram for Tonido::DataSync::DataSyncRecord:
Tonido::Data::GroupDataRecord

List of all members.

Public Types

typedef boost::shared_ptr
< DataSyncRecord
SharedPtr

Public Member Functions

 DataSyncRecord ()
 Ctor.
 DataSyncRecord (const Poco::UUID &a_id)
 DataSyncRecord (Poco::UUID a_id, int64_bt a_updateTimeStamp, const std::string &a_updatePeer, int64_bt a_createTimeStamp, const std::string &a_createPeer, int a_isDeleted)
virtual ~DataSyncRecord ()
 Dtor.
Poco::UUID & getID ()
 getID
void setID (const Poco::UUID &a_id)
 setID
const std::string & getUpdatePeer ()
 getUpdatePeer
const int64_bt getUpdateVersion ()
 getUpdateVersion
const std::string & getCreatedPeer ()
 getCreatedPeer
const int64_bt getCreatedVersion ()
 getCreatedVersion
bool isDeleted ()
 isDeleted
virtual DataSyncStrategy::SharedPtr getConflictResolutionStrategy ()
 getConflictResolutionStrategy
virtual void isConflict (bool a_conflicted)
 Sets whether a given record is in conflict or not.
bool operator== (const DataSyncRecord &a_other) const
 equals operator
bool operator!= (const DataSyncRecord &a_other) const
 notequals operator
void copy (const DataSyncRecord &a_other)
 copy
virtual Data::RawData::SharedPtr toRawData ()
 Serialization helpers.
virtual void fromRawData (Data::RawData::SharedPtr &a_data)

Protected Member Functions

void saveBase (Data::VariantRow &vr)
void loadBase (Data::VariantRow &vr)

Protected Attributes

Poco::UUID m_id
int64_bt m_updateVersion
std::string m_updatePeer
int64_bt m_createVersion
std::string m_createPeer
int m_isDeleted

Friends

class DataSyncStore
std::ostream & operator<< (std::ostream &os, const DataSyncRecord &e)

Detailed Description

DataSyncRecord.

Holds a Record


Constructor & Destructor Documentation

Tonido::DataSync::DataSyncRecord::DataSyncRecord ( )

Ctor.

Ctor default

virtual Tonido::DataSync::DataSyncRecord::~DataSyncRecord ( ) [virtual]

Dtor.

.. details if needed


Member Function Documentation

void Tonido::DataSync::DataSyncRecord::copy ( const DataSyncRecord a_other)

copy

copies the record meta data from another record

virtual DataSyncStrategy::SharedPtr Tonido::DataSync::DataSyncRecord::getConflictResolutionStrategy ( ) [virtual]

getConflictResolutionStrategy

Returns the strategy to use

const std::string& Tonido::DataSync::DataSyncRecord::getCreatedPeer ( )

getCreatedPeer

get's peer who created the record

const int64_bt Tonido::DataSync::DataSyncRecord::getCreatedVersion ( )

getCreatedVersion

get's peer's created version

Poco::UUID& Tonido::DataSync::DataSyncRecord::getID ( )

getID

get's the id of the record

const std::string& Tonido::DataSync::DataSyncRecord::getUpdatePeer ( )

getUpdatePeer

get's peer who updated the record last

const int64_bt Tonido::DataSync::DataSyncRecord::getUpdateVersion ( )

getUpdateVersion

get's peer version who updated the record last

virtual void Tonido::DataSync::DataSyncRecord::isConflict ( bool  a_conflicted) [virtual]

Sets whether a given record is in conflict or not.

Optional callback invoked by datasync indicating that a record is in conflict

bool Tonido::DataSync::DataSyncRecord::isDeleted ( )

isDeleted

whether the record was deleted or not

bool Tonido::DataSync::DataSyncRecord::operator!= ( const DataSyncRecord a_other) const

notequals operator

compares the record to another record

bool Tonido::DataSync::DataSyncRecord::operator== ( const DataSyncRecord a_other) const

equals operator

compares the record to another record

void Tonido::DataSync::DataSyncRecord::setID ( const Poco::UUID &  a_id)

setID

set's the id of the record


Generated on Wed Oct 12 2011 21:46:53. © CodeLathe LLC 2007-2011. All Rights Reserved.