Class AttributeHome


  • public final class AttributeHome
    extends java.lang.Object
    AttributeHome
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int create​(IAttribute attribute)
      Insert an new attribute
      static java.util.List<IAttribute> findAll​(java.util.Locale locale)
      Load every attributes
      static IAttribute findByPrimaryKey​(int nIdAttribute, java.util.Locale locale)
      Load attribute
      static java.util.List<IAttribute> findCoreAttributes​(java.util.Locale locale)
      Load every attributes that do not come from a plugin
      static java.util.List<IAttribute> findPluginAttributes​(java.lang.String strPluginName, java.util.Locale locale)
      Load every attributes associated to a plugin
      static void remove​(int nIdAttribute)
      Delete an attribute
      static void update​(IAttribute attribute)
      Update an attribute
      static 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
    • Method Detail

      • findByPrimaryKey

        public static IAttribute findByPrimaryKey​(int nIdAttribute,
                                                  java.util.Locale locale)
        Load attribute
        Parameters:
        nIdAttribute - ID Attribute
        locale - Locale
        Returns:
        Attribute
      • create

        public static int create​(IAttribute attribute)
        Insert an new attribute
        Parameters:
        attribute - attribute
        Returns:
        new PK
      • update

        public static void update​(IAttribute attribute)
        Update an attribute
        Parameters:
        attribute - the attribute
      • remove

        public static void remove​(int nIdAttribute)
        Delete an attribute
        Parameters:
        nIdAttribute - The id of the attribute
      • findAll

        public static java.util.List<IAttribute> findAll​(java.util.Locale locale)
        Load every attributes
        Parameters:
        locale - locale
        Returns:
        list of attributes
      • findPluginAttributes

        public static java.util.List<IAttribute> findPluginAttributes​(java.lang.String strPluginName,
                                                                      java.util.Locale locale)
        Load every attributes associated to a plugin
        Parameters:
        strPluginName - plugin name
        locale - locale
        Returns:
        list of attributes
      • findCoreAttributes

        public static java.util.List<IAttribute> findCoreAttributes​(java.util.Locale locale)
        Load every attributes that do not come from a plugin
        Parameters:
        locale - locale
        Returns:
        list of attributes
      • updateAttributeAnonymization

        public static void updateAttributeAnonymization​(int nIdAttribute,
                                                        boolean bAnonymize)
        Update the anonymization status of the attribute.
        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.