View Javadoc

1   /*******************************************************************************
2    *  Copyright (c) 2005, 2006 Imola Informatica.
3    *  All rights reserved. This program and the accompanying materials
4    *  are made available under the terms of the LGPL License v2.1
5    *  which accompanies this distribution, and is available at
6    *  http://www.gnu.org/licenses/lgpl.html
7    *******************************************************************************/
8   /**
9    * 
10   */
11  package it.imolinfo.jbi4cics.messageformat.jdbc;
12  
13  import it.imolinfo.jbi4cics.exception.FormatException;
14  import it.imolinfo.jbi4cics.jbi.Messages;
15  import it.imolinfo.jbi4cics.messageformat.FieldDescriptor;
16  
17  public class JdbcParameterDescriptor implements FieldDescriptor {
18    
19    public static final int IN_PARAMETER=0;
20    public static final int OUT_PARAMETER=1;
21    public static final int IN_OUT_PARAMETER=2;
22    
23    /**
24     * The responsible to translate localized messages.
25     */
26    private static final Messages MESSAGES
27            = Messages.getMessages(JdbcParameterDescriptor.class);
28  
29    private int inOutType;
30    private int sqlType;
31  
32   /**
33    * 
34    * @param type  The type
35    */
36    
37    public JdbcParameterDescriptor(int type) {
38  	    this.inOutType = type;
39  	  }
40    
41    /**
42     * @return Returns the sqlType.
43     */
44    public int getSqlType() {
45      return sqlType;
46    }
47  
48    /**
49     * @param sqlType The sqlType to set.
50     */
51    public void setSqlType(int sqlType) {
52      this.sqlType = sqlType;
53    }
54  
55   
56    /**
57     * @return Returns the inOutType.
58     */
59    public int getInOutType() {
60      return inOutType;
61    }
62    /**
63     * @param type  The type to set.
64     */
65    public void setInOutType(int type) {
66      this.inOutType = type;
67    }
68  
69    /**
70     * @throws FormatException    The format exception
71     * @return Class The prefered java type
72     */
73    public Class getPreferredJavaType() throws FormatException {
74      //TODO gestire questo metodo
75      throw new FormatException(MESSAGES.getString("CIC001800_Not_implemented"));
76    }
77    
78  }