Package com.meidusa.amoeba.sqljep

Examples of com.meidusa.amoeba.sqljep.ParseException


      cal.setTimeInMillis(ts.getTime());
      int day = cal.get(DAY_OF_WEEK);
      String[] week = symb.getWeekdays();
      return week[day];
    }
    throw new ParseException(WRONG_TYPE+" dayname("+param.getClass()+")");
  }
View Full Code Here


      Comparable<?>  param1 = runtime.stack.pop();
      return new Comparable<?>[]{param1,param2};
    } else {
      // remove all parameters from stack and push null
      removeParams(runtime.stack, num);
      throw new ParseException("Wrong number of parameters for instr");
    }
  }
View Full Code Here

    }
    if (param1 instanceof String && ((String)param1).length() == 0) {
      return null;
    }
    if (!(param2 instanceof String)) {
      throw new ParseException(PARAM_EXCEPTION);
    }
    if (param1 instanceof String) {
      return (String)param1;
    }
    else if (param1 instanceof Number) {
      try {
        OracleNumberFormat format = new OracleNumberFormat((String)param2);
        return format.format((Number)param1);
      } catch (java.text.ParseException e) {
        throw new ParseException(e.getMessage());
      }
    }
    else if (param1 instanceof java.util.Date) {
      try {
        OracleTimestampFormat format = new OracleTimestampFormat((String)param2, cal, symb);
        return format.format((java.sql.Timestamp)param1);
      } catch (java.text.ParseException e) {
        throw new ParseException(e.getMessage());
      }
    } else {
      throw new ParseException(TYPE_EXCEPTION);
    }
  }
View Full Code Here

      cal.add(SECOND, -s);
      cal.add(MINUTE, -m);
      cal.roll(HOUR_OF_DAY, -h);
      return (param1 instanceof Time) ? new Time(cal.getTimeInMillis()) : new Timestamp(cal.getTimeInMillis());
    } else {
      throw new ParseException(WRONG_TYPE+"  subtime("+param1.getClass()+","+param2.getClass()+")");
    }
  }
View Full Code Here

TOP

Related Classes of com.meidusa.amoeba.sqljep.ParseException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.