Class ExportHelper


  • public final class ExportHelper
    extends java.lang.Object
    Helper methods for exporters.
    Author:
    rns
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean canExport​(PagedTable pt, java.lang.Class<?> cls)
      Return true if the specified class or a subclass is found in a column of the paged table (or is the parent class of a field displayed in the table).
      static int getClassIndex​(java.util.List<java.lang.Class<?>> clazzes, java.lang.Class<?> cls)  
      static java.util.List<java.lang.Integer> getClassIndexes​(java.util.List<java.lang.Class<?>> clazzes, java.lang.Class<?> searched)  
      static java.util.List<java.lang.Class<?>> getColumnClasses​(PagedTable pt)  
      static java.util.List<Path> getColumnPaths​(PagedTable pt)
      Return a List containing the Path objects from the Columns of this PagedTable.
      static int getFirstColumnForClass​(PagedTable pt, java.lang.Class<?> cls)
      Find the first column index for the specified class or a subclass in the page table (may be a parent class of a field being displayed).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • canExport

        public static boolean canExport​(PagedTable pt,
                                        java.lang.Class<?> cls)
        Return true if the specified class or a subclass is found in a column of the paged table (or is the parent class of a field displayed in the table).
        Parameters:
        pt - a table to export from
        cls - a class to look for in the results
        Returns:
        true if the class is found
      • getClassIndex

        public static int getClassIndex​(java.util.List<java.lang.Class<?>> clazzes,
                                        java.lang.Class<?> cls)
        Parameters:
        clazzes - classes
        cls - searched class
        Returns:
        index of class that is assignable to given class
      • getClassIndexes

        public static java.util.List<java.lang.Integer> getClassIndexes​(java.util.List<java.lang.Class<?>> clazzes,
                                                                        java.lang.Class<?> searched)
        Parameters:
        clazzes - classes
        searched - searched class
        Returns:
        index of class that is assignable to given class
      • getColumnClasses

        public static java.util.List<java.lang.Class<?>> getColumnClasses​(PagedTable pt)
        Parameters:
        pt - paged table
        Returns:
        classes of columns
      • getFirstColumnForClass

        public static int getFirstColumnForClass​(PagedTable pt,
                                                 java.lang.Class<?> cls)
        Find the first column index for the specified class or a subclass in the page table (may be a parent class of a field being displayed).
        Parameters:
        pt - a table to export from
        cls - a class to look for in the results
        Returns:
        the first column index for the class
      • getColumnPaths

        public static java.util.List<Path> getColumnPaths​(PagedTable pt)
        Return a List containing the Path objects from the Columns of this PagedTable.
        Parameters:
        pt - the paged table
        Returns:
        the Paths