org.apache.jdo.impl.fostore
Class CLID

java.lang.Object
  extended byorg.apache.jdo.impl.fostore.CLID

class CLID
extends java.lang.Object

Represents a class id. These are in no way visible to clients, but are an integral part of an OID. Each distinct CLID represents a different class. In this sense, a 'different class' is one which is structurally distinct from all others. Two classes with (e.g.) different fields with the same name will therefore be considered different and hence have different CLID's (methods, however, are not considered by structural equivalence).

Author:
Dave Bristor
See Also:
OID

Field Summary
(package private) static java.math.BigDecimal[] BigDecimalArray
           
(package private) static java.math.BigInteger[] BigIntegerArray
           
(package private) static java.util.BitSet[] BitSetArray
           
(package private) static boolean[] booleanArray
           
(package private) static java.lang.Boolean[] BooleanArray
           
(package private) static byte[] byteArray
           
(package private) static java.lang.Byte[] ByteArray
           
(package private) static java.lang.Character[] CharacterArray
           
(package private) static char[] charArray
           
(package private) static double[] doubleArray
           
(package private) static java.lang.Double[] DoubleArray
           
static CLID firstCLID
          We reserve the first 100 CLID's for internal use.
(package private) static float[] floatArray
           
(package private) static java.lang.Float[] FloatArray
           
(package private) static CLID forOID
           
(package private) static CLID forOIDArray
           
private  int hashCode
           
private  int id
           
(package private) static int[] intArray
           
(package private) static java.lang.Integer[] IntegerArray
           
private static java.util.HashMap knownCLIDs
           
(package private) static java.util.Locale[] LocaleArray
           
private static java.lang.Integer lock
           
(package private) static long[] longArray
           
(package private) static java.lang.Long[] LongArray
           
private static int MIN_USER_CLID
           
private static org.apache.jdo.util.I18NHelper msg
           
(package private) static int nextCLID
           
private static int nextProvisional
           
(package private) static CLID nullCLID
           
(package private) static OID[] oidArray
           
private  boolean provisional
           
private static int PROVISIONAL_MASK
           
(package private) static org.apache.jdo.impl.sco.ArrayList[] scoArrayListArray
           
private static java.util.HashMap scoCLIDs
           
(package private) static org.apache.jdo.impl.sco.Date[] scoDateArray
           
(package private) static org.apache.jdo.impl.sco.HashMap[] scoHashMapArray
           
(package private) static org.apache.jdo.impl.sco.HashSet[] scoHashSetArray
           
(package private) static org.apache.jdo.impl.sco.Hashtable[] scoHashtableArray
           
(package private) static org.apache.jdo.impl.sco.LinkedList[] scoLinkedListArray
           
(package private) static org.apache.jdo.impl.sco.SqlDate[] scoSqlDateArray
           
(package private) static org.apache.jdo.impl.sco.TreeMap[] scoTreeMapArray
           
(package private) static org.apache.jdo.impl.sco.TreeSet[] scoTreeSetArray
           
(package private) static org.apache.jdo.impl.sco.Vector[] scoVectorArray
           
(package private) static short[] shortArray
           
(package private) static java.lang.Short[] ShortArray
           
(package private) static java.sql.Date[] sqlDateArray
           
(package private) static java.lang.String[] StringArray
           
(package private) static java.util.ArrayList[] utilArrayListArray
           
(package private) static java.util.Date[] utilDateArray
           
(package private) static java.util.HashMap[] utilHashMapArray
           
(package private) static java.util.HashSet[] utilHashSetArray
           
(package private) static java.util.Hashtable[] utilHashtableArray
           
(package private) static java.util.LinkedList[] utilLinkedListArray
           
(package private) static java.util.TreeMap[] utilTreeMapArray
           
(package private) static java.util.TreeSet[] utilTreeSetArray
           
(package private) static java.util.Vector[] utilVectorArray
           
 
Constructor Summary
private CLID(int id, boolean provisional)
           
 
Method Summary
(package private) static CLID create(int id, boolean provisional)
           
(package private) static CLID createProvisional()
           
 boolean equals(java.lang.Object other)
           
(package private)  int getId()
          Provides the id part of a CLID.
(package private) static CLID getKnownCLID(java.lang.Class cls)
          Get the CLID that corresponds to the given Class.
(package private) static java.lang.Class getKnownType(CLID clid)
          Get the java.lang.Class that corresponds to the given CLID.
 int hashCode()
           
(package private) static boolean isKnown(java.lang.Class cls)
          Indicate whether a Class is known, that is, has built-in support
(package private)  boolean isProvisional()
          Indicates whether the given CLID is provisional or not.
(package private)  CLID next()
          Provides a new CLID whose id is one greater than this one's.
(package private) static CLID read(java.io.DataInput in)
           
 java.lang.String toString()
           
(package private)  void write(java.io.DataOutput out)
           
(package private) static void writeForKnown(java.lang.Class cls, java.io.DataOutput out)
          Writes the CLID for the given class, which *must* be a known class
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PROVISIONAL_MASK

private static final int PROVISIONAL_MASK
See Also:
Constant Field Values

provisional

private final boolean provisional

id

private final int id

nextProvisional

private static int nextProvisional

