All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.supercsv.ext.annotation.CsvColumn Maven / Gradle / Ivy

Go to download

CSVのJavaライブラリであるSuperCSVに、アノテーション機能を追加したライブラリです。

There is a newer version: 2.3
Show newest version
/*
 * CsvColumn.java
 * created in 2013/03/05
 *
 * (C) Copyright 2003-2013 GreenDay Project. All rights reserved.
 */
package org.supercsv.ext.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.supercsv.ext.builder.CellProcessorBuilder;
import org.supercsv.ext.builder.DefaultCellProcessorBuilder;


/**
 * Annotation for CSV "Column".
 * 
 * @version 1.1
 * @since 1.0
 * @author T.TSUCHIE
 *
 */
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface CsvColumn {
    
    /**
     * index of column.
     * 

start with zero(0). * @return */ int position(); /** * Header column label. *

if label omiited, then using field name. */ String label() default ""; /** * optional colums. *

if set the true, set CellProcessor for 'Optional' *

if set the false, set CellProcessor for 'NotNull' * @return */ boolean optional() default false; /** * trimming on read/write *

set CellProcessor for 'Trim' * @return */ boolean trim() default false; /** * default value. *

set CellProcessor for 'ConvertNullTo' *

When type is 'String', set the magic value '@empty' as empty ''. * @return */ String inputDefaultValue() default ""; /** * default value. *

set CellProcessor for 'ConvertNullTo' *

When type is 'String', set the magic value '@empty' as empty ''. * @return */ String outputDefaultValue() default ""; /** * unique column *

set CellProcessor for 'Unique' * @return */ boolean unique() default false; /** * eqauals value *

set CellProcessor for 'Equals' * @return */ String equalsValue() default ""; /** * custom builder class * @return */ @SuppressWarnings("rawtypes") Class builderClass() default DefaultCellProcessorBuilder.class; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy