fr.paris.lutece.plugins.pluginwizard.business.model
Class BusinessClassHome

java.lang.Object
  extended by fr.paris.lutece.plugins.pluginwizard.business.model.BusinessClassHome

public final class BusinessClassHome
extends java.lang.Object

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


Method Summary
static BusinessClass create(BusinessClass businessClass, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Create an instance of the businessClass class
static BusinessClass findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of a businessClass whose identifier is specified in parameter
static java.util.Collection<BusinessClass> getBusinessClassesByFeature(int nFeatureId, int nPluginId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns a collection of business classes selected by feature
static java.util.Collection<BusinessClass> getBusinessClassesByPlugin(int nIdPlugin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the businessClass objects and returns them in form of a collection
static boolean hasAlreadyDescription(int nBusinessId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Verifies if the class has a description
static boolean hasAlreadyKey(int nBusinessId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Verifies if business class has already a key
static boolean hasAttributes(int nBusinessClassId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Verifies whether attributes are attached to the business class
static boolean keyExists(int nFeatureId, java.lang.String strBusinessClassName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
static void remove(int nBusinessClassId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove the businessClass whose identifier is specified in parameter
static void removeBusinessClassesByPlugin(int nIdPlugin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Removes all the business classes attached to a plugin
static BusinessClass update(BusinessClass businessClass, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update of the businessClass 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

hasAlreadyDescription

public static boolean hasAlreadyDescription(int nBusinessId,
                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Verifies if the class has a description

Parameters:
nBusinessId - The id of the business class
plugin - The plugin
Returns:
A boolean value which is true if descritpion exists

hasAlreadyKey

public static boolean hasAlreadyKey(int nBusinessId,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Verifies if business class has already a key

Parameters:
nBusinessId - The id of the business class
plugin - the plugin
Returns:
A boolean value which is true when keys exists for the class

create

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

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

hasAttributes

public static boolean hasAttributes(int nBusinessClassId,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Verifies whether attributes are attached to the business class

Parameters:
nBusinessClassId - The business class id
plugin - The plugin
Returns:
boolean value :true if at least one attribute is present

update

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

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

remove

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

Parameters:
nBusinessClassId - The businessClass Id
plugin - the Plugin

removeBusinessClassesByPlugin

public static void removeBusinessClassesByPlugin(int nIdPlugin,
                                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Removes all the business classes attached to a plugin

Parameters:
nIdPlugin - the id of the plugin to be generated
plugin - The plugin

findByPrimaryKey

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

Parameters:
nKey - The businessClass primary key
plugin - the Plugin
Returns:
an instance of BusinessClass

getBusinessClassesByPlugin

public static java.util.Collection<BusinessClass> getBusinessClassesByPlugin(int nIdPlugin,
                                                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the businessClass objects and returns them in form of a collection

Parameters:
plugin - the Plugin
nIdPlugin - The id of the generated plugin
Returns:
the collection which contains the data of all the businessClass objects

getBusinessClassesByFeature

public static java.util.Collection<BusinessClass> getBusinessClassesByFeature(int nFeatureId,
                                                                              int nPluginId,
                                                                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns a collection of business classes selected by feature

Parameters:
nFeatureId - The id of the feature
nPluginId - the id of the plugin
plugin - The Plugin
Returns:
A collection of business classes selected by feature

keyExists

public static boolean keyExists(int nFeatureId,
                                java.lang.String strBusinessClassName,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
Parameters:
nFeatureId - The feature id
strBusinessClassName - The business class name
plugin - The plugin
Returns:
A boolean value pointing if a key exists


Copyright © 2012 Mairie de Paris. All Rights Reserved.