@Override public Kost2DO convertToObject(String value, final Locale locale) { value = StringUtils.trimToEmpty(value); return kost2Dao.getKost2(value); }
/** * @param kostString Format ######## or #.###.##.## is supported. * @see #getKost2(int, int, int, int) */ @Transactional(readOnly = true, propagation = Propagation.SUPPORTS) public Kost2DO getKost2(final String kostString) { final int[] kost = KostHelper.parseKostString(kostString); if (kost == null) { return null; } return getKost2(kost[0], kost[1], kost[2], kost[3]); }
if (kost != null) { final int[] vals = KostFormatter.splitKost(kost); final Kost2DO kost2 = kost2Dao.getKost2(vals[0], vals[1], vals[2], vals[3]); if (kost2 != null) { satz.setKost2(kost2);
master.setTask(initTestDB.getTask(prefix + "2")); master.setLocation("Headquarter"); Kost2DO kost2 = kost2Dao.getKost2(5, 51, 1, 0); // Kost2 is not supported by destination task. assertNotNull(kost2); master.setKost2(kost2); assertKost2(list.get(2), 5, 51, 1, 2); // Kost2 not transformed. kost2 = kost2Dao.getKost2(5, 51, 2, 0); // Kost2 supported by destination task. assertNotNull(kost2); master.setKost2(kost2);
assertNull(list.get(2).getKost2Id()); // Kost2 not set. final Kost2DO kost2 = kost2Dao.getKost2(5, 52, 1, 0); // Kost2 supported by destination task. assertNotNull(kost2); master.setKost2(kost2);
final Kost2DO kost2 = kost2Dao.getKost2(values[0], values[1], values[2], values[3]); if (kost2 != null) { satz.setKost2(kost2);
private TimesheetDO createTimesheet(final String prefix, final String taskName, final String userName, final int year, final int month, final int day, final int fromHour, final int fromMinute, final int toHour, final int toMinute, final String location, final String description, final int kost2Nummernkreis, final int kost2Bereich, final int kost2Teilbereich, final int kost2Art) { final TimesheetDO ts = new TimesheetDO(); setTimeperiod(ts, year, month, day, fromHour, fromMinute, day, toHour, toMinute); ts.setTask(initTestDB.getTask(prefix + taskName)); ts.setUser(getUser(prefix + userName)); ts.setLocation(location); ts.setDescription(description); if (kost2Nummernkreis > 0) { final Kost2DO kost2 = kost2Dao.getKost2(kost2Nummernkreis, kost2Bereich, kost2Teilbereich, kost2Art); assertNotNull(kost2); ts.setKost2(kost2); } final Serializable id = timesheetDao.internalSave(ts); return timesheetDao.getById(id); }