Class CsvImportResult<T extends TopiaEntityEnum>
java.lang.Object
org.nuiton.topia.persistence.csv.in.CsvImportResult<T>
- All Implemented Interfaces:
java.io.Serializable
public class CsvImportResult<T extends TopiaEntityEnum>
extends java.lang.Object
implements java.io.Serializable
A simple csv result bean just to keep the number of created or
updated entities.
- Since:
- 0.2
- Author:
- tchemit <chemit@codelutin.com>
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected booleancreateIfNotFoundFlag to authorize to create entities not found in db.protected TentityTypetype of entity to import csv datas.protected java.lang.StringimportFileNameName of the csv file to import.protected intnumberCreatedCount of created entities.protected intnumberUpdatedCount of updated entities.protected CsvProgressModelprogressModel -
Constructor Summary
Constructors Modifier Constructor Description protectedCsvImportResult(T entityType, java.lang.String importFileName, boolean createIfNotFound, CsvProgressModel progressModel) -
Method Summary
Modifier and Type Method Description TgetEntityType()java.lang.StringgetImportFileName()intgetNumberCreated()intgetNumberUpdated()CsvProgressModelgetProgressModel()voidincrementsNumberCreated()voidincrementsNumberUpdated()booleanisCreateIfNotFound()static <T extends TopiaEntityEnum>
CsvImportResult<T>newResult(T entityType, java.lang.String importFileName, boolean createIfNotFound)static <T extends TopiaEntityEnum>
CsvImportResult<T>newResult(T entityType, java.lang.String importFileName, boolean createIfNotFound, CsvProgressModel progressModel)
-
Field Details
-
entityType
type of entity to import csv datas. -
importFileName
protected final java.lang.String importFileNameName of the csv file to import. -
createIfNotFound
protected final boolean createIfNotFoundFlag to authorize to create entities not found in db. -
numberCreated
protected int numberCreatedCount of created entities. -
numberUpdated
protected int numberUpdatedCount of updated entities. -
progressModel
-
-
Constructor Details
-
CsvImportResult
protected CsvImportResult(T entityType, java.lang.String importFileName, boolean createIfNotFound, CsvProgressModel progressModel)
-
-
Method Details
-
newResult
public static <T extends TopiaEntityEnum> CsvImportResult<T> newResult(T entityType, java.lang.String importFileName, boolean createIfNotFound) -
newResult
public static <T extends TopiaEntityEnum> CsvImportResult<T> newResult(T entityType, java.lang.String importFileName, boolean createIfNotFound, CsvProgressModel progressModel) -
getEntityType
-
getImportFileName
public java.lang.String getImportFileName() -
getNumberCreated
public int getNumberCreated() -
getNumberUpdated
public int getNumberUpdated() -
isCreateIfNotFound
public boolean isCreateIfNotFound() -
incrementsNumberCreated
public void incrementsNumberCreated() -
incrementsNumberUpdated
public void incrementsNumberUpdated() -
getProgressModel
-