Op.java :  » Database-DBMS » Quadcap-Embeddable-Database » com » quadcap » sql » types » Java Open Source

Java Open Source » Database DBMS » Quadcap Embeddable Database 
Quadcap Embeddable Database » com » quadcap » sql » types » Op.java
package com.quadcap.sql.types;

/* Copyright 1999 - 2003 Quadcap Software.  All rights reserved.
 *
 * This software is distributed under the Quadcap Free Software License.
 * This software may be used or modified for any purpose, personal or
 * commercial.  Open Source redistributions are permitted.  Commercial
 * redistribution of larger works derived from, or works which bundle
 * this software requires a "Commercial Redistribution License"; see
 * http://www.quadcap.com/purchase.
 *
 * Redistributions qualify as "Open Source" under  one of the following terms:
 *   
 *    Redistributions are made at no charge beyond the reasonable cost of
 *    materials and delivery.
 *
 *    Redistributions are accompanied by a copy of the Source Code or by an
 *    irrevocable offer to provide a copy of the Source Code for up to three
 *    years at the cost of materials and delivery.  Such redistributions
 *    must allow further use, modification, and redistribution of the Source
 *    Code under substantially the same terms as this license.
 *
 * Redistributions of source code must retain the copyright notices as they
 * appear in each source code file, these license terms, and the
 * disclaimer/limitation of liability set forth as paragraph 6 below.
 *
 * Redistributions in binary form must reproduce this Copyright Notice,
 * these license terms, and the disclaimer/limitation of liability set
 * forth as paragraph 6 below, in the documentation and/or other materials
 * provided with the distribution.
 *
 * The Software is provided on an "AS IS" basis.  No warranty is
 * provided that the Software is free of defects, or fit for a
 * particular purpose.  
 *
 * Limitation of Liability. Quadcap Software shall not be liable
 * for any damages suffered by the Licensee or any third party resulting
 * from use of the Software.
 */

import java.io.IOException;

import java.util.Enumeration;
import java.util.Vector;

import java.sql.SQLException;

import com.quadcap.util.Debug;

/**
 * A list of all the ops.
 *
 * @author Stan Bailes
 */

public abstract class Op {
    public static final int  ALL      = 1;
    public static final int  AND      = 2;
    public static final int  ANY      = 3;
    public static final int  BETWEEN      = 4;
    public static final int  CONCAT      = 5;
    public static final int  CROSS      = 6;
    public static final int  DIVIDE      = 7;
    public static final int  EQ      = 8;
    public static final int  EXCEPT      = 9;
    public static final int  EXISTS      = 10;
    public static final int  EXP      = 11;
    public static final int  FALSE      = 12;
    public static final int  FULL      = 13;
    public static final int  GE      = 14;
    public static final int  GT      = 15;
    public static final int  IN      = 16;
    public static final int  INNER      = 17;
    public static final int  INTERSECT    = 18;
    public static final int  LE      = 19;
    public static final int  LEFT      = 20;
    public static final int  LIKE      = 21;
    public static final int  LT      = 22;
    public static final int  MINUS      = 23;
    public static final int  NE      = 24;
    public static final int  NOT      = 25;
    public static final int  NULL      = 26;
    public static final int  OR      = 27;
    public static final int  PLUS      = 28;
    public static final int  RIGHT      = 29;
    public static final int  COMPARE      = 30;
    public static final int  TIMES      = 31;
    public static final int  TRUE      = 32;
    public static final int  UNION      = 33;
    public static final int  UNKNOWN      = 34;
    public static final int  PATTERN      = 35;
    public static final int  UNIQUE      = 36;
    

    static String[] expStrings = {
  "<bad op: 0>", "ALL", "AND", "ANY", "BETWEEN", "||", "CROSS", "/", "=",
  "EXCEPT", "EXISTS", "**", "FALSE", "FULL", ">=", ">", "IN",
  "INNER", "INTERSECT", "<=", "LEFT", "LIKE", "<", "-", "<>",
  "NOT", "NULL", "OR", "+", "RIGHT", "COMPARE", "*", "TRUE", "UNION",
  "UNKNOWN", "PATTERN", "UNIQUE"
    };

    // this one gets bit or-ed with join types as a modifier
    public static final int  NATURAL      = 256;

    public static String toString(int op) {
  try {
      return expStrings[op];
  } catch (Exception e) {
      return "<bad op: " + op + ">";
  }
    }    
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.