|
|||||||||
| Home >> All >> com >> RuntimeCollective >> content >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.RuntimeCollective.content.bean
Class SimpleContent

java.lang.Objectcom.RuntimeCollective.content.bean.SimpleContent
- All Implemented Interfaces:
- Content, com.RuntimeCollective.webapps.bean.Duplicable, com.RuntimeCollective.webapps.bean.EntityBean, java.io.Serializable
- Direct Known Subclasses:
- ComplexContent, File, Image, Link, TextComponent
- public class SimpleContent
- extends java.lang.Object
- implements Content
- extends java.lang.Object
A basic implementation of Content, which you shouldn't instantiate as is, but subclass.
- Version:
- $Id: SimpleContent.java,v 1.25 2003/09/30 15:12:46 joe Exp $
| Field Summary | |
protected int |
Author_id
The author |
protected java.util.Date |
CreationDate
The creation date bean |
static java.lang.String |
DATABASE_TABLE
The name of the database table for this bean type. |
protected int |
id
This SimpleContent's id |
protected java.util.Date |
LastModifiedDate
The last modified date |
protected int |
LastModifierUser_id
The last modifier user |
| Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean |
INTERFACE_BEAN, NULL_ID |
| Constructor Summary | |
SimpleContent()
Construct a new blank SimpleContent, giving it a new unique ID. |
|
SimpleContent(int id)
Get a SimpleContent from the RuntimeDataSource, given an id. |
|
| Method Summary | |
com.RuntimeCollective.webapps.bean.Duplicable |
customiseDuplicate(com.RuntimeCollective.webapps.bean.Duplicable duplicate)
A method to customise (and save) a "raw" Duplicate, usually not called directly, but used by makeDuplicate(int). |
void |
delete()
Delete this SimpleContent from the database. |
com.RuntimeCollective.webapps.bean.User |
getAuthor()
Get the author |
java.util.Date |
getCreationDate()
Get the creation date |
java.lang.String |
getDescription()
Get the description |
int |
getId()
Get the unique id of this SimpleContent. |
java.util.Date |
getLastModifiedDate()
Get the last modified date |
com.RuntimeCollective.webapps.bean.User |
getLastModifierUser()
Get the last modifier user |
java.lang.String |
getTitle()
Get the title |
com.RuntimeCollective.webapps.bean.Duplicable |
makeDuplicate()
The method to call when you want to create (and save) the duplicate of an object. |
com.RuntimeCollective.webapps.bean.Duplicable |
makeDuplicate(int duplicateId)
The method to call when you want to create (and save) the duplicate of an object, while expliciting the id you want for the duplicate. |
void |
save()
Save this SimpleContent to the database. |
void |
setAuthor(com.RuntimeCollective.webapps.bean.User author)
Set the author |
void |
setCreationDate(java.util.Date date)
Set the creation date |
void |
setDescription(java.lang.String description)
Set the description. |
void |
setId(int id)
Set the unique id of this SimpleContent. |
void |
setLastModifiedDate(java.util.Date date)
Set the last modified date bean |
void |
setLastModifierUser(com.RuntimeCollective.webapps.bean.User user)
Set the last modifier user |
void |
setTitle(java.lang.String title)
Set the title. |
java.lang.Object |
viewFormat(java.lang.String format)
Get the SimpleContent in a certain format. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
DATABASE_TABLE
public static final java.lang.String DATABASE_TABLE
- The name of the database table for this bean type.
- See Also:
- Constant Field Values
id
protected int id
- This SimpleContent's id
Author_id
protected int Author_id
- The author
CreationDate
protected java.util.Date CreationDate
- The creation date bean
LastModifiedDate
protected java.util.Date LastModifiedDate
- The last modified date
LastModifierUser_id
protected int LastModifierUser_id
- The last modifier user
| Constructor Detail |
SimpleContent
public SimpleContent()
throws java.sql.SQLException
- Construct a new blank SimpleContent, giving it a new unique ID.
SimpleContent
public SimpleContent(int id)
throws java.sql.SQLException
- Get a SimpleContent from the RuntimeDataSource, given an id.
| Method Detail |
setId
public void setId(int id)
- Set the unique id of this SimpleContent.
- Specified by:
setIdin interfacecom.RuntimeCollective.webapps.bean.EntityBean
getId
public int getId()
- Get the unique id of this SimpleContent.
- Specified by:
getIdin interfacecom.RuntimeCollective.webapps.bean.EntityBean
save
public void save()
throws java.sql.SQLException
- Save this SimpleContent to the database.
- Specified by:
savein interfacecom.RuntimeCollective.webapps.bean.EntityBean
delete
public void delete()
throws java.sql.SQLException
- Delete this SimpleContent from the database.
- Specified by:
deletein interfacecom.RuntimeCollective.webapps.bean.EntityBean
setAuthor
public void setAuthor(com.RuntimeCollective.webapps.bean.User author)
getAuthor
public com.RuntimeCollective.webapps.bean.User getAuthor()
setCreationDate
public void setCreationDate(java.util.Date date)
- Set the creation date
- Specified by:
setCreationDatein interfaceContent
getCreationDate
public java.util.Date getCreationDate()
- Get the creation date
- Specified by:
getCreationDatein interfaceContent
setLastModifiedDate
public void setLastModifiedDate(java.util.Date date)
- Set the last modified date bean
- Specified by:
setLastModifiedDatein interfaceContent
getLastModifiedDate
public java.util.Date getLastModifiedDate()
- Get the last modified date
- Specified by:
getLastModifiedDatein interfaceContent
setLastModifierUser
public void setLastModifierUser(com.RuntimeCollective.webapps.bean.User user)
- Set the last modifier user
- Specified by:
setLastModifierUserin interfaceContent
getLastModifierUser
public com.RuntimeCollective.webapps.bean.User getLastModifierUser()
- Get the last modifier user
- Specified by:
getLastModifierUserin interfaceContent
getTitle
public java.lang.String getTitle()
setTitle
public void setTitle(java.lang.String title)
getDescription
public java.lang.String getDescription()
- Get the description
- Specified by:
getDescriptionin interfaceContent
setDescription
public void setDescription(java.lang.String description)
- Set the description.
NB: This does nothing.
- Specified by:
setDescriptionin interfaceContent
viewFormat
public java.lang.Object viewFormat(java.lang.String format)
- Get the SimpleContent in a certain format.
- Specified by:
viewFormatin interfaceContent
makeDuplicate
public com.RuntimeCollective.webapps.bean.Duplicable makeDuplicate()
- The method to call when you want to create (and save) the duplicate of an object.
This will call makeDuplicate(int) with a fresh new id.
- Specified by:
makeDuplicatein interfacecom.RuntimeCollective.webapps.bean.Duplicable
makeDuplicate
public com.RuntimeCollective.webapps.bean.Duplicable makeDuplicate(int duplicateId)
- The method to call when you want to create (and save) the duplicate of an object,
while expliciting the id you want for the duplicate.
To use with care, as obviously the bean using that id will be overwritten. It is "recommended" that the overwritten bean be of the same type as the object being duplicated.
Implementation-wise, this method will make a raw duplicate (ie clone itself by changing its own id), and then call the customiseDuplicate() method where class-specific code should reside.
- Specified by:
makeDuplicatein interfacecom.RuntimeCollective.webapps.bean.Duplicable
customiseDuplicate
public com.RuntimeCollective.webapps.bean.Duplicable customiseDuplicate(com.RuntimeCollective.webapps.bean.Duplicable duplicate)
- A method to customise (and save) a "raw" Duplicate, usually not called directly,
but used by makeDuplicate(int).
This method will do additional processing of a "raw" Duplicate. This is most useful for class-specific logic, such as creating Duplicates of composed objects, and assigning those Duplicates to the "raw" Duplicate.
When subclassing a Duplicable class, you should override this method only, without changing the makeDuplicate methods.
- Specified by:
customiseDuplicatein interfacecom.RuntimeCollective.webapps.bean.Duplicable
|
|||||||||
| Home >> All >> com >> RuntimeCollective >> content >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.RuntimeCollective.content.bean.SimpleContent