View Javadoc

1   /*
2    * JBoss, Home of Professional Open Source.
3    * See the COPYRIGHT.txt file distributed with this work for information
4    * regarding copyright ownership.  Some portions may be licensed
5    * to Red Hat, Inc. under one or more contributor license agreements.
6    * 
7    * This library is free software; you can redistribute it and/or
8    * modify it under the terms of the GNU Lesser General Public
9    * License as published by the Free Software Foundation; either
10   * version 2.1 of the License, or (at your option) any later version.
11   * 
12   * This library is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15   * Lesser General Public License for more details.
16   * 
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this library; if not, write to the Free Software
19   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20   * 02110-1301 USA.
21   */
22  
23  package org.modeshape.jdbc.metadata;
24  
25  /**
26   * This constants in this class indicate the column positions of different
27   * columns in queries against metadata. These constants are
28   * used in JcrResultsMetaData object to obtain column specific
29   * metadata information.
30   */
31  
32  public interface ResultsMetadataConstants {
33      
34      // constant indicating the position of catalog .
35      public static final Integer CATALOG = new Integer(0);
36      // constant indicating the position of schema .
37      public static final Integer SCHEMA = new Integer(1);
38      // constant indicating the position of table.
39      public static final Integer TABLE = new Integer(2);
40      // constant indicating the position of column .
41      public static final Integer COLUMN = new Integer(3);
42      // constant indicating the position of column label used for display purposes.
43      public static final Integer COLUMN_LABEL = new Integer(4);
44      // constant indicating the position of datatype of the column.
45      public static final Integer DATA_TYPE = new Integer(6);
46      // constant indicating the position of precision of the column.
47      public static final Integer PRECISION = new Integer(7);
48      // constant indiacting the position of radix of a column.
49      public static final Integer RADIX = new Integer(8);
50      // constant indicating scale of the column.
51      public static final Integer SCALE = new Integer(9);
52      // constant indiacting the position of auto-incrementable property of a column.
53      public static final Integer AUTO_INCREMENTING = new Integer(10);
54      // constant indiacting the position of columns case sensitivity.
55      public static final Integer CASE_SENSITIVE = new Integer(11);
56      // constant indicating the position of nullable property of a column.
57      public static final Integer NULLABLE = new Integer(12);
58      // constant indicating the position of searchable property of a column.
59      public static final Integer SEARCHABLE = new Integer(13);
60      // constant indicating the position of signed property of a column.
61      public static final Integer SIGNED = new Integer(14);
62      // constant indicating the position of updatable property of a column.
63      public static final Integer WRITABLE = new Integer(15);
64      // constant indicating if a column is a currency value
65      public static final Integer CURRENCY = new Integer(16);
66      // constant indicating the display size for a column
67      public static final Integer DISPLAY_SIZE = new Integer(17);
68      
69      /**
70       * These types are associated with a DataType or an Element needing the indication of null types. 
71       */
72      public static final class NULL_TYPES {
73          public static final Integer NOT_NULL = new Integer(1);
74          public static final Integer NULLABLE = new Integer(2);
75          public static final Integer UNKNOWN = new Integer(3);
76      }
77  
78      /**
79       * These types are associated with the Element having valid search types. 
80       */
81      public static final class SEARCH_TYPES {
82          public static final Integer SEARCHABLE = new Integer(1);
83          public static final Integer ALLEXCEPTLIKE = new Integer(2);
84          public static final Integer LIKE_ONLY = new Integer(3);
85          public static final Integer UNSEARCHABLE = new Integer(4);
86      }
87      
88      public static final class TABLE_TYPES {
89      	public static final String VIEW = "VIEW";
90      }
91  
92  }