org.opensubsystems.blog.data
Class Entry

java.lang.Object
  extended by org.opensubsystems.core.data.DataObject
      extended by org.opensubsystems.core.data.BasicDataObject
          extended by org.opensubsystems.core.data.ModifiableDataObject
              extended by org.opensubsystems.blog.data.Entry
All Implemented Interfaces:
java.io.Serializable

public class Entry
extends org.opensubsystems.core.data.ModifiableDataObject

Entry within a blog. Entry has caption, text and can have an image associated with it. Entry can also contain separate URL associated with the image.

Version:
$Id: Entry.java,v 1.4 2007/01/07 06:05:11 bastafidli Exp $
Author:
Miro Halas
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
Initial revision

Field Summary
protected  java.lang.Boolean m_bIsPreformated
          Flag signaling if the text contains formatting or not.
protected  int m_iParentId
          Parent ID is the ID of the blog this entry belongs to.
protected  java.lang.String m_strCaption
          Caption is more descriptive name of the entry.
protected  java.lang.String m_strComments
          Comments is any additional text for the entry.
protected  java.lang.String m_strImageURL
          Image URL of image associated with the entry.
protected  java.lang.String m_strTargetURL
          Target URL for the image when user clicks on the image.
protected static int s_iCaptionMaxLength
          Maximal length of the caption field.
protected static int s_iCommentsMaxLength
          Maximal length of the comments field.
protected static int s_iImageURLMaxLength
          Maximal length of the image URL field.
protected static int s_iTargetURLMaxLength
          Maximal length of the target URL field.
 
Fields inherited from class org.opensubsystems.core.data.ModifiableDataObject
m_modificationTimestamp
 
Fields inherited from class org.opensubsystems.core.data.BasicDataObject
m_creationTimestamp, m_iDomainId
 
Fields inherited from class org.opensubsystems.core.data.DataObject
NEW_ID, NEW_ID_OBJ, NEW_ID_STR
 
Constructor Summary
Entry()
          Empty entry initialized to default parameters
Entry(int iDomainId)
          Empty entry for a specified domain initialized to default parameters
Entry(int iDomainId, int iParentId)
          Empty entry for a specified domain and parent initialized to default parameters
Entry(int iId, int iDomainId, int iParentId, java.lang.String strCaption, java.lang.String strComments, java.lang.String strImageURL, java.lang.String strTargetURL, java.sql.Timestamp creationTimestamp, java.sql.Timestamp modificationTimestamp)
          Create entry from a given parameters.
 
Method Summary
 java.lang.String getCaption()
          Caption is more descriptive name of the entry.
 int getCaptionMaxLength()
           
static int getCaptionMaxLengthStatic()
           
 java.lang.String getComments()
          Comments is any additional description of the entry.
 int getCommentsMaxLength()
           
static int getCommentsMaxLengthStatic()
           
 java.lang.String getImageURL()
          Image URL of image associated with the entry.
 int getImageURLMaxLength()
           
static int getImageURLMaxLengthStatic()
           
 boolean getIsPreformated()
          Flag signaling if the text contains formatting or not.
 int getParentId()
          Id of the parent this entry belongs to.
 java.lang.String getTargetURL()
          Target URL to display when user clicks on the image associated with this entry.
 int getTargetURLMaxLength()
           
static int getTargetURLMaxLengthStatic()
           
 boolean isSame(java.lang.Object oObject)
          
static void setCaptionMaxLength(int iCaptionMaxLength)
           
static void setCommentsMaxLength(int iCommentsMaxLength)
           
static void setImageURLMaxLength(int iImageURLMaxLength)
           
 void setParentId(int iParentId)
          Id of the parent this entry belongs to.
static void setTargetURLMaxLength(int iTargetURLMaxLength)
           
 
Methods inherited from class org.opensubsystems.core.data.ModifiableDataObject
equals, getModificationTimestamp, hashCode, restore, setModificationTimestamp
 
Methods inherited from class org.opensubsystems.core.data.BasicDataObject
getCreationTimestamp, getDomainId, getId, getIdAsObject, restore, setCreationTimestamp, setId
 
Methods inherited from class org.opensubsystems.core.data.DataObject
isFromPersistenceStore, setFromPersistenceStore
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_iCaptionMaxLength

protected static int s_iCaptionMaxLength
Maximal length of the caption field. The value depends on the underlying persistance mechanism and it is set once the persistance is initialized.


s_iCommentsMaxLength

protected static int s_iCommentsMaxLength
Maximal length of the comments field. The value depends on the underlying persistance mechanism and it is set once the persistance is initialized.


s_iImageURLMaxLength

protected static int s_iImageURLMaxLength
Maximal length of the image URL field. The value depends on the underlying persistance mechanism and it is set once the persistance is initialized.


