Ejemplo n.º 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);
 }
Ejemplo n.º 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);
    }
  }
Ejemplo n.º 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;
 }
Ejemplo n.º 4
0
 public Object removeEL(PageContext pc) {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 5
0
 public Object touch(PageContext pc) throws PageException {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 6
0
 public Object clone() {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 7
0
 public Object remove(Key key) throws PageException {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 8
0
 public Object set(String key, Object value) throws PageException {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 9
0
 public void addRow(int count) {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 10
0
 public int compareTo(String str) throws PageException {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 11
0
 public Object removeEL(int row) {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 12
0
 public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties properties) {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 13
0
 public Iterator valueIterator() {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 14
0
 public boolean containsKey(Key key) {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 15
0
 public Collection duplicate(boolean deepCopy) {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 16
0
 public Object setEL(Key key, Object value) {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 17
0
 public Object touchEL(PageContext pc) {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 18
0
 public Object set(int row, Object value) throws PageException {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 19
0
 public Object removeRow(int row) throws PageException {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 20
0
 public Object removeEL(Key key) {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 21
0
 public int compareTo(boolean b) throws PageException {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 22
0
 public void clear() {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 23
0
 public void add(Object value) {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 24
0
 public int compareTo(double d) throws PageException {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 25
0
 public Object setEL(int row, Object value) {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 26
0
 public int compareTo(DateTime dt) throws PageException {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 27
0
 public void cutRowsTo(int maxrows) {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 28
0
 public Object set(PageContext pc, Object value) throws PageException {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 29
0
 public Object setEL(PageContext pc, Object value) {
   throw SimpleQuery.notSupported();
 }
Ejemplo n.º 30
0
 public String[] keysAsString() {
   throw SimpleQuery.notSupported();
 }