}
void createAllType(Database db, int index) {
Session session = db.getParent();
String sIndex = Integer.toString(index);
Document doc = db.createDocument();
doc.put("Form", "AllTypes");
doc.put("fldIcon", index);
doc.put("fldText", "text_" + sIndex);
doc.put("fldNumber", index * 100);
doc.put("fldDate", createDate(2012, Calendar.JANUARY, index));
doc.put("fldTime", createTime(session, 5, 1, index));
doc.put("fldDateTime", createDateTime(2011, 2, index, 8, 9, index));
doc.put("fldDateTimeRange", createDateTimeRange(session, 2012, 3, index, 8, 9, index));
doc.put("fldDialogList", "dlg_" + sIndex);
ArrayList<String> mx = new ArrayList<String>();
mx.add("text_" + sIndex + "_1");
mx.add("text_" + sIndex + "_2");
mx.add("text_" + sIndex + "_3");
doc.put("fldText2", mx);
ArrayList<Object> mn = new ArrayList<Object>();
mn.add(index * 100 + 1);
mn.add(index * 100 + 2);
mn.add(index * 100 + 3);
doc.put("fldNumber2", mn);
ArrayList<Date> md = new ArrayList<Date>();
md.add(createDate(2010, Calendar.JANUARY, index));
md.add(createDate(2010, Calendar.FEBRUARY, index));
md.add(createDate(2010, Calendar.MARCH, index));
doc.put("fldDate2", md);
Vector<Date> mt = new Vector<Date>();
mt.add(createTime(session, 6, 1, index));
mt.add(createTime(session, 6, 2, index));
mt.add(createTime(session, 6, 3, index));
doc.put("fldTime2", mt);
Vector<Date> mdt = new Vector<Date>();
mdt.add(createDateTime(2011, 1, index, 6, 1, index));
mdt.add(createDateTime(2011, 2, index, 6, 2, index));
mdt.add(createDateTime(2011, 3, index, 6, 3, index));
doc.put("fldDateTime2", mdt);
if (false) { // DateTime range do not work with multiple values?
Vector<DateRange> mrg = new Vector<DateRange>();
mrg.add(createDateTimeRange(session, 2012, 2, index, 4, 1, index));
mrg.add(createDateTimeRange(session, 2012, 3, index, 5, 1, index));
mrg.add(createDateTimeRange(session, 2012, 4, index, 6, 1, index));
doc.put("fldDateTimeRange2", mrg);
}
ArrayList<Object> mdg = new ArrayList<Object>();
mdg.add("dlgx_" + sIndex + "_1");
mdg.add("dlgx_" + sIndex + "_1");
mdg.add("dlgx_" + sIndex + "_1");
doc.put("fldDialogList2", mdg);
doc.save();
}