fr.paris.lutece.plugins.pluginwizard.business
Class ModelDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.pluginwizard.business.ModelDAO
All Implemented Interfaces:
IModelDAO

public final class ModelDAO
extends Object
implements IModelDAO

This class provides Data Access methods for Model objects


Constructor Summary
ModelDAO()
           
 
Method Summary
 void delete(int nModelId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void insert(Model model, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 Model load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the model from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 List<Model> selectModelsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the models and returns them as a List
 void store(Model model, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelDAO

public ModelDAO()
Method Detail

newPrimaryKey

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

Parameters:
plugin - The Plugin
Returns:
The new primary key

insert

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

Specified by:
insert in interface IModelDAO
Parameters:
model - instance of the Model object to insert
plugin - The plugin

load

public Model load(int nId,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of the model from the table

Specified by:
load in interface IModelDAO
Parameters:
nId - The identifier of the model
plugin - The plugin
Returns:
the instance of the Model

delete

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

Specified by:
delete in interface IModelDAO
Parameters:
nModelId - The identifier of the model
plugin - The plugin

store

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

Specified by:
store in interface IModelDAO
Parameters:
model - The reference of the model
plugin - The plugin

selectModelsList

public List<Model> selectModelsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the models and returns them as a List

Specified by:
selectModelsList in interface IModelDAO
Parameters:
plugin - The plugin
Returns:
The List which contains the data of all the models


Copyright © 2013 Mairie de Paris. All Rights Reserved.