SPT Core API

com.sptci.jdo
Class Category

java.lang.Object
  extended by com.sptci.jdo.JDOObject
      extended by com.sptci.jdo.NameDescription
          extended by com.sptci.jdo.Category
All Implemented Interfaces:
Treeable<Category>, Serializable, Cloneable, Comparable<JDOObject>, javax.jdo.InstanceCallbacks, javax.jdo.listener.ClearCallback, javax.jdo.listener.DeleteCallback, javax.jdo.listener.LoadCallback, javax.jdo.listener.StoreCallback

public class Category
extends NameDescription
implements Treeable<Category>

A default category model object that may be used to represent categories or classifications. Sub-classes should use InheritanceStrategy.SUPERCLASS_TABLE since this class defines a Discriminator.

© Copyright 2009 Sans Pareil Technologies, Inc.

Version:
$Id: Category.java 4722 2009-02-28 14:29:55Z rakesh $
Author:
Rakesh Vidyadharan 2009-1-12
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sptci.jdo.NameDescription
description, name
 
Fields inherited from class com.sptci.jdo.JDOObject
hash, HASH, logger, startLetter
 
Constructor Summary
Category()
           
 
Method Summary
 List<Category> getChildren()
          The method that returns the children of this instance.
 String getDisplayName()
          The display name to display for the node corresponding to this instance.
 Category getParent()
          The method that returns the parent object of this instance.
 void jdoPreDelete()
          Over-ridden to set the parent field to parent for child categories of this category.
 void setParent(Category parent)
          Mutator for property 'parent'.
 
Methods inherited from class com.sptci.jdo.NameDescription
compareTo, createXStream, equals, getDescription, getName, hashCode, setDescription, setName
 
Methods inherited from class com.sptci.jdo.JDOObject
clone, fromXML, getObjectId, getPersistenceManager, getStartLetter, jdoPostLoad, jdoPreClear, jdoPreStore, resetHash, toString, toXML
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sptci.jdo.Treeable
getObjectId
 

Constructor Detail

Category

public Category()
Method Detail

getParent

public Category getParent()
The method that returns the parent object of this instance.

Specified by:
getParent in interface Treeable<Category>
Returns:
The parent of the current object.

setParent

public void setParent(Category parent)
Mutator for property 'parent'.

Parameters:
parent - Value to set for property 'parent'.

getChildren

public List<Category> getChildren()
The method that returns the children of this instance.

Specified by:
getChildren in interface Treeable<Category>
Returns:
The children of the current object.

getDisplayName

public String getDisplayName()
The display name to display for the node corresponding to this instance.

Specified by:
getDisplayName in interface Treeable<Category>
Returns:
The display name for this instance.

jdoPreDelete

public void jdoPreDelete()
Over-ridden to set the parent field to parent for child categories of this category. InstanceCallbacks method implementation. No actions required.

Specified by:
jdoPreDelete in interface javax.jdo.listener.DeleteCallback
Overrides:
jdoPreDelete in class JDOObject

SPT Core API