org.apache.avro
Class Schema.Field

java.lang.Object
  extended by org.apache.avro.Schema.Field
Enclosing class:
Schema

public static class Schema.Field
extends Object

A field within a record.


Nested Class Summary
static class Schema.Field.Order
          How values of this field should be ordered when sorting records.
 
Constructor Summary
Schema.Field(String name, Schema schema, String doc, JsonNode defaultValue)
           
Schema.Field(String name, Schema schema, String doc, JsonNode defaultValue, Schema.Field.Order order)
           
 
Method Summary
 void addAlias(String alias)
           
 void addProp(String name, String value)
          Add a property with the given name to this field.
 JsonNode defaultValue()
           
 String doc()
          Field's documentation within the record, if set.
 boolean equals(Object other)
           
 String getProp(String name)
          Return the value of the named property in this field or null.
 int hashCode()
           
 String name()
           
 Schema.Field.Order order()
           
 int pos()
          The position of this field within the record.
 Schema schema()
          This field's Schema.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Schema.Field

public Schema.Field(String name,
                    Schema schema,
                    String doc,
                    JsonNode defaultValue)

Schema.Field

public Schema.Field(String name,
                    Schema schema,
                    String doc,
                    JsonNode defaultValue,
                    Schema.Field.Order order)
Method Detail

name

public String name()

pos

public int pos()
The position of this field within the record.


schema

public Schema schema()
This field's Schema.


doc

public String doc()
Field's documentation within the record, if set. May return null.


defaultValue

public JsonNode defaultValue()

order

public Schema.Field.Order order()

getProp

public String getProp(String name)
Return the value of the named property in this field or null.


addProp

public void addProp(String name,
                    String value)
Add a property with the given name to this field.


addAlias

public void addAlias(String alias)

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.