public class OfBizCustomFieldValuePersister extends Object implements CustomFieldValuePersister
Modifier and Type | Field and Description |
---|---|
static Long |
DEFAULT_VALUE_ISSUE_ID |
static String |
DEFAULT_VALUE_TYPE |
protected OfBizDelegator |
delegator |
protected static String |
ENTITY_CUSTOMFIELD_ID |
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 |
static String |
TABLE_CUSTOMFIELD_VALUE |
Constructor and Description |
---|
OfBizCustomFieldValuePersister(OfBizDelegator delegator,
com.atlassian.core.util.Clock clock) |
Modifier and Type | Method and Description |
---|---|
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)
Values returned in order by (UPDATED ASC, ID ASC)
|
List<Object> |
getValues(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType,
String parentKey)
Values returned in order by (UPDATED ASC, ID ASC)
|
Map<Long,List<CustomFieldValue>> |
getValues(Set<Long> issueIds)
Return custom field values of given issues batch.
|
protected List<org.ofbiz.core.entity.GenericValue> |
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.
|
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.
|
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValues
getIdentity
protected final OfBizDelegator delegator
public static final String ENTITY_VALUE_TYPE
public static final String ENTITY_ISSUE_ID
protected static final String ENTITY_CUSTOMFIELD_ID
protected static final String ENTITY_PARENT_KEY
public static final String DEFAULT_VALUE_TYPE
public static final String FIELD_TYPE_STRING
public static final String FIELD_TYPE_TEXT
public static final String FIELD_TYPE_DATE
public static final String FIELD_TYPE_NUMBER
public static final String TABLE_CUSTOMFIELD_VALUE
public static final Long DEFAULT_VALUE_ISSUE_ID
public OfBizCustomFieldValuePersister(OfBizDelegator delegator, com.atlassian.core.util.Clock clock)
public List<Object> getValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType)
CustomFieldValuePersister
getValues
in interface CustomFieldValuePersister
public List<Object> getValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType, String parentKey)
CustomFieldValuePersister
getValues
in interface CustomFieldValuePersister
public Set<Long> getIssueIdsWithValue(CustomField field, PersistenceFieldType persistenceFieldType, Object value)
CustomFieldValuePersister
getIssueIdsWithValue
in interface CustomFieldValuePersister
field
- CustomFieldpersistenceFieldType
- PersistenceFieldTypevalue
- Value objectpublic void createValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType, Collection values)
createValues
in interface CustomFieldValuePersister
public void createValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType, Collection values, String parentKey)
createValues
in interface CustomFieldValuePersister
public void updateValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType, Collection values)
updateValues
in interface CustomFieldValuePersister
public void updateValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType, Collection values, String parentKey)
updateValues
in interface CustomFieldValuePersister
public void removeDuplicateValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType)
CustomFieldValuePersister
removeDuplicateValues
in interface CustomFieldValuePersister
field
- the custom field.issueId
- the issue.persistenceFieldType
- the data type of the valuepublic Map<Long,List<CustomFieldValue>> getValues(Set<Long> issueIds)
CustomFieldValuePersister
getValues
in interface CustomFieldValuePersister
public Set<Long> removeValue(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType, Object value)
CustomFieldValuePersister
removeValue
in interface CustomFieldValuePersister
field
- the custom field.issueId
- the issue.persistenceFieldType
- the data type of the valuevalue
- the value to delete.public Set<Long> removeAllValues(String customFieldId)
CustomFieldValuePersister
removeAllValues
in interface CustomFieldValuePersister
customFieldId
- the id of the custom fieldprotected List<org.ofbiz.core.entity.GenericValue> getValuesForTypeAndParent(CustomField field, Long issueId, String parentKey)
protected List<org.ofbiz.core.entity.GenericValue> getValuesForType(CustomField field, Long issueId)
Copyright © 2002-2023 Atlassian. All Rights Reserved.