All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.protostream.sampledomain.Transaction$___Marshaller_fc10ee67836ac8cf2235f0f2ca0a8aad8486d96d152a39e2d16020ae4c3d7e4b Maven / Gradle / Ivy

/*
 Generated by org.infinispan.protostream.annotations.impl.processor.MarshallerSourceCodeGenerator
 for class org.infinispan.protostream.sampledomain.Transaction
*/

package org.infinispan.protostream.sampledomain;

import org.infinispan.protostream.sampledomain.Transaction;

/**
 * WARNING: Generated code! Do not edit!
 */
@javax.annotation.processing.Generated(
   value = "org.infinispan.protostream.annotations.impl.processor.AutoProtoSchemaBuilderAnnotationProcessor",
   comments = "Please do not edit this file!"
)
@SuppressWarnings("all")
public final class Transaction$___Marshaller_fc10ee67836ac8cf2235f0f2ca0a8aad8486d96d152a39e2d16020ae4c3d7e4b extends org.infinispan.protostream.annotations.impl.GeneratedMarshallerBase implements org.infinispan.protostream.ProtobufTagMarshaller {

   @Override
   public Class getJavaClass() { return org.infinispan.protostream.sampledomain.Transaction.class; }

   @Override
   public String getTypeName() { return "sample_bank_account.Transaction"; }

   @Override
   public org.infinispan.protostream.sampledomain.Transaction read(org.infinispan.protostream.ProtobufTagMarshaller.ReadContext $1) throws java.io.IOException {
      final org.infinispan.protostream.TagReader $in = $1.getReader();
      final org.infinispan.protostream.sampledomain.Transaction o = new org.infinispan.protostream.sampledomain.Transaction();
      long __bits$0 = 0;
      boolean done = false;
      while (!done) {
         final int tag = $in.readTag();
         switch (tag) {
            case 0: {
               done = true;
               break;
            }
            case (1 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_VARINT): {
               int __v$1 = $in.readInt32();
               o.setId(__v$1);
               __bits$0 |= 1L;
               break;
            }
            case (2 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_LENGTH_DELIMITED): {
               java.lang.String __v$2 = $in.readString();
               o.setDescription(__v$2);
               break;
            }
            case (3 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_LENGTH_DELIMITED): {
               java.lang.String __v$3 = $in.readString();
               o.setLongDescription(__v$3);
               break;
            }
            case (4 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_LENGTH_DELIMITED): {
               java.lang.String __v$4 = $in.readString();
               o.setNotes(__v$4);
               break;
            }
            case (5 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_VARINT): {
               int __v$5 = $in.readInt32();
               o.setAccountId(__v$5);
               __bits$0 |= 2L;
               break;
            }
            case (6 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_FIXED64): {
               java.util.Date __v$6 = new java.util.Date($in.readFixed64());
               o.setDate(__v$6);
               break;
            }
            case (7 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_FIXED64): {
               double __v$7 = $in.readDouble();
               o.setAmount(__v$7);
               __bits$0 |= 4L;
               break;
            }
            case (8 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_VARINT): {
               boolean __v$8 = $in.readBool();
               o.setDebit(__v$8);
               __bits$0 |= 8L;
               break;
            }
            case (9 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_VARINT): {
               boolean __v$9 = $in.readBool();
               o.setValid(__v$9);
               __bits$0 |= 16L;
               break;
            }
            default: {
               if (!$in.skipField(tag)) done = true;
            }
         }
      }
      if ((__bits$0 & 1L) == 0) {
         o.setId(0);
      }
      if ((__bits$0 & 2L) == 0) {
         o.setAccountId(0);
      }
      if ((__bits$0 & 4L) == 0) {
         o.setAmount(0.0D);
      }
      if ((__bits$0 & 8L) == 0) {
         o.setDebit(false);
      }
      if ((__bits$0 & 16L) == 0) {
         o.setValid(false);
      }
      return o;
   }

   @Override
   public void write(org.infinispan.protostream.ProtobufTagMarshaller.WriteContext $1, org.infinispan.protostream.sampledomain.Transaction $2) throws java.io.IOException {
      org.infinispan.protostream.impl.TagWriterImpl $out = (org.infinispan.protostream.impl.TagWriterImpl) $1.getWriter();
      final org.infinispan.protostream.sampledomain.Transaction o = (org.infinispan.protostream.sampledomain.Transaction) $2;
      {
         final int __v$1 = o.getId();
         $out.writeInt32(1, __v$1);
      }
      {
         final java.lang.String __v$2 = o.getDescription();
         if (__v$2 != null) $out.writeString(2, __v$2);
      }
      {
         final java.lang.String __v$3 = o.getLongDescription();
         if (__v$3 != null) $out.writeString(3, __v$3);
      }
      {
         final java.lang.String __v$4 = o.getNotes();
         if (__v$4 != null) $out.writeString(4, __v$4);
      }
      {
         final int __v$5 = o.getAccountId();
         $out.writeInt32(5, __v$5);
      }
      {
         final java.util.Date __v$6 = o.getDate();
         if (__v$6 != null) $out.writeFixed64(6, __v$6.getTime());
      }
      {
         final double __v$7 = o.getAmount();
         $out.writeDouble(7, __v$7);
      }
      {
         final boolean __v$8 = o.isDebit();
         $out.writeBool(8, __v$8);
      }
      {
         final boolean __v$9 = o.isValid();
         $out.writeBool(9, __v$9);
      }
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy