public class CSVDump extends Object
column1,column2,column7
value11,value12,value17
value21,value22,value27
...
| Modifier and Type | Field and Description |
|---|---|
static char |
QUOTE |
static char |
SEPARATOR |
| Constructor and Description |
|---|
CSVDump() |
| Modifier and Type | Method and Description |
|---|---|
void |
importFromFile(String sCSV)
import the given CSV directly from a local file.
|
void |
importFromResource(String sCSV)
import the given CSV directly from a JAR resource.
|
void |
setEntityClass(Class<? extends EntityBase> aEntityClass)
set the entity class used for import/export here.
|
void |
setPersistenceUnitName(String sPersistenceUnitName)
set the corresponding persistence unit where the also given
entity class is used.
|
public static final char SEPARATOR
public static final char QUOTE
public void setEntityClass(Class<? extends EntityBase> aEntityClass) throws Exception
aEntityClass - [IN]
the entity class.Exceptionpublic void setPersistenceUnitName(String sPersistenceUnitName) throws Exception
sPersistenceUnitName - [IN]
the name of the corresponding persistence unit.Exceptionpublic void importFromFile(String sCSV) throws Exception
sCSV - [IN]
valid path and file name to a CSV file on disc.ExceptionCopyright © 2016 as-development.net. All rights reserved.