public class FieldConfigSchemePersisterImpl extends Object implements FieldConfigSchemePersister
Modifier and Type | Field and Description |
---|---|
static String |
ENTITY_CONFIG_ID |
static String |
ENTITY_DESCRIPTION |
static String |
ENTITY_FIELD |
static String |
ENTITY_ID |
static String |
ENTITY_ISSUE_TYPE |
static String |
ENTITY_NAME |
static String |
ENTITY_RELATED_TABLE_NAME |
static String |
ENTITY_SCHEME_ID |
static String |
ENTITY_TABLE_NAME |
static String |
FK_RELATED_CONFIGS |
Constructor and Description |
---|
FieldConfigSchemePersisterImpl(OfBizDelegator ofBizDelegator,
QueryDslAccessor queryDslAccessor,
ConstantsManager constantsManager,
FieldConfigPersister fieldConfigPersister,
FieldConfigContextPersister contextPersister,
com.atlassian.cache.CacheManager cacheManager) |
Modifier and Type | Method and Description |
---|---|
FieldConfigScheme |
create(FieldConfigScheme configScheme,
ConfigurableField field) |
FieldConfigScheme |
createWithDefaultValues(ConfigurableField field,
Map<String,FieldConfig> configs) |
FieldConfigScheme |
getConfigSchemeForFieldConfig(FieldConfig fieldConfig)
Finds the
FieldConfigScheme that contains
the FieldConfig |
List<Long> |
getConfigSchemeIdsForCustomFieldId(String customFieldId)
Retrieves the ids of the field config schemes for the specified customfield id.
|
List<FieldConfigScheme> |
getConfigSchemesForCustomField(ConfigurableField field) |
FieldConfigScheme |
getFieldConfigScheme(Long configSchemeId) |
Collection<FieldConfigScheme> |
getInvalidFieldConfigSchemeAfterIssueTypeRemoval(IssueType issueType)
Returns a collection of the
FieldConfigScheme s that will be made invalid if the issueType is
removed (that is the FieldConfigScheme would no longer be bound to ANY issue types). |
void |
init() |
protected void |
invalidateAll() |
void |
remove(Long fieldConfigSchemeId) |
void |
removeByIssueType(IssueType issueType)
Removes
FieldConfigScheme associations for the given issue type. |
protected FieldConfigScheme |
removeIfExist(Long fieldConfigSchemeId)
Remove a field config from the database, returning the removed object if it exists.
|
protected void |
removeRelatedConfigsForUpdate(FieldConfigScheme configScheme,
org.ofbiz.core.entity.GenericValue gv) |
FieldConfigScheme |
update(FieldConfigScheme configScheme) |
public static final String ENTITY_TABLE_NAME
public static final String ENTITY_ID
public static final String ENTITY_NAME
public static final String ENTITY_DESCRIPTION
public static final String ENTITY_FIELD
public static final String ENTITY_RELATED_TABLE_NAME
public static final String ENTITY_ISSUE_TYPE
public static final String ENTITY_SCHEME_ID
public static final String ENTITY_CONFIG_ID
public static final String FK_RELATED_CONFIGS
public FieldConfigSchemePersisterImpl(OfBizDelegator ofBizDelegator, QueryDslAccessor queryDslAccessor, ConstantsManager constantsManager, FieldConfigPersister fieldConfigPersister, FieldConfigContextPersister contextPersister, com.atlassian.cache.CacheManager cacheManager)
public FieldConfigScheme create(FieldConfigScheme configScheme, ConfigurableField field)
create
in interface FieldConfigSchemePersister
public FieldConfigScheme createWithDefaultValues(ConfigurableField field, Map<String,FieldConfig> configs)
createWithDefaultValues
in interface FieldConfigSchemePersister
public Collection<FieldConfigScheme> getInvalidFieldConfigSchemeAfterIssueTypeRemoval(IssueType issueType)
FieldConfigSchemePersister
FieldConfigScheme
s that will be made invalid if the issueType is
removed (that is the FieldConfigScheme would no longer be bound to ANY issue types).
If there are still any other issue types that a FieldConfigScheme will be bound to after
the removal then it will not be included in the collection returned.getInvalidFieldConfigSchemeAfterIssueTypeRemoval
in interface FieldConfigSchemePersister
issueType
- to be removedFieldConfigScheme
s or an empty collection.public void removeByIssueType(IssueType issueType)
FieldConfigSchemePersister
FieldConfigScheme
associations for the given issue type. Please note that this method call
on it's own is NOT safe. it removes rows from a many-to-many table without considering other entities in
the many-to-many relationship. What this means is that if there's only one row left in the table, this
method may remove it, and you'll end up with orphaned values. Only use this in conjunction with
FieldConfigSchemePersister.getInvalidFieldConfigSchemeAfterIssueTypeRemoval(com.atlassian.jira.issue.issuetype.IssueType)
.
Also see FieldConfigSchemeManagerImpl.removeInvalidFieldConfigSchemesForIssueType(com.atlassian.jira.issue.issuetype.IssueType)
for correct usage.
removeByIssueType
in interface FieldConfigSchemePersister
issueType
- the issue type to remove the associations forpublic void init()
init
in interface FieldConfigSchemePersister
public FieldConfigScheme update(FieldConfigScheme configScheme)
update
in interface FieldConfigSchemePersister
protected void removeRelatedConfigsForUpdate(@Nonnull FieldConfigScheme configScheme, @Nonnull org.ofbiz.core.entity.GenericValue gv) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
public void remove(Long fieldConfigSchemeId)
remove
in interface FieldConfigSchemePersister
@Nullable protected FieldConfigScheme removeIfExist(Long fieldConfigSchemeId)
fieldConfigSchemeId
- Id of the config to be removedpublic FieldConfigScheme getFieldConfigScheme(Long configSchemeId)
getFieldConfigScheme
in interface FieldConfigSchemePersister
public List<FieldConfigScheme> getConfigSchemesForCustomField(ConfigurableField field)
getConfigSchemesForCustomField
in interface FieldConfigSchemePersister
public FieldConfigScheme getConfigSchemeForFieldConfig(FieldConfig fieldConfig)
FieldConfigSchemePersister
FieldConfigScheme
that contains
the FieldConfig
getConfigSchemeForFieldConfig
in interface FieldConfigSchemePersister
fieldConfig
- the config to find the containing FieldConfigScheme
of; cannot be null.FieldConfig
. Not Null.public List<Long> getConfigSchemeIdsForCustomFieldId(String customFieldId)
FieldConfigSchemePersister
FieldConfigScheme
domain objects are not required, for
example when removing them from the system.getConfigSchemeIdsForCustomFieldId
in interface FieldConfigSchemePersister
customFieldId
- the id of the customfieldFieldConfigScheme
objects associated with this customfield. Should not be
null.protected void invalidateAll()
Copyright © 2002-2019 Atlassian. All Rights Reserved.