
io.github.millij.poi.ss.model.annotations.SheetColumn Maven / Gradle / Ivy
package io.github.millij.poi.ss.model.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import io.github.millij.poi.ss.model.DateTimeType;
/**
* 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;
/**
* Data presentation format of the Data cell.
*
* @return Data format String.
*/
String format() default "";
/**
* DateTime Type
*
* @return
*/
DateTimeType datetime() default DateTimeType.NONE;
// For Write
/**
* Column sorting Order when writing content to file
*
* @return Order defined by an integer
*/
int order() default 0;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy