View Javadoc
1   /*
2    * Copyright 2008 FatWire Corporation. All Rights Reserved.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *    http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package tools.gsf.facade.sql;
18  
19  import java.util.Date;
20  
21  /**
22   * Represents a row in an IList.
23   * <p>
24   * Wrapper over IList so that it can be used by an iterator()
25   *
26   * @author Dolf.Dijkstra
27   */
28  
29  public interface Row {
30      /**
31       * @param key key string to look up
32       * @return the key value as a String or null.
33       */
34      String getString(String key);
35  
36      /**
37       * @param key key string to look up
38       * @return the key value as a Long or null.
39       */
40      Long getLong(String key);
41  
42      /**
43       * @param key key string to look up
44       * @return the key value as a Integer or null.
45       */
46      Integer getInt(String key);
47  
48  
49      /**
50       * @param key key string to look up
51       * @return the key value as a Byte array or null.
52       */
53      byte[] getBytes(String key);
54  
55      /**
56       * @param key key string to look up
57       * @return the key value as a char or null.
58       */
59      Character getChar(String key);
60  
61      /**
62       * @param key key string to look up
63       * @return the key value as a Date or null.
64       */
65      Date getDate(String key);
66  
67      /**
68       * @param key key string to look up
69       * @return true if key is a field in the Row.
70       */
71      boolean isField(String key);
72  }