Saros
Distributed Collaborative Editing and Distributed Party Programming
de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject Class Reference
Inheritance diagram for de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject:
de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.NewRecordDataObject de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.SetRecordDataObject

List of all members.

Public Member Functions

 RecordDataObject (RecordType recordType)
RecordType getRecordType ()
void setSenderIfAbsent (String sender)
abstract String getTargetRid () throws MalformedRecordException
void putValue (RecordEntry entry, String value)
void putValue (RecordEntry entry, Float value)
void putValue (RecordEntry entry, Boolean value)
void putValue (RecordEntry entry, int value)
String getString (RecordEntry name)
Boolean getBoolean (RecordEntry name)
Integer getInt (RecordEntry name)
Float getFloat (RecordEntry name)
String getSender ()
String toString ()
void setNodeType (NodeType nodeType)
NodeType getNodeType ()
Map< RecordEntry, String > getValuePairs ()
abstract IRecord getIRecord (DocumentRecord document) throws MissingRecordException
abstract boolean isAlreadyApplied (DocumentRecord document) throws MissingRecordException

Detailed Description

Base class for serializable records. This class uses the enum RecordEntry to maintain the records' fields and offers respective setter methods.

As a record only consists of attributes the fields are stored in a HashMap.

Author:
jurke

Constructor & Destructor Documentation

de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.RecordDataObject ( RecordType  recordType)

Member Function Documentation

Boolean de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.getBoolean ( RecordEntry  name)
Float de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.getFloat ( RecordEntry  name)
Integer de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.getInt ( RecordEntry  name)
abstract IRecord de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.getIRecord ( DocumentRecord  document) throws MissingRecordException [pure virtual]

Note: under certain conditions this record may return a different type than defined in the RecordType field due to concurrent edits.

Subclasses have to ensure to provide a record that sets the document in a synchronized state or throw a MissingRecordException.

Parameters:
document
Returns:
a record to set the document in a synchronized state
Exceptions:
MissingRecordExceptionif a field references a missing record

Implemented in de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.NewRecordDataObject, and de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.SetRecordDataObject.

NodeType de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.getNodeType ( )
RecordType de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.getRecordType ( )
String de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.getSender ( )
String de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.getString ( RecordEntry  name)
abstract String de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.getTargetRid ( ) throws MalformedRecordException [pure virtual]

Returns the target RID entry or the RID of the new-record. Like this it works as complement to Record.getTarget() and clients can assume that it will never return null.

Returns:
the target-entry or the rid of the new-record
Exceptions:
MalformedRecordExceptionif there is no RID this data object does not correspond to a valid record

Implemented in de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.NewRecordDataObject, and de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.SetRecordDataObject.

Map<RecordEntry, String> de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.getValuePairs ( )
abstract boolean de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.isAlreadyApplied ( DocumentRecord  document) throws MissingRecordException [pure virtual]
Parameters:
documentthe document record where it may have been applied to
Returns:
whether the corresponding IRecord was already applied locally
Exceptions:
MissingRecordExceptionif a target (i.e. SetRecord, RemoveRecord) is missing completely

Implemented in de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.NewRecordDataObject, and de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.SetRecordDataObject.

void de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.putValue ( RecordEntry  entry,
Float  value 
)
void de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.putValue ( RecordEntry  entry,
int  value 
)
void de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.putValue ( RecordEntry  entry,
Boolean  value 
)
void de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.putValue ( RecordEntry  entry,
String  value 
)
void de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.setNodeType ( NodeType  nodeType)
void de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.setSenderIfAbsent ( String  sender)
String de.fu_berlin.inf.dpp.whiteboard.sxe.records.serializable.RecordDataObject.toString ( )
 All Classes Namespaces Files Functions Variables Enumerations