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 com.fatwire.gst.foundation.facade.sql;
18  
19  import java.util.Date;
20  
21  /**
22   * 
23   * Represents a row in an IList.
24   * <p/>
25   * Wrapper over IList so that it can be used by an iterator()
26   * 
27   * @author Dolf.Dijkstra
28   * 
29   */
30  
31  public interface Row {
32      /**
33       * @param key
34       * @return the key value as a String or null.
35       */
36      String getString(String key);
37  
38      /**
39       * @param key
40       * @return the key value as a Long or null.
41       */
42      Long getLong(String key);
43      
44      /**
45       * @param key
46       * @return the key value as a Integer or null.
47       */
48      Integer getInt(String key);
49  
50  
51      /**
52       * @param key
53       * @return the key value as a Byte array or null.
54       */
55      byte[] getBytes(String key);
56  
57      /**
58       * @param key
59       * @return the key value as a char or null.
60       */
61      Character getChar(String key);
62  
63      /**
64       * @param key
65       * @return the key value as a Date or null.
66       */
67      Date getDate(String key);
68  
69      /**
70       * @param key
71       * @return true if key is a field in the Row.
72       */
73      boolean isField(String key);
74  }