Package org.infinispan.protostream.domain

Examples of org.infinispan.protostream.domain.Address


      user.setId(1);
      user.setName("John");
      user.setSurname("Batman");
      user.setGender(User.Gender.MALE);
      user.setAccountIds(new HashSet<Integer>(Arrays.asList(1, 3)));
      user.setAddresses(Collections.singletonList(new Address("Old Street", "XYZ42")));

      byte[] bytes = ProtobufUtil.toByteArray(ctx, user);

      ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
      CodedInputStream codedInputStream = CodedInputStream.newInstance(bais);
View Full Code Here


      user.setId(id);
      user.setName(name);
      user.setSurname(surname);
      user.setGender(User.Gender.MALE);
      user.setAccountIds(new HashSet<Integer>(Arrays.asList(1, 3)));
      user.setAddresses(Collections.singletonList(new Address("Old Street", "XYZ42")));
      return user;
   }
View Full Code Here

   @Override
   public Address readFrom(ProtoStreamReader reader) throws IOException {
      String street = reader.readString("street");
      String postCode = reader.readString("postCode");

      Address address = new Address();
      address.setStreet(street);
      address.setPostCode(postCode);
      return address;
   }
View Full Code Here

      user.setName("John");
      user.setSurname("Batman");
      user.setGender(User.Gender.MALE);
      user.setAccountIds(new HashSet<Integer>(Arrays.asList(1, 3)));
      List<Address> addresses = new ArrayList<Address>();
      addresses.add(new Address("Old Street", "XYZ42"));
      addresses.add(new Address("Bond Street", "QQ42"));
      user.setAddresses(addresses);
      return user;
   }
View Full Code Here

      user.setId(1);
      user.setName("John");
      user.setSurname("Batman");
      user.setGender(User.Gender.MALE);
      user.setAccountIds(new HashSet<Integer>(Arrays.asList(1, 3)));
      user.setAddresses(Collections.singletonList(new Address("Old Street", "XYZ42")));

      byte[] bytes = ProtobufUtil.toWrappedByteArray(ctx, user);

      TagHandler tagHandler = new TagHandler() {
         private Descriptor nextDescriptor = null;
View Full Code Here

      user.setId(1);
      user.setName("John");
      user.setSurname("Batman");
      user.setGender(User.Gender.MALE);
      user.setAccountIds(new HashSet<Integer>(Arrays.asList(1, 3)));
      user.setAddresses(Collections.singletonList(new Address("Old Street", "XYZ42")));

      byte[] bytes = ProtobufUtil.toByteArray(ctx, user);

      User decoded = ProtobufUtil.fromByteArray(ctx, bytes, User.class);
View Full Code Here

      user.setId(1);
      user.setName("John");
      user.setSurname("Batman");
      user.setGender(User.Gender.MALE);
      user.setAccountIds(Arrays.asList(1, 3));
      user.setAddresses(Collections.singletonList(new Address("Old Street", "XYZ42")));

      byte[] bytes = ProtobufUtil.toWrappedByteArray(ctx, user);

      TagHandler tagHandler = new TagHandler() {
         private Descriptors.Descriptor nextDescriptor = null;
View Full Code Here

      user.setId(1);
      user.setName("John");
      user.setSurname("Batman");
      user.setGender(User.Gender.MALE);
      user.setAccountIds(Arrays.asList(1, 3));
      user.setAddresses(Collections.singletonList(new Address("Old Street", "XYZ42")));

      byte[] bytes = ProtobufUtil.toByteArray(ctx, user);

      User decoded = ProtobufUtil.fromByteArray(ctx, bytes, User.class);
View Full Code Here

      user.setId(id);
      user.setName(name);
      user.setSurname(surname);
      user.setGender(User.Gender.MALE);
      user.setAccountIds(Arrays.asList(1, 3));
      user.setAddresses(Collections.singletonList(new Address("Old Street", "XYZ42")));
      return user;
   }
View Full Code Here

      user.setName("John");
      user.setSurname("Batman");
      user.setGender(User.Gender.MALE);
      user.setAccountIds(Arrays.asList(1, 3));
      List<Address> addresses = new ArrayList<Address>();
      addresses.add(new Address("Old Street", "XYZ42"));
      addresses.add(new Address("Bond Street", "QQ42"));
      user.setAddresses(addresses);
      return user;
   }
View Full Code Here

TOP

Related Classes of org.infinispan.protostream.domain.Address

Copyright © 2018 www.massapicom. 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.