Package com.logicaldoc.core.metadata
Interface AttributeOptionDAO
- All Superinterfaces:
PersistentObjectDAO<AttributeOption>
- All Known Implementing Classes:
HibernateAttributeOptionDAO
DAO for
AttributeOption
handling.- Since:
- 6.1
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO
ENTITY
-
Method Summary
Modifier and TypeMethodDescriptionboolean
deleteBySetIdAndAttribute
(long setId, String attribute) This method deletes options.void
deleteOrphaned
(long setId, Collection<String> currentAttributes) This method deletes the orphaned options of a given templatefindByAttribute
(long setId, String attribute) This finds all the options for a given attribute.findByAttributeAndCategory
(long setId, String attribute, String category) This finds all the options for a given attribute.findByAttributeAsMap
(long setId, String attribute) This finds all the options for a given attribute and groups them by category.Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO
bulkUpdate, delete, delete, deleteAll, deleteAll, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, isOracle, jdbcUpdate, jdbcUpdate, query, query, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForRowSet, queryForRowSet, queryForString, store
-
Method Details
-
deleteBySetIdAndAttribute
This method deletes options.- Parameters:
setId
- ID of the attribute setattribute
- Name of the attribute (optional)- Returns:
- if all went ok
-
deleteOrphaned
This method deletes the orphaned options of a given template- Parameters:
setId
- ID of the attribute setcurrentAttributes
- Names of the attributes of the actual template
-
findByAttribute
This finds all the options for a given attribute. The list is ordered by position asc.- Parameters:
setId
- The attribute set idattribute
- The attribute name (Optional)- Returns:
- The ordered list of options
-
findByAttributeAsMap
This finds all the options for a given attribute and groups them by category. The list is ordered by position asc.- Parameters:
setId
- The attribute set idattribute
- The attribute name- Returns:
- The map of opions, key is the category
-
findByAttributeAndCategory
This finds all the options for a given attribute. The list is ordered by position asc.- Parameters:
setId
- The attribute set idattribute
- The attribute name (Optional)category
- The category (Optional)- Returns:
- The ordered list of options
-