fr.paris.lutece.plugins.rating.business
Class ResourceStatDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.rating.business.ResourceStatDAO
All Implemented Interfaces:
IResourceStatDAO

public class ResourceStatDAO
extends java.lang.Object
implements IResourceStatDAO

class ResourceStatDAO


Constructor Summary
ResourceStatDAO()
           
 
Method Summary
 void delete(java.lang.String strResourceType, int nIdResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove the ResourceStat whose identifier are specified in parameters
 int getDownloadCountByResource(java.lang.String strResourceType, int nIdResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the count of resource download whose resource identifier and resource type are specified in parameters
 int getScore(java.lang.String strResourceType, int nIdResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the score of a resource whose resource identifier and resource type are specified in parameters
 void insert(ResourceStat resourceStat, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 ResourceStat load(java.lang.String strResourceType, int nIdResource, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the resourceStat from the table
 void store(ResourceStat resourceStat, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          update record in the table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceStatDAO

public ResourceStatDAO()
Method Detail

load

public ResourceStat load(java.lang.String strResourceType,
                         int nIdResource,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of the resourceStat from the table

Specified by:
load in interface IResourceStatDAO
Parameters:
strResourceType - the type of the resource
nIdResource - the id of the resource
plugin - the Plugin
Returns:
an instance of ResourceStat

insert

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

Specified by:
insert in interface IResourceStatDAO
Parameters:
resourceStat - instance of the ResourceStat object to insert
plugin - the plugin

store

public void store(ResourceStat resourceStat,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
update record in the table.

Specified by:
store in interface IResourceStatDAO
Parameters:
resourceStat - instance of the ResourceStat object to update
plugin - the plugin

delete

public void delete(java.lang.String strResourceType,
                   int nIdResource,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove the ResourceStat whose identifier are specified in parameters

Specified by:
delete in interface IResourceStatDAO
Parameters:
strResourceType - The type of the resource
nIdResource - the id of the resource
plugin - the Plugin

getDownloadCountByResource

public int getDownloadCountByResource(java.lang.String strResourceType,
                                      int nIdResource,
                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the count of resource download whose resource identifier and resource type are specified in parameters

Specified by:
getDownloadCountByResource in interface IResourceStatDAO
Parameters:
strResourceType - The type of the resource
nIdResource - the id of the resource
plugin - the Plugin
Returns:
the count of resource download

getScore

public int getScore(java.lang.String strResourceType,
                    int nIdResource,
                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the score of a resource whose resource identifier and resource type are specified in parameters

Specified by:
getScore in interface IResourceStatDAO
Parameters:
strResourceType - The type of the resource
nIdResource - the id of the resource
plugin - the Plugin
Returns:
the score


Copyright © 2010 Mairie de Paris. All Rights Reserved.