fr.paris.lutece.plugins.phraseanet.business.media
Class MediaHandlerDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.phraseanet.business.media.MediaHandlerDAO
All Implemented Interfaces:
IMediaHandlerDAO

public final class MediaHandlerDAO
extends Object
implements IMediaHandlerDAO

This class provides Data Access methods for MediaHandler objects


Constructor Summary
MediaHandlerDAO()
           
 
Method Summary
 boolean checkMediaHandlerByAccount(int nIdAccount, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check if some Account is used by Media
 void delete(int nMediaHandlerId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void insert(MediaHandler mediaHandler, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 MediaHandler load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the mediaHandler from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 List<MediaHandler> selectMediaHandlersList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the mediaHandlers and returns them as a List
 void store(MediaHandler mediaHandler, 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

MediaHandlerDAO

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

Specified by:
insert in interface IMediaHandlerDAO
Parameters:
mediaHandler - instance of the MediaHandler object to insert
plugin - The plugin

load

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

Specified by:
load in interface IMediaHandlerDAO
Parameters:
nId - The identifier of the mediaHandler
plugin - The plugin
Returns:
the instance of the MediaHandler

delete

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

Specified by:
delete in interface IMediaHandlerDAO
Parameters:
nMediaHandlerId - The identifier of the mediaHandler
plugin - The plugin

store

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

Specified by:
store in interface IMediaHandlerDAO
Parameters:
mediaHandler - The reference of the mediaHandler
plugin - The plugin

selectMediaHandlersList

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

Specified by:
selectMediaHandlersList in interface IMediaHandlerDAO
Parameters:
plugin - The plugin
Returns:
The List which contains the data of all the mediaHandlers

checkMediaHandlerByAccount

public boolean checkMediaHandlerByAccount(int nIdAccount,
                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if some Account is used by Media

Specified by:
checkMediaHandlerByAccount in interface IMediaHandlerDAO
Parameters:
nIdAccount - the id account to check
plugin - the plugin
Returns:
true if the account is used


Copyright © 2013 Mairie de Paris. All Rights Reserved.