Examples of Column


Examples of org.apache.metamodel.schema.Column

public class ConvertedDataSetInterceptorTest extends TestCase {

  public void testConvertedQuery() throws Exception {
    UpdateableDataContext dc = new MockUpdateableDataContext();
    Column fooColumn = dc.getColumnByQualifiedLabel("schema.table.foo");
    assertNotNull(fooColumn);

    dc = Converters.addTypeConverter(dc, fooColumn,
        new StringToIntegerConverter());
View Full Code Here

Examples of org.apache.ode.bpel.extvar.jdbc.DbExternalVariable.Column

  Column getColumn(int idx) {
    return _columns.get(idx);
  }
 
  Object get(String name) {
        Column c = _colmap.get(name);
        if (c == null)
            return null;
        int idx = _columns.indexOf(c);
        return get(idx);
    }
View Full Code Here

Examples of org.apache.openejb.jee.jpa.Column

                Field field = entityData.fields.get(cmpFieldName);
                if (field == null) {
                    // todo warn no such cmp-field in the ejb-jar.xml
                    continue;
                }
                Column column = new Column();
                column.setName(cmpFieldMapping.getTableColumn());
                field.setColumn(column);
            }

            if (bean.getKeyGenerator() != null) {
                // todo support complex primary keys
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.Column

            || cols.size() == icols.size())) {
            if (cols.isEmpty())
                cols = new ArrayList(icols.size());
            for (int i = 0; i < icols.size(); i++) {
                if (cols.size() == i)
                    cols.add(new Column());
                ((Column) cols.get(i)).copy((Column) icols.get(i));
            }
            setColumns(cols);
        }
    }
View Full Code Here

Examples of org.apache.pig.Expression.Column

        private void updateMappedColNames(Expression expr) {
            if(expr instanceof BinaryExpression) {
                updateMappedColNames(((BinaryExpression) expr).getLhs());
                updateMappedColNames(((BinaryExpression) expr).getRhs());
            } else if (expr instanceof Column) {
                Column col = (Column) expr;
                col.setName(reverseColNameMap.get(col.getName()));
            }
        }
View Full Code Here

Examples of org.apache.pig.impl.plan.ProjectionMap.Column

        MultiMap<Integer, Column> mappedFields = new MultiMap<Integer, Column>();
        List<Column> columns;
        for (int i=0;i<=getSchema().size();i++) {
            columns = new ArrayList<Column>();
            columns.add(new Column(new Pair<Integer, Integer>(0, i)));
            mappedFields.put(i, columns);
        }
        mPlan.add(forEach);
        mPlan.doInsertBetween(this, forEach, succ, false);
        forEach.getProjectionMap().setMappedFields(mappedFields);
View Full Code Here

Examples of org.apache.poi.ss.formula.functions.Column

        retval[ID.SUM] = AggregateFunction.SUM;
        retval[5] = AggregateFunction.AVERAGE;
        retval[6] = AggregateFunction.MIN;
        retval[7] = AggregateFunction.MAX;
        retval[8] = new RowFunc(); // ROW
        retval[9] = new Column();
        retval[10] = new Na();
        retval[11] = new Npv();
        retval[12] = AggregateFunction.STDEV;
        retval[13] = NumericFunction.DOLLAR;
View Full Code Here

Examples of org.apache.sqoop.schema.type.Column

  private static Column restoreColumn(JSONObject obj) {
    String name = (String) obj.get(NAME);

    Boolean nullable = (Boolean) obj.get(NULLABLE);
    Column key = null;
    if(obj.containsKey(KEY)) {
      key = restoreColumn((JSONObject) obj.get(KEY));
    }
    Column value = null;
    if(obj.containsKey(VALUE)) {
      value = restoreColumn((JSONObject) obj.get(VALUE));
    }
    Long size = (Long)obj.get(SIZE);
    Boolean fraction = (Boolean)obj.get(FRACTION);
    Boolean timezone = (Boolean)obj.get(TIMEZONE);
    Long precision = (Long)obj.get(PRECISION);
    Long scale = (Long)obj.get(SCALE);
    Boolean unsigned = (Boolean)obj.get(UNSIGNED);
    Long jdbcType = (Long)obj.get(JDBC_TYPE);

    Type type = Type.valueOf((String) obj.get(TYPE));
    Column output = null;
    switch (type) {
      case ARRAY:
        output = new Array(key);
        break;
      case BINARY:
        output = new Binary().setSize(size);
        break;
      case BIT:
        output = new Bit();
        break;
      case DATE:
        output = new Date();
        break;
      case DATE_TIME:
        output = new DateTime().setFraction(fraction).setTimezone(timezone);
        break;
      case DECIMAL:
        output = new Decimal().setPrecision(precision).setScale(scale);
        break;
      case ENUM:
        output = new Enum(key);
        break;
      case FIXED_POINT:
        output = new FixedPoint().setByteSize(size).setUnsigned(unsigned);
        break;
      case FLOATING_POINT:
        output = new FloatingPoint().setByteSize(size);
        break;
      case MAP:
        output = new Map(key, value);
        break;
      case SET:
        output = new Set(key);
        break;
      case TEXT:
        output = new Text().setSize(size);
        break;
      case TIME:
        output = new Time().setFraction(fraction);
        break;
      case UNSUPPORTED:
        output = new Unsupported().setJdbcType(jdbcType);
        break;
      default:
        // TODO(Jarcec): Throw an exception of unsupported type?
    }

    output.setName(name);
    output.setNullable(nullable);

    return output;
  }
View Full Code Here

Examples of org.apache.tajo.catalog.Column

    public Tuple toTuple(byte [] bytes) {
      nullFlags.clear();
      ByteBuffer bb = ByteBuffer.wrap(bytes);
      Tuple tuple = new VTuple(schema.size());
      Column col;
      TajoDataTypes.DataType type;

      bb.limit(headerSize);
      nullFlags.fromByteBuffer(bb);
      bb.limit(bytes.length);

      for (int i =0; i < schema.size(); i++) {
        if (nullFlags.get(i)) {
          tuple.put(i, DatumFactory.createNullDatum());
          continue;
        }

        col = schema.getColumn(i);
        type = col.getDataType();
        switch (type.getType()) {
          case BOOLEAN: tuple.put(i, DatumFactory.createBool(bb.get())); break;
          case BIT:
            byte b = bb.get();
            tuple.put(i, DatumFactory.createBit(b));
View Full Code Here

Examples of org.apache.torque.Column

    {
        if (!(possibleColumn instanceof Column))
        {
            return null;
        }
        Column column = (Column) possibleColumn;
        TableMap result = null;
        String tableName = column.getTableName();
        if (tableName == null)
        {
            // try asColumns
            Column asColumn = criteria.getAsColumns().get(
                    column.getSqlExpression());
            if (asColumn != null)
            {
                tableName = asColumn.getTableName();
            }
        }
        if (tableName != null)
        {
            String databaseName = criteria.getDbName();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.