CsvImportResults

public class CsvImportResults implements Serializable

This class holds results from a CSV import - IDs of updated and created instances.

Constructors

CsvImportResults

public CsvImportResults(EntityDto entity, List<Long> newInstanceIDs, List<Long> updatedInstanceIDs, Map<Integer, String> rowErrors)
Parameters:
  • entity – entity for which this import was performed
  • newInstanceIDs – a list of IDs for instances that were newly created during import
  • updatedInstanceIDs – a list of IDs for instances that were updated during import
  • rowErrors – a list of errors thrown during import

Methods

getEntityClassName

public String getEntityClassName()
Returns:the class name of the entity for which this import was performed

getEntityModule

public String getEntityModule()
Returns:the name of the module of the entity for which this import was performed

getEntityName

public String getEntityName()
Returns:the name of the entity for which this import was performed

getEntityNamespace

public String getEntityNamespace()
Returns:the namespace of the entity for which this import was performed

getNewInstanceIDs

public List<Long> getNewInstanceIDs()
Returns:a list of IDs for instances that were newly created during import

getRowErrors

public Map<Integer, String> getRowErrors()
Returns:the map containing errors thrown during import

getUpdatedInstanceIDs

public List<Long> getUpdatedInstanceIDs()
Returns:a list of IDs for instances that were updated during import

newInstanceCount

public int newInstanceCount()
Returns:the total number of instances that were newly created during import

totalNumberOfImportedInstances

public int totalNumberOfImportedInstances()

Returns the total number of imported instances. The total number of imported instances is the sum of the number of updated instances and the total number of newly created instances. In other words this is the number of affected instances.

Returns:total number of imported instances

updatedInstanceCount

public int updatedInstanceCount()
Returns:the total number of instances that were updated during import