de.hs_rm.cs.lecturenotes.shared.entity
Class Exercise

java.lang.Object
  extended by de.hs_rm.cs.lecturenotes.shared.entity.Exercise
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable, IXMLEntity

public final class Exercise
extends java.lang.Object
implements com.google.gwt.user.client.rpc.IsSerializable, IXMLEntity

Exercise System Object.

Version:
$LastChangedRevision: 242 $
Author:
Enrico Homann

Field Summary
static java.lang.String INDENT
          Indentation for a nicer XML output.
 
Constructor Summary
Exercise()
          Default constructor.
 
Method Summary
 java.lang.String getContent()
          Will return the exercise content.
 java.lang.Long getCreationUnixTimestamp()
          Will return the exercise creation unix timestamp.
 java.lang.Long getId()
          Will return the exercise id.
 java.lang.Long getLastModifiedUnixTimestamp()
          Will return the last modified unix timestamp.
 java.lang.Long getParagraphId()
          Will return the exercise paragraphId.
 ParagraphTransportHeader getParaHeader()
          Will return the ParagraphTransportHeader.
 java.lang.Long getPosition()
          Will return the exercise position.
 java.lang.String getXMLRepresentation()
          Will return a XML representation of the entity.
 void setContent(java.lang.String sContent)
          Sets the exercise content.
 void setCreationUnixTimestamp(java.lang.Long nCreationUnixTimestamp)
          Sets the exercise creation unix timestamp.
 void setId(java.lang.Long nId)
          Sets the exercise id.
 void setLastModifiedUnixTimestamp(java.lang.Long nLastModifiedUnixTimestamp)
          Sets the last modified unix timestamp.
 void setParagraphId(java.lang.Long nParagraphId)
          Sets the exercise paragraphId.
 void setParaHeader(ParagraphTransportHeader oParaHeader)
          Will set the ParagraphTransportHeader.
 void setPosition(java.lang.Long nPosition)
          Sets the exercise position.
 java.lang.String toString()
           
 void writeAsXML(java.lang.StringBuffer w)
          Writes a XML representation of the entity to StringBuffer sb .
 void writeAsXML(java.lang.StringBuffer w, int i)
          Writes Exercise as XML representation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INDENT

public static final java.lang.String INDENT
Indentation for a nicer XML output.

See Also:
Constant Field Values
Constructor Detail

Exercise

public Exercise()
Default constructor. For serialization.

Method Detail

getId

public java.lang.Long getId()
Will return the exercise id.

Returns:
Long

setId

public void setId(java.lang.Long nId)
Sets the exercise id.

Parameters:
nId - Long

getParagraphId

public java.lang.Long getParagraphId()
Will return the exercise paragraphId.

Returns:
Long

setParagraphId

public void setParagraphId(java.lang.Long nParagraphId)
Sets the exercise paragraphId.

Parameters:
nParagraphId - Long

setPosition

public void setPosition(java.lang.Long nPosition)
Sets the exercise position.

Parameters:
nPosition - Long

getPosition

public java.lang.Long getPosition()
Will return the exercise position.

Returns:
Long

getContent

public java.lang.String getContent()
Will return the exercise content.

Returns:
String

setContent

public void setContent(java.lang.String sContent)
Sets the exercise content.

Parameters:
sContent - String

getCreationUnixTimestamp

public java.lang.Long getCreationUnixTimestamp()
Will return the exercise creation unix timestamp.

Returns:
Long

setCreationUnixTimestamp

public void setCreationUnixTimestamp(java.lang.Long nCreationUnixTimestamp)
Sets the exercise creation unix timestamp.

Parameters:
nCreationUnixTimestamp - Long

getLastModifiedUnixTimestamp

public java.lang.Long getLastModifiedUnixTimestamp()
Will return the last modified unix timestamp.

Returns:
Long

setLastModifiedUnixTimestamp

public void setLastModifiedUnixTimestamp(java.lang.Long nLastModifiedUnixTimestamp)
Sets the last modified unix timestamp.

Parameters:
nLastModifiedUnixTimestamp - Long

getParaHeader

public ParagraphTransportHeader getParaHeader()
Will return the ParagraphTransportHeader.

Returns:
ParagraphTransportHeader

setParaHeader

public void setParaHeader(ParagraphTransportHeader oParaHeader)
Will set the ParagraphTransportHeader.

Parameters:
oParaHeader - ParagraphTransportHeader

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

writeAsXML

public void writeAsXML(java.lang.StringBuffer w,
                       int i)
Writes Exercise as XML representation. Used for PDF generation on server-side.

Parameters:
w - StrinBuffer to append to
i - int intent for nicer output

writeAsXML

public void writeAsXML(java.lang.StringBuffer w)
Description copied from interface: IXMLEntity
Writes a XML representation of the entity to StringBuffer sb .

Specified by:
writeAsXML in interface IXMLEntity
Parameters:
w - StringBuffer

getXMLRepresentation

public java.lang.String getXMLRepresentation()
Description copied from interface: IXMLEntity
Will return a XML representation of the entity.

Specified by:
getXMLRepresentation in interface IXMLEntity
Returns:
String