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

java.lang.Object
  extended by fr.paris.lutece.plugins.pluginwizard.business.model.BusinessClassDAO
All Implemented Interfaces:
IBusinessClassDAO

public final class BusinessClassDAO
extends java.lang.Object
implements IBusinessClassDAO

This class provides Data Access methods for BusinessClass objects


Constructor Summary
BusinessClassDAO()
           
 
Method Summary
 boolean containsAttributes(int nBusinessClassId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Verifies whether business class has attributes
 void delete(int nBusinessClassId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void deleteAllClassesByPluginId(int nIdPlugin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete the dependency
 void deleteByFeature(int nFeatureId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete business classes by feature
 void deleteDependency(int nBusinessClassId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete the dependency
 boolean hasAlreadyDescription(int nIdBusinessClass, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Verifies whether business class has a description
 boolean hasAlreadyKey(int nIdBusinessClass, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Verifies whether business class has a description
 void insert(BusinessClass businessClass, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 void insertDependency(int nIdPluginFeature, int nIdBusinessClass, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Inserts the depedency between the business class and the admin feature
 boolean keyExists(int nFeatureId, java.lang.String strBusinessClass, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Verifies whether key exists
 BusinessClass load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the businessClass from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 java.util.Collection<Attribute> selectAttributeList(int nBusinessClassId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns a list of Attribute
 java.util.Collection<BusinessClass> selectBusinessClassesByFeature(int nFeatureId, int nPluginId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns a collection of business classes
 java.util.Collection<BusinessClass> selectBusinessClassesList(int nPluginId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns a list of business classe
 void store(BusinessClass businessClass, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Updates 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

BusinessClassDAO

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

Specified by:
insert in interface IBusinessClassDAO
Parameters:
businessClass - instance of the BusinessClass object to insert
plugin - The plugin

load

public BusinessClass load(int nId,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of the businessClass from the table

Specified by:
load in interface IBusinessClassDAO
Parameters:
nId - The identifier of the businessClass
plugin - The plugin
Returns:
the instance of the BusinessClass

delete

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

Specified by:
delete in interface IBusinessClassDAO
Parameters:
nBusinessClassId - The identifier of the businessClass
plugin - The plugin

deleteDependency

public void deleteDependency(int nBusinessClassId,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete the dependency

Parameters:
nBusinessClassId - The identifier of the businessClass
plugin - The plugin

deleteAllClassesByPluginId

public void deleteAllClassesByPluginId(int nIdPlugin,
                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete the dependency

Specified by:
deleteAllClassesByPluginId in interface IBusinessClassDAO
Parameters:
nIdPlugin - The identifier of the businessClass
plugin - The plugin

insertDependency

public void insertDependency(int nIdPluginFeature,
                             int nIdBusinessClass,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Inserts the depedency between the business class and the admin feature

Parameters:
nIdPluginFeature - The id of the plugin feature
nIdBusinessClass - The id of the business class
plugin - The plugin

deleteByFeature

public void deleteByFeature(int nFeatureId,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete business classes by feature

Specified by:
deleteByFeature in interface IBusinessClassDAO
Parameters:
nFeatureId - The identifier of the feature
plugin - The plugin

store

public void store(BusinessClass businessClass,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Updates the record in the table

Specified by:
store in interface IBusinessClassDAO
Parameters:
businessClass - The reference of the businessClass
plugin - The plugin

selectBusinessClassesList

public java.util.Collection<BusinessClass> selectBusinessClassesList(int nPluginId,
                                                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns a list of business classe

Specified by:
selectBusinessClassesList in interface IBusinessClassDAO
Parameters:
nPluginId - The plugin id
plugin - The plugin
Returns:
A collection of business classes

selectAttributeList

public java.util.Collection<Attribute> selectAttributeList(int nBusinessClassId,
                                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns a list of Attribute

Parameters:
nBusinessClassId - The business class id
plugin - The plugin
Returns:
A collection of attributes

selectBusinessClassesByFeature

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

Specified by:
selectBusinessClassesByFeature in interface IBusinessClassDAO
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 boolean keyExists(int nFeatureId,
                         java.lang.String strBusinessClass,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Verifies whether key exists

Specified by:
keyExists in interface IBusinessClassDAO
Parameters:
nFeatureId - the id of the feature
strBusinessClass - The business class name
plugin - The plugin
Returns:
A boolean value which is true when class has attributes

containsAttributes

public boolean containsAttributes(int nBusinessClassId,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Verifies whether business class has attributes

Specified by:
containsAttributes in interface IBusinessClassDAO
Parameters:
nBusinessClassId - the id of the business class
plugin - The plugin
Returns:
A boolean value which is true when class has attributes

hasAlreadyDescription

public boolean hasAlreadyDescription(int nIdBusinessClass,
                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Verifies whether business class has a description

Specified by:
hasAlreadyDescription in interface IBusinessClassDAO
Parameters:
nIdBusinessClass - the id of the business class
plugin - The plugin
Returns:
A boolean value which is true when class has a description

hasAlreadyKey

public boolean hasAlreadyKey(int nIdBusinessClass,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Verifies whether business class has a description

Specified by:
hasAlreadyKey in interface IBusinessClassDAO
Parameters:
nIdBusinessClass - the id of the business class
plugin - The plugin
Returns:
A boolean value which is true when class has a key


Copyright © 2011 Mairie de Paris. All Rights Reserved.