Java Doc for ComboKey.java in  » Database-ORM » Torque » org » apache » torque » om » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » Torque » org.apache.torque.om 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.torque.om.ObjectKey
      org.apache.torque.om.ComboKey

ComboKey
public class ComboKey extends ObjectKey (Code)
This class can be used as an ObjectKey to uniquely identify an object within an application where the key consists of multiple entities (such a String[] representing a multi-column primary key).
author:
   John McNally
author:
   Daniel Rall
author:
   J. Russell Smyth
version:
   $Id: ComboKey.java 473821 2006-11-11 22:37:25Z tv $


Field Summary
final public static  charSEPARATOR
     The single character used to separate key values in a string.
final public static  StringSEPARATOR_STRING
     The single character used to separate key values in a string.

Constructor Summary
public  ComboKey()
    
public  ComboKey(SimpleKey[] keys)
     Creates a ComboKey whose internal representation is an array of SimpleKeys.
public  ComboKey(String keys)
     Sets the internal representation to a String array.

Method Summary
public  voidappendTo(StringBuffer sb)
    
public  booleanequals(Object keyObj)
     This method will return true if the conditions for a looseEquals are met and in addition no parts of the keys are null.
public  ObjectgetValue()
     Get the underlying object.
public  inthashCode()
     if the underlying key array is not null and the first element is not null this method returns the hashcode of the first element in the key.
public  booleanlooseEquals(Object keyObj)
     keyObj is equal to this ComboKey if keyObj is a ComboKey, String, ObjectKey[], or String[] that contains the same information this key contains.
public  voidsetValue(SimpleKey[] keys)
     Sets the internal representation using a SimpleKey array.
public  voidsetValue(String keys)
     Sets the internal representation using a String of the form produced by the toString method.
public  voidsetValue(ComboKey keys)
     Sets the internal representation using a ComboKey.
public  StringtoString()
     A String that may consist of one section or multiple sections separated by a colon.

Field Detail
SEPARATOR
final public static char SEPARATOR(Code)
The single character used to separate key values in a string.



SEPARATOR_STRING
final public static String SEPARATOR_STRING(Code)
The single character used to separate key values in a string.




Constructor Detail
ComboKey
public ComboKey()(Code)
Creates an ComboKey whose internal representation will be set later, through a set method



ComboKey
public ComboKey(SimpleKey[] keys)(Code)
Creates a ComboKey whose internal representation is an array of SimpleKeys.
Parameters:
  keys - the key values



ComboKey
public ComboKey(String keys)(Code)
Sets the internal representation to a String array.
Parameters:
  keys - the key values
See Also:   ComboKey.toString()




Method Detail
appendTo
public void appendTo(StringBuffer sb)(Code)

Parameters:
  sb - the StringBuffer to append
See Also:   ComboKey.toString()



equals
public boolean equals(Object keyObj)(Code)
This method will return true if the conditions for a looseEquals are met and in addition no parts of the keys are null.
Parameters:
  keyObj - the comparison value whether the two objects are equal



getValue
public Object getValue()(Code)
Get the underlying object. the underlying object



hashCode
public int hashCode()(Code)
if the underlying key array is not null and the first element is not null this method returns the hashcode of the first element in the key. Otherwise calls ObjectKey.hashCode() an int value



looseEquals
public boolean looseEquals(Object keyObj)(Code)
keyObj is equal to this ComboKey if keyObj is a ComboKey, String, ObjectKey[], or String[] that contains the same information this key contains. For example A String[] might be equal to this key, if this key was instantiated with a String[] and the arrays contain equal Strings. Another example, would be if keyObj is an ComboKey that was instantiated with a ObjectKey[] and this ComboKey was instantiated with a String[], but the ObjectKeys in the ObjectKey[] were instantiated with Strings that equal the Strings in this KeyObject's String[] This method is not as strict as the equals method which does not allow any null keys parts, while the internal key may not be null portions may be, and the two object will be considered equal if their null portions match.
Parameters:
  keyObj - the comparison value whether the two objects are equal



setValue
public void setValue(SimpleKey[] keys)(Code)
Sets the internal representation using a SimpleKey array.
Parameters:
  keys - the key values



setValue
public void setValue(String keys)(Code)
Sets the internal representation using a String of the form produced by the toString method.
Parameters:
  keys - the key values



setValue
public void setValue(ComboKey keys)(Code)
Sets the internal representation using a ComboKey.
Parameters:
  keys - the key values



toString
public String toString()(Code)
A String that may consist of one section or multiple sections separated by a colon.
Each Key is represented by [type N|S|D][value][:].

Example:
the ComboKey(StringKey("key1"), NumberKey(2)) is represented as Skey1:N2: a String representation




Fields inherited from org.apache.torque.om.ObjectKey
protected Object key(Code)(Java Doc)

Methods inherited from org.apache.torque.om.ObjectKey
public void appendTo(StringBuffer sb)(Code)(Java Doc)
public int compareTo(Object obj)(Code)(Java Doc)
public Object getValue()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
abstract public void setValue(String s) throws TorqueException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.