io.github.relbraun.poi.ss.model.annotations.SheetColumn Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of poi-object-mapper Show documentation
Show all versions of poi-object-mapper Show documentation
Objects mapper for Office formats - Excel files, Spreadsheets, etc.
The newest version!
package io.github.relbraun.poi.ss.model.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Marker annotation that can be used to define a non-static method as a "setter" or "getter" for a
* column, or non-static field to be used as a column.
*
*
* Default value ("") indicates that the field name is used as the column name without any
* modifications, but it can be specified to non-empty value to specify different name.
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD})
public @interface SheetColumn {
/**
* Name of the column to map the annotated property with.
*
* @return column name/header.
*/
String value() default "";
/**
* Setting this to false
will enable the null check on the Column values, to ensure
* non-null values for the field.
*
* default is true
. i.e., null values are allowed.
*
* @return true
if the annotated field is allowed null
as value.
*/
boolean nullable() default true;
}