Class AttributeDAO

  • All Implemented Interfaces:
    IAttributeDAO

    public class AttributeDAO
    extends java.lang.Object
    implements IAttributeDAO
    AttributeDAO
    • Constructor Summary

      Constructors 
      Constructor Description
      AttributeDAO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(int nIdAttribute)
      Delete an attribute
      int insert​(IAttribute attribute)
      Insert a new attribute
      IAttribute load​(int nIdAttribute, java.util.Locale locale)
      Load attribute
      java.util.List<IAttribute> selectAll​(java.util.Locale locale)
      Load every attributes
      java.util.List<IAttribute> selectCoreAttributes​(java.util.Locale locale)
      Load every attributes that do not come from a plugin
      java.util.List<IAttribute> selectPluginAttributes​(java.lang.String strPluginName, java.util.Locale locale)
      Load every attributes from plugin name
      void store​(IAttribute attribute)
      Update an attribute
      void updateAttributeAnonymization​(int nIdAttribute, boolean bAnonymize)
      Update the anonymization status of the attribute.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AttributeDAO

        public AttributeDAO()
    • Method Detail

      • load

        public IAttribute load​(int nIdAttribute,
                               java.util.Locale locale)
        Load attribute
        Specified by:
        load in interface IAttributeDAO
        Parameters:
        nIdAttribute - ID
        locale - Locale
        Returns:
        Attribute
      • insert

        public int insert​(IAttribute attribute)
        Insert a new attribute
        Specified by:
        insert in interface IAttributeDAO
        Parameters:
        attribute - the attribute
        Returns:
        new PK
      • store

        public void store​(IAttribute attribute)
        Update an attribute
        Specified by:
        store in interface IAttributeDAO
        Parameters:
        attribute - the attribute
      • delete

        public void delete​(int nIdAttribute)
        Delete an attribute
        Specified by:
        delete in interface IAttributeDAO
        Parameters:
        nIdAttribute - The Id of the attribute
      • selectAll

        public java.util.List<IAttribute> selectAll​(java.util.Locale locale)
        Load every attributes
        Specified by:
        selectAll in interface IAttributeDAO
        Parameters:
        locale - locale
        Returns:
        list of attributes
      • selectPluginAttributes

        public java.util.List<IAttribute> selectPluginAttributes​(java.lang.String strPluginName,
                                                                 java.util.Locale locale)
        Load every attributes from plugin name
        Specified by:
        selectPluginAttributes in interface IAttributeDAO
        Parameters:
        strPluginName - plugin name
        locale - locale
        Returns:
        list of attributes
      • selectCoreAttributes

        public java.util.List<IAttribute> selectCoreAttributes​(java.util.Locale locale)
        Load every attributes that do not come from a plugin
        Specified by:
        selectCoreAttributes in interface IAttributeDAO
        Parameters:
        locale - locale
        Returns:
        list of attributes
      • updateAttributeAnonymization

        public void updateAttributeAnonymization​(int nIdAttribute,
                                                 boolean bAnonymize)
        Update the anonymization status of the attribute.
        Specified by:
        updateAttributeAnonymization in interface IAttributeDAO
        Parameters:
        nIdAttribute - Id of the attribute
        bAnonymize - New value of the anonymization status. True means the attribute should be anonymize, false means it doesn't.