public Table<Record> getTableBasedOnList(DSLContext create, List<String> list) { @SuppressWarnings ("unchecked") Row1<String>[] values = (Row1<String>[]) Array.newInstance (Row1.class, list.size ()); Iterator<String> it = list.iterator (); int i=0; while(it.hasNext ()) values[i++]=row(it.next ()); Table<Record> table = create.select().from( values(values) ).asTable("tblDimension"); if(log.isDebugEnabled ()) log.debug ("table: " + table.toString ()); return table; }
/** * {@inheritDoc} */ @Override public Row1<String> fieldsRow() { return (Row1) super.fieldsRow(); }
/** * {@inheritDoc} */ @Override public Row1<String> valuesRow() { return (Row1) super.valuesRow(); }
/** * {@inheritDoc} */ @Override public Row1<Long> fieldsRow() { return (Row1) super.fieldsRow(); }
/** * {@inheritDoc} */ @Override public Row1<Long> valuesRow() { return (Row1) super.valuesRow(); }
/** * {@inheritDoc} */ @Override public Row1<UInteger> fieldsRow() { return (Row1) super.fieldsRow(); }
/** * {@inheritDoc} */ @Override public Row1<UInteger> valuesRow() { return (Row1) super.valuesRow(); }