Docmosis API 4.8.0

com.docmosis.template.population
Class SQLDataItem

java.lang.Object
  extended by com.docmosis.template.population.SQLDataItem

public class SQLDataItem
extends Object

This class is a wrapper keeping a value retrieved from a database associated with it's data type.


Constructor Summary
SQLDataItem(Class itemClass, Object item)
           
 
Method Summary
 boolean equals(Object other)
           
 boolean getBooleanValue()
          Return the boolean value of this item.
 int hashCode()
           
 boolean isBooleanItem()
          Determine if this object is a boolean item.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLDataItem

public SQLDataItem(Class itemClass,
                   Object item)
            throws IllegalArgumentException
Parameters:
itemClass - the class of the item as retrieved from the result set meta data.
item - the item itself.
Throws:
IllegalArgumentException - if any of the parameters are null. If you really want a null, just assign null rather than using this constructor.
Method Detail

isBooleanItem

public boolean isBooleanItem()
Determine if this object is a boolean item. This is true if the item class has been determined as boolean or the value returned is "true" or "false" (ignoring case).

Returns:
true if this item can be considered boolean

getBooleanValue

public boolean getBooleanValue()
Return the boolean value of this item.

Returns:
false if the item is not a boolean item

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Docmosis API 4.8.0

Copyright © 2014–2024 Docmosis Pty Ltd. All rights reserved.