KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > services > sqldataloader > test > TestThreeColumnBean


1 /*
2  * The contents of this file are subject to the Sapient Public License
3  * Version 1.0 (the "License"); you may not use this file except in compliance
4  * with the License. You may obtain a copy of the License at
5  * http://carbon.sf.net/License.html.
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is The Carbon Component Framework.
12  *
13  * The Initial Developer of the Original Code is Sapient Corporation
14  *
15  * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16  */

17
18 package org.sape.carbon.services.sqldataloader.test;
19
20 import java.math.BigDecimal JavaDoc;
21
22 /**
23  * <p>The purpose of this class is to provide a class to contain a
24  * value object obtained by SqlBeanDataLoader. This bean represents query
25  * returning three columns </p>
26  *
27  * Copyright 2003 Sapient
28  * @since carbon 2.0
29  * @author Akash Tayal, May 2003
30  * @version $Revision: 1.1 $($Author: ghinkl $ / $Date: 2003/09/30 02:08:19 $)
31  */

32 public class TestThreeColumnBean {
33
34     public TestThreeColumnBean() {
35     }
36
37     private BigDecimal JavaDoc key;
38     private String JavaDoc column1Value;
39     private String JavaDoc column2Value;
40
41
42     public BigDecimal JavaDoc getKey() {
43         return this.key;
44     }
45     public void setKey(BigDecimal JavaDoc key) {
46         this.key = key;
47     }
48
49     public String JavaDoc getColumn1Value() {
50         return this.column1Value;
51     }
52
53     public void setColumn1Value(String JavaDoc value) {
54         this.column1Value = value;
55     }
56
57     public String JavaDoc getColumn2Value() {
58         return this.column2Value;
59     }
60
61     public void setColumn2Value(String JavaDoc value) {
62         this.column2Value = value;
63     }
64
65     public boolean equals(Object JavaDoc object) {
66         TestThreeColumnBean threeColumnBean = (TestThreeColumnBean) object;
67         if ((this.key.equals(threeColumnBean.getKey())) &&
68             (this.column1Value.equals(threeColumnBean.getColumn1Value())) &&
69             (this.column2Value.equals(threeColumnBean.getColumn2Value()))) {
70             return true;
71         } else {
72             return false;
73         }
74     }
75
76     public int hashCode() {
77         return this.key.hashCode();
78     }
79 }
Popular Tags