Package com.logicaldoc.core.metadata

# Interface AttributeSetDAO

All Superinterfaces:
  `PersistentObjectDAO<AttributeSet>`

All Known Implementing Classes:
  `HibernateAttributeSetDAO`

public interface AttributeSetDAO extends PersistentObjectDAO<AttributeSet>
This class is a DAO-service for attribute sets.

Version:
  7.5
Author:
  Marco Meschieri - LogicalDOC

## Field Summary

### Fields inherited from interface com.logicaldoc.core.PersistentObjectDAO

`ENTITY`

## Method Summary

Modifier and Type
Method
Description
`Map<String,Attribute>`
`findAttributes(long tenantId, Long setId)`
Gets the map of attributes defined in the given tenant or set
`AttributeSet`
`findByName(String name, long tenantId)`
This method finds a attribute set by name
`List<AttributeSet>`
`findByType(int type, long tenantId)`
This method finds a attribute set by type
`static AttributeSetDAO`
`get()`
Gets the object available in the application context
`Map<Long,AttributeSet>`
`load(long tenantId)`
Retrieves all the attribute sets in a tenant

### Methods inherited from interface com.logicaldoc.core.PersistentObjectDAO

`bulkUpdate, count, count, count, delete, delete, deleteAll, deleteAll, evict, evict, findAll, findAll, findAllIds, findAllIds, findById, findById, findByObjectQuery, findByQuery, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDatabaseMetadata, getDbms, initialize, initialize, isMariaDB, isMySQL, isOracle, isPostgreSQL, isSQLServer, jdbcUpdate, jdbcUpdate, query, query, queryForDouble, queryForDouble, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, queryForResultSet, queryForString, queryForString, store`

## Method Details

### get

static AttributeSetDAO get()
Gets the object available in the application context

Returns:
  the instance of this object in the application context

### findByName

AttributeSet findByName(String name, long tenantId) throws PersistenceException
This method finds a attribute set by name

Parameters:
  `name` - Name of the attribute set
  `tenantId` - ID of the owning tenant
Returns:
  AttributeSet with given name
Throws:
  `PersistenceException` - Error in the database

### findByType

List<AttributeSet> findByType(int type, long tenantId) throws PersistenceException
This method finds a attribute set by type

Parameters:
  `type` - Type of the attribute set
  `tenantId` - ID of the owning tenant
Returns:
  AttributeSet with given type
Throws:
  `PersistenceException` - Error in the database

### load

Map<Long,AttributeSet> load(long tenantId) throws PersistenceException
Retrieves all the attribute sets in a tenant

Parameters:
  `tenantId` - The tenant
Returns:
  Map ID-AttributeSet
Throws:
  `PersistenceException` - Error in the database

### findAttributes

Map<String,Attribute> findAttributes(long tenantId, Long setId) throws PersistenceException
Gets the map of attributes defined in the given tenant or set

Parameters:
  `tenantId` - The tenant ID
  `setId` - Optional set ID return map of attributes
Throws:
  `PersistenceException` - Error in the database