Package com.logicaldoc.core.metadata

# Class AbstractAttributeSet

java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.core.metadata.ExtensibleObject
com.logicaldoc.core.metadata.AbstractAttributeSet

All Implemented Interfaces:
  `Extensible`, `Serializable`

Direct Known Subclasses:
  `AttributeSet`, `Template`

@MappedSuperclass public abstract class AbstractAttributeSet extends ExtensibleObject
A base class for attribute sets and templates

Since:
  8.8.3
Author:
  Marco Meschieri - LogicalDOC
See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`TYPE_DEFAULT`
The AttributeSet's default type: 0

### Fields inherited from class com.logicaldoc.core.PersistentObject

`DELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id`

## Constructor Summary

Constructors
Constructor
Description
`AbstractAttributeSet()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
`Attribute`
`getAttribute(String name)`
`Attribute`
`getAttributeAtPosition(int position)`
`List<String>`
`getAttributeNames()`
`List<String>`
`getAttributeNames(long setId)`
`Map<String,Attribute>`
`getAttributes()`
`String`
`getDescription()`
`String`
`getLabel()`
`String`
`getName()`
`Template`
`getTemplate()`
`Attribute`
`getTemplateAttribute(String name)`
`abstract Map<String,Attribute>`
`getTemplateAttributes()`
`Long`
`getTemplateId()`
`String`
`getTemplateName()`
`int`
`getType()`
`Object`
`getValue(String name)`
`List<Attribute>`
`getValueAttributes(String name)`
`List<Object>`
`getValues(String name)`
`int`
`hashCode()`
`boolean`
`isReadonly()`
`void`
`removeAttribute(String name)`
`void`
`setAttribute(String name, Attribute attr)`
Puts a new attribute, if the attribute already exists his position and label are left untouched
`void`
`setAttributes(Map<String,Attribute> attributes)`
`void`
`setDescription(String description)`
`void`
`setLabel(String label)`
`void`
`setName(String name)`
`void`
`setReadonly(boolean readonly)`
`void`
`setTemplate(Template template)`
`abstract void`
`setTemplateAttributes(Map<String,Attribute> templateAttributes)`
`void`
`setTemplateId(Long templateId)`
`void`
`setTemplateName(String templateName)`
`void`
`setType(int type)`
`Attribute`
`setValue(String name, Object value)`
`List<Attribute>`
`setValues(String name, List<Object> values)`

### Methods inherited from class com.logicaldoc.core.PersistentObject

`getCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId, toString`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### TYPE_DEFAULT

public static final int TYPE_DEFAULT
The AttributeSet's default type: 0

See Also:
  - Constant Field Values

## Constructor Details

### AbstractAttributeSet

public AbstractAttributeSet()

## Method Details

### getTemplateAttributes

public abstract Map<String,Attribute> getTemplateAttributes()

### setTemplateAttributes

public abstract void setTemplateAttributes(Map<String,Attribute> templateAttributes)

### getTemplateAttribute

public Attribute getTemplateAttribute(String name)

### getAttributes

public Map<String,Attribute> getAttributes()

### setAttributes

public void setAttributes(Map<String,Attribute> attributes)

### getValueAttributes

public List<Attribute> getValueAttributes(String name)

Specified by:
  `getValueAttributes` in interface `Extensible`
Overrides:
  `getValueAttributes` in class `ExtensibleObject`

### getValues

public List<Object> getValues(String name)

Specified by:
  `getValues` in interface `Extensible`
Overrides:
  `getValues` in class `ExtensibleObject`

### getValue

public Object getValue(String name)

Specified by:
  `getValue` in interface `Extensible`
Overrides:
  `getValue` in class `ExtensibleObject`

### getAttribute

public Attribute getAttribute(String name)

Specified by:
  `getAttribute` in interface `Extensible`
Overrides:
  `getAttribute` in class `ExtensibleObject`

### getAttributeNames

public List<String> getAttributeNames()

Specified by:
  `getAttributeNames` in interface `Extensible`
Overrides:
  `getAttributeNames` in class `ExtensibleObject`

### getAttributeNames

public List<String> getAttributeNames(long setId)

Specified by:
  `getAttributeNames` in interface `Extensible`
Overrides:
  `getAttributeNames` in class `ExtensibleObject`

### removeAttribute

public void removeAttribute(String name)

Specified by:
  `removeAttribute` in interface `Extensible`
Overrides:
  `removeAttribute` in class `ExtensibleObject`

### getAttributeAtPosition

public Attribute getAttributeAtPosition(int position)

Specified by:
  `getAttributeAtPosition` in interface `Extensible`
Overrides:
  `getAttributeAtPosition` in class `ExtensibleObject`

### setValues

public List<Attribute> setValues(String name, List<Object> values)

Specified by:
  `setValues` in interface `Extensible`
Overrides:
  `setValues` in class `ExtensibleObject`

### setAttribute

public void setAttribute(String name, Attribute attr)
Description copied from class: `ExtensibleObject`
Puts a new attribute, if the attribute already exists his position and label are left untouched

Specified by:
  `setAttribute` in interface `Extensible`
Overrides:
  `setAttribute` in class `ExtensibleObject`
Parameters:
  `name` - name of the attribute
  `attr` - the attribute instance

### setValue

public Attribute setValue(String name, Object value)

Specified by:
  `setValue` in interface `Extensible`
Overrides:
  `setValue` in class `ExtensibleObject`

### getName

public String getName()

### setName

public void setName(String name)

### getDescription

public String getDescription()

### setDescription

public void setDescription(String description)

### isReadonly

public boolean isReadonly()

### setReadonly

public void setReadonly(boolean readonly)

### getType

public int getType()

### setType

public void setType(int type)

### getLabel

public String getLabel()

### setLabel

public void setLabel(String label)

### getTemplateId

public Long getTemplateId()

### setTemplateId

public void setTemplateId(Long templateId)

### getTemplateName

public String getTemplateName()

### setTemplateName

public void setTemplateName(String templateName)

### getTemplate

public Template getTemplate()

### setTemplate

public void setTemplate(Template template)

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `PersistentObject`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `PersistentObject`