com.atlassian.jira.issue.customfields.persistence
Class OfBizCustomFieldValuePersister

java.lang.Object
  extended by com.atlassian.jira.issue.customfields.persistence.OfBizCustomFieldValuePersister
All Implemented Interfaces:
CustomFieldValuePersister
Direct Known Subclasses:
EagerLoadingOfBizCustomFieldPersister

public class OfBizCustomFieldValuePersister
extends Object
implements CustomFieldValuePersister


Field Summary
static Long DEFAULT_VALUE_ISSUE_ID
           
static String DEFAULT_VALUE_TYPE
           
protected  OfBizDelegator delegator
           
protected static String ENTITY_CUSTOMFIELD_ID
           
protected static String ENTITY_ISSUE_ID
           
protected static String ENTITY_PARENT_KEY
           
static String ENTITY_VALUE_TYPE
           
static String FIELD_TYPE_DATE
           
static String FIELD_TYPE_NUMBER
           
static String FIELD_TYPE_STRING
           
static String FIELD_TYPE_TEXT
           
protected static String TABLE_CUSTOMFIELD_VALUE
           
 
Constructor Summary
OfBizCustomFieldValuePersister(OfBizDelegator delegator)
           
 
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 getIssueIdsWithValue(CustomField field, PersistenceFieldType persistenceFieldType, Object value)
          Return a set of issue ids that have a certain value.
 List getValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType)
           
 List getValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType, String parentKey)
           
protected  List getValuesForType(CustomField field, Long issueId)
           
protected  List getValuesForTypeAndParent(CustomField field, Long issueId, String parentKey)
           
 Set removeAllValues(CustomField field)
          called when removing a field.
 Set removeValue(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType, Object value)
           
 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
 

Field Detail

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
Constructor Detail

OfBizCustomFieldValuePersister

public OfBizCustomFieldValuePersister(OfBizDelegator delegator)
Method Detail

getValues

public List getValues(CustomField field,
                      Long issueId,
                      PersistenceFieldType persistenceFieldType)
Specified by:
getValues in interface CustomFieldValuePersister

getValues

public List getValues(CustomField field,
                      Long issueId,
                      PersistenceFieldType persistenceFieldType,
                      String parentKey)
Specified by:
getValues in interface CustomFieldValuePersister

getIssueIdsWithValue

public Set 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

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 removeValue(CustomField field,
                       Long issueId,
                       PersistenceFieldType persistenceFieldType,
                       Object value)
Specified by:
removeValue in interface CustomFieldValuePersister

removeAllValues

public Set removeAllValues(CustomField field)
Description copied from interface: CustomFieldValuePersister
called when removing a field. return issue IDs affected.

Specified by:
removeAllValues in interface CustomFieldValuePersister

getValuesForTypeAndParent

protected List getValuesForTypeAndParent(CustomField field,
                                         Long issueId,
                                         String parentKey)

getValuesForType

protected List getValuesForType(CustomField field,
                                Long issueId)


Copyright © 2002-2008 Atlassian. All Rights Reserved.