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

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

public final class AttributeDAO
extends java.lang.Object
implements IAttributeDAO

This class provides Data Access methods for Attribute objects


Constructor Summary
AttributeDAO()
           
 
Method Summary
 void delete(int nAttributeId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void deleteAllAttributesByPluginId(int nIdPlugin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
 void deleteDependency(int nIdAttribute, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete the dependency
 java.lang.String getTypeName(int nIdAttribute, fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
 void insert(int nBusinessId, Attribute attribute, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 void insertDependency(int nBusinessClassId, int nAttributeId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 Attribute load(int nId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the attribute from the table
 int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Generates a new primary key
 fr.paris.lutece.util.ReferenceList selectAttributeListCombo(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of types of the attribute for the business class
 java.util.List<Attribute> selectAttributesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the attributes and returns them as a List
 java.lang.String selectClassDescription(int nIdBusinessClass, fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
 java.lang.String selectPrimaryKey(int nIdBusinessClass, fr.paris.lutece.portal.service.plugin.Plugin plugin)
           
 void store(Attribute attribute, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update 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

AttributeDAO

public AttributeDAO()
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(int nBusinessId,
                   Attribute attribute,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Specified by:
insert in interface IAttributeDAO
Parameters:
attribute - instance of the Attribute object to insert
plugin - The plugin

insertDependency

public void insertDependency(int nBusinessClassId,
                             int nAttributeId,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Parameters:
pluginFeature - instance of the PluginFeature object to insert
plugin - The plugin

load

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

Specified by:
load in interface IAttributeDAO
Parameters:
nId - The identifier of the attribute
plugin - The plugin
Returns:
the instance of the Attribute

delete

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

Specified by:
delete in interface IAttributeDAO
Parameters:
nAttributeId - The identifier of the attribute
plugin - The plugin

deleteDependency

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

Parameters:
nIdAttribute - The identifier of the attribute
plugin - The plugin

store

public void store(Attribute attribute,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Specified by:
store in interface IAttributeDAO
Parameters:
attribute - The reference of the attribute
plugin - The plugin

selectAttributesList

public java.util.List<Attribute> selectAttributesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the attributes and returns them as a List

Specified by:
selectAttributesList in interface IAttributeDAO
Parameters:
plugin - The plugin
Returns:
The List which contains the data of all the attributes

getTypeName

public java.lang.String getTypeName(int nIdAttribute,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Specified by:
getTypeName in interface IAttributeDAO
Parameters:
nIdAttribute - int identifier of the Attribute
plugin - plugin the Plugin
Returns:

selectAttributeListCombo

public fr.paris.lutece.util.ReferenceList selectAttributeListCombo(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of types of the attribute for the business class

Specified by:
selectAttributeListCombo in interface IAttributeDAO
Parameters:
plugin - The plugin
Returns:
The Collection of the attribute types

deleteAllAttributesByPluginId

public void deleteAllAttributesByPluginId(int nIdPlugin,
                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Specified by:
deleteAllAttributesByPluginId in interface IAttributeDAO

selectClassDescription

public java.lang.String selectClassDescription(int nIdBusinessClass,
                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Specified by:
selectClassDescription in interface IAttributeDAO

selectPrimaryKey

public java.lang.String selectPrimaryKey(int nIdBusinessClass,
                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Specified by:
selectPrimaryKey in interface IAttributeDAO


Copyright © 2009 Mairie de Paris. All Rights Reserved.