Documentation of 'org.hsqldb.types.JavaObjectData' Java class
JavaObjectData
org.hsqldb.types

Class JavaObjectData



  • public class JavaObjectData
    extends java.lang.Object
    Represents of an instance of an OTHER field value.

    Prior to 1.7.0 there were problems storing Objects of normal column types in columns of the type OTHER. In 1.7.0 changes were made to allow this, but as all the conversion took place inside the engine, it introduced a requirement for all classes for objects stored in OTHER columns to be available on the runtime class path of the engine.

    In 1.7.2, the introduction of real preprared statement support allows us revert to the pre 1.7.0 behaviour without the artificial limitations.

    The classes for stored objects need not be available to open and operate the database in general. The classes need to be available only if a conversion from one of these objects to another type is performed inside the engine while operating the database. The current limitation is that in SQL statements, values of type String (CHARACTER and related SQL types) cannot be stored in columns of type OTHER. This limitation does not exist for String values assigned to PreparedStatement variables.

    Since:
    1.7.2
    • Constructor Summary

      Constructors 
      Constructor and Description
      JavaObjectData(byte[] data)
      Constructor used inside the engine when an already serialized Object is read from a file (.log, .script, .data or text table source).
      JavaObjectData(java.io.Serializable o)
      Constructor used inside the engine to convert an Object into an object of type OTHER.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object other) 
      byte[] getBytes() 
      int getBytesLength() 
      java.io.Serializable getObject()
      This method is called from classes implementing the JDBC interfaces.
      int hashCode() 
      java.lang.String toString()
      Returns String repsentation of this object.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • JavaObjectData

        public JavaObjectData(byte[] data)
        Constructor used inside the engine when an already serialized Object is read from a file (.log, .script, .data or text table source).
      • JavaObjectData

        public JavaObjectData(java.io.Serializable o)
        Constructor used inside the engine to convert an Object into an object of type OTHER. Used also with JDBC setParameter(). If parameter serialize is true, the Object is serialized for storage.
    • Method Detail

      • getBytes

        public byte[] getBytes()
      • getBytesLength

        public int getBytesLength()
      • getObject

        public java.io.Serializable getObject()
        This method is called from classes implementing the JDBC interfaces. Inside the engine it is used for conversion from a value of type OTHER to another type. It will throw if the OTHER is an instance of a classe that is not available.
      • toString

        public java.lang.String toString()
        Returns String repsentation of this object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a String represntation of this object.
      • equals

        public boolean equals(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.