s_iTargetURLMaxLength

protected static int s_iTargetURLMaxLength
Maximal length of the target URL field. The value depends on the underlying persistance mechanism and it is set once the persistance is initialized.


m_bIsPreformated

protected java.lang.Boolean m_bIsPreformated
Flag signaling if the text contains formatting or not. Example of such formatting is a newline character.


m_iParentId

protected int m_iParentId
Parent ID is the ID of the blog this entry belongs to.


m_strCaption

protected java.lang.String m_strCaption
Caption is more descriptive name of the entry.


m_strComments

protected java.lang.String m_strComments
Comments is any additional text for the entry.


m_strImageURL

protected java.lang.String m_strImageURL
Image URL of image associated with the entry.


m_strTargetURL

protected java.lang.String m_strTargetURL
Target URL for the image when user clicks on the image.

Constructor Detail

Entry

public Entry()
Empty entry initialized to default parameters


Entry

public Entry(int iDomainId)
Empty entry for a specified domain initialized to default parameters

Parameters:
iDomainId - - Id of the domain this domain belongs to

Entry

public Entry(int iDomainId,
             int iParentId)
Empty entry for a specified domain and parent initialized to default parameters

Parameters:
iDomainId - - Id of the domain this domain belongs to
iParentId - - Id of the parent this entry belongs to

Entry

public Entry(int iId,
             int iDomainId,
             int iParentId,
             java.lang.String strCaption,
             java.lang.String strComments,
             java.lang.String strImageURL,
             java.lang.String strTargetURL,
             java.sql.Timestamp creationTimestamp,
             java.sql.Timestamp modificationTimestamp)
Create entry from a given parameters.

Parameters:
iId - - Id of the entry
iDomainId - - Id of the domain this domain belongs to
iParentId - - Id of the parent this entry belongs to
strCaption - - More descriptive name of the entry
strComments - - Any additional text of the entry
strImageURL - - Image URL of image associated with the entry
strTargetURL - - Target URL for the image when user clicks on the image
creationTimestamp - - Timestamp when the entry was created
modificationTimestamp - - Timestamp when the entry was last time modified
Method Detail

getParentId

public int getParentId()
Id of the parent this entry belongs to.

Returns:
int

setParentId

public void setParentId(int iParentId)
Id of the parent this entry belongs to.

Parameters:
iParentId - - if of the parent this entry belongs to

getCaption

public java.lang.String getCaption()
Caption is more descriptive name of the entry.

Returns:
String

getComments

public java.lang.String getComments()
Comments is any additional description of the entry.

Returns:
String

getImageURL

public java.lang.String getImageURL()
Image URL of image associated with the entry.

Returns:
String

getTargetURL

public java.lang.String getTargetURL()
Target URL to display when user clicks on the image associated with this entry.

Returns:
String

getCaptionMaxLengthStatic

public static int getCaptionMaxLengthStatic()
Returns:
int

getCaptionMaxLength

public int getCaptionMaxLength()
Returns:
int

getCommentsMaxLengthStatic

public static int getCommentsMaxLengthStatic()
Returns:
int

getCommentsMaxLength

public int getCommentsMaxLength()
Returns:
int

setCaptionMaxLength

public static void setCaptionMaxLength(int iCaptionMaxLength)
Parameters:
iCaptionMaxLength - - maximal length for caption

setCommentsMaxLength

public static void setCommentsMaxLength(int iCommentsMaxLength)
Parameters:
iCommentsMaxLength - - maximal length for comments

getImageURLMaxLengthStatic

public static int getImageURLMaxLengthStatic()
Returns:
int - maximal length for image URL

getImageURLMaxLength

public int getImageURLMaxLength()
Returns:
int - maximal length for image URL

getTargetURLMaxLengthStatic

public static int getTargetURLMaxLengthStatic()
Returns:
int - maximal length for target URL

getTargetURLMaxLength

public int getTargetURLMaxLength()
Returns:
int - maximal length for target URL

setImageURLMaxLength

public static void setImageURLMaxLength(int iImageURLMaxLength)
Parameters:
iImageURLMaxLength - - maximal length for image URL

setTargetURLMaxLength

public static void setTargetURLMaxLength(int iTargetURLMaxLength)
Parameters:
iTargetURLMaxLength - - maximal length for target URL

getIsPreformated

public boolean getIsPreformated()
Flag signaling if the text contains formatting or not. Example of such formatting is a newline character.

Returns:
boolean

isSame

public boolean isSame(java.lang.Object oObject)

Specified by:
isSame in class org.opensubsystems.core.data.DataObject


Copyright © 2003 - 2007 OpenSubsystems s.r.o.