Package simpleorm.sessionjdbc
Class SDataLoader<T extends SRecordInstance>
java.lang.Object
simpleorm.sessionjdbc.SDataLoader<T>
This class provides simple bulk data loading facilities which are particularly handy for developing test data. It is
 used as follows:-
  SSession.rawJDBC("DELETE FROM XX_EMPLOYEE");
  
SDataLoader<Employee> empDL = new SDataLoader(Employee.meta);
Employee e1 = empDL.insert("100", "One00", "123 4567", "50000"});
empDL.insert(new String[][]{ {"200", "Two00", "123 4567", "50000"}, {"200", "Two00", "123 4567", "50000"}, {"300", "Three00", "123 4567", "50000"}});
- 
Constructor SummaryConstructorsConstructorDescriptionSDataLoader(SSessionJdbc session, SRecordMeta<T> meta) SDataLoader(SSessionJdbc session, SRecordMeta<T> meta, SFieldScalar[] fields) A data loader for recordsRecordMetawill loadfields.
- 
Method SummaryModifier and TypeMethodDescriptioninsertRecord(Object... record) Inserts (or updates) one record in the databases, and returns it.insertRecords(Object[][] records) Conveniently inserts multiple records in one go.
- 
Constructor Details- 
SDataLoaderA data loader for recordsRecordMetawill loadfields. The primary key fields are always implicitly included at the beginning and need not be repeated here. The default forfieldsis all fields except those flaggedSQY_UNQUERIED.
- 
SDataLoader
 
- 
- 
Method Details- 
insertRecordInserts (or updates) one record in the databases, and returns it. The first element(s) inrecordcontain the primary key field(s), the rest contain the public
- 
insertRecordsConveniently inserts multiple records in one go. Each inner array is simply passed toinsert(String[]).
 
-