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) |
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) |
List<Object> |
getValues(CustomField field,
Long issueId,
PersistenceFieldType persistenceFieldType,
String parentKey) |
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.
|
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) |
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)
public List<Object> getValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType)
getValues
in interface CustomFieldValuePersister
public List<Object> getValues(CustomField field, Long issueId, PersistenceFieldType persistenceFieldType, String parentKey)
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 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-2015 Atlassian. All Rights Reserved.