Copyright 2009,2010, Lapetus Systems Ltd. (All rights reserved)

com.lapetus_ltd.api.db.xml.types
Class TLptsXmlRowSetRowObjectType

java.lang.Object
  extended by com.lapetus_ltd._2009.xml.types.XLptsXmlRowSetRowObjectType
      extended by com.lapetus_ltd.api.db.xml.types.TLptsXmlRowSetRowObjectType

public class TLptsXmlRowSetRowObjectType
extends XLptsXmlRowSetRowObjectType

Class Description : This class initiates the XML row object.

It contains a string, SQL type and byte data, which all together represent a single object.
The bytes can be used for CHARSET translations or for exact value extrapolations in the case of doubles.
The SQL type indicates the type of variable contained, which assists in making a decision as to
which conversion is required from the bytes.

Refer to TLptsXmlRowSetType for a full example of how to use this and the other related
classes so that all the levels of information can be populated correctly.

$LastChangedRevision: 1165 $
$LastChangedDate:: 2010-11-03 10:37:03#$


Field Summary
 
Fields inherited from class com.lapetus_ltd._2009.xml.types.XLptsXmlRowSetRowObjectType
dataBytes, sqlType, string
 
Constructor Summary
TLptsXmlRowSetRowObjectType()
          The constructor for new XLptsXmlRowSetRowObjectType objects.
TLptsXmlRowSetRowObjectType(java.lang.String str, int sqlType, byte[] data)
          The constructor for new XLptsXmlRowSetRowObjectType objects.
TLptsXmlRowSetRowObjectType(XLptsXmlRowSetRowObjectType type)
          Copies an existing XLptsXmlRowSetRowObjectType object and instantiates a new one.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks for equality of all three parts of the row object.
 
Methods inherited from class com.lapetus_ltd._2009.xml.types.XLptsXmlRowSetRowObjectType
getDataBytes, getSqlType, getString, setDataBytes, setSqlType, setString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TLptsXmlRowSetRowObjectType

public TLptsXmlRowSetRowObjectType()
The constructor for new XLptsXmlRowSetRowObjectType objects.

Thread Safe : Yes

Spawns its own Thread : No

May Return NULL : N/A

Notes : Initiates a new empty string, with a sql type of "java.sql.Types.VARCHAR".


TLptsXmlRowSetRowObjectType

public TLptsXmlRowSetRowObjectType(java.lang.String str,
                                   int sqlType,
                                   byte[] data)
The constructor for new XLptsXmlRowSetRowObjectType objects.

Thread Safe : Yes

Spawns its own Thread : No

May Return NULL : N/A

Notes : Initiates from the data supplied.

Parameters:
str - The string to use for initiating this object
sqlType - The java.sql.Types value to be used for initiating
data - The byte data for the object

TLptsXmlRowSetRowObjectType

public TLptsXmlRowSetRowObjectType(XLptsXmlRowSetRowObjectType type)
Copies an existing XLptsXmlRowSetRowObjectType object and instantiates a new one.

Thread Safe : Yes

Spawns its own Thread : No

May Return NULL : N/A

Notes :

Parameters:
type - The existing XLptsXmlRowSetRowObjectType object.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Checks for equality of all three parts of the row object.

Thread Safe : Yes

Spawns its own Thread : No

May Return NULL : N/A

Notes : All the data needs to be exactly the same for an equal match.

Example :


 TLptsXmlRowSetRowObjectType object1 = new TLptsXmlRowSetRowObjectType("1", java.sql.Types.INTEGER, TLptsBytesUtil.int2Bytes(1));
 TLptsXmlRowSetRowObjectType object2 = new TLptsXmlRowSetRowObjectType("2", java.sql.Types.INTEGER, TLptsBytesUtil.int2Bytes(2));
 if (object1.equals(object2))
   System.out.println("New mathematical theory : 1 = 2");

 

Overrides:
equals in class java.lang.Object
Parameters:
obj - The object of type XLptsXmlRowSetRowObjectType to be compared.
Returns:
True if the objects are equal.


Copyright 2009,2010, Lapetus Systems Ltd. (All rights reserved)