SPT Object Database API

com.sptci.prevayler
Class IndexedObject

java.lang.Object
  extended by com.sptci.prevayler.IndexedObject
All Implemented Interfaces:
Serializable

public class IndexedObject
extends Object
implements Serializable

A simple value object used to represent the class of a prevalent object and its objectId. Instances of this class are used to represent indexed prevalent objects.

© Copyright 2008 Sans Pareil Technologies, Inc.

Version:
$Id: IndexedObject.java 4379 2008-07-11 02:21:18Z rakesh $
Author:
Rakesh Vidyadharan 2008-07-10
See Also:
Serialized Form

Field Summary
 Object objectId
          The field that stores the objectId of the prevalent object.
private static long serialVersionUID
           
 Class type
          The field that stores the class of the prevalent object.
 
Constructor Summary
protected IndexedObject(Class type, Object objectId)
          Create a new instance of the value object with the specified values for the instance members.
 
Method Summary
 boolean equals(Object object)
          Compare the specified object with this instance for equality.
 Object getObjectId()
          Getter for property objectId.
 Class getType()
          Getter for property type.
 int hashCode()
          Return a hash code for this instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

type

public final Class type
The field that stores the class of the prevalent object.


objectId

public final Object objectId
The field that stores the objectId of the prevalent object.

Constructor Detail

IndexedObject

protected IndexedObject(Class type,
                        Object objectId)
Create a new instance of the value object with the specified values for the instance members.

Parameters:
type - The type value to use.
objectId - The objectId value to use.
Method Detail

getType

public Class getType()
Getter for property type.

Returns:
Value for property type.

getObjectId

public Object getObjectId()
Getter for property objectId.

Returns:
Value for property objectId.

equals

public boolean equals(Object object)
Compare the specified object with this instance for equality. The specified object is equal if its is of the same type and have equivalent members.

Overrides:
equals in class Object
Parameters:
object - The object that is to be compared for equality.
Returns:
Returns true if the object is of the same type and has equivalent fields.

hashCode

public int hashCode()
Return a hash code for this instance. Computes the hash code based upon the hash codes for the fields.

Overrides:
hashCode in class Object
Returns:
The hash code for this object.

SPT Object Database API