KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > resource > cci > Record


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package javax.resource.cci;
24
25
26 /** The <code>javax.resource.cci.Record</code> interface is the base
27  * interface for the representation of an input or output to the
28  * execute methods defined on an Interaction.
29  *
30  * <p>The Record interface can be extended to form a one of the
31  * following representations:
32  * <UL>
33  * <LI> MappedRecord: A key-value pair based collection represents
34  * a record. This interface is based on the <code>java.util.Map</code>
35  * <LI> IndexedRecord:An ordered and indexed collection represents
36  * a record. This interface is based on the <code>java.util.List</code>.
37  * <LI> JavaBean based representation of an EIS abstraction: An
38  * example is a custom record generated to represent a purchase
39  * order in an ERP system.
40  * <LI> <code>javax.resource.cci.ResultSet</code>: This interface
41  * extends both <code>java.sql.ResultSet</code> and <code>
42  * javax.resource.cci.Record</code>. A ResultSet
43  * represents tabular data.
44  * </UL>
45  *
46  * <p>A MappedRecord or IndexedRecord can contain another Record. This
47  * means that MappedRecord and IndexedRecord can be used to create
48  * a hierarchical structure of any arbitrary depth. A basic Java
49  * type is used as the leaf element of a hierarchical structure
50  * represented by a MappedRecord or IndexedRecord.
51  *
52  * @author Rahul Sharma
53  * @version 0.8
54  * @see javax.resource.cci.Interaction
55  * @see java.sql.ResultSet
56 **/

57 public interface Record extends java.lang.Cloneable JavaDoc, java.io.Serializable JavaDoc {
58  
59   /** Gets the name of the Record.
60    *
61    * @return String representing name of the Record
62   **/

63   public
64   String JavaDoc getRecordName();
65   
66   /** Sets the name of the Record.
67    *
68    * @param name Name of the Record
69   **/

70   public
71   void setRecordName(String JavaDoc name);
72   
73   /** Sets a short description string for the Record. This property
74    * is used primarily by application development tools.
75    *
76    * @param description Description of the Record
77   **/

78   public
79   void setRecordShortDescription(String JavaDoc description);
80
81   /** Gets a short description string for the Record. This property
82    * is used primarily by application development tools.
83    *
84    * @return String representing a short description of the Record
85   **/

86   public
87   String JavaDoc getRecordShortDescription();
88
89   /** Check if this instance is equal to another Record.
90    *
91    * @return true if two instances are equal
92   **/

93   public
94   boolean equals(Object JavaDoc other);
95
96
97   /** Returns the hash code for the Record instance.
98    *
99    * @return hash code
100   **/

101   public
102   int hashCode();
103
104   /** Creates and returns a copy of this object. The precise
105    * meaning of "copy" may depend on the class of the object.
106    *
107    * @return a clone of this instance.
108    * @throws CloneNotSupportedException
109    * If the object's class does not support the
110    * Cloneable interface Subclasses that override the
111    * clone method can also throw this exception to
112    * indicate that an instance cannot be cloned.
113   **/

114   public
115   Object JavaDoc clone() throws CloneNotSupportedException JavaDoc;
116
117 }
118
Popular Tags