fr.paris.lutece.plugins.shorturl.business
Class ShortUrlHome

java.lang.Object
  extended by fr.paris.lutece.plugins.shorturl.business.ShortUrlHome

public final class ShortUrlHome
extends java.lang.Object

This class provides instances management methods (create, find, ...) for ShortUrl objects


Method Summary
static ShortUrl create(ShortUrl shortener, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Create an instance of the shortener class
static ShortUrl findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of a shortener whose identifier is specified in parameter
static ShortUrl findByPrimaryKey(java.lang.String strKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of a shortener whose identifier is specified in parameter
static java.util.Collection<ShortUrl> getShortenersList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the shortener objects and returns them in form of a collection
static void remove(int nShortenerId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove the shortener whose identifier is specified in parameter
static ShortUrl update(ShortUrl shortener, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update of the shortener which is specified in parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static ShortUrl create(ShortUrl shortener,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Create an instance of the shortener class

Parameters:
shortener - The instance of the ShortUrl which contains the informations to store
plugin - the Plugin
Returns:
The instance of shortener which has been created with its primary key.

update

public static ShortUrl update(ShortUrl shortener,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update of the shortener which is specified in parameter

Parameters:
shortener - The instance of the ShortUrl which contains the data to store
plugin - the Plugin
Returns:
The instance of the shortener which has been updated

remove

public static void remove(int nShortenerId,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove the shortener whose identifier is specified in parameter

Parameters:
nShortenerId - The shortener Id
plugin - the Plugin

findByPrimaryKey

public static ShortUrl findByPrimaryKey(int nKey,
                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns an instance of a shortener whose identifier is specified in parameter

Parameters:
nKey - The shortener primary key
plugin - the Plugin
Returns:
an instance of ShortUrl

findByPrimaryKey

public static ShortUrl findByPrimaryKey(java.lang.String strKey,
                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns an instance of a shortener whose identifier is specified in parameter

Parameters:
nKey - The shortener primary key
plugin - the Plugin
Returns:
an instance of ShortUrl

getShortenersList

public static java.util.Collection<ShortUrl> getShortenersList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the shortener objects and returns them in form of a collection

Parameters:
plugin - the Plugin
Returns:
the collection which contains the data of all the shortener objects


Copyright © 2010 Mairie de Paris. All Rights Reserved.