com.hp.hpl.mesa.rdf.jena.rdb
Class DBIDHash

java.lang.Object
  |
  +--com.hp.hpl.mesa.rdf.jena.rdb.DBIDHash
All Implemented Interfaces:
IDBID

public class DBIDHash
extends java.lang.Object
implements IDBID

Interface for database identifiers. Most RDF entities (resources, literals, statements) have an associated database index. These are cached using RDB-specific variants of the jena "impl" classes. This can avoid some redundant database lookup.

This variant uses 8 character strings to stort 64bit hash values. Uses this representation instead of longs because some of our databases don't directly support longs but everyone supports char arrays (?)

Version:
$Revision: 1.2 $ on $Date: 2001/11/26 18:20:08 $
Author:
Dave Reynolds

Constructor Summary
DBIDHash(byte[] id)
          constructor
DBIDHash(char[] id)
          constructor
DBIDHash(java.lang.String id)
          constructor
 
Method Summary
 boolean equals(java.lang.Object obj)
          Equality is based on the underlying object
 java.lang.Object getID()
          get the identifier as a String, fits calling signature of our generic sql interface.
 long getIDLong()
          get first 64 bits of the hash id as a Long
 int hashCode()
          Hash is based on the underlying object
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBIDHash

public DBIDHash(char[] id)
constructor

DBIDHash

public DBIDHash(byte[] id)
constructor

DBIDHash

public DBIDHash(java.lang.String id)
constructor
Method Detail

getID

public java.lang.Object getID()
get the identifier as a String, fits calling signature of our generic sql interface.
Specified by:
getID in interface IDBID

getIDLong

public long getIDLong()
get first 64 bits of the hash id as a Long

hashCode

public int hashCode()
Hash is based on the underlying object
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Equality is based on the underlying object
Overrides:
equals in class java.lang.Object


Copyright © 2001 Hewlett-Packard. All Rights Reserved.