Package org.simpleframework.xml.convert

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


      Strategy strategy = new RegistryStrategy(registry);
      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);
      registry.bind(Date.class, DateConverter.class);
      registry.bind(User.class, new UserConverter(usersDao, usersMap));
     
      List<Configuration> list = readList(serializer, f, "configs.xml", "configs", Configuration.class, true);
      for (Configuration c : list) {
        if (c.getConf_key() == null || c.getDeleted()) {
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);
      registry.bind(Date.class, DateConverter.class);
      registry.bind(User.class, new UserConverter(usersDao, usersMap));
     
      List<Configuration> list = readList(serializer, f, "configs.xml", "configs", Configuration.class, true);
      for (Configuration c : list) {
        if (c.getConf_key() == null || c.getDeleted()) {
          continue;
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(User.class, new UserConverter(usersDao, usersMap));
      registry.bind(RoomType.class, new RoomTypeConverter(roomTypeDao));
     
      List<Room> list = readList(serializer, f, "rooms.xml", "rooms", Room.class);
      for (Room r : list) {
        Long roomId = r.getRooms_id();
View Full Code Here

      Serializer serializer = new Persister(strategy, matcher);

      matcher.bind(Long.class, LongTransform.class);
      matcher.bind(Integer.class, IntegerTransform.class);
      registry.bind(User.class, new UserConverter(usersDao, usersMap));
      registry.bind(RoomType.class, new RoomTypeConverter(roomTypeDao));
     
      List<Room> list = readList(serializer, f, "rooms.xml", "rooms", Room.class);
      for (Room r : list) {
        Long roomId = r.getRooms_id();
View Full Code Here

    {
      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()) {
View Full Code Here

      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(User.class, new UserConverter(usersDao, usersMap));
      registry.bind(Room.class, new RoomConverter(roomDao, roomsMap));
     
      List<ChatMessage> list = readList(serializer, f, "chat_messages.xml", "chat_messages", ChatMessage.class, true);
      for (ChatMessage m : list) {
        chatDao.update(m);
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(Room.class, new RoomConverter(roomDao, roomsMap));
     
      List<ChatMessage> list = readList(serializer, f, "chat_messages.xml", "chat_messages", ChatMessage.class, true);
      for (ChatMessage m : list) {
        chatDao.update(m);
      }
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

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.