fr.paris.lutece.plugins.avatarserver.business
Class AvatarDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.avatarserver.business.AvatarDAO
All Implemented Interfaces:
IAvatarDAO

public final class AvatarDAO
extends Object
implements IAvatarDAO

This class provides Data Access methods for Avatar objects


Constructor Summary
AvatarDAO()
           
 
Method Summary
 void delete(int nAvatarId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void insert(Avatar avatar, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 Avatar load(int nKey, 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
 Collection<Avatar> selectAvatarsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the avatar objects and returns them as a collection
 Avatar selectByHash(String strHash, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find avatar by its hash
 void store(Avatar avatar, 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

AvatarDAO

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

Specified by:
insert in interface IAvatarDAO
Parameters:
avatar - instance of the Avatar object to insert
plugin - the Plugin

load

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

Specified by:
load in interface IAvatarDAO
Parameters:
nKey - The identifier of the avatar
plugin - the Plugin
Returns:
The instance of the avatar

delete

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

Specified by:
delete in interface IAvatarDAO
Parameters:
nAvatarId - int identifier of the Avatar to delete
plugin - the Plugin

store

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

Specified by:
store in interface IAvatarDAO
Parameters:
avatar - the reference of the Avatar
plugin - the Plugin

selectAvatarsList

public Collection<Avatar> selectAvatarsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the avatar objects and returns them as a collection

Specified by:
selectAvatarsList in interface IAvatarDAO
Parameters:
plugin - the Plugin
Returns:
The collection which contains the data of all the avatar objects

selectByHash

public Avatar selectByHash(String strHash,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find avatar by its hash

Specified by:
selectByHash in interface IAvatarDAO
Parameters:
strHash - The hash
plugin - The plugin
Returns:
The avatar


Copyright © 2014 Mairie de Paris. All Rights Reserved.