fr.paris.lutece.plugins.jasper.business
Class JasperReportDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.jasper.business.JasperReportDAO
All Implemented Interfaces:
IJasperReportDAO

public final class JasperReportDAO
extends java.lang.Object
implements IJasperReportDAO

This class provides Data Access methods for JasperReport objects


Constructor Summary
JasperReportDAO()
           
 
Method Summary
 void delete(int nJasperReportId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void insert(JasperReport report, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 JasperReport load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the report from the table
 JasperReport load(java.lang.String strKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
 java.util.ArrayList<java.lang.String> loadFileFormats(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the file formats
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 java.util.Collection<JasperReport> selectJasperReportsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the reports and returns them as a collection
 void store(JasperReport report, 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

JasperReportDAO

public JasperReportDAO()
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(JasperReport report,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Specified by:
insert in interface IJasperReportDAO
Parameters:
report - instance of the JasperReport object to insert
plugin - The plugin

load

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

Specified by:
load in interface IJasperReportDAO
Parameters:
nId - The identifier of the report
plugin - The plugin
Returns:
the instance of the JasperReport

loadFileFormats

public java.util.ArrayList<java.lang.String> loadFileFormats(int nId,
                                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the file formats

Parameters:
nId - The identifier of the report
plugin - The plugin
Returns:
the list of file formats attached to the report

delete

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

Specified by:
delete in interface IJasperReportDAO
Parameters:
nJasperReportId - The identifier of the report
plugin - The plugin

store

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

Specified by:
store in interface IJasperReportDAO
Parameters:
report - The reference of the report
plugin - The plugin

selectJasperReportsList

public java.util.Collection<JasperReport> selectJasperReportsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the reports and returns them as a collection

Specified by:
selectJasperReportsList in interface IJasperReportDAO
Parameters:
plugin - The plugin
Returns:
The Collection which contains the data of all the reports

load

public JasperReport load(java.lang.String strKey,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Specified by:
load in interface IJasperReportDAO
Returns:


Copyright © 2012 Mairie de Paris. All Rights Reserved.