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

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

public class EagerLoadingOfBizCustomFieldPersister
extends OfBizCustomFieldValuePersister

Many times, the values for custom fields are all retrieved at the same time - such as viewing all values for an issue, or indexing all custom fields.

It therefore makes sense to eargerly loaded, reducing the number of database calls needed.


Field Summary
 
Fields inherited from class com.atlassian.jira.issue.customfields.persistence.OfBizCustomFieldValuePersister
DEFAULT_VALUE_ISSUE_ID, DEFAULT_VALUE_TYPE, delegator, ENTITY_CUSTOMFIELD_ID, ENTITY_ISSUE_ID, ENTITY_PARENT_KEY, ENTITY_VALUE_TYPE, FIELD_TYPE_DATE, FIELD_TYPE_NUMBER, FIELD_TYPE_STRING, FIELD_TYPE_TEXT, TABLE_CUSTOMFIELD_VALUE
 
Constructor Summary
EagerLoadingOfBizCustomFieldPersister(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)
           
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 com.atlassian.jira.issue.customfields.persistence.OfBizCustomFieldValuePersister
getIssueIdsWithValue, getValues, getValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EagerLoadingOfBizCustomFieldPersister

public EagerLoadingOfBizCustomFieldPersister(OfBizDelegator delegator)
Method Detail

createValues

public void createValues(CustomField field,
                         Long issueId,
                         PersistenceFieldType persistenceFieldType,
                         Collection values)
Specified by:
createValues in interface CustomFieldValuePersister
Overrides:
createValues in class OfBizCustomFieldValuePersister

createValues

public void createValues(CustomField field,
                         Long issueId,
                         PersistenceFieldType persistenceFieldType,
                         Collection values,
                         String parentKey)
Specified by:
createValues in interface CustomFieldValuePersister
Overrides:
createValues in class OfBizCustomFieldValuePersister

updateValues

public void updateValues(CustomField field,
                         Long issueId,
                         PersistenceFieldType persistenceFieldType,
                         Collection values)
Specified by:
updateValues in interface CustomFieldValuePersister
Overrides:
updateValues in class OfBizCustomFieldValuePersister

updateValues

public void updateValues(CustomField field,
                         Long issueId,
                         PersistenceFieldType persistenceFieldType,
                         Collection values,
                         String parentKey)
Specified by:
updateValues in interface CustomFieldValuePersister
Overrides:
updateValues in class OfBizCustomFieldValuePersister

removeValue

public Set removeValue(CustomField field,
                       Long issueId,
                       PersistenceFieldType persistenceFieldType,
                       Object value)
Specified by:
removeValue in interface CustomFieldValuePersister
Overrides:
removeValue in class OfBizCustomFieldValuePersister

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
Overrides:
removeAllValues in class OfBizCustomFieldValuePersister

getValuesForTypeAndParent

protected List getValuesForTypeAndParent(CustomField field,
                                         Long issueId,
                                         String parentKey)
Overrides:
getValuesForTypeAndParent in class OfBizCustomFieldValuePersister

getValuesForType

protected List getValuesForType(CustomField field,
                                Long issueId)
Overrides:
getValuesForType in class OfBizCustomFieldValuePersister


Copyright © 2002-2009 Atlassian. All Rights Reserved.