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 Object
implements IAttributeDAO

Author:
nobaudv

Constructor Summary
AttributeDAO()
           
 
Method Summary
 void delete(int nAttributeId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 String getTypeName(int nIdAttribute, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Fetches the type name of an attribute
 void insert(Attribute attribute, 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
 String selectClassDescription(int nIdBusinessClass, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the string representation of a class
 String selectPrimaryKey(int nIdBusinessClass, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Fetches the primary key of a business class
 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(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

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

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

getTypeName

public String getTypeName(int nIdAttribute,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Fetches the type name of an attribute

Specified by:
getTypeName in interface IAttributeDAO
Parameters:
nIdAttribute - The id of the attribute
plugin - The plugin
Returns:
The attribute type name

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

selectClassDescription

public String selectClassDescription(int nIdBusinessClass,
                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the string representation of a class

Specified by:
selectClassDescription in interface IAttributeDAO
Parameters:
nIdBusinessClass - The id of the business class
plugin - The plugin
Returns:
The business class description

selectPrimaryKey

public String selectPrimaryKey(int nIdBusinessClass,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Fetches the primary key of a business class

Specified by:
selectPrimaryKey in interface IAttributeDAO
Parameters:
nIdBusinessClass - The id of the business class
plugin - The plugin
Returns:
The string representation of the key of the business class


Copyright © 2013 Mairie de Paris. All Rights Reserved.