com.atlassian.jira.issue.customfields.persistence
Class OfBizCustomFieldValuePersister
java.lang.Object
com.atlassian.jira.issue.customfields.persistence.OfBizCustomFieldValuePersister
- All Implemented Interfaces:
- CustomFieldValuePersister
- Direct Known Subclasses:
- EagerLoadingOfBizCustomFieldPersister
public class OfBizCustomFieldValuePersister
- extends Object
- implements CustomFieldValuePersister
Method Summary |
void |
createValues(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType,
Collection values)
|
void |
createValues(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType,
Collection values,
String parentKey)
|
Set<Long> |
getIssueIdsWithValue(CustomField field,
PersistenceFieldType persistenceFieldType,
Object value)
Return a set of issue ids that have a certain value. |
List<Object> |
getValues(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType)
|
List<Object> |
getValues(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType,
String parentKey)
|
protected List |
getValuesForType(CustomField field,
Long issueId)
|
protected List<org.ofbiz.core.entity.GenericValue> |
getValuesForTypeAndParent(CustomField field,
Long issueId,
String parentKey)
|
Set<Long> |
removeAllValues(String customFieldId)
Called when removing a field. |
Set<Long> |
removeValue(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType,
Object value)
Removes a specific custom field value for the given custom field, from a given issue, of a particular type. |
void |
updateValues(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType,
Collection values)
|
void |
updateValues(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType,
Collection values,
String parentKey)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
delegator
protected final OfBizDelegator delegator
ENTITY_VALUE_TYPE
public static final String ENTITY_VALUE_TYPE
- See Also:
- Constant Field Values
ENTITY_ISSUE_ID
protected static final String ENTITY_ISSUE_ID
- See Also:
- Constant Field Values
ENTITY_CUSTOMFIELD_ID
protected static final String ENTITY_CUSTOMFIELD_ID
- See Also:
- Constant Field Values
ENTITY_PARENT_KEY
protected static final String ENTITY_PARENT_KEY
- See Also:
- Constant Field Values
DEFAULT_VALUE_TYPE
public static final String DEFAULT_VALUE_TYPE
- See Also:
- Constant Field Values
FIELD_TYPE_STRING
public static final String FIELD_TYPE_STRING
- See Also:
- Constant Field Values
FIELD_TYPE_TEXT
public static final String FIELD_TYPE_TEXT
- See Also:
- Constant Field Values
FIELD_TYPE_DATE
public static final String FIELD_TYPE_DATE
- See Also:
- Constant Field Values
FIELD_TYPE_NUMBER
public static final String FIELD_TYPE_NUMBER
- See Also:
- Constant Field Values
TABLE_CUSTOMFIELD_VALUE
protected static final String TABLE_CUSTOMFIELD_VALUE
- See Also:
- Constant Field Values
DEFAULT_VALUE_ISSUE_ID
public static final Long DEFAULT_VALUE_ISSUE_ID
OfBizCustomFieldValuePersister
public OfBizCustomFieldValuePersister(OfBizDelegator delegator)
getValues
public List<Object> getValues(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType)
- Specified by:
getValues
in interface CustomFieldValuePersister
getValues
public List<Object> getValues(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType,
String parentKey)
- Specified by:
getValues
in interface CustomFieldValuePersister
getIssueIdsWithValue
public Set<Long> getIssueIdsWithValue(CustomField field,
PersistenceFieldType persistenceFieldType,
Object value)
- Description copied from interface:
CustomFieldValuePersister
- Return a set of issue ids that have a certain value.
This is used when you need to do a global 'swap' of a certain custom field value.
- Specified by:
getIssueIdsWithValue
in interface CustomFieldValuePersister
- Parameters:
field
- CustomFieldpersistenceFieldType
- PersistenceFieldTypevalue
- Value object
- Returns:
- Set of Issue IDs
createValues
public void createValues(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType,
Collection values)
- Specified by:
createValues
in interface CustomFieldValuePersister
createValues
public void createValues(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType,
Collection values,
String parentKey)
- Specified by:
createValues
in interface CustomFieldValuePersister
updateValues
public void updateValues(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType,
Collection values)
- Specified by:
updateValues
in interface CustomFieldValuePersister
updateValues
public void updateValues(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType,
Collection values,
String parentKey)
- Specified by:
updateValues
in interface CustomFieldValuePersister
removeValue
public Set<Long> removeValue(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType,
Object value)
- Description copied from interface:
CustomFieldValuePersister
- Removes a specific custom field value for the given custom field, from a given issue, of a particular type.
- Specified by:
removeValue
in interface CustomFieldValuePersister
- Parameters:
field
- the custom field.issueId
- the issue.persistenceFieldType
- the data type of the valuevalue
- the value to delete.
- Returns:
- returns the set of ids of issues that were affected for some reason (should be 1, just the given issue!).
removeAllValues
public Set<Long> removeAllValues(String customFieldId)
- Description copied from interface:
CustomFieldValuePersister
- Called when removing a field. Removes all the customfield values linked to the customfield
Id provided.
- Specified by:
removeAllValues
in interface CustomFieldValuePersister
- Parameters:
customFieldId
- the id of the custom field
- Returns:
- issue IDs affected.
getValuesForTypeAndParent
protected List<org.ofbiz.core.entity.GenericValue> getValuesForTypeAndParent(CustomField field,
Long issueId,
String parentKey)
getValuesForType
protected List getValuesForType(CustomField field,
Long issueId)
Copyright © 2002-2013 Atlassian. All Rights Reserved.