Class HibernateAttributeOptionDAO

    • Constructor Detail

      • HibernateAttributeOptionDAO

        public HibernateAttributeOptionDAO()
    • Method Detail

      • deleteBySetIdAndAttribute

        public boolean deleteBySetIdAndAttribute​(long setId,
                                                 String attribute)
        Description copied from interface: AttributeOptionDAO
        This method deletes options.
        Specified by:
        deleteBySetIdAndAttribute in interface AttributeOptionDAO
        Parameters:
        setId - ID of the attribute set
        attribute - Name of the attribute (optional)
        Returns:
        if all went ok
      • findBySetIdAndAttribute

        public List<AttributeOption> findBySetIdAndAttribute​(long setId,
                                                             String attribute)
        Description copied from interface: AttributeOptionDAO
        This finds all the options for a given attribute. The list is ordered by position asc.
        Specified by:
        findBySetIdAndAttribute in interface AttributeOptionDAO
        Parameters:
        setId - The attribute set id
        attribute - The attribute name (Optional)
        Returns:
        The ordered list of options
      • deleteOrphaned

        public void deleteOrphaned​(long setId,
                                   Collection<String> currentAttributes)
        Description copied from interface: AttributeOptionDAO
        This method deletes the orphaned options of a given template
        Specified by:
        deleteOrphaned in interface AttributeOptionDAO
        Parameters:
        setId - ID of the attribute set
        currentAttributes - Names of the attributes of the actual template