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

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

public class WritableDateObjectInspector
extends AbstractPrimitiveWritableObjectInspector
implements SettableDateObjectInspector

A WritableDateObjectInspector inspects a DateWritable 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
 
Field Summary
 
Fields inherited from class org.apache.hadoop.hive.serde2.objectinspector.primitive.AbstractPrimitiveObjectInspector
typeParams
 
Constructor Summary
WritableDateObjectInspector()
           
 
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 create(Date d)
           
 Date getPrimitiveJavaObject(Object o)
          Get the Java Primitive object.
 DateWritable getPrimitiveWritableObject(Object o)
          Return the data in an instance of primitive writable Object.
 Object set(Object o, Date d)
           
 Object set(Object o, DateWritable d)
           
 
Methods inherited from class org.apache.hadoop.hive.serde2.objectinspector.primitive.AbstractPrimitiveWritableObjectInspector
preferWritable
 
Methods inherited from class org.apache.hadoop.hive.serde2.objectinspector.primitive.AbstractPrimitiveObjectInspector
getCategory, getJavaPrimitiveClass, getPrimitiveCategory, getPrimitiveWritableClass, getTypeName, getTypeParams, setTypeParams
 
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
getJavaPrimitiveClass, getPrimitiveCategory, getPrimitiveWritableClass, getTypeParams, preferWritable, setTypeParams
 
Methods inherited from interface org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector
getCategory, getTypeName
 

Constructor Detail

WritableDateObjectInspector

public WritableDateObjectInspector()
Method Detail

getPrimitiveWritableObject

public DateWritable getPrimitiveWritableObject(Object o)
Description copied from interface: PrimitiveObjectInspector
Return the data in an instance of primitive writable Object. If the Object is already a primitive writable Object, just return o.

Specified by:
getPrimitiveWritableObject in interface DateObjectInspector
Specified by:
getPrimitiveWritableObject in interface PrimitiveObjectInspector
Overrides:
getPrimitiveWritableObject in class AbstractPrimitiveWritableObjectInspector

getPrimitiveJavaObject

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

Specified by:
getPrimitiveJavaObject in interface DateObjectInspector
Specified by:
getPrimitiveJavaObject in interface PrimitiveObjectInspector

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.

Specified by:
copyObject in interface PrimitiveObjectInspector

set

public Object set(Object o,
                  Date d)
Specified by:
set in interface SettableDateObjectInspector

set

public Object set(Object o,
                  DateWritable d)
Specified by:
set in interface SettableDateObjectInspector

create

public Object create(Date d)
Specified by:
create in interface SettableDateObjectInspector


Copyright © 2012 The Apache Software Foundation