|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.props.PropertyValueComponentImpl
public class PropertyValueComponentImpl
This component provides a clearer distinction between shared and unshared properties and avoids the need to access the DAO, which is much more obscure and potentially harmful.
Constructor Summary | |
---|---|
PropertyValueComponentImpl()
|
Method Summary | |
---|---|
java.lang.Long |
createPropertyUniqueContext(java.io.Serializable value1,
java.io.Serializable value2,
java.io.Serializable value3)
Create a new combination of three unique properties. |
java.lang.Long |
createUnsharedProperty(java.io.Serializable value)
|
void |
deletePropertyUniqueContext(java.lang.Long id)
Delete a unique property context. |
int |
deletePropertyUniqueContexts(java.io.Serializable[] values)
Delete a combination of three unique properties. |
void |
deleteUnsharedProperty(java.lang.Long id)
|
java.lang.Long |
getOrCreateSharedValue(java.io.Serializable value)
|
java.lang.Long |
getPropertyUniqueContext(java.io.Serializable value1,
java.io.Serializable value2,
java.io.Serializable value3)
Get the ID of a unique property context. |
java.io.Serializable |
getSharedValueById(java.lang.Long id)
|
java.lang.Long |
getSharedValueId(java.io.Serializable value)
|
java.io.Serializable |
getUnsharedPropertyById(java.lang.Long id)
|
void |
init()
Ensures that all necessary properties have been set |
void |
setPropertyValueDAO(PropertyValueDAO propertyValueDAO)
Set the underlying DAO that manipulates the database data |
void |
updatePropertyUniqueContext(java.lang.Long id,
java.io.Serializable value1,
java.io.Serializable value2,
java.io.Serializable value3)
Update a unique property context. |
java.lang.Long |
updatePropertyUniqueContext(java.io.Serializable value1Before,
java.io.Serializable value2Before,
java.io.Serializable value3Before,
java.io.Serializable value1,
java.io.Serializable value2,
java.io.Serializable value3)
Update a combination of three unique properties. |
void |
updateUnsharedProperty(java.lang.Long id,
java.io.Serializable value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertyValueComponentImpl()
Method Detail |
---|
public void setPropertyValueDAO(PropertyValueDAO propertyValueDAO)
public void init()
public java.io.Serializable getSharedValueById(java.lang.Long id)
getSharedValueById
in interface PropertyValueComponent
id
- the ID (may not be null)public java.lang.Long getSharedValueId(java.io.Serializable value)
getSharedValueId
in interface PropertyValueComponent
value
- the value to find the ID for (may be null)
public java.lang.Long getOrCreateSharedValue(java.io.Serializable value)
getOrCreateSharedValue
in interface PropertyValueComponent
value
- the value to find the ID for (may be null)
public java.io.Serializable getUnsharedPropertyById(java.lang.Long id)
getUnsharedPropertyById
in interface PropertyValueComponent
id
- the ID (may not be null)
public java.lang.Long createUnsharedProperty(java.io.Serializable value)
createUnsharedProperty
in interface PropertyValueComponent
value
- the value to create (may be null)
public void updateUnsharedProperty(java.lang.Long id, java.io.Serializable value)
updateUnsharedProperty
in interface PropertyValueComponent
id
- the ID of the root property to change (may not be null)value
- the new property valuepublic void deleteUnsharedProperty(java.lang.Long id)
deleteUnsharedProperty
in interface PropertyValueComponent
id
- the ID of the root property to delete (may be null)public java.lang.Long createPropertyUniqueContext(java.io.Serializable value1, java.io.Serializable value2, java.io.Serializable value3)
createPropertyUniqueContext
in interface PropertyValueComponent
value1
- the first property, which should denote application name or use-case ID
(null allowed)value2
- the second property, which should denote the context or container value
(null allowed)value3
- the third property, which should denote the unique value within the context
of the previous two properties (null allowed)
public java.lang.Long getPropertyUniqueContext(java.io.Serializable value1, java.io.Serializable value2, java.io.Serializable value3)
getPropertyUniqueContext
in interface PropertyValueComponent
PropertyValueComponent.createPropertyUniqueContext(Serializable, Serializable, Serializable)
public void updatePropertyUniqueContext(java.lang.Long id, java.io.Serializable value1, java.io.Serializable value2, java.io.Serializable value3)
updatePropertyUniqueContext
in interface PropertyValueComponent
PropertyValueComponent.createPropertyUniqueContext(Serializable, Serializable, Serializable)
public java.lang.Long updatePropertyUniqueContext(java.io.Serializable value1Before, java.io.Serializable value2Before, java.io.Serializable value3Before, java.io.Serializable value1, java.io.Serializable value2, java.io.Serializable value3)
create
is better
if there is no pre-existing set of values.
updatePropertyUniqueContext
in interface PropertyValueComponent
value1Before
- the first property before (null allowed)value2Before
- the second property before (null allowed)value3Before
- the third property before (null allowed)value1
- the first property (null allowed)value2
- the second property (null allowed)value3
- the third property (null allowed)
public void deletePropertyUniqueContext(java.lang.Long id)
deletePropertyUniqueContext
in interface PropertyValueComponent
PropertyValueComponent.createPropertyUniqueContext(Serializable, Serializable, Serializable)
public int deletePropertyUniqueContexts(java.io.Serializable[] values)
deletePropertyUniqueContexts
in interface PropertyValueComponent
values
- an array of one, two or three values, any of which may be null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |