org.davesag.generica.core
Class SiteCopy

java.lang.Object
  extended byorg.davesag.generica.core.AbstractDateStamped
      extended byorg.davesag.generica.core.AbstractContent
          extended byorg.davesag.generica.core.AbstractExtensibleContent
              extended byorg.davesag.generica.core.AbstractText
                  extended byorg.davesag.generica.core.SiteCopy
All Implemented Interfaces:
Authorable, Content, DateStamped, Extensible, Localisable, Persistable, Serializable

public class SiteCopy
extends AbstractText

The SiteCopy bean represents a component of textual data for display on the site.

Since:
Generica 1.0
Version:
CVS Revision $Id: SiteCopy.java,v 1.11 2004/04/08 13:19:08 davesag Exp $
Author:
Dave Sag http://www.davesag.com
See Also:
Serialized Form

Field Summary
protected  String theSection
          the site section name.
 
Fields inherited from class org.davesag.generica.core.AbstractText
theAuthor, theText, theTitle
 
Fields inherited from class org.davesag.generica.core.AbstractExtensibleContent
theMetaData
 
Fields inherited from class org.davesag.generica.core.AbstractContent
theCountryCode, theLanguageCode
 
Fields inherited from class org.davesag.generica.core.AbstractDateStamped
theCreated, theId, theLastModified
 
Constructor Summary
SiteCopy()
          null constructor required by hibernate.
SiteCopy(String title, User author, String text, Locale loc)
          Constructor that takes a title, author and text.
SiteCopy(String title, User author, String text, String lang)
          Constructor that takes a title, author and text.
 
Method Summary
 boolean equals(Object o)
          Tests if the supplied object is equal to this SiteCopy.
 String getSection()
          the section name.
 int hashcode()
          the hashcode.
 void setSection(String section)
          Set an associated section for this this piece of SiteCopy.
 String toString()
          a simple string representation of the story.
 
Methods inherited from class org.davesag.generica.core.AbstractText
getAuthor, getText, getTitle, setAuthor, setText, setTitle
 
Methods inherited from class org.davesag.generica.core.AbstractExtensibleContent
addMetaData, getMetaData, getMetaData, removeMetaData, setMetaData
 
Methods inherited from class org.davesag.generica.core.AbstractContent
getCountryCode, getLanguageCode, getLocale, setCountryCode, setLanguageCode, setLocale
 
Methods inherited from class org.davesag.generica.core.AbstractDateStamped
getCreated, getId, getLastModified, setCreated, setId, setLastModified, setTemplateId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.davesag.generica.core.DateStamped
getCreated, getLastModified, setCreated, setLastModified
 

Field Detail

theSection

protected String theSection
the site section name. this should match up with a section name entered in the web.xml file.

Constructor Detail

SiteCopy

public SiteCopy()
null constructor required by hibernate.


SiteCopy

public SiteCopy(String title,
                User author,
                String text,
                String lang)
Constructor that takes a title, author and text.

Parameters:
title - The title of the Story.
author - The User that wrote the story.
text - The text of the story.
lang - The ISO Language Code.

SiteCopy

public SiteCopy(String title,
                User author,
                String text,
                Locale loc)
Constructor that takes a title, author and text.

Parameters:
title - The title of the Story.
author - The User that wrote the story.
text - The text of the story.
loc - The ISO Language Code.
Method Detail

getSection

public String getSection()
the section name.

Returns:
An associated section for this piece of SiteCopy. Can be null.
Hibernate Property:
length = "255"

setSection

public void setSection(String section)
Set an associated section for this this piece of SiteCopy.

Parameters:
section - A section for this SiteCopy.

toString

public String toString()
a simple string representation of the story.

Specified by:
toString in class AbstractContent
Returns:
the story title. useful for debugging.

equals

public boolean equals(Object o)
Tests if the supplied object is equal to this SiteCopy.

Overrides:
equals in class AbstractText
Parameters:
o - The object to test against this SiteCopy. Must also be a SiteCopy item to make sense.
Returns:
true if the two SiteCopies have the same id.

hashcode

public int hashcode()
the hashcode.

Specified by:
hashcode in class AbstractContent
Returns:
a valid hashcode for this SiteCopy.


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.