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

java.lang.Object
  extended by fr.paris.lutece.plugins.mytasks.business.MyTaskHome

public final class MyTaskHome
extends java.lang.Object

MyTasksHome


Method Summary
static MyTask create(MyTask myTask)
          Create an instance of the MyTask class
static void createUserMyTask(java.lang.String strUserGuid, int nIdMyTask)
          Insert a new record in the table
static MyTask findByPrimaryKey(int nIdMyTask)
          Returns an instance of a MyTask whose identifier is specified in parameter
static int getNbMyTasks(java.lang.String strUserGuid)
          Get the nb of tasks from a given user guid
static int newPrimaryKey()
          Generates a new primary key
static void remove(int nIdMyTask)
          Remove the widget whose identifier is specified in parameter
static void removeUserMyTask(int nIdMyTask)
          Delete a record from the table
static java.util.List<MyTask> selectMyTasksListFromUser(java.lang.String strUserGuid)
          Load the list of MyTask from a given user guid
static void undoneMyTasks(java.lang.String strUserGuid)
          Change every tasks to undone from the given user guid
static MyTask update(MyTask myTask)
          Update of the widget which is specified in parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newPrimaryKey

public static int newPrimaryKey()
Generates a new primary key

Returns:
The new primary key

create

public static MyTask create(MyTask myTask)
Create an instance of the MyTask class

Parameters:
myTask - The instance of the MyTask which contains the informations to store
Returns:
The instance of MyTask which has been created with its primary key.

update

public static MyTask update(MyTask myTask)
Update of the widget which is specified in parameter

Parameters:
myTask - The instance of the MyTask which contains the data to store
Returns:
The instance of the MyTask which has been updated

remove

public static void remove(int nIdMyTask)
Remove the widget whose identifier is specified in parameter

Parameters:
nIdMyTask - The Id of the task

findByPrimaryKey

public static MyTask findByPrimaryKey(int nIdMyTask)
Returns an instance of a MyTask whose identifier is specified in parameter

Parameters:
nIdMyTask - The MyTask primary key
Returns:
an instance of MyTask

selectMyTasksListFromUser

public static java.util.List<MyTask> selectMyTasksListFromUser(java.lang.String strUserGuid)
Load the list of MyTask from a given user guid

Parameters:
strUserGuid - the user guid
Returns:
a list of MyTask

createUserMyTask

public static void createUserMyTask(java.lang.String strUserGuid,
                                    int nIdMyTask)
Insert a new record in the table

Parameters:
strUserGuid - the user guid
nIdMyTask - the Id of the MyTask

removeUserMyTask

public static void removeUserMyTask(int nIdMyTask)
Delete a record from the table

Parameters:
nIdMyTask - the Id of the task

undoneMyTasks

public static void undoneMyTasks(java.lang.String strUserGuid)
Change every tasks to undone from the given user guid

Parameters:
strUserGuid - the user guid

getNbMyTasks

public static int getNbMyTasks(java.lang.String strUserGuid)
Get the nb of tasks from a given user guid

Parameters:
strUserGuid - the user guid
Returns:
the nb of tasks


Copyright © 2011 Mairie de Paris. All Rights Reserved.