Package cdc.impex.api

Interface ImportRow


  • public interface ImportRow
    Definition of an import row.
    Author:
    Damien Carbonne
    • 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)
        Returns true if the data associated to column must be erased.
        Parameters:
        name - The column name.
        Returns:
        true if the data associated to column named name must be erased.
      • getDataOrNull

        Object getDataOrNull​(String name)
        Returns the data associated to a column or null.

        If data must be erased, null is returned.

        Parameters:
        name - The column name.
        Returns:
        The data associated to column named name or null.
      • getDataOrNull

        <T> T getDataOrNull​(Class<T> cls,
                            String name)
        Returns the data associated to a column or null.

        If data must be erased, null is returned.

        Type Parameters:
        T - The result type.
        Parameters:
        cls - The result class.
        name - The column name.
        Returns:
        The data associated to column named name or null.
        Throws:
        ClassCastException - When the associated data can not be converted to cls
      • getDataOrNull

        default <T> T getDataOrNull​(ColumnTemplate<T> column)
        Returns the data associated to a column or null.

        If data must be erased, null is returned.

        Type Parameters:
        T - The result type.
        Parameters:
        column - The column.
        Returns:
        The data associated to column or null.
        Throws:
        ClassCastException - When the associated data can not be converted to column data type.
      • getIssues

        List<ImportIssue> getIssues()
        Returns:
        The issues associated to this row.
      • canBeProcessed

        boolean canBeProcessed()
        Returns:
        true if this row can be processed.
        All mandatory values must be set.