com.atlassian.jira.entity
Interface EntityFactory<E>

All Superinterfaces:
EntityBuilder<E>, NamedEntityBuilder<E>
All Known Implementing Classes:
AbstractEntityFactory, ApplicationUserEntityFactory, ClusterLockStatusEntity, EntityPropertyFactory, EntityPropertyIndexDocumentFactory, FilterSubscriptionFactory, GlobalPermissionEntityFactory, IssueLinkFactory, IssueSecurityLevelFactory, IssueSecurityLevelPermissionFactory, LicenseRoleGroupEntityFactory, MovedIssueKeyFactory, ProjectCategoryFactory, RemoteIssueLinkFactory, ReplicatedIndexOperationFactory, RunDetailsFactory, WorklogEntityFactory

public interface EntityFactory<E>
extends NamedEntityBuilder<E>

An entity factory is able to convert a Generic Value for an entity into a domain object and back. It is used by EntityEngine to run queries that return Domain objects instead of GenericValues.

Since:
v4.4

Method Summary
 List<E> buildList(Collection<org.ofbiz.core.entity.GenericValue> gvList)
          Builds a list of instances from a list of GenericValues.
 Map<String,Object> fieldMapFrom(E value)
          Builds a FieldMap from an entity Object.
 
Methods inherited from interface com.atlassian.jira.entity.NamedEntityBuilder
getEntityName
 
Methods inherited from interface com.atlassian.jira.entity.EntityBuilder
build
 

Method Detail

buildList

List<E> buildList(Collection<org.ofbiz.core.entity.GenericValue> gvList)
Builds a list of instances from a list of GenericValues. This method is included in the interface so that the no-op implementation can take a performance shortcut and simply return the given list. If a null list is input, then a null list will be output.

Parameters:
gvList - List of GenericValues
Returns:
List of objects.

fieldMapFrom

Map<String,Object> fieldMapFrom(E value)
Builds a FieldMap from an entity Object. The FieldMap is the data held by a GenericValue, so this basically is the reverse operation of turning an object into a GenericValue.

Parameters:
value - the Entity value
Returns:
Map of field values


Copyright © 2002-2014 Atlassian. All Rights Reserved.