cal.set(Calendar.HOUR, 17);
wd1.setEnd(cal.getTime());
new_objs.add(wd1);
del_objs.push(wd1);
WorkDayTimeRecord wdtr1 = new WorkDayTimeRecord();
wdtr1.setDay(wd1);
wdtr1.setUserProjectActivity(upa);
cal = Calendar.getInstance();
cal.setTime(wd1.getDate());
cal.roll(Calendar.HOUR, 2);
wdtr1.setBegin(cal.getTime());
cal = (Calendar) cal.clone();
cal.roll(Calendar.HOUR, 1);
wdtr1.setEnd(cal.getTime());
wdtr1.setAmountOfHours(new BigDecimal("1.00").setScale(2, BigDecimal.ROUND_HALF_UP));
new_objs.add(wdtr1);
del_objs.push(wdtr1);
WorkDayTimeRecord wdtr2 = new WorkDayTimeRecord();
wdtr2.setDay(wd1);
wdtr2.setUserProjectActivity(upa);
cal = Calendar.getInstance();
cal.setTime(wdtr1.getEnd());
cal.roll(Calendar.HOUR, 1);
cal.roll(Calendar.MINUTE, 15);
wdtr2.setBegin(cal.getTime());
cal = (Calendar) cal.clone();
cal.roll(Calendar.HOUR, 4);
wdtr2.setEnd(cal.getTime());
wdtr2.setAmountOfHours(new BigDecimal("2.75").setScale(2, BigDecimal.ROUND_HALF_UP));
new_objs.add(wdtr2);
del_objs.push(wdtr2);
WorkDay wd2 = new WorkDay();
wd2.setUser(user);
cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 15);
cal.set(Calendar.MONTH, Calendar.APRIL);
cal.set(Calendar.YEAR, 2005);
wd2.setDate(cal.getTime());
cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 15);
cal.set(Calendar.MONTH, Calendar.APRIL);
cal.set(Calendar.YEAR, 2005);
cal.set(Calendar.HOUR, 8);
wd2.setBegin(cal.getTime());
cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 15);
cal.set(Calendar.MONTH, Calendar.APRIL);
cal.set(Calendar.YEAR, 2005);
cal.set(Calendar.HOUR, 17);
wd2.setEnd(cal.getTime());
new_objs.add(wd2);
del_objs.push(wd2);
WorkDayTimeRecord wdtr3 = new WorkDayTimeRecord();
wdtr3.setDay(wd2);
wdtr3.setUserProjectActivity(upa);
cal = Calendar.getInstance();
cal.setTime(wd2.getDate());
cal.roll(Calendar.HOUR, 2);
wdtr3.setBegin(cal.getTime());
cal = (Calendar) cal.clone();
cal.roll(Calendar.HOUR, 1);
wdtr3.setEnd(cal.getTime());
wdtr3.setAmountOfHours(new BigDecimal("1.00").setScale(2, BigDecimal.ROUND_HALF_UP));
new_objs.add(wdtr3);
del_objs.push(wdtr3);
WorkDayTimeRecord wdtr4 = new WorkDayTimeRecord();
wdtr4.setDay(wd2);
wdtr4.setUserProjectActivity(upa);
cal = Calendar.getInstance();
cal.setTime(wdtr3.getEnd());
cal.roll(Calendar.HOUR, 1);
cal.roll(Calendar.MINUTE, 15);
wdtr4.setBegin(cal.getTime());
cal = (Calendar) cal.clone();
cal.roll(Calendar.HOUR, 4);
wdtr4.setEnd(cal.getTime());
wdtr4.setAmountOfHours(new BigDecimal("2.75").setScale(2, BigDecimal.ROUND_HALF_UP));
new_objs.add(wdtr4);
del_objs.push(wdtr4);
WorkDay wd3 = new WorkDay();
wd3.setUser(user);
cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 16);
cal.set(Calendar.MONTH, Calendar.APRIL);
cal.set(Calendar.YEAR, 2005);
wd3.setDate(cal.getTime());
cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 16);
cal.set(Calendar.MONTH, Calendar.APRIL);
cal.set(Calendar.YEAR, 2005);
cal.set(Calendar.HOUR, 8);
wd3.setBegin(cal.getTime());
cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 16);
cal.set(Calendar.MONTH, Calendar.APRIL);
cal.set(Calendar.YEAR, 2005);
cal.set(Calendar.HOUR, 17);
wd3.setEnd(cal.getTime());
new_objs.add(wd3);
del_objs.push(wd3);
WorkDayTimeRecord wdtr5 = new WorkDayTimeRecord();
wdtr5.setDay(wd3);
wdtr5.setUserProjectActivity(upa);
cal = Calendar.getInstance();
cal.setTime(wd3.getDate());
cal.roll(Calendar.HOUR, 2);
wdtr5.setBegin(cal.getTime());
cal = (Calendar) cal.clone();
cal.roll(Calendar.HOUR, 1);
wdtr5.setEnd(cal.getTime());
wdtr5.setAmountOfHours(new BigDecimal("1.00").setScale(2, BigDecimal.ROUND_HALF_UP));
new_objs.add(wdtr5);
del_objs.push(wdtr5);
WorkDayTimeRecord wdtr6 = new WorkDayTimeRecord();
wdtr6.setDay(wd3);
wdtr6.setUserProjectActivity(upa);
cal = Calendar.getInstance();
cal.setTime(wdtr5.getEnd());
cal.roll(Calendar.HOUR, 1);
cal.roll(Calendar.MINUTE, 15);
wdtr6.setBegin(cal.getTime());
cal = (Calendar) cal.clone();
cal.roll(Calendar.HOUR, 4);
wdtr6.setEnd(cal.getTime());
wdtr6.setAmountOfHours(new BigDecimal("2.75").setScale(2, BigDecimal.ROUND_HALF_UP));
new_objs.add(wdtr6);
del_objs.push(wdtr6);
WorkDay wd4 = new WorkDay();
wd4.setUser(user);
cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 17);
cal.set(Calendar.MONTH, Calendar.APRIL);
cal.set(Calendar.YEAR, 2005);
wd4.setDate(cal.getTime());
cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 17);
cal.set(Calendar.MONTH, Calendar.APRIL);
cal.set(Calendar.YEAR, 2005);
cal.set(Calendar.HOUR, 8);
wd4.setBegin(cal.getTime());
cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 17);
cal.set(Calendar.MONTH, Calendar.APRIL);
cal.set(Calendar.YEAR, 2005);
cal.set(Calendar.HOUR, 17);
wd4.setEnd(cal.getTime());
new_objs.add(wd4);
del_objs.push(wd4);
WorkDayTimeRecord wdtr7 = new WorkDayTimeRecord();
wdtr7.setDay(wd4);
wdtr7.setUserProjectActivity(upa);
cal = Calendar.getInstance();
cal.setTime(wd4.getDate());
cal.roll(Calendar.HOUR, 2);
wdtr7.setBegin(cal.getTime());
cal = (Calendar) cal.clone();
cal.roll(Calendar.HOUR, 1);
wdtr7.setEnd(cal.getTime());
wdtr7.setAmountOfHours(new BigDecimal("1.00").setScale(2, BigDecimal.ROUND_HALF_UP));
new_objs.add(wdtr7);
del_objs.push(wdtr7);
WorkDayTimeRecord wdtr8 = new WorkDayTimeRecord();
wdtr8.setDay(wd4);
wdtr8.setUserProjectActivity(upa);
cal = Calendar.getInstance();
cal.setTime(wdtr7.getEnd());
cal.roll(Calendar.HOUR, 1);
cal.roll(Calendar.MINUTE, 15);
wdtr8.setBegin(cal.getTime());
cal = (Calendar) cal.clone();
cal.roll(Calendar.HOUR, 4);
wdtr8.setEnd(cal.getTime());
wdtr8.setAmountOfHours(new BigDecimal("2.75").setScale(2, BigDecimal.ROUND_HALF_UP));
new_objs.add(wdtr8);
del_objs.push(wdtr8);
WorkDay wd5 = new WorkDay();
wd5.setUser(user);
cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 18);
cal.set(Calendar.MONTH, Calendar.APRIL);
cal.set(Calendar.YEAR, 2005);
wd5.setDate(cal.getTime());
cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 18);
cal.set(Calendar.MONTH, Calendar.APRIL);
cal.set(Calendar.YEAR, 2005);
cal.set(Calendar.HOUR, 8);
wd5.setBegin(cal.getTime());
cal = Calendar.getInstance();
cal.set(Calendar.DAY_OF_MONTH, 18);
cal.set(Calendar.MONTH, Calendar.APRIL);
cal.set(Calendar.YEAR, 2005);
cal.set(Calendar.HOUR, 17);
wd5.setEnd(cal.getTime());
new_objs.add(wd5);
del_objs.push(wd5);
WorkDayTimeRecord wdtr9 = new WorkDayTimeRecord();
wdtr9.setDay(wd5);
wdtr9.setUserProjectActivity(upa);
cal = Calendar.getInstance();
cal.setTime(wd5.getDate());
cal.roll(Calendar.HOUR, 2);
wdtr9.setBegin(cal.getTime());
cal = (Calendar) cal.clone();
cal.roll(Calendar.HOUR, 1);
wdtr9.setEnd(cal.getTime());
wdtr9.setAmountOfHours(new BigDecimal("1.00").setScale(2, BigDecimal.ROUND_HALF_UP));
new_objs.add(wdtr9);
del_objs.push(wdtr9);
WorkDayTimeRecord wdtr10 = new WorkDayTimeRecord();
wdtr10.setDay(wd5);
wdtr10.setUserProjectActivity(upa);
cal = Calendar.getInstance();
cal.setTime(wdtr9.getEnd());
cal.roll(Calendar.HOUR, 1);
cal.roll(Calendar.MINUTE, 15);
wdtr10.setBegin(cal.getTime());
cal = (Calendar) cal.clone();
cal.roll(Calendar.HOUR, 4);
wdtr10.setEnd(cal.getTime());
wdtr10.setAmountOfHours(new BigDecimal("2.75").setScale(2, BigDecimal.ROUND_HALF_UP));
new_objs.add(wdtr10);
del_objs.push(wdtr10);
// save new objects
dataSrv.persistChanges(new_objs, null, null);