net.sourceforge.stripes.examples.bugzooky.biz
Class ComponentManager

java.lang.Object
  extended by net.sourceforge.stripes.examples.bugzooky.biz.ComponentManager

public class ComponentManager
extends Object

Maintains a list of components in an in memory "database".

Author:
Tim Fennell

Constructor Summary
ComponentManager()
           
 
Method Summary
 void deleteComponent(int componentId)
          Deletes an existing Components.
 List<Component> getAllComponents()
          Returns a sorted list of all components in the system.
 Component getComponent(int id)
          Gets the component with the specified ID, or null if no such component exists.
 void saveOrUpdate(Component component)
          Updates an existing component if the ID matches, or saves a new one otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentManager

public ComponentManager()
Method Detail

getComponent

public Component getComponent(int id)
Gets the component with the specified ID, or null if no such component exists.


getAllComponents

public List<Component> getAllComponents()
Returns a sorted list of all components in the system.


saveOrUpdate

public void saveOrUpdate(Component component)
Updates an existing component if the ID matches, or saves a new one otherwise.


deleteComponent

public void deleteComponent(int componentId)
Deletes an existing Components. May leave dangling references.



© Copyright 2005, Stripes Development Team.