Class SpreadsheetUtils

java.lang.Object
bld.common.spreadsheet.utils.SpreadsheetUtils

@Component public class SpreadsheetUtils extends Object
  • Field Details

    • SHEET_NAME_SIZE

      public static final int SHEET_NAME_SIZE
      The Constant SHEET_NAME_SIZE.
      See Also:
  • Constructor Details

    • SpreadsheetUtils

      public SpreadsheetUtils()
  • Method Details

    • getAnnotation

      public static <T extends Annotation> T getAnnotation(Class<?> classExcel, Class<T> classAnnotation)
      Gets the annotation.
      Type Parameters:
      T - the generic type
      Parameters:
      classExcel - the class excel
      classAnnotation - the class annotation
      Returns:
      the annotation
    • getAnnotation

      public static <T extends Annotation> T getAnnotation(Field field, Class<T> classAnnotation)
      Gets the annotation.
      Type Parameters:
      T - the generic type
      Parameters:
      field - the field
      classAnnotation - the class annotation
      Returns:
      the annotation
    • reflectionAnnotation

      public static <T, K extends Annotation> T reflectionAnnotation(T entity, K annotation)
      Reflection annotation.
      Type Parameters:
      T - the generic type
      K - the key type
      Parameters:
      entity - the entity
      annotation - the annotation
      Returns:
      the t
    • getListField

      public static Set<Field> getListField(Class<?> classComponentExcel)
      Gets the list field.
      Parameters:
      classComponentExcel - the class component excel
      Returns:
      the list field
    • getMapField

      public static Map<String,Field> getMapField(Class<?> classComponentExcel)
      Gets the map field.
      Parameters:
      classComponentExcel - the class component excel
      Returns:
      the map field
    • writeToFile

      public static void writeToFile(String pathFile, String fileName, String typeFile, byte[] data)
      Write to file.
      Parameters:
      pathFile - the path file
      fileName - the file name
      typeFile - the type file
      data - the dati