Examples of DataRow


Examples of org.apache.cayenne.DataRow

    public void writeObject(Object object, AbstractHessianOutput out) throws IOException {
        if (out.addRef(object)) {
            return;
        }

        DataRow row = (DataRow) object;

        out.writeMapBegin(DataRow.class.getName());
       
        out.writeInt(row.size());
        out.writeLong(row.getVersion());
        out.writeLong(row.getReplacesVersion());

        for (final Map.Entry<String, Object> entry : row.entrySet()) {
            out.writeObject(entry.getKey());
            out.writeObject(entry.getValue());
        }

        out.writeMapEnd();
View Full Code Here

Examples of org.apache.cayenne.DataRow

        Date now = cal.getTime();
        test.setTimestampColumn(now);
        context.commitChanges();

        NamedQuery q = new NamedQuery("SelectDateTest");
        DataRow testRead = (DataRow) context.performQuery(q).get(0);
        Date columnValue = (Date) testRead.get("TIMESTAMP_COLUMN");
        assertNotNull(columnValue);
        assertEquals(now, columnValue);
    }
View Full Code Here

Examples of org.apache.cayenne.DataRow

        java.sql.Date now = new java.sql.Date(cal.getTime().getTime());
        test.setDateColumn(now);
        context.commitChanges();

        NamedQuery q = new NamedQuery("SelectDateTest");
        DataRow testRead = (DataRow) context.performQuery(q).get(0);
        Date columnValue = (Date) testRead.get("DATE_COLUMN");
        assertNotNull(columnValue);
        assertEquals(now.toString(), new java.sql.Date(columnValue.getTime()).toString());
    }
View Full Code Here

Examples of org.apache.cayenne.DataRow

        Time now = new Time(cal.getTime().getTime());
        test.setTimeColumn(now);
        context.commitChanges();

        NamedQuery q = new NamedQuery("SelectDateTest");
        DataRow testRead = (DataRow) context.performQuery(q).get(0);
        Date columnValue = (Date) testRead.get("TIME_COLUMN");
        assertNotNull(columnValue);
        assertEquals(now.toString(), new Time(columnValue.getTime()).toString());
    }
View Full Code Here

Examples of org.apache.cayenne.DataRow

        assertEquals(1, artists.size());

        Map row = (Map) artists.get(0);
        assertEquals(19, list.indexOf(row));
       
        DataRow clone = new DataRow(row);
        assertEquals(19, list.indexOf(clone));

        row.remove("ARTIST_ID");
        assertEquals(-1, list.indexOf(row));
    }
View Full Code Here

Examples of org.jfree.report.DataRow

    protected boolean isValueChanged()
    {
        final ObjectOleElement element = (ObjectOleElement) getNode();
        final List masterfields = element.getMasterfields();
        final DataRow view = getFlowController().getMasterRow().getGlobalView();
        for (final Iterator iter = masterfields.iterator(); iter.hasNext();)
        {
            final String master = (String) iter.next();
            try
            {
                final DataFlags flags = view.getFlags(master);
                if (flags != null && flags.isChanged())
                {
                    return true;
                }
            }
View Full Code Here

Examples of org.jruby.pg.internal.messages.DataRow

      List<DataRow> rows = jdbcResultSet.getRows();
      if (row >= rows.size()) {
        throw context.runtime.newIndexError("row " + row + " is out of range");
      }
      DataRow dataRow = rows.get(row);
      ByteBuffer[] columns = dataRow.getValues();
      if (column >= columns.length) {
        throw context.runtime.newIndexError("column " + column + " is out of range");
      }
      return valueAsString(context, row, column);
    }
View Full Code Here

Examples of org.jtester.module.dbfit.db.model.DataRow

      for (int i = 0; i < keyProperties.length; i++) {
        if (keyProperties[i])
          matchingMask.put(columnNames[i], dr.get(columnNames[i]));
      }
      try {
        DataRow dr2 = t2.findMatching(matchingMask);
        dr2.markProcessed();
        lastScreenRow = addRow(lastScreenRow, dr, dr2);
      } catch (NoMatchingRowFoundException nex) {
        lastScreenRow = addRow(lastScreenRow, dr, true, " missing from " + queryName);
      }
      dr.markProcessed();
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.DataRow

    if (innerRow == null)
    {
      throw new NullPointerException();
    }

    final DataRow globalView = innerRow.getGlobalView();
    final String[] names = globalView.getColumnNames();
    final int cols = names.length;
    this.dataAttributes = new HashMap();
    this.outerNames = new String[cols];
    this.innerNames = outerNames;
    final Object[] values = new Object[cols];
    final DataSchema dataSchema = innerRow.getDataSchema();
    for (int i = 0; i < cols; i++)
    {
      final String name = names[i];
      if (name == null)
      {
        throw new IllegalStateException("Every column must have a name.");
      }
      outerNames[i] = name;
      values[i] = globalView.get(name);

      dataAttributes.put(name, dataSchema.getAttributes(name));
    }
    setData(outerNames, values);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.DataRow

    if (parameterMappings == null)
    {
      throw new NullPointerException();
    }

    final DataRow globalView = innerRow.getGlobalView();
    final int cols = parameterMappings.length;
    this.dataAttributes = new HashMap();
    this.outerNames = new String[cols];
    this.innerNames = outerNames;
    final Object[] values = new Object[cols];
    final DataSchema dataSchema = innerRow.getDataSchema();
    for (int i = 0; i < cols; i++)
    {
      final ParameterMapping mapping = parameterMappings[i];
      final String name = mapping.getAlias();
      if (name == null)
      {
        throw new IllegalStateException("Every column must have a name.");
      }
      outerNames[i] = name;
      values[i] = globalView.get(name);

      dataAttributes.put(mapping.getName(), dataSchema.getAttributes(name));
    }
    setData(outerNames, values);
  }
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.