Class PolymorphicPojoCollectionSchema

    • Field Detail

      • pipeSchema

        protected final Pipe.Schema<java.lang.Object> pipeSchema
    • Constructor Detail

      • PolymorphicPojoCollectionSchema

        public PolymorphicPojoCollectionSchema​(IdStrategy strategy)
    • Method Detail

      • getFieldName

        public java.lang.String getFieldName​(int number)
        Description copied from interface: Schema
        Gets the field name associated with the number. This is particularly useful when serializing to different formats (Eg. JSON). When using numeric field names:
         return String.valueOf(number);
         
      • getFieldNumber

        public int getFieldNumber​(java.lang.String name)
        Description copied from interface: Schema
        Gets the field number associated with the name. This is particularly useful when serializing to different formats (Eg. JSON). When using numeric field names:
         return Integer.parseInt(name);
         
      • isInitialized

        public boolean isInitialized​(java.lang.Object owner)
        Description copied from interface: Schema
        Returns true if there is no required field or if all the required fields are set.
        Specified by:
        isInitialized in interface Schema<java.lang.Object>
        Overrides:
        isInitialized in class PolymorphicSchema
      • messageFullName

        public java.lang.String messageFullName()
        Description copied from interface: Schema
        Returns the full name of the message tied to this schema. Allows custom schemas to provide a custom name other than typeClass().getName();
      • messageName

        public java.lang.String messageName()
        Description copied from interface: Schema
        Returns the simple name of the message tied to this schema. Allows custom schemas to provide a custom name other than typeClass().getSimpleName();
      • newMessage

        public java.lang.Object newMessage()
        Description copied from interface: Schema
        Creates the message/object tied to this schema.
        Specified by:
        newMessage in interface Schema<java.lang.Object>
        Overrides:
        newMessage in class PolymorphicSchema
      • typeClass

        public java.lang.Class<? super java.lang.Object> typeClass()
        Description copied from interface: Schema
        Gets the class of the message.
        Specified by:
        typeClass in interface Schema<java.lang.Object>
        Overrides:
        typeClass in class PolymorphicSchema
      • mergeFrom

        public void mergeFrom​(Input input,
                              java.lang.Object owner)
                       throws java.io.IOException
        Description copied from interface: Schema
        Deserializes a message/object from the input.
        Throws:
        java.io.IOException
      • writeTo

        public void writeTo​(Output output,
                            java.lang.Object value)
                     throws java.io.IOException
        Description copied from interface: Schema
        Serializes a message/object to the output.
        Throws:
        java.io.IOException
      • writeObjectTo

        static void writeObjectTo​(Output output,
                                  java.lang.Object value,
                                  Schema<?> currentSchema,
                                  IdStrategy strategy)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • readObjectFrom

        static java.lang.Object readObjectFrom​(Input input,
                                               Schema<?> schema,
                                               java.lang.Object owner,
                                               IdStrategy strategy)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • readObjectFrom

        static java.lang.Object readObjectFrom​(Input input,
                                               Schema<?> schema,
                                               java.lang.Object owner,
                                               IdStrategy strategy,
                                               int number)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • transferObject

        static void transferObject​(Pipe.Schema<java.lang.Object> pipeSchema,
                                   Pipe pipe,
                                   Input input,
                                   Output output,
                                   IdStrategy strategy)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • transferObject

        static void transferObject​(Pipe.Schema<java.lang.Object> pipeSchema,
                                   Pipe pipe,
                                   Input input,
                                   Output output,
                                   IdStrategy strategy,
                                   int number)
                            throws java.io.IOException
        Throws:
        java.io.IOException