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

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.objectinspector.primitive.AbstractPrimitiveObjectInspector
All Implemented Interfaces:
Cloneable, ObjectInspector, PrimitiveObjectInspector, PrimitiveTypeSpec
Direct Known Subclasses:
AbstractPrimitiveJavaObjectInspector, AbstractPrimitiveLazyObjectInspector, AbstractPrimitiveWritableObjectInspector

public abstract class AbstractPrimitiveObjectInspector
extends Object
implements PrimitiveObjectInspector

An AbstractPrimitiveObjectInspector is based on ObjectInspectorUtils.PrimitiveTypeEntry.


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
 
Field Summary
protected  BaseTypeParams typeParams
           
 
Constructor Summary
protected AbstractPrimitiveObjectInspector(PrimitiveObjectInspectorUtils.PrimitiveTypeEntry typeEntry)
          Construct a AbstractPrimitiveObjectInspector.
 
Method Summary
 ObjectInspector.Category getCategory()
          Return the associated category this primitive ObjectInspector.
 Class<?> getJavaPrimitiveClass()
          Return the associated Java primitive class for this primitive ObjectInspector.
 PrimitiveObjectInspector.PrimitiveCategory getPrimitiveCategory()
          Return the associated primitive category for this primitive ObjectInspector.
 Class<?> getPrimitiveWritableClass()
          Return the associated primitive Writable class for this primitive ObjectInspector.
 String getTypeName()
          Return the type name for this primitive ObjectInspector.
 BaseTypeParams getTypeParams()
          If the type has type parameters (such as varchar length, or decimal precision/scale), then return the parameters for the type.
 void setTypeParams(BaseTypeParams newParams)
          Set the type parameters for the type.
 
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
copyObject, getPrimitiveJavaObject, getPrimitiveWritableObject, preferWritable
 

Field Detail

typeParams

protected BaseTypeParams typeParams
Constructor Detail

AbstractPrimitiveObjectInspector

protected AbstractPrimitiveObjectInspector(PrimitiveObjectInspectorUtils.PrimitiveTypeEntry typeEntry)
Construct a AbstractPrimitiveObjectInspector.

Method Detail

getJavaPrimitiveClass

public Class<?> getJavaPrimitiveClass()
Return the associated Java primitive class for this primitive ObjectInspector.

Specified by:
getJavaPrimitiveClass in interface PrimitiveObjectInspector

getPrimitiveCategory

public PrimitiveObjectInspector.PrimitiveCategory getPrimitiveCategory()
Return the associated primitive category for this primitive ObjectInspector.

Specified by:
getPrimitiveCategory in interface PrimitiveObjectInspector
Specified by:
getPrimitiveCategory in interface PrimitiveTypeSpec
Returns:
PrimitiveCategory referred to by the PrimitiveTypeSpec

getPrimitiveWritableClass

public Class<?> getPrimitiveWritableClass()
Return the associated primitive Writable class for this primitive ObjectInspector.

Specified by:
getPrimitiveWritableClass in interface PrimitiveObjectInspector

getCategory

public ObjectInspector.Category getCategory()
Return the associated category this primitive ObjectInspector.

Specified by:
getCategory in interface ObjectInspector

getTypeName

public String getTypeName()
Return the type name for this primitive ObjectInspector.

Specified by:
getTypeName in interface ObjectInspector

getTypeParams

public BaseTypeParams getTypeParams()
Description copied from interface: PrimitiveObjectInspector
If the type has type parameters (such as varchar length, or decimal precision/scale), then return the parameters for the type.

Specified by:
getTypeParams in interface PrimitiveObjectInspector
Specified by:
getTypeParams in interface PrimitiveTypeSpec
Returns:
A BaseTypeParams object representing the parameters for the type, or null

setTypeParams

public void setTypeParams(BaseTypeParams newParams)
Description copied from interface: PrimitiveObjectInspector
Set the type parameters for the type.

Specified by:
setTypeParams in interface PrimitiveObjectInspector
Parameters:
newParams - type parameters for the type


Copyright © 2012 The Apache Software Foundation