Class GridTabSQLInsertExporter

java.lang.Object
org.adempiere.impexp.GridTabSQLInsertExporter
All Implemented Interfaces:
IGridTabExporter

public class GridTabSQLInsertExporter extends Object implements IGridTabExporter
Export data as SQL insert statement
Author:
hengsin
  • Constructor Details

    • GridTabSQLInsertExporter

      public GridTabSQLInsertExporter()
      Default constructor
  • Method Details

    • export

      public void export(GridTab gridTab, List<GridTab> childs, boolean isCurrentRowOnly, File file, int indxDetailSelected)
      Description copied from interface: IGridTabExporter
      export gridTab data to file
      Specified by:
      export in interface IGridTabExporter
      indxDetailSelected - index of selected child tab
    • addSQLInsert

      protected void addSQLInsert(PO po, List<String> oracles, List<String> pgs)
      Create SQL insert script for po
      Parameters:
      po -
      oracles - list to add oracle insert script
      pgs - list to add postgresql insert script
    • getPO

      protected PO getPO(GridTab gridTab, MTable table, int row)
      Load PO by record ID or UUID
      Parameters:
      gridTab -
      table -
      row -
      Returns:
      PO
    • getFileExtension

      public String getFileExtension()
      Specified by:
      getFileExtension in interface IGridTabExporter
      Returns:
      file extension (csv, zip, ect)
    • getFileExtensionLabel

      public String getFileExtensionLabel()
      Specified by:
      getFileExtensionLabel in interface IGridTabExporter
      Returns:
      label for file extension
    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface IGridTabExporter
      Returns:
      mime content type
    • getSuggestedFileName

      public String getSuggestedFileName(GridTab gridTab)
      Specified by:
      getSuggestedFileName in interface IGridTabExporter
      Returns:
      suggested file name
    • isExportableTab

      public boolean isExportableTab(GridTab gridTab)
      Description copied from interface: IGridTabExporter
      Check if exported support the export of a child tab
      Specified by:
      isExportableTab in interface IGridTabExporter
      Returns:
      true if export is supported, false otherwise
    • isAdvanced

      public boolean isAdvanced()
      Specified by:
      isAdvanced in interface IGridTabExporter
      Returns:
      true if exporter is available to role with advanced access only
    • isExportChildTabsForCurrentRowOnly

      public boolean isExportChildTabsForCurrentRowOnly()
      Specified by:
      isExportChildTabsForCurrentRowOnly in interface IGridTabExporter
      Returns:
      true if export of child tabs is supported only when current row only is on.
    • maxDeepOfChildTab

      public int maxDeepOfChildTab()
      Description copied from interface: IGridTabExporter
      Maximum deep of child tab supported by the exporter
      Specified by:
      maxDeepOfChildTab in interface IGridTabExporter
      Returns:
      > 0 for maximum level of deep, <= 0 for unlimited level of deep