com.atlassian.jira.propertyset
Interface OfBizPropertyEntryStore

All Known Implementing Classes:
BootstrapOfBizPropertyEntryStore, CachingOfBizPropertyEntryStore, MockOfBizPropertyEntryStore

public interface OfBizPropertyEntryStore

Cached loader for property set entries and their values. Note that this class must be used on any access to the property set to ensure cache consistency; accessing one directly using OFBizPropertySet will result in invalid cached state.

Since:
v6.2

Nested Class Summary
static interface OfBizPropertyEntryStore.PropertyEntry
          Holds the type and value of a property.
 
Method Summary
 OfBizPropertyEntryStore.PropertyEntry getEntry(String entityName, long entityId, String propertyKey)
          Retrieve the type and value of the specified property.
 Collection<String> getKeys(String entityName, long entityId)
          Retrieve all keys that are stored in the given property set.
 Collection<String> getKeys(String entityName, long entityId, int type)
          Retrieve all keys that are stored in the given property set and have the specified value type.
 void removeEntry(String entityName, long entityId, String propertyKey)
          Remove a specific property from a property set.
 void removePropertySet(String entityName, long entityId)
          Remove all properties that belong to a property set.
 void setEntry(String entityName, long entityId, String propertyKey, int type, Object value)
          Stores a new value for the specified property.
 

Method Detail

getKeys

Collection<String> getKeys(String entityName,
                           long entityId)
Retrieve all keys that are stored in the given property set.

Parameters:
entityName - the entity name of the property set's owner
entityId - the entity ID of the property set's owner
Returns:
all of the keys that are stored for this property set, in no particular order

getKeys

Collection<String> getKeys(String entityName,
                           long entityId,
                           int type)
Retrieve all keys that are stored in the given property set and have the specified value type.

Parameters:
entityName - the entity name of the property set's owner
entityId - the entity ID of the property set's owner
type - the value type, as defined by the value constants in the PropertySet interface, that the keys must have to be returned
Returns:
all of the keys that are stored for this property set and have the given type, in no particular order

getEntry

@CheckForNull
OfBizPropertyEntryStore.PropertyEntry getEntry(String entityName,
                                                            long entityId,
                                                            String propertyKey)
Retrieve the type and value of the specified property.

Parameters:
entityName - the entity name of the property set's owner
entityId - the entity ID of the property set's owner
propertyKey - the name of the property to load
Returns:
the property entry, or null if the property does not exist. Note that even if it does "exist", the value can itself be null.

setEntry

void setEntry(String entityName,
              long entityId,
              String propertyKey,
              int type,
              Object value)
Stores a new value for the specified property.

Parameters:
entityName - the entity name of the property set's owner
entityId - the entity ID of the property set's owner
propertyKey - the name of the property to store
type - the value type that is to be stored, as defined by the value constants in the PropertySet interface.
value - the value to be stored

removeEntry

void removeEntry(String entityName,
                 long entityId,
                 String propertyKey)
Remove a specific property from a property set.

Parameters:
entityName - the entity name of the property set's owner
entityId - the entity ID of the property set's owner
propertyKey - the name of the property to remove

removePropertySet

void removePropertySet(String entityName,
                       long entityId)
Remove all properties that belong to a property set.

Parameters:
entityName - the entity name of the property set's owner
entityId - the entity ID of the property set's owner


Copyright © 2002-2014 Atlassian. All Rights Reserved.