|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bm.testsuite.dataloader.CSVInitialDataSet<T>
T
- the type of the entity bean (mapping the table)public class CSVInitialDataSet<T>
This class creates initial data from a comma separated file.
Constructor Summary | |
---|---|
CSVInitialDataSet(java.lang.Class<T> entityBeanClass,
java.lang.String csvFileName,
boolean isCompressed,
boolean useSchemaName,
java.lang.String... propertyMapping)
Constructor. |
|
CSVInitialDataSet(java.lang.Class<T> entityBeanClass,
java.lang.String csvFileName,
boolean isCompressed,
java.lang.String... propertyMapping)
Constructor. |
|
CSVInitialDataSet(java.lang.Class<T> entityBeanClass,
java.lang.String csvFileName,
java.lang.String... propertyMapping)
Constructor. |
Method Summary | |
---|---|
CSVInitialDataSet<T> |
addDateFormat(DateFormats dateFormat)
Allows to specify a user specific date format pattern's. |
java.lang.String |
buildInsertSQL()
Returns the insert SQL. |
void |
cleanup(javax.persistence.EntityManager em)
Deletes the data. |
void |
create()
Creates the data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CSVInitialDataSet(java.lang.Class<T> entityBeanClass, java.lang.String csvFileName, boolean isCompressed, boolean useSchemaName, java.lang.String... propertyMapping)
entityBeanClass
- -
the corresponding entity bean classpropertyMapping
- -
a string array with the meaning the first column of the cvs
file belongs to the property with the name
propertyMapping[0]
isCompressed
- -
true if compressed (zip)useSchemaName
- the schema name will be used for sql generationcsvFileName
- -
the name of the csv filepublic CSVInitialDataSet(java.lang.Class<T> entityBeanClass, java.lang.String csvFileName, boolean isCompressed, java.lang.String... propertyMapping)
entityBeanClass
- -
the corresponding entity bean classpropertyMapping
- -
a string array with the meaning the first column of the csv
file belongs to the property with the name
propertyMapping[0]
isCompressed
- -
true if compressed (zip)csvFileName
- -
the name of the csv filepublic CSVInitialDataSet(java.lang.Class<T> entityBeanClass, java.lang.String csvFileName, java.lang.String... propertyMapping)
entityBeanClass
- -
the corresponding entity bean classpropertyMapping
- -
a string array with the meaning the first column of the csv
file belongs to the property with the name
propertyMapping[0]
csvFileName
- -
the name of the csv fileMethod Detail |
---|
public CSVInitialDataSet<T> addDateFormat(DateFormats dateFormat)
dateFormat
- the date format pattern
public java.lang.String buildInsertSQL()
public void create()
create
in interface InitialDataSet
InitialDataSet.create()
public void cleanup(javax.persistence.EntityManager em)
cleanup
in interface InitialDataSet
em
- -
the entyty manager.InitialDataSet.cleanup(EntityManager)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |