fr.paris.lutece.plugins.links.business
Class LinkDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.links.business.LinkDAO
All Implemented Interfaces:
ILinkDAO

public final class LinkDAO
extends java.lang.Object
implements ILinkDAO

This class provides Data Access methods for Link objects


Method Summary
 void delete(int nLinkId)
          Delete a record from the table
 void insert(Link link)
          Insert a new record in the table.
 Link load(int nLinkId)
          Load the data of link from the table
 fr.paris.lutece.portal.service.image.ImageResource loadImageResource(int nIdLink)
          Load a image corresponding to an Link
 int newPrimaryKey()
          Calculate a new primary key to add a new record
 java.util.Collection<Link> selectByPortlet(int nIdPortlet)
          load all the links registered in a specified portlet
 java.util.Collection<Link> selectList()
          Returns a list of all the links
 void store(Link link)
          Update the record in the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

insert

public void insert(Link link)
Insert a new record in the table.

Specified by:
insert in interface ILinkDAO
Parameters:
link - The instance of link object

delete

public void delete(int nLinkId)
Delete a record from the table

Specified by:
delete in interface ILinkDAO
Parameters:
nLinkId - The indentifier of the link object

load

public Link load(int nLinkId)
Load the data of link from the table

Specified by:
load in interface ILinkDAO
Parameters:
nLinkId - The indentifier of the link object
Returns:
An instance of link object

store

public void store(Link link)
Update the record in the table

Specified by:
store in interface ILinkDAO
Parameters:
link - The instance of link object

newPrimaryKey

public int newPrimaryKey()
Calculate a new primary key to add a new record

Specified by:
newPrimaryKey in interface ILinkDAO
Returns:
The new key.

selectList

public java.util.Collection<Link> selectList()
Returns a list of all the links

Specified by:
selectList in interface ILinkDAO
Returns:
A collection of links objects

selectByPortlet

public java.util.Collection<Link> selectByPortlet(int nIdPortlet)
load all the links registered in a specified portlet

Specified by:
selectByPortlet in interface ILinkDAO
Parameters:
nIdPortlet - The identifier of the portlet
Returns:
A collection of Links objects

loadImageResource

public fr.paris.lutece.portal.service.image.ImageResource loadImageResource(int nIdLink)
Description copied from interface: ILinkDAO
Load a image corresponding to an Link

Specified by:
loadImageResource in interface ILinkDAO
Parameters:
nIdLink - The Link Id
Returns:
the instance of the ImageContent


Copyright © 2012 Mairie de Paris. All Rights Reserved.