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

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

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

System object Lecture.

Version:
$LastChangedRevision: 262 $
Author:
Enrico Homann

Constructor Summary
Lecture()
          Default constructor.
Lecture(Lecture oLec)
          Copy constructor.
 
Method Summary
 java.util.List<java.lang.String> checkValidity()
          Will check the validity of the entity and return a List of error messages or a List with no messages (size 0).
 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.Long getCreationUnixTimestamp()
          Will return the lecture creation unix timestamp.
 DocentUser getDocentUser()
          Will return the lecture docent user (owner).
 java.lang.Long getId()
          Will return the lecture id.
 java.lang.Long getLastModifiedUnixTimestamp()
          Will return the lecutre last modified unix timestamp.
 java.lang.Long getModuleNo()
          Will return the lecture module number.
 java.util.List<Paragraph> getParagraphs()
          Will return the the lecture paragraphs.
 java.lang.String getPreface()
          Will return the lecture preface.
 java.lang.Boolean getPublished()
          Will set the lecture published state.
 java.lang.String getTitle()
          Will return the lecture title.
 java.lang.Long getVersion()
          Will return the lecture version.
 java.lang.String getXMLRepresentation()
          Will return a XML representation of the entity.
 void setCreationUnixTimestamp(java.lang.Long nCreationUnixTimestamp)
          Sets the lecture creation unix timestamp.
 void setDocentUser(DocentUser oDocentUser)
          Sets the lecture docent user (owner).
 void setId(java.lang.Long nId)
          Sets the lecture id.
 void setLastModifiedUnixTimestamp(java.lang.Long oLastModifiedUnixTimestamp)
          Will set the lecture last modified unitx timestamp.
 void setModuleNo(java.lang.Long oModuleNo)
          Sets the lecture module number.
 void setParagraphs(java.util.List<Paragraph> oParagraphs)
          Sets the lecture paragraphs.
 void setPreface(java.lang.String oPreface)
          Sets the lecture preface.
 void setPublished(java.lang.Boolean bPublished)
          Sets the lecture published state.
 void setTitle(java.lang.String oTitle)
          Sets the lecture title.
 void setVersion(java.lang.Long nVersion)
          Sets the lecture version.
 java.lang.String toString()
           
 void writeAsXML(java.lang.StringBuffer w)
          Implements IXMLEntity.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Lecture

public Lecture()
Default constructor. Needed for serialization.


Lecture

public Lecture(Lecture oLec)
Copy constructor.

Parameters:
oLec - Lecture
Method Detail

getId

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

Returns:
Long

setId

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

Parameters:
nId - Long

getDocentUser

public DocentUser getDocentUser()
Will return the lecture docent user (owner).

Returns:
DocentUser

setDocentUser

public void setDocentUser(DocentUser oDocentUser)
Sets the lecture docent user (owner). Adjusting makes no sense on client side because the server will always the the session user as creator user.

Parameters:
oDocentUser - DocentUser

getModuleNo

public java.lang.Long getModuleNo()
Will return the lecture module number.

Returns:
Long

setModuleNo

public void setModuleNo(java.lang.Long oModuleNo)
Sets the lecture module number.

Parameters:
oModuleNo - Long

getTitle

public java.lang.String getTitle()
Will return the lecture title.

Returns:
String

setTitle

public void setTitle(java.lang.String oTitle)
Sets the lecture title.

Parameters:
oTitle - String

getPreface

public java.lang.String getPreface()
Will return the lecture preface.

Returns:
String

setPreface

public void setPreface(java.lang.String oPreface)
Sets the lecture preface.

Parameters:
oPreface - String

getPublished

public java.lang.Boolean getPublished()
Will set the lecture published state.

Returns:
Boolean

setPublished

public void setPublished(java.lang.Boolean bPublished)
Sets the lecture published state.

Parameters:
bPublished - Boolean

getCreationUnixTimestamp

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

Returns:
Long

setCreationUnixTimestamp

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

Parameters:
nCreationUnixTimestamp - Long

getLastModifiedUnixTimestamp

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

Returns:
Long

setLastModifiedUnixTimestamp

public void setLastModifiedUnixTimestamp(java.lang.Long oLastModifiedUnixTimestamp)
Will set the lecture last modified unitx timestamp.

Parameters:
oLastModifiedUnixTimestamp - Long

getVersion

public java.lang.Long getVersion()
Will return the lecture version.

Returns:
Long

setVersion

public void setVersion(java.lang.Long nVersion)
Sets the lecture version.

Parameters:
nVersion - Long

getParagraphs

public java.util.List<Paragraph> getParagraphs()
Will return the the lecture paragraphs.

Returns:
List of Paragraph

setParagraphs

public void setParagraphs(java.util.List<Paragraph> oParagraphs)
Sets the lecture paragraphs.

Parameters:
oParagraphs - List of Paragraph

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

writeAsXML

public void writeAsXML(java.lang.StringBuffer w)
Implements IXMLEntity.

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

toString

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

checkValidity

public java.util.List<java.lang.String> checkValidity()
Description copied from interface: IFieldVerifier
Will check the validity of the entity and return a List of error messages or a List with no messages (size 0).

Specified by:
checkValidity in interface IFieldVerifier
Returns:
List of String