org.apache.hadoop.hive.serde2.objectinspector.primitive
Class AbstractPrimitiveJavaObjectInspector

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.objectinspector.primitive.AbstractPrimitiveObjectInspector
      extended by org.apache.hadoop.hive.serde2.objectinspector.primitive.AbstractPrimitiveJavaObjectInspector
All Implemented Interfaces:
Cloneable, ObjectInspector, PrimitiveObjectInspector
Direct Known Subclasses:
JavaBooleanObjectInspector, JavaByteObjectInspector, JavaDoubleObjectInspector, JavaFloatObjectInspector, JavaIntObjectInspector, JavaLongObjectInspector, JavaShortObjectInspector, JavaStringObjectInspector, JavaVoidObjectInspector

public abstract class AbstractPrimitiveJavaObjectInspector
extends AbstractPrimitiveObjectInspector

An AbstractJavaPrimitiveObjectInspector for a Java object.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector
PrimitiveObjectInspector.PrimitiveCategory
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector
ObjectInspector.Category
 
Constructor Summary
protected AbstractPrimitiveJavaObjectInspector(PrimitiveObjectInspectorUtils.PrimitiveTypeEntry typeEntry)
           
 
Method Summary
 Object copyObject(Object o)
          Get a copy of the Object in the same class, so the return value can be stored independently of the parameter.
 Object getPrimitiveJavaObject(Object o)
          Get the Java Primitive object.
 boolean preferWritable()
          Whether the ObjectInspector prefers to return a Primitive Writable Object instead of a Primitive Java Object.
 
Methods inherited from class org.apache.hadoop.hive.serde2.objectinspector.primitive.AbstractPrimitiveObjectInspector
getCategory, getJavaPrimitiveClass, getPrimitiveCategory, getPrimitiveWritableClass, getTypeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector
getPrimitiveWritableObject
 

Constructor Detail

AbstractPrimitiveJavaObjectInspector

protected AbstractPrimitiveJavaObjectInspector(PrimitiveObjectInspectorUtils.PrimitiveTypeEntry typeEntry)
Method Detail

getPrimitiveJavaObject

public Object getPrimitiveJavaObject(Object o)
Description copied from interface: PrimitiveObjectInspector
Get the Java Primitive object.


copyObject

public Object copyObject(Object o)
Description copied from interface: PrimitiveObjectInspector
Get a copy of the Object in the same class, so the return value can be stored independently of the parameter. If the Object is a Primitive Java Object, we just return the parameter since Primitive Java Object is immutable.


preferWritable

public boolean preferWritable()
Description copied from interface: PrimitiveObjectInspector
Whether the ObjectInspector prefers to return a Primitive Writable Object instead of a Primitive Java Object. This can be useful for determining the most efficient way to getting data out of the Object.



Copyright © 2010 The Apache Software Foundation