org.apache.hadoop.hive.serde2.typeinfo
Class PrimitiveTypeInfo

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.typeinfo.TypeInfo
      extended by org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo
All Implemented Interfaces:
Serializable

public final class PrimitiveTypeInfo
extends TypeInfo
implements Serializable

There are limited number of Primitive Types. All Primitive Types are defined by TypeInfoFactory.isPrimitiveClass(). Always use the TypeInfoFactory to create new TypeInfo objects, instead of directly creating an instance of this class.

See Also:
Serialized Form

Constructor Summary
PrimitiveTypeInfo()
          For java serialization use only.
 
Method Summary
 boolean equals(Object other)
          Compare if 2 TypeInfos are the same.
 ObjectInspector.Category getCategory()
          Returns the category of this TypeInfo.
 PrimitiveObjectInspector.PrimitiveCategory getPrimitiveCategory()
           
 Class<?> getPrimitiveJavaClass()
           
 Class<?> getPrimitiveWritableClass()
           
 String getTypeName()
          A String representation of the TypeInfo.
 int hashCode()
          Generate the hashCode for this TypeInfo.
 void setTypeName(String typeName)
           
 
Methods inherited from class org.apache.hadoop.hive.serde2.typeinfo.TypeInfo
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrimitiveTypeInfo

public PrimitiveTypeInfo()
For java serialization use only.

Method Detail

getCategory

public ObjectInspector.Category getCategory()
Returns the category of this TypeInfo.

Specified by:
getCategory in class TypeInfo

getPrimitiveCategory

public PrimitiveObjectInspector.PrimitiveCategory getPrimitiveCategory()

getPrimitiveWritableClass

public Class<?> getPrimitiveWritableClass()

getPrimitiveJavaClass

public Class<?> getPrimitiveJavaClass()

setTypeName

public void setTypeName(String typeName)

getTypeName

public String getTypeName()
Description copied from class: TypeInfo
A String representation of the TypeInfo.

Specified by:
getTypeName in class TypeInfo

equals

public boolean equals(Object other)
Compare if 2 TypeInfos are the same. We use TypeInfoFactory to cache TypeInfos, so we only need to compare the Object pointer.

Specified by:
equals in class TypeInfo

hashCode

public int hashCode()
Generate the hashCode for this TypeInfo.

Specified by:
hashCode in class TypeInfo


Copyright © 2010 The Apache Software Foundation