Package org.apache.torque.om
Class StringKey
- java.lang.Object
-
- org.apache.torque.om.ObjectKey<T>
-
- org.apache.torque.om.SimpleKey<String>
-
- org.apache.torque.om.StringKey
-
- All Implemented Interfaces:
Serializable
,Comparable<Object>
public class StringKey extends SimpleKey<String>
This class can be used as an ObjectKey to uniquely identify an object within an application where the id consists of a single entity such a GUID or the value of a db row's primary key.- Version:
- $Id: StringKey.java 1849379 2018-12-20 12:33:43Z tv $
- Author:
- John McNally
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getJdbcType()
Returns the JDBC type of the key as defined injava.sql.Types
.-
Methods inherited from class org.apache.torque.om.SimpleKey
keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor, keyFor
-
-
-
-
Constructor Detail
-
StringKey
public StringKey()
Initializes the internal key value tonull
.
-
StringKey
public StringKey(String key)
Creates an StringKey and set its internal representation- Parameters:
key
- the key value as String
-
StringKey
public StringKey(StringKey key)
Creates a StringKey that is equivalent to key.- Parameters:
key
- the key value
-
-
Method Detail
-
getJdbcType
public int getJdbcType()
Returns the JDBC type of the key as defined injava.sql.Types
.- Specified by:
getJdbcType
in classObjectKey<String>
- Returns:
Types.VARCHAR
.
-
-