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

com.taosdata.jdbc.common.ColumnInfo Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show newest version
package com.taosdata.jdbc.common;

import java.util.ArrayList;
import java.util.List;

public class ColumnInfo implements Comparable {
    private List dataList = new ArrayList<>();
    // taos data type
    private final int type;
    private final int index;

    public ColumnInfo(int columnIndex, Object data, int type) {
        this.index = columnIndex;
        this.dataList.add(data);
        this.type = type;
    }

    public ColumnInfo(int columnIndex, List dataList, int type, Integer flag) {
        this.index = columnIndex;
        this.dataList = dataList;
        this.type = type;
    }

    public void add(Object data) {
        this.dataList.add(data);
    }

    public List getDataList() {
        return dataList;
    }

    public int getType() {
        return type;
    }

    public int getIndex() {
        return index;
    }

    @Override
    public int compareTo(ColumnInfo c) {
        return this.index > c.index ? 1 : -1;
    }

}