com.opnworks.timesheet.domain
Class ActivityType

java.lang.Object
  extended bycom.opnworks.timesheet.domain.ActivityType
All Implemented Interfaces:
INamedObject, IPersistent, net.sf.hibernate.Lifecycle, java.io.Serializable

public class ActivityType
extends java.lang.Object
implements IPersistent, INamedObject, net.sf.hibernate.Lifecycle

Author:
laurent
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface net.sf.hibernate.Lifecycle
NO_VETO, VETO
 
Constructor Summary
ActivityType()
           
ActivityType(java.lang.String name, java.lang.String code, java.lang.String description, ActivityType parent)
           
 
Method Summary
 void addChild(ActivityType activityType)
           
 boolean equals(java.lang.Object other)
          Description of the Method
 java.util.Set getChildren()
           
 java.lang.String getCode()
           
 java.lang.String getDescription()
           
 java.lang.Long getId()
          Gets the Id attribute of the IPersistent object
 java.lang.String getName()
          Gets the Name attribute of the INamedObject object
 ActivityType getParent()
           
 int getVersion()
          Gets the Version attribute of the ActivityType object
 boolean hasChildren()
           
 int hashCode()
          Description of the Method
 boolean hasParent()
          Returns true if object has parent
 boolean onDelete(net.sf.hibernate.Session session)
          Description of the Method
 void onLoad(net.sf.hibernate.Session arg0, java.io.Serializable arg1)
          Description of the Method
 boolean onSave(net.sf.hibernate.Session session)
          Description of the Method
 boolean onUpdate(net.sf.hibernate.Session session)
          Description of the Method
 void removeChild(ActivityType activityType)
           
 void setCode(java.lang.String string)
           
 void setDescription(java.lang.String string)
           
 void setId(java.lang.Long id)
          Sets the Id attribute of the IPersistent object
 void setName(java.lang.String string)
           
 void setParent(ActivityType type)
          Sets the Parent attribute of the ActivityType object
 void setVersion(int version)
          Sets the Version attribute of the ActivityType object
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivityType

public ActivityType()

ActivityType

public ActivityType(java.lang.String name,
                    java.lang.String code,
                    java.lang.String description,
                    ActivityType parent)
Parameters:
name - Name of activity type
code - Code value for activity type
description - Description of activity type
parent - Parent of activity type (null for root activity)
Method Detail

setId

public void setId(java.lang.Long id)
Description copied from interface: IPersistent
Sets the Id attribute of the IPersistent object

Specified by:
setId in interface IPersistent
Parameters:
id -

setName

public void setName(java.lang.String string)
Parameters:
string -

setDescription

public void setDescription(java.lang.String string)
Parameters:
string -

setParent

public void setParent(ActivityType type)
Sets the Parent attribute of the ActivityType object

Parameters:
type - The new Parent value

setCode

public void setCode(java.lang.String string)
Parameters:
string -

setVersion

public void setVersion(int version)
Sets the Version attribute of the ActivityType object

Specified by:
setVersion in interface IPersistent
Parameters:
version - The new Version value

getId

public java.lang.Long getId()
Description copied from interface: IPersistent
Gets the Id attribute of the IPersistent object

Specified by:
getId in interface IPersistent
Returns:
The Id value

getName

public java.lang.String getName()
Description copied from interface: INamedObject
Gets the Name attribute of the INamedObject object

Specified by:
getName in interface INamedObject
Returns:
The Name value

getDescription

public java.lang.String getDescription()
Returns:
The Description value

getParent

public ActivityType getParent()
Returns:
The Parent value

getChildren

public java.util.Set getChildren()
Returns:
The Children value

getCode

public java.lang.String getCode()
Returns:

getVersion

public int getVersion()
Gets the Version attribute of the ActivityType object

Specified by:
getVersion in interface IPersistent
Returns:
The Version value

hasParent

public boolean hasParent()
Returns true if object has parent

Returns:
Description of the Returned Value

addChild

public void addChild(ActivityType activityType)
Parameters:
activityType - A child activity type

removeChild

public void removeChild(ActivityType activityType)
Parameters:
activityType - A child activity type

hasChildren

public boolean hasChildren()
Returns:
Description of the Returned Value

onSave

public boolean onSave(net.sf.hibernate.Session session)
               throws net.sf.hibernate.CallbackException
Description of the Method

Specified by:
onSave in interface net.sf.hibernate.Lifecycle
Parameters:
session - Description of Parameter
Returns:
Description of the Returned Value
Throws:
net.sf.hibernate.CallbackException - Description of Exception

onUpdate

public boolean onUpdate(net.sf.hibernate.Session session)
                 throws net.sf.hibernate.CallbackException
Description of the Method

Specified by:
onUpdate in interface net.sf.hibernate.Lifecycle
Parameters:
session - Description of Parameter
Returns:
Description of the Returned Value
Throws:
net.sf.hibernate.CallbackException - Description of Exception

onDelete

public boolean onDelete(net.sf.hibernate.Session session)
                 throws net.sf.hibernate.CallbackException
Description of the Method

Specified by:
onDelete in interface net.sf.hibernate.Lifecycle
Parameters:
session - Description of Parameter
Returns:
Description of the Returned Value
Throws:
net.sf.hibernate.CallbackException - Description of Exception

onLoad

public void onLoad(net.sf.hibernate.Session arg0,
                   java.io.Serializable arg1)
Description of the Method

Specified by:
onLoad in interface net.sf.hibernate.Lifecycle
Parameters:
arg0 - Description of Parameter
arg1 - Description of Parameter

equals

public boolean equals(java.lang.Object other)
Description of the Method

Parameters:
other - Description of Parameter
Returns:
Description of the Returned Value

hashCode

public int hashCode()
Description of the Method

Returns:
Description of the Returned Value