org.datamanager.kernel
Class JispIdentifier

java.lang.Object
  |
  +--KeyObject
        |
        +--org.datamanager.kernel.JispIdentifier
All Implemented Interfaces:
org.datamanager.kernel.Identifier, Serializable

public class JispIdentifier
extends KeyObject
implements org.datamanager.kernel.Identifier

A class of Identifiers for use with JispEntityManager. They are KeyObjects (for jisp) and also implement Identifier.

See Also:
Serialized Form

Field Summary
protected  long dateSection
          The long value of the Identifier.
protected static JispIdentifier lastIdentifier
          The last Identifier that was created.
protected  long longSection
          A number to help distinguish between Identifiers.
 
Constructor Summary
JispIdentifier()
          Public constructor so serialization will work.
JispIdentifier(long dateSection, long longSection)
          Constructs a unique Identifier.
 
Method Summary
 int compareTo(KeyObject keyObject)
           
 boolean equals(Object object)
          Checks to see if the given Object is the same as this Identifier.
protected static JispIdentifier generateIdentifier()
          Generates a unique Identifier.
protected  long getDateSection()
          Gets the long Date part of this Identifier.
protected  long getLongSection()
          Gets the long part of this Identifier.
 int hashCode()
           
 KeyObject makeNullKey()
           
 void readExternal(ObjectInput in)
           
 String toString()
          Gets a String representation of this Identifier.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

lastIdentifier

protected static JispIdentifier lastIdentifier
The last Identifier that was created.


dateSection

protected long dateSection
The long value of the Identifier.


longSection

protected long longSection
A number to help distinguish between Identifiers.

Constructor Detail

JispIdentifier

public JispIdentifier(long dateSection,
                      long longSection)
Constructs a unique Identifier.

Parameters:
dateSection - A long version of the date.
longSection - The current incremented value of the long numeric that ensures that Indentifiers are unique.

JispIdentifier

public JispIdentifier()
Public constructor so serialization will work.

Method Detail

makeNullKey

public KeyObject makeNullKey()

getDateSection

protected long getDateSection()
Gets the long Date part of this Identifier.


getLongSection

protected long getLongSection()
Gets the long part of this Identifier.


hashCode

public int hashCode()

equals

public boolean equals(Object object)
Checks to see if the given Object is the same as this Identifier.


toString

public String toString()
Gets a String representation of this Identifier.

Specified by:
toString in interface org.datamanager.kernel.Identifier
Returns:
A String representation of the Identifier.

compareTo

public int compareTo(KeyObject keyObject)

generateIdentifier

protected static JispIdentifier generateIdentifier()
Generates a unique Identifier.


writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
IOException
ClassNotFoundException


See the Helium Website