Package org.simpleframework.xml.convert

Examples of org.simpleframework.xml.convert.Registry.bind()


      Registry registry = new Registry();
      Strategy strategy = new RegistryStrategy(registry);
      Serializer serializer = new Persister(strategy);
 
      registry.bind(Organisation.class, new OrganisationConverter(orgDao, organisationsMap));
      registry.bind(Room.class, new RoomConverter(roomDao, roomsMap));
     
      List<RoomOrganisation> list = readList(serializer, f, "rooms_organisation.xml", "room_organisations", RoomOrganisation.class);
      for (RoomOrganisation ro : list) {
        if (!ro.getDeleted()) {
          // We need to reset this as openJPA reject to store them otherwise
View Full Code Here


    {
      Registry registry = new Registry();
      Strategy strategy = new RegistryStrategy(registry);
      Serializer serializer = new Persister(strategy);
 
      registry.bind(AppointmentCategory.class, new AppointmentCategoryConverter(appointmentCategoryDaoImpl));
      registry.bind(User.class, new UserConverter(usersDao, usersMap));
      registry.bind(AppointmentReminderTyps.class, new AppointmentReminderTypeConverter(appointmentReminderTypDaoImpl));
      registry.bind(Room.class, new RoomConverter(roomDao, roomsMap));
      registry.bind(Date.class, DateConverter.class);
     
View Full Code Here

      Registry registry = new Registry();
      Strategy strategy = new RegistryStrategy(registry);
      Serializer serializer = new Persister(strategy);
 
      registry.bind(AppointmentCategory.class, new AppointmentCategoryConverter(appointmentCategoryDaoImpl));
      registry.bind(User.class, new UserConverter(usersDao, usersMap));
      registry.bind(AppointmentReminderTyps.class, new AppointmentReminderTypeConverter(appointmentReminderTypDaoImpl));
      registry.bind(Room.class, new RoomConverter(roomDao, roomsMap));
      registry.bind(Date.class, DateConverter.class);
     
      List<Appointment> list = readList(serializer, f, "appointements.xml", "appointments", Appointment.class);
View Full Code Here

      Strategy strategy = new RegistryStrategy(registry);
      Serializer serializer = new Persister(strategy);
 
      registry.bind(AppointmentCategory.class, new AppointmentCategoryConverter(appointmentCategoryDaoImpl));
      registry.bind(User.class, new UserConverter(usersDao, usersMap));
      registry.bind(AppointmentReminderTyps.class, new AppointmentReminderTypeConverter(appointmentReminderTypDaoImpl));
      registry.bind(Room.class, new RoomConverter(roomDao, roomsMap));
      registry.bind(Date.class, DateConverter.class);
     
      List<Appointment> list = readList(serializer, f, "appointements.xml", "appointments", Appointment.class);
      for (Appointment a : list) {
View Full Code Here

      Serializer serializer = new Persister(strategy);
 
      registry.bind(AppointmentCategory.class, new AppointmentCategoryConverter(appointmentCategoryDaoImpl));
      registry.bind(User.class, new UserConverter(usersDao, usersMap));
      registry.bind(AppointmentReminderTyps.class, new AppointmentReminderTypeConverter(appointmentReminderTypDaoImpl));
      registry.bind(Room.class, new RoomConverter(roomDao, roomsMap));
      registry.bind(Date.class, DateConverter.class);
     
      List<Appointment> list = readList(serializer, f, "appointements.xml", "appointments", Appointment.class);
      for (Appointment a : list) {
        Long appId = a.getAppointmentId();
View Full Code Here

 
      registry.bind(AppointmentCategory.class, new AppointmentCategoryConverter(appointmentCategoryDaoImpl));
      registry.bind(User.class, new UserConverter(usersDao, usersMap));
      registry.bind(AppointmentReminderTyps.class, new AppointmentReminderTypeConverter(appointmentReminderTypDaoImpl));
      registry.bind(Room.class, new RoomConverter(roomDao, roomsMap));
      registry.bind(Date.class, DateConverter.class);
     
      List<Appointment> list = readList(serializer, f, "appointements.xml", "appointments", Appointment.class);
      for (Appointment a : list) {
        Long appId = a.getAppointmentId();
View Full Code Here

    {
      Registry registry = new Registry();
      Strategy strategy = new RegistryStrategy(registry);
      Serializer serializer = new Persister(strategy);
 
      registry.bind(User.class, new UserConverter(usersDao, usersMap));
      registry.bind(Appointment.class, new AppointmentConverter(appointmentDao, appointmentsMap));
     
      List<MeetingMember> list = readList(serializer, f, "meetingmembers.xml", "meetingmembers", MeetingMember.class);
      for (MeetingMember ma : list) {
        if (ma.getUserid() != null && ma.getUserid().getUser_id() == null) {
View Full Code Here

      Registry registry = new Registry();
      Strategy strategy = new RegistryStrategy(registry);
      Serializer serializer = new Persister(strategy);
 
      registry.bind(User.class, new UserConverter(usersDao, usersMap));
      registry.bind(Appointment.class, new AppointmentConverter(appointmentDao, appointmentsMap));
     
      List<MeetingMember> list = readList(serializer, f, "meetingmembers.xml", "meetingmembers", MeetingMember.class);
      for (MeetingMember ma : list) {
        if (ma.getUserid() != null && ma.getUserid().getUser_id() == null) {
          ma.setUserid(null);
View Full Code Here

      RegistryMatcher matcher = new RegistryMatcher(); //TODO need to be removed in the later versions
      Serializer serializer = new Persister(strategy, matcher);

      matcher.bind(Long.class, LongTransform.class);
      matcher.bind(Integer.class, IntegerTransform.class);
      registry.bind(Date.class, DateConverter.class);
     
      List<FlvRecording> list = readList(serializer, f, "flvRecordings.xml", "flvrecordings", FlvRecording.class, true);
      for (FlvRecording fr : list) {
        fr.setFlvRecordingId(0);
        if (fr.getRoom_id() != null) {
View Full Code Here

    {
      Registry registry = new Registry();
      Strategy strategy = new RegistryStrategy(registry);
      Serializer serializer = new Persister(strategy);
 
      registry.bind(User.class, new UserConverter(usersDao, usersMap));
     
      List<UserContact> list = readList(serializer, f, "userContacts.xml", "usercontacts", UserContact.class, true);
      for (UserContact uc : list) {
        Long ucId = uc.getUserContactId();
        UserContact storedUC = userContactsDao.getUserContacts(ucId);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.