home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / IBM VisualAge for Java Enterprise v4.0 Retail / ivj40 / setup / IDE.Cab / F85550_DatabaseQuerySpec.class (.txt) < prev    next >
Encoding:
Java Class File  |  2001-05-09  |  1.8 KB  |  91 lines

  1. package com.ibm.db.base;
  2.  
  3. import java.io.Serializable;
  4.  
  5. public class DatabaseQuerySpec implements Serializable {
  6.    private String name;
  7.    private String statement;
  8.    private DatabaseCompoundType outputShape;
  9.    private DatabaseCompoundType hostVarShape;
  10.    static final long serialVersionUID = 5823869221779577202L;
  11.    private static final String copyright = "Licensed Materials -- Property of IBM\n(c) Copyright International Business Machines Corporation, 1998, 2000";
  12.  
  13.    public DatabaseQuerySpec() {
  14.    }
  15.  
  16.    public DatabaseQuerySpec(DatabaseQuerySpec var1) throws CloneNotSupportedException {
  17.       if (var1 != null) {
  18.          if (var1.name != null) {
  19.             this.name = new String(var1.name);
  20.          }
  21.  
  22.          if (var1.statement != null) {
  23.             this.statement = new String(var1.statement);
  24.          }
  25.  
  26.          if (var1.outputShape != null) {
  27.             this.outputShape = (DatabaseCompoundType)var1.outputShape.clone();
  28.          }
  29.  
  30.          if (var1.hostVarShape != null) {
  31.             this.hostVarShape = (DatabaseCompoundType)var1.hostVarShape.clone();
  32.          }
  33.  
  34.       }
  35.    }
  36.  
  37.    public DatabaseQuerySpec(String var1) {
  38.       this((String)null, var1);
  39.    }
  40.  
  41.    public DatabaseQuerySpec(String var1, String var2) {
  42.       this.name = var1;
  43.       this.statement = var2;
  44.    }
  45.  
  46.    public DatabaseRow getEmptyInputRow() {
  47.       DatabaseCompoundType var1 = this.getHostVarShape();
  48.       return var1 == null ? null : new DatabaseRow(var1);
  49.    }
  50.  
  51.    public DatabaseCompoundType getHostVarShape() {
  52.       return this.hostVarShape;
  53.    }
  54.  
  55.    public String getName() {
  56.       return this.name;
  57.    }
  58.  
  59.    public DatabaseCompoundType getOutputShape() {
  60.       return this.outputShape;
  61.    }
  62.  
  63.    public String getStatement() {
  64.       return this.statement;
  65.    }
  66.  
  67.    protected boolean isInputDescribed() {
  68.       return this.getHostVarShape() != null;
  69.    }
  70.  
  71.    protected boolean isOutputDescribed() {
  72.       return this.getOutputShape() != null;
  73.    }
  74.  
  75.    public void setHostVarShape(DatabaseCompoundType var1) {
  76.       this.hostVarShape = var1;
  77.    }
  78.  
  79.    public void setName(String var1) {
  80.       this.name = var1;
  81.    }
  82.  
  83.    public void setOutputShape(DatabaseCompoundType var1) {
  84.       this.outputShape = var1;
  85.    }
  86.  
  87.    public void setStatement(String var1) {
  88.       this.statement = var1;
  89.    }
  90. }
  91.