/** * Gestion des réservations * */ public void saveReservation(ReservationDetail reservation, String listReservationCurrent) { Connection con = initCon(); try { String idReservation = ResourcesManagerDAO.saveReservation(con, reservation, listReservationCurrent); reservation.setId(idReservation); createIndex(reservation); } catch (Exception e) { throw new ResourcesManagerRuntimeException( "ResourcesManagerBmEJB.saveReservation()", SilverpeasRuntimeException.ERROR, "resourcesManager.EX_SAVE_RESERVATION", e); } finally { fermerCon(con); } }
private void createIndex(ReservationDetail reservation) { SilverTrace.info( "resourceManager", "resourceManagerBmEJB.createIndex()", "root.MSG_GEN_ENTER_METHOD", "reservation = " + reservation); FullIndexEntry indexEntry = null; if (reservation != null) { // Index the Reservation indexEntry = new FullIndexEntry(reservation.getInstanceId(), "Reservation", reservation.getId()); indexEntry.setTitle(reservation.getEvent()); indexEntry.setPreView(reservation.getReason()); indexEntry.setCreationDate(reservation.getCreationDate()); indexEntry.setCreationUser(reservation.getUserId()); indexEntry.setKeyWords(reservation.getPlace()); IndexEngineProxy.addIndexEntry(indexEntry); } }