public class AttributeServiceImpl extends Object implements AttributeService
PropertyValueDAO
AttributeService.AttributeQueryCallback
Constructor and Description |
---|
AttributeServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
createAttribute(Serializable value,
Serializable... keys)
Create an attribute with an optional value, assuming there is no existing attribute
using the same keys.
|
boolean |
exists(Serializable... keys)
Determine if a particular attribute exists.
|
Serializable |
getAttribute(Serializable... keys)
Get an attribute using a list of unique keys
|
void |
getAttributes(AttributeService.AttributeQueryCallback callback,
Serializable... keys)
Get all attributes that share the starter keys provided.
|
void |
removeAttribute(Serializable... keys)
Remove a specific attribute.
|
void |
removeAttributes(Serializable... keys)
Remove all attributes that share a set of keys (in order)
|
void |
setAttribute(Serializable value,
Serializable... keys)
Set an attribute, overwriting its prior value if it already existed.
|
void |
setPropertyValueDAO(PropertyValueDAO propertyValueDAO)
Set the DAO that handles the unique property persistence
|
void |
updateOrCreateAttribute(Serializable keyBefore1,
Serializable keyBefore2,
Serializable keyBefore3,
Serializable keyAfter1,
Serializable keyAfter2,
Serializable keyAfter3)
Update an attribute key whilst preserving the associated value (if any).
|
public void setPropertyValueDAO(PropertyValueDAO propertyValueDAO)
public boolean exists(Serializable... keys)
exists
in interface AttributeService
keys
- List of 1 to 3 keys to uniquely identify the attributepublic Serializable getAttribute(Serializable... keys)
getAttribute
in interface AttributeService
keys
- List of 1 to 3 keys to uniquely identify the attributepublic void getAttributes(AttributeService.AttributeQueryCallback callback, Serializable... keys)
getAttributes
in interface AttributeService
callback
- the callback that handles the resultskeys
- 0 to 3 key values to search againstpublic void setAttribute(Serializable value, Serializable... keys)
AttributeService.exists(Serializable...)
will still return true. If the attribute doesn't
exist, it will be created otherwise it will be modified.setAttribute
in interface AttributeService
value
- The value to store (can be a collection or null)keys
- List of 1 to 3 keys to uniquely identify the attributepublic void createAttribute(Serializable value, Serializable... keys)
createAttribute
in interface AttributeService
value
- The value to store (can be a collection or null)keys
- List of 1 to 3 keys to uniquely identify the attributepublic void updateOrCreateAttribute(Serializable keyBefore1, Serializable keyBefore2, Serializable keyBefore3, Serializable keyAfter1, Serializable keyAfter2, Serializable keyAfter3)
updateOrCreateAttribute
in interface AttributeService
keyBefore1
- the first part of the original unique key (never null)keyBefore2
- the second part of the original unique key (null allowed)keyBefore3
- the third part of the original unique key (null allowed)keyAfter1
- the first part of the new unique key (never null)keyAfter2
- the second part of the new unique key (null allowed)keyAfter3
- the third part of the new unique key (null allowed)public void removeAttribute(Serializable... keys)
removeAttribute
in interface AttributeService
keys
- up to 3 keys to uniquely identify the attributepublic void removeAttributes(Serializable... keys)
removeAttributes
in interface AttributeService
keys
- up to 3 keys to identify attributes to removeCopyright © 2005–2017 Alfresco Software. All rights reserved.