lock

private static final java.lang.Integer lock

hashCode

private final int hashCode

MIN_USER_CLID

private static final int MIN_USER_CLID
See Also:
Constant Field Values

firstCLID

public static final CLID firstCLID
We reserve the first 100 CLID's for internal use. We have no purpose for them (yet) but this allows for future expansion.


msg

private static org.apache.jdo.util.I18NHelper msg

oidArray

static final OID[] oidArray

booleanArray

static final boolean[] booleanArray

charArray

static final char[] charArray

byteArray

static final byte[] byteArray

shortArray

static final short[] shortArray

intArray

static final int[] intArray

longArray

static final long[] longArray

floatArray

static final float[] floatArray

doubleArray

static final double[] doubleArray

BooleanArray

static final java.lang.Boolean[] BooleanArray

CharacterArray

static final java.lang.Character[] CharacterArray

ByteArray

static final java.lang.Byte[] ByteArray

ShortArray

static final java.lang.Short[] ShortArray

IntegerArray

static final java.lang.Integer[] IntegerArray

LongArray

static final java.lang.Long[] LongArray

FloatArray

static final java.lang.Float[] FloatArray

DoubleArray

static final java.lang.Double[] DoubleArray

StringArray

static final java.lang.String[] StringArray

BigDecimalArray

static final java.math.BigDecimal[] BigDecimalArray

BigIntegerArray

static final java.math.BigInteger[] BigIntegerArray

BitSetArray

static final java.util.BitSet[] BitSetArray

LocaleArray

static final java.util.Locale[] LocaleArray

utilDateArray

static final java.util.Date[] utilDateArray

scoDateArray

static final org.apache.jdo.impl.sco.Date[] scoDateArray

sqlDateArray

static final java.sql.Date[] sqlDateArray

scoSqlDateArray

static final org.apache.jdo.impl.sco.SqlDate[] scoSqlDateArray

utilArrayListArray

static final java.util.ArrayList[] utilArrayListArray

scoArrayListArray

static final org.apache.jdo.impl.sco.ArrayList[] scoArrayListArray

utilVectorArray

static final java.util.Vector[] utilVectorArray

scoVectorArray

static final org.apache.jdo.impl.sco.Vector[] scoVectorArray

utilHashSetArray

static final java.util.HashSet[] utilHashSetArray

scoHashSetArray

static final org.apache.jdo.impl.sco.HashSet[] scoHashSetArray

utilTreeSetArray

static final java.util.TreeSet[] utilTreeSetArray

scoTreeSetArray

static final org.apache.jdo.impl.sco.TreeSet[] scoTreeSetArray

utilLinkedListArray

static final java.util.LinkedList[] utilLinkedListArray

scoLinkedListArray

static final org.apache.jdo.impl.sco.LinkedList[] scoLinkedListArray

utilHashMapArray

static final java.util.HashMap[] utilHashMapArray

scoHashMapArray

static final org.apache.jdo.impl.sco.HashMap[] scoHashMapArray

utilHashtableArray

static final java.util.Hashtable[] utilHashtableArray

scoHashtableArray

static final org.apache.jdo.impl.sco.Hashtable[] scoHashtableArray

utilTreeMapArray

static final java.util.TreeMap[] utilTreeMapArray

scoTreeMapArray

static final org.apache.jdo.impl.sco.TreeMap[] scoTreeMapArray

knownCLIDs

private static java.util.HashMap knownCLIDs

scoCLIDs

private static java.util.HashMap scoCLIDs

nextCLID

static int nextCLID

nullCLID

static final CLID nullCLID

forOID

static final CLID forOID

forOIDArray

static final CLID forOIDArray
Constructor Detail

CLID

private CLID(int id,
             boolean provisional)
Method Detail

createProvisional

static CLID createProvisional()

create

static CLID create(int id,
                   boolean provisional)

isKnown

static boolean isKnown(java.lang.Class cls)
Indicate whether a Class is known, that is, has built-in support

Returns:
true if known, false otherwise

getKnownCLID

static CLID getKnownCLID(java.lang.Class cls)
Get the CLID that corresponds to the given Class. Return null if there is no such CLID.


writeForKnown

static void writeForKnown(java.lang.Class cls,
                          java.io.DataOutput out)
                   throws java.io.IOException
Writes the CLID for the given class, which *must* be a known class

Throws:
java.io.IOException

getKnownType

static java.lang.Class getKnownType(CLID clid)
Get the java.lang.Class that corresponds to the given CLID.


isProvisional

boolean isProvisional()
Indicates whether the given CLID is provisional or not. A 'provisonal' CLID is one that has been allocated within a JVM, but for which the corresponding class is not yet known to have a correspondence in the store itself.

Returns:
True if this CLID is provisonal, false otherwise.

hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object other)

write

void write(java.io.DataOutput out)
     throws java.io.IOException
Throws:
java.io.IOException

read

static CLID read(java.io.DataInput in)
          throws java.io.IOException
Throws:
java.io.IOException

next

CLID next()
Provides a new CLID whose id is one greater than this one's.

Returns:
A new CLID.

getId

int getId()
Provides the id part of a CLID.

Returns:
The CLID's representation.

toString

public java.lang.String toString()