com.atlassian.jira.bc.project.component
Class ComponentConverter

java.lang.Object
  extended by com.atlassian.jira.bc.project.component.ComponentConverter

public class ComponentConverter
extends Object

Originally this was part of the OfBizProjectComponentStore. I've extracted it to a separate class so that the logic can be reused elsewhere.

Since:
4.2

Constructor Summary
ComponentConverter()
           
 
Method Summary
 MutableProjectComponent convertToComponent(org.ofbiz.core.entity.GenericValue componentGV)
          Convert the specified GenericValue representing a MutableProjectComponent object to a MutableProjectComponent object.
 Collection<MutableProjectComponent> convertToComponents(Collection<org.ofbiz.core.entity.GenericValue> componentGVCollection)
          Convert the specified collection of GenericValues representing MutableProjectComponent object to a collection of MutableProjectComponent objects.
 ProjectComponent convertToProjectComponent(MutableProjectComponent value)
          Convert the specified MutableProjectComponent to a ProjectComponent object.
 Collection<ProjectComponent> convertToProjectComponents(Collection<MutableProjectComponent> mutables)
          Convert a collection of MutableProjectComponent objects to a collection of ProjectComponent objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentConverter

public ComponentConverter()
Method Detail

convertToComponents

public Collection<MutableProjectComponent> convertToComponents(Collection<org.ofbiz.core.entity.GenericValue> componentGVCollection)
Convert the specified collection of GenericValues representing MutableProjectComponent object to a collection of MutableProjectComponent objects.

Parameters:
componentGVCollection - collection of GenericValues - each GenericValue represents a ProjectComponent
Returns:
collection of new MutableProjectComponent objects that represents the original collection of GenericValues

convertToComponent

public MutableProjectComponent convertToComponent(org.ofbiz.core.entity.GenericValue componentGV)
Convert the specified GenericValue representing a MutableProjectComponent object to a MutableProjectComponent object.

Parameters:
componentGV - GenericValue object representing a MutableProjectComponent object to be converted to a MutableProjectComponent object
Returns:
new MutableProjectComponent object that represents the original GenericValue object

convertToProjectComponent

public ProjectComponent convertToProjectComponent(MutableProjectComponent value)
Convert the specified MutableProjectComponent to a ProjectComponent object.

Parameters:
value - MutableProjectComponent to be converted into a ProjectComponent.
Returns:
new instance of ProjectComponent with same values as given in the parameter object

convertToProjectComponents

public Collection<ProjectComponent> convertToProjectComponents(Collection<MutableProjectComponent> mutables)
Convert a collection of MutableProjectComponent objects to a collection of ProjectComponent objects.

Parameters:
mutables - collection of MutableProjectComponent objects to convert
Returns:
collection of new ProjectComponent objects that represent objects in the given MutableProjectComponent collection


Copyright © 2002-2014 Atlassian. All Rights Reserved.