fr.paris.lutece.plugins.helpdesk.business
Class AbstractSubjectHome

java.lang.Object
  extended by fr.paris.lutece.plugins.helpdesk.business.AbstractSubjectHome
All Implemented Interfaces:
AbstractSubjectHomeInterface
Direct Known Subclasses:
SubjectHome, ThemeHome

public abstract class AbstractSubjectHome
extends java.lang.Object
implements AbstractSubjectHomeInterface

This class provides instances management methods (create, find, ...) for AbstractSubject objects


Field Summary
static int FIRST_ORDER
           
protected static int STEP
           
 
Constructor Summary
AbstractSubjectHome()
           
 
Method Summary
 AbstractSubject create(AbstractSubject abstractSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Creation of an instance of an article AbstractSubject
 java.util.List<? extends AbstractSubject> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns AbstractSubject list
 java.util.Collection<? extends AbstractSubject> findByIdParent(int nIdParent, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Finds all AbstractSubject specified by the parent id
 AbstractSubject findByOrder(int nIdParent, int nOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of the AbstractSubject whose identifier is specified in parameter
 AbstractSubject findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of the AbstractSubject whose identifier is specified in parameter
 int getMaxOrder(int nIdParent, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the max order of a parent AbstractSubject
 void goDown(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Move down an AbstractSubject into the list
 void goIn(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Set the AbstractSubject into another parent AbstractSubject
 void goOut(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Set the AbstractSubject out of another parent AbstractSubject
 void goUp(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Move up an AbstractSubject into the list
 void remove(int nIdAbstractSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Deletes the AbstractSubject instance whose identifier is specified in parameter
 AbstractSubject update(AbstractSubject abstractSubject, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Updates of the AbstractSubject instance specified in parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fr.paris.lutece.plugins.helpdesk.business.AbstractSubjectHomeInterface
getDAO
 

Field Detail

FIRST_ORDER

public static final int FIRST_ORDER
See Also:
Constant Field Values

STEP

protected static final int STEP
See Also:
Constant Field Values
Constructor Detail

AbstractSubjectHome

public AbstractSubjectHome()
Method Detail

create

public AbstractSubject create(AbstractSubject abstractSubject,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Creation of an instance of an article AbstractSubject

Parameters:
abstractSubject - An instance of the AbstractSubject which contains the informations to store
plugin - The current plugin using this method
Returns:
The instance of the AbstractSubject which has been created

update

public AbstractSubject update(AbstractSubject abstractSubject,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Updates of the AbstractSubject instance specified in parameter

Parameters:
abstractSubject - An instance of the AbstractSubject which contains the informations to store
plugin - The current plugin using this method
Returns:
The instance of the AbstractSubject which has been updated.

remove

public void remove(int nIdAbstractSubject,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Deletes the AbstractSubject instance whose identifier is specified in parameter

Parameters:
nIdAbstractSubject - The identifier of the article AbstractSubject to delete in the database
plugin - The current plugin using this method

findByPrimaryKey

public AbstractSubject findByPrimaryKey(int nKey,
                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns an instance of the AbstractSubject whose identifier is specified in parameter

Parameters:
nKey - The primary key of the AbstractSubject to find in the database
plugin - The current plugin using this method
Returns:
An instance of the AbstractSubject which corresponds to the key

findAll

public java.util.List<? extends AbstractSubject> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns AbstractSubject list

Parameters:
plugin - The current plugin using this method
Returns:
the list of the AbstractSubject of the database in form of a Subject Collection object

findByIdParent

public java.util.Collection<? extends AbstractSubject> findByIdParent(int nIdParent,
                                                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Finds all AbstractSubject specified by the parent id

Parameters:
nIdParent - The parent AbstractSubject id
plugin - The Plugin using this data access service
Returns:
A collection of AbstractSubject

findByOrder

public AbstractSubject findByOrder(int nIdParent,
                                   int nOrder,
                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns an instance of the AbstractSubject whose identifier is specified in parameter

Parameters:
nIdParent - The primary key of the parent AbstractSubject
nOrder - The order id
plugin - The current plugin using this method
Returns:
An instance of the AbstractSubject which corresponds to the parent id and order id

getMaxOrder

public int getMaxOrder(int nIdParent,
                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the max order of a parent AbstractSubject

Parameters:
nIdParent - The id of the parent AbstractSubject
plugin - The Plugin
Returns:
the max order

goDown

public void goDown(int nId,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Move down an AbstractSubject into the list

Parameters:
nId - The id of the AbstractSubject
plugin - The plugin

goUp

public void goUp(int nId,
                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Move up an AbstractSubject into the list

Parameters:
nId - The id of the AbstractSubject
plugin - The plugin

goIn

public void goIn(int nId,
                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Set the AbstractSubject into another parent AbstractSubject

Parameters:
nId - The AbstractSubject to move
plugin - The plugin

goOut

public void goOut(int nId,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Set the AbstractSubject out of another parent AbstractSubject

Parameters:
nId - The AbstractSubject to move
plugin - The plugin


Copyright © 2008 Mairie de Paris. All Rights Reserved.