Class CsvImportResult<T extends TopiaEntityEnum>
java.lang.Object
org.nuiton.topia.persistence.csv.in.CsvImportResult<T>
- All Implemented Interfaces:
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanFlag to authorize to create entities not found in db.protected final Ttype of entity to import csv datas.protected final StringName of the csv file to import.protected intCount of created entities.protected intCount of updated entities.protected final CsvProgressModel -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCsvImportResult(T entityType, String importFileName, boolean createIfNotFound, CsvProgressModel progressModel) -
Method Summary
Modifier and TypeMethodDescriptionintintvoidvoidbooleanstatic <T extends TopiaEntityEnum>
CsvImportResult<T>static <T extends TopiaEntityEnum>
CsvImportResult<T>newResult(T entityType, String importFileName, boolean createIfNotFound, CsvProgressModel progressModel)
-
Field Details
-
entityType
type of entity to import csv datas. -
importFileName
Name 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, String importFileName, boolean createIfNotFound, CsvProgressModel progressModel)
-
-
Method Details
-
newResult
public static <T extends TopiaEntityEnum> CsvImportResult<T> newResult(T entityType, String importFileName, boolean createIfNotFound) -
newResult
public static <T extends TopiaEntityEnum> CsvImportResult<T> newResult(T entityType, String importFileName, boolean createIfNotFound, CsvProgressModel progressModel) -
getEntityType
-
getImportFileName
-
getNumberCreated
public int getNumberCreated() -
getNumberUpdated
public int getNumberUpdated() -
isCreateIfNotFound
public boolean isCreateIfNotFound() -
incrementsNumberCreated
public void incrementsNumberCreated() -
incrementsNumberUpdated
public void incrementsNumberUpdated() -
getProgressModel
-