com.nurelm.nucontent.model
Class Content

java.lang.Object
  extended bycom.nurelm.nucontent.model.Content
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class Content
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

A Content object represents one piece of text content within Page or RepeatItem objects.

Corresponds to the tag

See Also:
Serialized Form

Constructor Summary
protected Content()
          Does nothing, used nowhere, but eliminates JDO complie-time warning about not having a zero-args constructor.
  Content(java.lang.String contentId, java.lang.String text)
          Creates a new Content object.
  Content(java.lang.String contentId, java.lang.String text, java.lang.String type)
           
 
Method Summary
 int compareTo(java.lang.Object o)
          Overrides Object's compareTo method, and works in the same way.
 java.lang.String getContentId()
          Returns this object's contentId.
 java.lang.String getText()
          Returns this object's text.
 java.lang.String getType()
          Indicates what type of content object this is.
 void setContentId(java.lang.String contentId)
          Sets this object's contentId field.
 void setText(java.lang.String text)
          Sets this object's text field.
 void setType(java.lang.String type)
          Sets this object's text field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Content

protected Content()
Does nothing, used nowhere, but eliminates JDO complie-time warning about not having a zero-args constructor.


Content

public Content(java.lang.String contentId,
               java.lang.String text)
Creates a new Content object.

Parameters:
contentId - A text identifier for this piece of content. Must be unique within the current Page or RepeatItem.
text - This content's text.

Content

public Content(java.lang.String contentId,
               java.lang.String text,
               java.lang.String type)
Method Detail

compareTo

public int compareTo(java.lang.Object o)
Overrides Object's compareTo method, and works in the same way.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - Another Content object.
Returns:
Returns 0 if both objects have matching text.

getContentId

public java.lang.String getContentId()
Returns this object's contentId.

Returns:
This object's contentId identifier.

setContentId

public void setContentId(java.lang.String contentId)
Sets this object's contentId field.

Parameters:
contentId - This object's contentId identifier.

getText

public java.lang.String getText()
Returns this object's text.

Returns:
This object's text field.

setText

public void setText(java.lang.String text)
Sets this object's text field.

Parameters:
text - This object's text field.

getType

public java.lang.String getType()
Indicates what type of content object this is.

Returns:
This object's type field.

setType

public void setType(java.lang.String type)
Sets this object's text field.