Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*******************************************************************************************
* Copyright (c) 2016, zzg.zhou([email protected])
*
* Monalisa is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*******************************************************************************************/
package com.tsc9526.monalisa.orm.datatable;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import com.google.gson.stream.JsonWriter;
import com.tsc9526.monalisa.orm.tools.helper.ClassHelper;
import com.tsc9526.monalisa.orm.tools.helper.ClassHelper.FGS;
import com.tsc9526.monalisa.orm.tools.helper.ClassHelper.MetaClass;
import com.tsc9526.monalisa.orm.tools.helper.DynamicLibHelper;
import com.tsc9526.monalisa.orm.tools.helper.JsonHelper;
import com.tsc9526.monalisa.orm.tools.helper.SQLHelper;
/**
*
* @author zzg.zhou([email protected])
*/
public class DataTable extends ArrayList {
private static final long serialVersionUID = 6839964505006290332L;
public static DataTable fromCsv(InputStream csvInputStream) {
return DynamicLibHelper.createCsv().fromCsv(csvInputStream, CsvOptions.createDefaultOptions());
}
public static DataTable fromCsv(String csvString){
return DynamicLibHelper.createCsv().fromCsv(csvString, CsvOptions.createDefaultOptions());
}
protected List headers=new ArrayList();
protected String name="_THIS_TABLE";
public DataTable() {
}
public DataTable(Collection extends E> cs) {
super(cs);
}
public void saveCsv(OutputStream csvOutputStream){
DynamicLibHelper.createCsv().writeToCsv(this, csvOutputStream,CsvOptions.createDefaultOptions());
}
/**
* 获取指定列数据
*
* @param column 列名称
* @return 返回指定列名的整列数据
*/
public List