Package cdc.impex.api
Interface ImportRow
-
public interface ImportRowDefinition of an import row.- Author:
- Damien Carbonne
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancanBeProcessed()ImportActiongetAction()default <T> TgetDataOrNull(ColumnTemplate<T> column)Returns the data associated to a column ornull.<T> TgetDataOrNull(Class<T> cls, String name)Returns the data associated to a column ornull.ObjectgetDataOrNull(String name)Returns the data associated to a column ornull.List<ImportIssue>getIssues()intgetNumber()StringgetSystemId()SheetTemplategetTemplate()booleanisErase(String name)Returnstrueif the data associated to column must be erased.
-
-
-
Method Detail
-
getSystemId
String getSystemId()
- Returns:
- The systemId of the imported data.
-
getTemplate
SheetTemplate getTemplate()
- Returns:
- The associated template.
-
getNumber
int getNumber()
- Returns:
- The row number (1-based).
-
getAction
ImportAction getAction()
- Returns:
- The action to be taken for this row.
-
isErase
boolean isErase(String name)
Returnstrueif the data associated to column must be erased.- Parameters:
name- The column name.- Returns:
trueif the data associated to column namednamemust be erased.
-
getDataOrNull
Object getDataOrNull(String name)
Returns the data associated to a column ornull.If data must be erased,
nullis returned.- Parameters:
name- The column name.- Returns:
- The data associated to column named
nameornull.
-
getDataOrNull
<T> T getDataOrNull(Class<T> cls, String name)
Returns the data associated to a column ornull.If data must be erased,
nullis returned.- Type Parameters:
T- The result type.- Parameters:
cls- The result class.name- The column name.- Returns:
- The data associated to column named
nameornull. - Throws:
ClassCastException- When the associated data can not be converted tocls
-
getDataOrNull
default <T> T getDataOrNull(ColumnTemplate<T> column)
Returns the data associated to a column ornull.If data must be erased,
nullis returned.- Type Parameters:
T- The result type.- Parameters:
column- The column.- Returns:
- The data associated to
columnornull. - Throws:
ClassCastException- When the associated data can not be converted tocolumndata type.
-
getIssues
List<ImportIssue> getIssues()
- Returns:
- The issues associated to this row.
-
canBeProcessed
boolean canBeProcessed()
- Returns:
trueif this row can be processed.
All mandatory values must be set.
-
-