Example #1
0
 private synchronized Object _get(int row) throws SQLException, IOException {
   if (data == null) {
     data = new Object[qry.getRecordcount()];
     for (int i = 0; i < data.length; i++) {
       data[i] = SimpleQuery.DEFAULT_VALUE;
     }
   }
   return data[row - 1] = cast.toCFType(type, res, index);
 }
Example #2
0
  public SimpleQueryColumn(
      SimpleQuery qry, ResultSet res, Collection.Key key, int type, int index) {
    this.qry = qry;
    this.res = res;
    this.key = key;
    this.index = index;

    try {
      switch (type) {
        case Types.TIMESTAMP:
          cast = Cast.TIMESTAMP;
          break;
        case Types.TIME:
          cast = Cast.TIME;
          break;
        case Types.DATE:
          cast = Cast.DATE;
          break;
        case Types.CLOB:
          cast = Cast.CLOB;
          break;
        case Types.BLOB:
          cast = Cast.BLOB;
          break;
        case Types.BIT:
          cast = Cast.BIT;
          break;
        case Types.ARRAY:
          cast = Cast.ARRAY;
          break;
        case CFTypes.OPAQUE:
          if (SQLUtil.isOracle(res.getStatement().getConnection())) cast = Cast.ORACLE_OPAQUE;
          else cast = Cast.OTHER;
          break;
        default:
          cast = Cast.OTHER;
          break;
      }
    } catch (Exception e) {
      throw SimpleQuery.toRuntimeExc(e);
    }
  }
Example #3
0
 private Object getChildElement(Key key, Object defaultValue) {
   // column and query has same name
   if (key.equals(this.key)) {
     return get(qry.getCurrentrow(), defaultValue);
   }
   // get it from undefined scope
   PageContext pc = ThreadLocalPageContext.get();
   if (pc != null) {
     UndefinedImpl undefined = ((UndefinedImpl) pc.undefinedScope());
     boolean old = undefined.setAllowImplicidQueryCall(false);
     Object sister = undefined.get(this.key, null);
     undefined.setAllowImplicidQueryCall(old);
     if (sister != null) {
       try {
         return pc.get(sister, key);
       } catch (PageException e) {
         return defaultValue;
       }
     }
   }
   return defaultValue;
 }
Example #4
0
 public Object removeEL(PageContext pc) {
   throw SimpleQuery.notSupported();
 }
Example #5
0
 public Object touch(PageContext pc) throws PageException {
   throw SimpleQuery.notSupported();
 }
Example #6
0
 public Object clone() {
   throw SimpleQuery.notSupported();
 }
Example #7
0
 public Object remove(Key key) throws PageException {
   throw SimpleQuery.notSupported();
 }
Example #8
0
 public Object set(String key, Object value) throws PageException {
   throw SimpleQuery.notSupported();
 }
Example #9
0
 public void addRow(int count) {
   throw SimpleQuery.notSupported();
 }
Example #10
0
 public int compareTo(String str) throws PageException {
   throw SimpleQuery.notSupported();
 }
Example #11
0
 public Object removeEL(int row) {
   throw SimpleQuery.notSupported();
 }
Example #12
0
 public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties properties) {
   throw SimpleQuery.notSupported();
 }
Example #13
0
 public Iterator valueIterator() {
   throw SimpleQuery.notSupported();
 }
Example #14
0
 public boolean containsKey(Key key) {
   throw SimpleQuery.notSupported();
 }
Example #15
0
 public Collection duplicate(boolean deepCopy) {
   throw SimpleQuery.notSupported();
 }
Example #16
0
 public Object setEL(Key key, Object value) {
   throw SimpleQuery.notSupported();
 }
Example #17
0
 public Object touchEL(PageContext pc) {
   throw SimpleQuery.notSupported();
 }
Example #18
0
 public Object set(int row, Object value) throws PageException {
   throw SimpleQuery.notSupported();
 }
Example #19
0
 public Object removeRow(int row) throws PageException {
   throw SimpleQuery.notSupported();
 }
Example #20
0
 public Object removeEL(Key key) {
   throw SimpleQuery.notSupported();
 }
Example #21
0
 public int compareTo(boolean b) throws PageException {
   throw SimpleQuery.notSupported();
 }
Example #22
0
 public void clear() {
   throw SimpleQuery.notSupported();
 }
Example #23
0
 public void add(Object value) {
   throw SimpleQuery.notSupported();
 }
Example #24
0
 public int compareTo(double d) throws PageException {
   throw SimpleQuery.notSupported();
 }
Example #25
0
 public Object setEL(int row, Object value) {
   throw SimpleQuery.notSupported();
 }
Example #26
0
 public int compareTo(DateTime dt) throws PageException {
   throw SimpleQuery.notSupported();
 }
Example #27
0
 public void cutRowsTo(int maxrows) {
   throw SimpleQuery.notSupported();
 }
Example #28
0
 public Object set(PageContext pc, Object value) throws PageException {
   throw SimpleQuery.notSupported();
 }
Example #29
0
 public Object setEL(PageContext pc, Object value) {
   throw SimpleQuery.notSupported();
 }
Example #30
0
 public String[] keysAsString() {
   throw SimpleQuery.notSupported();
 }