This project has retired. For details please refer to its Attic page.
AvroUtils (Apache Gora 0.2 API)

org.apache.gora.util
Class AvroUtils

java.lang.Object
  extended by org.apache.gora.util.AvroUtils

public class AvroUtils
extends Object

An utility class for Avro related tasks


Constructor Summary
AvroUtils()
           
 
Method Summary
static Object getEnumValue(org.apache.avro.Schema schema, int enumOrdinal)
           
static Object getEnumValue(org.apache.avro.Schema schema, String symbol)
           
static Map<String,org.apache.avro.Schema.Field> getFieldMap(org.apache.avro.Schema schema)
          Returns a map of field name to Field for schema's fields.
static org.apache.avro.Schema getSchema(Class<? extends Persistent> clazz)
          Returns the schema of the class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvroUtils

public AvroUtils()
Method Detail

getFieldMap

public static Map<String,org.apache.avro.Schema.Field> getFieldMap(org.apache.avro.Schema schema)
Returns a map of field name to Field for schema's fields.


getEnumValue

public static Object getEnumValue(org.apache.avro.Schema schema,
                                  String symbol)

getEnumValue

public static Object getEnumValue(org.apache.avro.Schema schema,
                                  int enumOrdinal)

getSchema

public static org.apache.avro.Schema getSchema(Class<? extends Persistent> clazz)
                                        throws SecurityException,
                                               NoSuchFieldException,
                                               IllegalArgumentException,
                                               IllegalAccessException
Returns the schema of the class

Throws:
SecurityException
NoSuchFieldException
IllegalArgumentException
IllegalAccessException


Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.