moos.ssds.model
Class CommentTag

java.lang.Object
  extended bymoos.ssds.model.CommentTag
All Implemented Interfaces:
ICommentTag, java.io.Serializable, ValueObject

public class CommentTag
extends java.lang.Object
implements java.io.Serializable, ValueObject, ICommentTag

CommentTag simply holds a string. We need to have a separate class for this to map to the relational model which permists a collection of CommentTags for each HeaderDescription.

Note: the hashCode and the toString method are overridden to actually call the underlying String method.



The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement. This information should not be published or distributed to third parties without specific written permission from MBARI.


Copyright 2002 MBARI.
MBARI Proprietary Information. All rights reserved.



Version:
: $Revision: 1.8 $
Author:
: $Author: kgomes $
See Also:
Serialized Form

Constructor Summary
CommentTag()
          This is the default (no argument) constructor
CommentTag(java.lang.String tag)
          This is the constructor that takes in a string that represents the comment
 
Method Summary
 boolean equals(java.lang.Object obj)
          A method that checks to see if two CommentTags are equal.
 IHeaderDescription getHeaderDescription()
          This is the method to return the HeaderDescription object that this CommentTag is associated with.
 java.lang.Long getHeaderDescriptionId()
          This is the method to retrieve the unique identifier of the HeaderDescription that this CommentTag is associated with
 java.lang.Long getId()
          The method to return the ID of the CommentTag
 java.lang.String getTagString()
          This is the method used to get the TagString text that is in this CommentTag
 int hashCode()
          A method to return a hashcode for the tagString that is in this CommentTag
 void setHeaderDescription(IHeaderDescription headerDescription)
          This method sets the associated HeaderDescription for this CommentTag.
 void setHeaderDescriptionId(java.lang.Long headerDescriptionId)
          This is the method to set the unique identifier of the HeaderDescription that this CommentTag is associated with
 void setId(java.lang.Long id)
          The method to set the ID of the CommentTag
 void setTagString(java.lang.String tagString)
          This is the method to set the text string of the CommentTag
 java.lang.String toString()
          A method that over-rides the toString method and just returns the tagString of this CommentTag
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommentTag

public CommentTag()
This is the default (no argument) constructor


CommentTag

public CommentTag(java.lang.String tag)
This is the constructor that takes in a string that represents the comment

Parameters:
tag - The comment text
Method Detail

getId

public java.lang.Long getId()
The method to return the ID of the CommentTag

Specified by:
getId in interface ValueObject
Returns:
A Long that is the unique identifier of the CommentTag

setId

public void setId(java.lang.Long id)
The method to set the ID of the CommentTag

Specified by:
setId in interface ValueObject
Parameters:
id - Is the Long value to set the unique identifier of the CommentTag

getTagString

public java.lang.String getTagString()
This is the method used to get the TagString text that is in this CommentTag

Specified by:
getTagString in interface ICommentTag
Returns:
A string that is the text of the CommentTag

setTagString

public void setTagString(java.lang.String tagString)
This is the method to set the text string of the CommentTag

Specified by:
setTagString in interface ICommentTag
Parameters:
tagString - Is a String that is the text to be stored with the CommentTag

getHeaderDescription

public IHeaderDescription getHeaderDescription()
This is the method to return the HeaderDescription object that this CommentTag is associated with.

Specified by:
getHeaderDescription in interface ICommentTag
Returns:
The HeaderDescription that this CommentTag is associated with. It is an object that implements the IHeaderDescription interface.

setHeaderDescription

public void setHeaderDescription(IHeaderDescription headerDescription)
This method sets the associated HeaderDescription for this CommentTag.

Specified by:
setHeaderDescription in interface ICommentTag
Parameters:
headerDescription - is an object that implements the IHeaderDescription interface.

getHeaderDescriptionId

public java.lang.Long getHeaderDescriptionId()
This is the method to retrieve the unique identifier of the HeaderDescription that this CommentTag is associated with

Specified by:
getHeaderDescriptionId in interface ICommentTag
Returns:
A Long that is the unique identifier of the header description that this CommentTage is associated with

setHeaderDescriptionId

public void setHeaderDescriptionId(java.lang.Long headerDescriptionId)
This is the method to set the unique identifier of the HeaderDescription that this CommentTag is associated with

Specified by:
setHeaderDescriptionId in interface ICommentTag
Returns:
A Long that is the unique identifier of the header description that this CommentTage is associated with

equals

public boolean equals(java.lang.Object obj)
A method that checks to see if two CommentTags are equal. The two instances of CommentTag are equal if their respective tagStrings are equal

Specified by:
equals in interface ICommentTag
Returns:
A boolean that is true if the two are equal and false if they are not

hashCode

public int hashCode()
A method to return a hashcode for the tagString that is in this CommentTag

Specified by:
hashCode in interface ICommentTag
Returns:
an int that is the hash code of the tagString

toString

public java.lang.String toString()
A method that over-rides the toString method and just returns the tagString of this CommentTag

Specified by:
toString in interface ICommentTag
Returns:
A string that is the TagString of the CommentTag