org.apache.openjpa.util
Class ShortId

java.lang.Object
  extended by org.apache.openjpa.util.OpenJPAId
      extended by org.apache.openjpa.util.ShortId
All Implemented Interfaces:
Serializable, Comparable

public final class ShortId
extends OpenJPAId

OpenJPAId subclass appropriate for short fields.

Author:
Steve Kim
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.openjpa.util.OpenJPAId
subs, type
 
Constructor Summary
ShortId(Class cls, short key)
           
ShortId(Class cls, Short key)
           
ShortId(Class cls, short key, boolean subs)
           
ShortId(Class cls, String key)
           
 
Method Summary
 short getId()
           
 Object getIdObject()
          Return the identity value as an object.
protected  boolean idEquals(OpenJPAId o)
          Compare the id to the id of the given instance.
protected  int idHash()
          Return the id's hash code.
 String toString()
           
 
Methods inherited from class org.apache.openjpa.util.OpenJPAId
compareTo, equals, getType, hashCode, hasSubclasses, setManagedInstanceType, setManagedInstanceType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShortId

public ShortId(Class cls,
               Short key)

ShortId

public ShortId(Class cls,
               String key)

ShortId

public ShortId(Class cls,
               short key)

ShortId

public ShortId(Class cls,
               short key,
               boolean subs)
Method Detail

getId

public short getId()

getIdObject

public Object getIdObject()
Description copied from class: OpenJPAId
Return the identity value as an object.

Specified by:
getIdObject in class OpenJPAId

toString

public String toString()
Overrides:
toString in class OpenJPAId

idHash

protected int idHash()
Description copied from class: OpenJPAId
Return the id's hash code.

Specified by:
idHash in class OpenJPAId

idEquals

protected boolean idEquals(OpenJPAId o)
Description copied from class: OpenJPAId
Compare the id to the id of the given instance.

Specified by:
idEquals in class OpenJPAId


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.