com.sun.mdm.index.objects
Class ObjectKey

java.lang.Object
  extended bycom.sun.mdm.index.objects.ObjectKey
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
SuperKey

public class ObjectKey
extends java.lang.Object
implements java.io.Externalizable

ObjectKey definition class

See Also:
Serialized Form

Field Summary
(package private) static long serialVersionUID
           
static int version
           
 
Constructor Summary
ObjectKey()
           
ObjectKey(java.util.ArrayList names, java.util.ArrayList types, java.util.ArrayList values)
          Creates new instance of ObjectKey by list of field names,types, and values
 
Method Summary
 boolean equals(ObjectKey key)
          compares if itself equals to the passed key object
 java.util.ArrayList getKeyNames()
          gets a list of key field names
 int getKeyType(java.lang.String name)
          gets key type for given field
 java.util.ArrayList getKeyTypes()
          gets a list of key types
 java.lang.Object getKeyValue(java.lang.String name)
          gets key value
 java.util.ArrayList getKeyValues()
          gets key values
 int hashCode()
          calculates hashCode 1.
 void readExternal(java.io.ObjectInput in)
           
 void setKeyValue(java.lang.String name, java.lang.Object value)
          sets key values by field name
 java.lang.String toString()
          toString
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

version

public static final int version
See Also:
Constant Field Values
Constructor Detail

ObjectKey

public ObjectKey()

ObjectKey

public ObjectKey(java.util.ArrayList names,
                 java.util.ArrayList types,
                 java.util.ArrayList values)
          throws ObjectException
Creates new instance of ObjectKey by list of field names,types, and values

Parameters:
names - ArrayList of field names
types - ArrayList of field types
values - ArrayList of field values
Throws:
ObjectException - ObjectException
Method Detail

equals

public boolean equals(ObjectKey key)
compares if itself equals to the passed key object

Parameters:
key - ObjectKey
Returns:
boolean

getKeyNames

public java.util.ArrayList getKeyNames()
gets a list of key field names

Returns:
ArrayList

getKeyType

public int getKeyType(java.lang.String name)
               throws ObjectException
gets key type for given field

Parameters:
name - name
Returns:
ArrayList
Throws:
ObjectException - ObjectException

getKeyTypes

public java.util.ArrayList getKeyTypes()
gets a list of key types

Returns:
ArrayList

getKeyValue

public java.lang.Object getKeyValue(java.lang.String name)
                             throws ObjectException
gets key value

Parameters:
name - key field name
Returns:
Object value
Throws:
ObjectException - ObjectException

getKeyValues

public java.util.ArrayList getKeyValues()
gets key values

Returns:
ArrayList

hashCode

public int hashCode()
calculates hashCode 1. for each key field, concatenates field name and field string value 2. adds up all key fields 3. calc. hashCode

Returns:
hashCode

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

setKeyValue

public void setKeyValue(java.lang.String name,
                        java.lang.Object value)
                 throws ObjectException
sets key values by field name

Parameters:
name - key field name
value - key value
Throws:
ObjectException - ObjectException

toString

public java.lang.String toString()
toString

Returns:
String

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException


Sun Microsystems, Inc.