org.makumba
Class Pointer

java.lang.Object
  extended by org.makumba.Pointer
All Implemented Interfaces:
Serializable

public class Pointer
extends Object
implements Serializable

This class represents an abstract makumba pointer. It is up to the concrete database to represent it. Pointer values are returned by the database inserts and queries, they cannot be constructed explicitely.

See Also:
Serialized Form

Field Summary
protected static int MASK_ORDER
           
protected  long n
           
static Object Null
          null constant for pointers
static Object NullBoolean
          null constant for booleans
static Object NullDate
          null constant for dates
static Object NullInteger
          null constant for integers
static Object NullReal
          null constant for real numbers
static Object NullSet
          null constant for external sets
static Object NullString
          null constant for characters
static Object NullText
          null constant for texts
protected  String type
           
 
Constructor Summary
protected Pointer()
           
  Pointer(String type, String externalForm)
          Constructs a pointer for the given type from the given external form.
 
Method Summary
 boolean equals(Object o)
          see if this Pointer is equal with the object provided
 int getDbsv()
          Get the database identifier of the database where the pointed record was created
 int getId()
          gets the int value of the db-level id
 String getType()
          Get the makumba type of the pointed object
 int getUid()
          Get the unique index of the pointer within the parent database and the respective type
 int hashCode()
          A hash code for this pointer
static boolean isNullObject(Object o)
           
 long longValue()
          Utility method to combine DBSV and UID in one long value
 String toExternalForm()
          encode in external format
 String toString()
          generate a printable format
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MASK_ORDER

protected static final int MASK_ORDER
See Also:
Constant Field Values

n

protected long n

type

protected String type

Null

public static Object Null
null constant for pointers


NullInteger

public static Object NullInteger
null constant for integers


NullReal

public static Object NullReal
null constant for real numbers


NullString

public static Object NullString
null constant for characters


NullText

public static Object NullText
null constant for texts


NullDate

public static Object NullDate
null constant for dates


NullSet

public static Object NullSet
null constant for external sets


NullBoolean

public static final Object NullBoolean
null constant for booleans

Constructor Detail

Pointer

protected Pointer()

Pointer

public Pointer(String type,
               String externalForm)
Constructs a pointer for the given type from the given external form.

Parameters:
type - The makumba type of the pointer.
Example: given an MDD in the file, general/Country.mdd, this would be "general.Country".
externalForm - The value of the Pointer in its external form, as derived by the toExternalForm() method or via the makumba tag library.
Example: hhi4xw7.
Method Detail

getDbsv

public int getDbsv()
Get the database identifier of the database where the pointed record was created


getUid

public int getUid()
Get the unique index of the pointer within the parent database and the respective type


getType

public String getType()
Get the makumba type of the pointed object


toString

public String toString()
generate a printable format

Overrides:
toString in class Object

isNullObject

public static boolean isNullObject(Object o)

toExternalForm

public String toExternalForm()
encode in external format


equals

public boolean equals(Object o)
see if this Pointer is equal with the object provided

Overrides:
equals in class Object

hashCode

public int hashCode()
A hash code for this pointer

Overrides:
hashCode in class Object

longValue

public long longValue()
Utility method to combine DBSV and UID in one long value


getId

public int getId()
gets the int value of the db-level id