v = ValueMetaFactory.createValueMeta( column.getName(), valtype ); } catch ( KettlePluginException e ) { throw new KettleStepException( e );
private void addHeaders(List<? extends Column> columns, XHTMLContentHandler xhtml) throws SAXException { xhtml.startElement("thead"); xhtml.startElement("tr"); for (Column c : columns) { xhtml.startElement("th"); xhtml.characters(c.getName()); xhtml.endElement("th"); } xhtml.endElement("tr"); xhtml.endElement("thead"); }
@Override public int countValues(int complexValueFk) throws IOException { return getRawValues(complexValueFk, Collections.singleton(_complexValFkCol.getName())) .size(); }
private String commaSeparated(List<? extends Index.Column> columns, boolean escape) throws SQLException { String comma = ""; StringBuffer sb = new StringBuffer(" ("); for (Index.Column cd : columns) { String cl = escape ? escapeIdentifier(cd.getColumn().getName()) : cd.getColumn().getName(); sb.append(comma).append(cl); comma = ","; } return sb.append(") ").toString(); }
public IterableBuilder addColumns(Iterable<? extends Column> cols) { if(cols != null) { for(Column col : cols) { addColumnName(col.getName()); } } return this; }
public EntryIterableBuilder addColumns(Iterable<? extends Column> cols) { if(cols != null) { for(Column col : cols) { addColumnName(col.getName()); } } return this; }
/** * Sets an index to use for the cursor by searching the table for an index * with exactly the given columns. * @throws IllegalArgumentException if no index can be found on the table * with the given columns */ public CursorBuilder setIndexByColumns(Column... columns) { List<String> colNames = new ArrayList<String>(); for(Column col : columns) { colNames.add(col.getName()); } return setIndexByColumns(colNames); }
@Override public Collection<IColumn> getColumns() { ArrayList<IColumn> ret = new ArrayList<IColumn>(); try { for (com.healthmarketscience.jackcess.Column cc : getTable().getColumns()) { ret.add(new Column(cc.getName())); } } catch (KlabIOException e) { ret.clear(); } return ret; }
@Override public IColumn getColumn(String columnName) { boolean ok = false; try { for (com.healthmarketscience.jackcess.Column cc : getTable().getColumns()) { if (cc.getName().equals(columnName)) { ok = true; break; } } } catch (KlabIOException e) { } return ok ? new Column(columnName) : null; }
@Override public Object handleRowError(Column cl, byte[] bt, Location location, Exception ex) throws IOException { if (cl.getType().isTextual()) { Logger.logParametricWarning(Messages.INVALID_CHARACTER_SEQUENCE, cl.getTable().getName(), cl.getName(), new String(bt)); } throw new IOException(ex.getMessage()); } });
private String getExpression(Column cl) throws IOException { PropertyMap map = cl.getProperties(); Property exprp = map.get(PropertyMap.EXPRESSION_PROP); if (exprp != null) { Table tl = cl.getTable(); String expr = SQLConverter.convertPowOperator((String) exprp.getValue()); for (Column cl1 : tl.getColumns()) { expr = expr.replaceAll("\\[(?i)(" + Pattern.quote(cl1.getName()) + ")\\]", "newrow.$0"); } return expr; } return null; }
public JackcessDenseObjectMatrix2D(File file, String tablename) throws IOException { super(0, 0); database = DatabaseBuilder.open(file); VerifyUtil.verifyNotNull(database, "database could not be opened"); table = database.getTable(tablename); VerifyUtil.verifyNotNull(table, "table not found in database"); columns = table.getColumns(); cursor = CursorBuilder.createCursor(table); for (int i = 0; i < columns.size(); i++) { setColumnLabel(i, columns.get(i).getName()); } setLabel(tablename); }
private static boolean anyUpdates(Joiner joiner,Object[] oldRow, Object[] newRow) { Table fromTable = joiner.getFromTable(); for(Index.Column iCol : joiner.getColumns()) { Column col = iCol.getColumn(); if(!MATCHER.matches(fromTable, col.getName(), col.getRowValue(oldRow), col.getRowValue(newRow))) { return true; } } return false; }
@Override public void postTableLoadInit() throws IOException { super.postTableLoadInit(); // link up with the actual versioned column. it should have the same name // as the "value" column in the type table. Column versionedCol = getColumn().getTable().getColumn( getValueColumn().getName()); ((ColumnImpl)versionedCol).setVersionHistoryColumn((ColumnImpl)getColumn()); }
private void addHeaders(List<? extends Column> columns, XHTMLContentHandler xhtml) throws SAXException { xhtml.startElement("thead"); xhtml.startElement("tr"); for (Column c : columns) { xhtml.startElement("th"); xhtml.characters(c.getName()); xhtml.endElement("th"); } xhtml.endElement("tr"); xhtml.endElement("thead"); }
private void addHeaders(List<? extends Column> columns, XHTMLContentHandler xhtml) throws SAXException { xhtml.startElement("thead"); xhtml.startElement("tr"); for (Column c : columns) { xhtml.startElement("th"); xhtml.characters(c.getName()); xhtml.endElement("th"); } xhtml.endElement("tr"); xhtml.endElement("thead"); }
public ComplexBase(ComplexValue cv) { this(cv.getId(), cv.getComplexValueForeignKey().getColumn().getTable().getName(), cv.getComplexValueForeignKey().getColumn().getName()); }