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

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

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

System object (entity) Filecard. A Filecard means in this system's context a double sided learning "flashcard" where there is a question on the front side, and the related answer on the back side.

Version:
$LastChangedRevision: 262 $
Author:
Enrico Homann

Constructor Summary
Filecard()
          Default constructor.
 
Method Summary
 java.lang.String fillTemplate(java.lang.String template)
          Will return a String based upon a template where the tags were replaced using the attribute tags of the persisted table and the attributes of this object.
 java.lang.Boolean getActivated()
          Will return the filecard activated.
 java.lang.String getAnswer()
          Will return the filecard answer.
 java.lang.Long getCreationUnixTimestamp()
          Will return the filecard creation unix timestamp.
 RegisteredUser getCreatorUser()
          Will return the filecard creator user.
 java.lang.Long getId()
          Will return the filecard id.
 java.lang.Long getLastModifiedUnixTimestamp()
          Will return the filecard last modified unix timestamp.
 java.lang.Long getParagraphId()
          Will return the filecard's paragraph id.
 ParagraphTransportHeader getParaHeader()
          Will return the ParagraphTransportHeader.
 java.lang.String getQuestion()
          Will return the filecard question.
 java.lang.String getXMLRepresentation()
          Will return a XML representation of the entity.
 void setActivated(java.lang.Boolean bActivated)
          Sets the filecard activated.
 void setAnswer(java.lang.String sAnswer)
          Will set the filecard answer.
 void setCreationUnixTimestamp(java.lang.Long nCreationUnixTimestamp)
          Sets the filecard creation unix timestamp.
 void setCreatorUser(RegisteredUser oCreatorUser)
          Sets the filecard creator user.
 void setId(java.lang.Long nId)
          Sets the filecard id.
 void setLastModifiedUnixTimestamp(java.lang.Long nLastModifiedUnixTimestamp)
          Sets the filecard last modified unix timestamp.
 void setParagraphId(java.lang.Long nParagraphId)
          Sets the filecard's paragraph id.
 void setParaHeader(ParagraphTransportHeader oParaHeader)
          Sets the ParagraphTransportHeader.
 void setQuestion(java.lang.String sQuestion)
          Will set the filecard question.
 java.lang.String toString()
           
 void writeAsXML(java.lang.StringBuffer w)
          Writes a XML representation of the entity to StringBuffer sb .
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Filecard

public Filecard()
Default constructor. For serialization.

Method Detail

getId

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

Returns:
Long

setId

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

Parameters:
nId - Long

getParagraphId

public java.lang.Long getParagraphId()
Will return the filecard's paragraph id.

Returns:
Long

setParagraphId

public void setParagraphId(java.lang.Long nParagraphId)
Sets the filecard's paragraph id.

Parameters:
nParagraphId - Long

getActivated

public java.lang.Boolean getActivated()
Will return the filecard activated.

Returns:
Boolean

setActivated

public void setActivated(java.lang.Boolean bActivated)
Sets the filecard activated.

Parameters:
bActivated - Boolean

getQuestion

public java.lang.String getQuestion()
Will return the filecard question.

Returns:
String

setQuestion

public void setQuestion(java.lang.String sQuestion)
Will set the filecard question.

Parameters:
sQuestion - Question

getAnswer

public java.lang.String getAnswer()
Will return the filecard answer.

Returns:
String

setAnswer

public void setAnswer(java.lang.String sAnswer)
Will set the filecard answer.

Parameters:
sAnswer - String

getCreationUnixTimestamp

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

Returns:
Long

setCreationUnixTimestamp

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

Parameters:
nCreationUnixTimestamp - Long

getLastModifiedUnixTimestamp

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

Returns:
Long

setLastModifiedUnixTimestamp

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

Parameters:
nLastModifiedUnixTimestamp - Long

getCreatorUser

public RegisteredUser getCreatorUser()
Will return the filecard creator user.

Returns:
RegisteredUser

setCreatorUser

public void setCreatorUser(RegisteredUser oCreatorUser)
Sets the filecard creator user.

Parameters:
oCreatorUser - RegisteredUser

getParaHeader

public ParagraphTransportHeader getParaHeader()
Will return the ParagraphTransportHeader.

Returns:
ParagraphTransportHeader

setParaHeader

public void setParaHeader(ParagraphTransportHeader oParaHeader)
Sets the ParagraphTransportHeader.

Parameters:
oParaHeader - ParagraphTransportHeader

fillTemplate

public java.lang.String fillTemplate(java.lang.String template)
Will return a String based upon a template where the tags were replaced using the attribute tags of the persisted table and the attributes of this object. While the prefix for each template tag is %user_

Specified by:
fillTemplate in interface IStringTemplateEntity
Parameters:
template - String
Returns:
String String with replaced key tags

toString

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

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