org.tigris.scarab.om
Class RModuleAttribute

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

public class RModuleAttribute
extends BaseRModuleAttribute
implements org.apache.torque.om.Persistent, Conditioned

This class represents a RModuleAttribute relationship.

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

Field Summary
 
Fields inherited from class org.tigris.scarab.om.BaseRModuleAttribute
collConditions
 
Fields inherited from class org.apache.torque.om.BaseObject
NEW_ID
 
Constructor Summary
RModuleAttribute()
           
 
Method Summary
 void delete()
           
protected  void delete(boolean overrideLock)
           
 java.util.List getConditions()
          If this collection has already been initialized, returns the collection.
 java.lang.Integer[] getConditionsArray()
          Returns the array of attributeOptionIds that will force the requiment of this attribute if set.
 java.lang.String getDisplayValue()
          Get the Display Value for the attribute.
 boolean getIsDefaultText()
          if this RMA is the chosen attribute for email subjects then return true.
 Module getModule()
          Module getter.
 ScarabModule getScarabModule()
          Throws UnsupportedOperationException.
 boolean isConditioned()
          Returns true if this object is conditioned (has related conditions)
 boolean isRequiredIf(java.lang.Integer optionID)
          Return true if the given attributeOptionId will make the current attribute required.
 void save(java.sql.Connection con)
          Stores the object in the database.
 void setConditionsArray(java.lang.Integer[] aOptionId)
          Load the attribute options' IDs from the template combo.
 void setIsDefaultText(boolean b)
          This method sets the defaultTextFlag property and also makes sure that no other related RMA is defined as the default.
 void setModule(Module me)
          Use this instead of setScarabModule.
 void setScarabModule(ScarabModule module)
          Throws UnsupportedOperationException.
 
Methods inherited from class org.tigris.scarab.om.BaseRModuleAttribute
addCondition, copy, copyInto, getActive, getAttribute, getAttribute, getAttributeId, getByName, getByPeerName, getByPosition, getConditions, getConditions, getConditions, getConditionsJoinAttribute, getConditionsJoinAttributeOption, getConditionsJoinRModuleAttribute, getConditionsJoinRModuleIssueType, getConditionsJoinTransition, getDefaultTextFlag, getFieldNames, getIssueType, getIssueType, getIssueTypeId, getModule, getModuleId, getOrder, getPeer, getPrimaryKey, getQueryKey, getQuickSearch, getRequired, initConditions, isCacheOnSave, save, save, setActive, setAttribute, setAttributeId, setAttributeKey, setDefaultTextFlag, setDisplayValue, setIssueType, setIssueTypeId, setIssueTypeKey, setModuleId, setModuleKey, setOrder, setPrimaryKey, setPrimaryKey, setPrimaryKey, setQueryKey, setQuickSearch, setRequired, 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

RModuleAttribute

public RModuleAttribute()
Method Detail

save

public void save(java.sql.Connection con)
          throws org.apache.torque.TorqueException
Description copied from class: BaseRModuleAttribute
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 BaseRModuleAttribute
Parameters:
con -
Throws:
org.apache.torque.TorqueException

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 BaseRModuleAttribute
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 BaseRModuleAttribute
Returns:
a Module value
Throws:
org.apache.torque.TorqueException

getDisplayValue

public java.lang.String getDisplayValue()
Get the Display Value for the attribute. In the event that this is a new RModuleAttribute that has not been assigned a Display Value, this method will return the Attribute Name.

Overrides:
getDisplayValue in class BaseRModuleAttribute
Returns:
String

delete

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

delete

protected void delete(boolean overrideLock)
               throws org.apache.torque.TorqueException,
                      ScarabException
Throws:
org.apache.torque.TorqueException
ScarabException

getIsDefaultText

public boolean getIsDefaultText()
                         throws org.apache.torque.TorqueException
if this RMA is the chosen attribute for email subjects then return true. if not explicitly chosen, check the other RMA's for this module and if none is chosen as the email attribute, choose the highest ordered text attribute.

Returns:
a boolean value
Throws:
org.apache.torque.TorqueException

setIsDefaultText

public void setIsDefaultText(boolean b)
                      throws org.apache.torque.TorqueException
This method sets the defaultTextFlag property and also makes sure that no other related RMA is defined as the default. It should be used instead of setDefaultTextFlag in application code.

Parameters:
b - a boolean value
Throws:
org.apache.torque.TorqueException

getConditions

public java.util.List getConditions()
                             throws org.apache.torque.TorqueException
Description copied from class: BaseRModuleAttribute
If this collection has already been initialized, returns the collection. Otherwise returns the results of getConditions(new Criteria())

Overrides:
getConditions in class BaseRModuleAttribute
Returns:
the collection of associated objects
Throws:
org.apache.torque.TorqueException

getConditionsArray

public java.lang.Integer[] getConditionsArray()
Returns the array of attributeOptionIds that will force the requiment of this attribute if set. Used by templates to load the combo.

Specified by:
getConditionsArray in interface Conditioned
Returns:

setConditionsArray

public void setConditionsArray(java.lang.Integer[] aOptionId)
                        throws org.apache.torque.TorqueException
Load the attribute options' IDs from the template combo.

Specified by:
setConditionsArray in interface Conditioned
Parameters:
aOptionId -
Throws:
org.apache.torque.TorqueException

isRequiredIf

public boolean isRequiredIf(java.lang.Integer optionID)
                     throws org.apache.torque.TorqueException
Return true if the given attributeOptionId will make the current attribute required.

Specified by:
isRequiredIf in interface Conditioned
Parameters:
optionID -
Returns:
Throws:
org.apache.torque.TorqueException

isConditioned

public boolean isConditioned()
Returns true if this object is conditioned (has related conditions)

Specified by:
isConditioned in interface Conditioned
Returns:


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