Interface CustomFieldValuePersister

All Superinterfaces:
IdentifiableComponent
All Known Implementing Classes:
EagerLoadingOfBizCustomFieldPersister, OfBizCustomFieldValuePersister

public interface CustomFieldValuePersister extends IdentifiableComponent
  • Method Details

    • createValues

      void createValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType, Collection value)
    • createValues

      void createValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType, Collection values, @Nullable String parentKey)
    • updateValues

      void updateValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType, Collection values)
    • updateValues

      void updateValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType, Collection values, @Nullable String parentKey)
    • removeValue

      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.
      Parameters:
      field - the custom field.
      issueId - the issue.
      persistenceFieldType - the data type of the value
      value - 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!).
    • getValues

      List<Object> getValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType)
      Values returned in order by (UPDATED ASC, ID ASC)
    • getValues

      List<Object> getValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType, String parentKey)
      Values returned in order by (UPDATED ASC, ID ASC)
    • getIssueIdsWithValue

      Set<Long> getIssueIdsWithValue(CustomField field, PersistenceFieldType persistenceFieldType, Object value)
      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.
      Parameters:
      field - CustomField
      persistenceFieldType - PersistenceFieldType
      value - Value object
      Returns:
      Set of Issue IDs
    • removeAllValues

      Set<Long> removeAllValues(String customFieldId)
      Called when removing a field. Removes all the customfield values linked to the customfield Id provided.
      Parameters:
      customFieldId - the id of the custom field
      Returns:
      issue IDs affected.
    • getValues

      @ExperimentalApi @Deprecated default List<CustomFieldValue> getValues(long issueId)
      Deprecated.
      since 8.13 use getValues(Set) instead
      Return custom field values of a given issue.
      Since:
      8.10
    • getValues

      @ExperimentalApi default Map<Long,List<CustomFieldValue>> getValues(Set<Long> issueIds)
      Return custom field values of given issues batch.
      Since:
      8.12
    • removeDuplicateValues

      @ExperimentalApi default void removeDuplicateValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType)
      Removes any duplicate values and keeps the most recent custom field value for the given custom field, from a given issue.
      Parameters:
      field - the custom field.
      issueId - the issue.
      persistenceFieldType - the data type of the value