fr.paris.lutece.plugins.mytasks.business
Class MyTaskDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.mytasks.business.MyTaskDAO
All Implemented Interfaces:
IMyTaskDAO

public final class MyTaskDAO
extends java.lang.Object
implements IMyTaskDAO

MyTaskDAO


Constructor Summary
MyTaskDAO()
           
 
Method Summary
 void delete(int nIdMyTask, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void deleteUserMyTask(int nIdMyTask, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 int getNbMyTasks(java.lang.String strUserGuid, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the nb of tasks from a given user guid
 void insert(MyTask myTask, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 void insertUserMyTask(java.lang.String strUserGuid, int nIdMyTask, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table
 MyTask load(int nIdMyTask, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 java.util.List<MyTask> selectMyTasksListFromUser(java.lang.String strUserGuid, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of MyTask from a given user guid
 void store(MyTask myTask, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 void undoneMyTasks(java.lang.String strUserGuid, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Change every tasks to undone from the given user guid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyTaskDAO

public MyTaskDAO()
Method Detail

newPrimaryKey

public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Generates a new primary key

Specified by:
newPrimaryKey in interface IMyTaskDAO
Parameters:
plugin - The Plugin
Returns:
The new primary key

insert

public void insert(MyTask myTask,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Specified by:
insert in interface IMyTaskDAO
Parameters:
myTask - instance of the MyTask object to insert
plugin - the Plugin

load

public MyTask load(int nIdMyTask,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data from the table

Specified by:
load in interface IMyTaskDAO
Parameters:
nIdMyTask - The identifier of the mytask
plugin - the Plugin
Returns:
The instance of the widget

delete

public void delete(int nIdMyTask,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Specified by:
delete in interface IMyTaskDAO
Parameters:
nIdMyTask - int identifier of the MyTask to delete
plugin - the Plugin

store

public void store(MyTask myTask,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Specified by:
store in interface IMyTaskDAO
Parameters:
myTask - the reference of the MyTask
plugin - the Plugin

selectMyTasksListFromUser

public java.util.List<MyTask> selectMyTasksListFromUser(java.lang.String strUserGuid,
                                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of MyTask from a given user guid

Specified by:
selectMyTasksListFromUser in interface IMyTaskDAO
Parameters:
strUserGuid - the user guid
plugin - Plugin
Returns:
a list of MyTask

insertUserMyTask

public void insertUserMyTask(java.lang.String strUserGuid,
                             int nIdMyTask,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table

Specified by:
insertUserMyTask in interface IMyTaskDAO
Parameters:
strUserGuid - the user guid
nIdMyTask - the Id of the MyTask
plugin - Plugin

deleteUserMyTask

public void deleteUserMyTask(int nIdMyTask,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Specified by:
deleteUserMyTask in interface IMyTaskDAO
Parameters:
nIdMyTask - the Id of the task
plugin - Plugin

undoneMyTasks

public void undoneMyTasks(java.lang.String strUserGuid,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Change every tasks to undone from the given user guid

Specified by:
undoneMyTasks in interface IMyTaskDAO
Parameters:
strUserGuid - the user guid
plugin - Plugin

getNbMyTasks

public int getNbMyTasks(java.lang.String strUserGuid,
                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the nb of tasks from a given user guid

Specified by:
getNbMyTasks in interface IMyTaskDAO
Parameters:
strUserGuid - the user guid
plugin - Plugin
Returns:
the nb of tasks


Copyright © 2011 Mairie de Paris. All Rights Reserved.