001: /*
002: * ChainBuilder ESB
003: * Visual Enterprise Integration
004: *
005: * Copyright (C) 2006 Bostech Corporation
006: *
007: * This program is free software; you can redistribute it and/or modify
008: * it under the terms of the GNU General Public License as published by
009: * the Free Software Foundation; either version 2 of the License, or
010: * (at your option) any later version.
011: *
012: * This program is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * General Public License for more details.
016: *
017: * You should have received a copy of the GNU General Public License
018: * along with this program; if not, write to the Free Software
019: * Foundation, Inc.,59 Temple Place, Suite 330, Boston, MA 02111-1307
020: * USA
021: *
022: *
023: * $Id: JdbcVar.java 8856 2007-08-31 05:43:07Z lzheng $
024: */
025: package com.bostechcorp.cbesb.runtime.jdbc;
026:
027: import java.io.UnsupportedEncodingException;
028:
029: /**
030: * JDBCVar represents an input or output parameter in the SQL Statement of a JDBCUPoC request.
031: * The JDBCRequest and JDBCResult may have a Vector containing instances of JDBCVar. The JDBCVar
032: * contains the datatype and value of the parameter as well as whether it is an input or output
033: * parameter or both.
034: */
035: public class JdbcVar {
036:
037: public static int MODE_IN = 0;
038: public static int MODE_OUT = 1;
039: public static int MODE_INOUT = 2;
040:
041: private int mode;
042: private int dataType;
043: private String value;
044: private String name;
045:
046: /**
047: * Constructor
048: */
049: public JdbcVar(int mode) {
050: this .mode = mode;
051: }
052:
053: public JdbcVar(int mode, int datatype, String value) {
054: this .mode = mode;
055: this .dataType = datatype;
056: this .value = value;
057: }
058:
059: public JdbcVar(int mode, int dataType, String value, String name) {
060: super ();
061: this .mode = mode;
062: this .dataType = dataType;
063: this .value = value;
064: this .name = name;
065: }
066:
067: public JdbcVar(int mode, int datatype) {
068: this .mode = mode;
069: this .dataType = datatype;
070: }
071:
072: /**
073: * @return the dataType
074: */
075: public int getDataType() {
076: return dataType;
077: }
078:
079: /**
080: * @param dataType the dataType to set
081: */
082: public void setDataType(int dataType) {
083: this .dataType = dataType;
084: }
085:
086: /**
087: * @return the mode
088: */
089: public int getMode() {
090: return mode;
091: }
092:
093: /**
094: * @param mode the mode to set
095: */
096: public void setMode(int mode) {
097: this .mode = mode;
098: }
099:
100: /**
101: * @return the value
102: */
103: public String getValue() {
104: return value;
105: }
106:
107: /**
108: * @param value the value to set
109: */
110: public void setValue(String value) {
111: this .value = value;
112: }
113:
114: public String getName() {
115: return name;
116: }
117:
118: public void setName(String name) {
119: this.name = name;
120: }
121:
122: }
|