org.tigris.scarab.om
Class RModuleOption

java.lang.Object
  extended byorg.apache.torque.om.BaseObject
      extended byorg.tigris.scarab.om.BaseRModuleOption
          extended byorg.tigris.scarab.om.RModuleOption
All Implemented Interfaces:
org.apache.torque.om.Persistent, org.apache.fulcrum.intake.Retrievable, java.io.Serializable

public class RModuleOption
extends BaseRModuleOption
implements org.apache.torque.om.Persistent

This class represents a RModuleOption

Version:
$Id: RModuleOption.java 9977 2005-12-09 00:40:59Z hair $
Author:
John McNally
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.torque.om.BaseObject
NEW_ID
 
Constructor Summary
RModuleOption()
           
 
Method Summary
 void delete()
           
static java.util.Comparator getComparator()
          Compares numeric value and in cases where the numeric value is the same it compares the display values.
 java.util.List getDescendants(IssueType issueType)
          Gets a list of this option's descendants That are associated with this module/Issue Type
 java.lang.String getDisplayValue()
          A convenience method for getting the option name.
 int getLevel()
          Get the level in the option parent-child tree.
 Module getModule()
          Module getter.
 RModuleAttribute getRModuleAttribute(IssueType issueType)
           
 ScarabModule getScarabModule()
          Throws UnsupportedOperationException.
 void save(java.sql.Connection con)
          Stores the object in the database.
 void setLevel(int v)
          Get the level in the option parent-child tree.
 void setModule(Module me)
          Use this instead of setScarabModule.
 void setScarabModule(ScarabModule module)
          Throws UnsupportedOperationException.
 
Methods inherited from class org.tigris.scarab.om.BaseRModuleOption
copy, copyInto, getActive, getAttributeOption, getAttributeOption, getByName, getByPeerName, getByPosition, getFieldNames, getIssueType, getIssueType, getIssueTypeId, getModule, getModuleId, getOptionId, getOrder, getPeer, getPrimaryKey, getQueryKey, getWeight, isCacheOnSave, save, save, setActive, setAttributeOption, setAttributeOptionKey, setDisplayValue, setIssueType, setIssueTypeId, setIssueTypeKey, setModuleId, setModuleKey, setOptionId, setOrder, setPrimaryKey, setPrimaryKey, setPrimaryKey, setQueryKey, setWeight, toString
 
Methods inherited from class org.apache.torque.om.BaseObject
equals, equals, getLog, hashCode, isModified, isNew, resetModified, setModified, setNew, setPrimaryKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.torque.om.Persistent
getPrimaryKey, isModified, isNew, save, save, setModified, setNew, setPrimaryKey, setPrimaryKey
 

Constructor Detail

RModuleOption

public RModuleOption()
Method Detail

getScarabModule

public ScarabModule getScarabModule()
Throws UnsupportedOperationException. Use getModule() instead.

Returns:
a ScarabModule value

setScarabModule

public void setScarabModule(ScarabModule module)
Throws UnsupportedOperationException. Use setModule(Module) instead.


setModule

public void setModule(Module me)
               throws org.apache.torque.TorqueException
Use this instead of setScarabModule. Note: module cannot be new.

Overrides:
setModule in class BaseRModuleOption
Parameters:
me - Module
Throws:
org.apache.torque.TorqueException

getModule

public Module getModule()
                 throws org.apache.torque.TorqueException
Module getter. Use this method instead of getScarabModule().

Overrides:
getModule in class BaseRModuleOption
Returns:
a Module value
Throws:
org.apache.torque.TorqueException

getComparator

public static java.util.Comparator getComparator()
Compares numeric value and in cases where the numeric value is the same it compares the display values.


getDisplayValue

public java.lang.String getDisplayValue()
A convenience method for getting the option name. It is preferred over using getAttributeOption().getName() as it leaves open the possibility of per module display values.

Overrides:
getDisplayValue in class BaseRModuleOption
Returns:
String

getLevel

public int getLevel()
Get the level in the option parent-child tree.

Returns:
value of level.

setLevel

public void setLevel(int v)
Get the level in the option parent-child tree.

Parameters:
v - Value to assign to level.

getRModuleAttribute

public RModuleAttribute getRModuleAttribute(IssueType issueType)
                                     throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getDescendants

public java.util.List getDescendants(IssueType issueType)
                              throws org.apache.torque.TorqueException
Gets a list of this option's descendants That are associated with this module/Issue Type

Returns:
List of RModuleOptions
Throws:
org.apache.torque.TorqueException

delete

public void delete()
            throws org.apache.torque.TorqueException,
                   ScarabException
Throws:
org.apache.torque.TorqueException
ScarabException

save

public void save(java.sql.Connection con)
          throws org.apache.torque.TorqueException
Description copied from class: BaseRModuleOption
Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed. This method is meant to be used as part of a transaction, otherwise use the save() method and the connection details will be handled internally

Specified by:
save in interface org.apache.torque.om.Persistent
Overrides:
save in class BaseRModuleOption
Parameters:
con -
Throws:
org.apache.torque.TorqueException


Copyright © 2000-2004 Tigris.org. All Rights Reserved.