Search in sources :

Example 1 with QueryColumnImpl

use of lucee.runtime.type.QueryColumnImpl in project Lucee by lucee.

the class QueryUtil method duplicate2QueryColumnImpl.

public static QueryColumnImpl duplicate2QueryColumnImpl(QueryImpl targetQuery, QueryColumn col, boolean deepCopy) {
    if (col instanceof QueryColumnImpl)
        return ((QueryColumnImpl) col).cloneColumnImpl(deepCopy);
    // fill array for column
    Array content = new ArrayImpl();
    int len = col.size();
    for (int i = 1; i <= len; i++) {
        content.setEL(i, col.get(i, null));
    }
    // create and return column
    try {
        return new QueryColumnImpl(targetQuery, col.getKey(), content, col.getType());
    } catch (PageException e) {
        throw new PageRuntimeException(e);
    }
}
Also used : Array(lucee.runtime.type.Array) PageException(lucee.runtime.exp.PageException) QueryColumnImpl(lucee.runtime.type.QueryColumnImpl) ArrayImpl(lucee.runtime.type.ArrayImpl) PageRuntimeException(lucee.runtime.exp.PageRuntimeException)

Aggregations

PageException (lucee.runtime.exp.PageException)1 PageRuntimeException (lucee.runtime.exp.PageRuntimeException)1 Array (lucee.runtime.type.Array)1 ArrayImpl (lucee.runtime.type.ArrayImpl)1 QueryColumnImpl (lucee.runtime.type.QueryColumnImpl)1