Package com.logicaldoc.core.metadata

# Class ExtensibleObject

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

All Implemented Interfaces:
  `Extensible`, `Serializable`

Direct Known Subclasses:
  `AbstractAttributeSet`, `Fillable`, `Generic`

@MappedSuperclass public abstract class ExtensibleObject extends PersistentObject implements Extensible
An extensible object is able to store an indeterminate number of attributes. Each attribute has a name and a string value.

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

## Field Summary

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

`DELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id`

## Constructor Summary

Constructors
Constructor
Description
`ExtensibleObject()`

## Method Summary

Modifier and Type
Method
Description
`Attribute`
`getAttribute(String name)`
`Attribute`
`getAttributeAtPosition(int position)`
`List<String>`
`getAttributeNames()`
`List<String>`
`getAttributeNames(long setId)`
`Object`
`getValue(String name)`
`List<Attribute>`
`getValueAttributes(String name)`
`List<Object>`
`getValues(String name)`
`void`
`removeAttribute(String name)`
`void`
`setAttribute(String name, Attribute attribute)`
Puts a new attribute, if the attribute already exists his position and label are left untouched
`Attribute`
`setValue(String name, Object value)`
`List<Attribute>`
`setValues(String name, List<Object> values)`

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

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

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

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

### Methods inherited from interface com.logicaldoc.core.metadata.Extensible

`getAttributes, getTemplate, getTemplateId, getTemplateName, setAttributes, setTemplate, setTemplateId, setTemplateName`

## Constructor Details

### ExtensibleObject

public ExtensibleObject()

## Method Details

### getValueAttributes

public List<Attribute> getValueAttributes(String name)

Specified by:
  `getValueAttributes` in interface `Extensible`

### getValues

public List<Object> getValues(String name)

Specified by:
  `getValues` in interface `Extensible`

### getValue

public Object getValue(String name)

Specified by:
  `getValue` in interface `Extensible`

### getAttribute

public Attribute getAttribute(String name)

Specified by:
  `getAttribute` in interface `Extensible`

### getAttributeNames

public List<String> getAttributeNames()

Specified by:
  `getAttributeNames` in interface `Extensible`

### getAttributeNames

public List<String> getAttributeNames(long setId)

Specified by:
  `getAttributeNames` in interface `Extensible`

### removeAttribute

public void removeAttribute(String name)

Specified by:
  `removeAttribute` in interface `Extensible`

### getAttributeAtPosition

public Attribute getAttributeAtPosition(int position)

Specified by:
  `getAttributeAtPosition` in interface `Extensible`

### setValues

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

Specified by:
  `setValues` in interface `Extensible`

### setAttribute

public void setAttribute(String name, Attribute attribute)
Puts a new attribute, if the attribute already exists his position and label are left untouched

Specified by:
  `setAttribute` in interface `Extensible`
Parameters:
  `name` - name of the attribute
  `attribute` - the attribute instance

### setValue

public Attribute setValue(String name, Object value)

Specified by:
  `setValue` in interface `Extensible`