org.apache.torque.om
Class BooleanKey

java.lang.Object
  extended by org.apache.torque.om.ObjectKey
      extended by org.apache.torque.om.SimpleKey
          extended by org.apache.torque.om.BooleanKey
All Implemented Interfaces:
Serializable, Comparable<Object>

public class BooleanKey
extends SimpleKey

This class can be used as an ObjectKey to uniquely identify an object within an application where the id consists of a Boolean.

Version:
$Id: BooleanKey.java 1448414 2013-02-20 21:06:35Z tfischer $
Author:
John McNally
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.torque.om.ObjectKey
key
 
Constructor Summary
BooleanKey()
          Creates an SimpleKey whose internal representation will be set later, through a set method
BooleanKey(Boolean key)
          Creates a BooleanKey whose internal representation is a Boolean
BooleanKey(BooleanKey key)
          Creates a BooleanKey that is equivalent to key.
 
Method Summary
 Boolean getBoolean()
          Access the underlying Boolean object.
 int getJdbcType()
          Returns the JDBC type of the key as defined in java.sql.Types.
 void setValue(Boolean key)
          Sets the internal representation to a Boolean.
 void setValue(BooleanKey key)
          Sets the internal representation to the same object used by key.
 void setValue(String key)
          Sets the internal representation to a String.
 String toString()
          Get a String representation of this key.
 
Methods inherited from class org.apache.torque.om.SimpleKey
keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor
 
Methods inherited from class org.apache.torque.om.ObjectKey
appendTo, compareTo, equals, getValue, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BooleanKey

public BooleanKey()
Creates an SimpleKey whose internal representation will be set later, through a set method


BooleanKey

public BooleanKey(Boolean key)
Creates a BooleanKey whose internal representation is a Boolean

Parameters:
key - the key value

BooleanKey

public BooleanKey(BooleanKey key)
Creates a BooleanKey that is equivalent to key.

Parameters:
key - the key value
Method Detail

setValue

public void setValue(String key)
Sets the internal representation to a String.

Specified by:
setValue in class ObjectKey
Parameters:
key - the key value

setValue

public void setValue(Boolean key)
Sets the internal representation to a Boolean.

Parameters:
key - the key value

setValue

public void setValue(BooleanKey key)
Sets the internal representation to the same object used by key.

Parameters:
key - the key value

getBoolean

public Boolean getBoolean()
Access the underlying Boolean object.

Returns:
a Boolean value

getJdbcType

public int getJdbcType()
Returns the JDBC type of the key as defined in java.sql.Types.

Specified by:
getJdbcType in class ObjectKey
Returns:
Types.BIT.

toString

public String toString()
Get a String representation of this key.

Overrides:
toString in class Object
Returns:
a String representation of this key, or an empty String if the value is null.


Copyright © 2000-2013 The Apache Software Foundation. All Rights Reserved.