@@ -0,0 +1,2250 @@
+/*%0A * This program is free software; you can redistribute it and/or modify it under the%0A * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software%0A * Foundation.%0A *%0A * You should have received a copy of the GNU Lesser General Public License along with this%0A * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html%0A * or from the Free Software Foundation, Inc.,%0A * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.%0A *%0A * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;%0A * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.%0A * See the GNU Lesser General Public License for more details.%0A *%0A * Copyright (c) 2009 Pentaho Corporation..  All rights reserved.%0A */%0A%0Apackage pt.webdetails.cda.tests.utils;%0A%0Aimport javax.swing.table.TableModel;%0A%0Aimport org.pentaho.reporting.engine.classic.core.util.TypedTableModel;%0A%0A/**%0A * Todo: Document me%0A *%0A * @author Thomas Morgner%0A */%0Apublic class StaticDataFactorySample%0A%7B%0A  private static final Long ZERO = new Long(0);%0A%0A  public StaticDataFactorySample()%0A  %7B%0A  %7D%0A%0A  public TableModel createMainQuery()%0A  %7B%0A    final TypedTableModel model = new TypedTableModel(new String%5B%5D%7B%22ID%22, %22TEXT%22%7D, new Class%5B%5D%7BLong.class, String.class%7D, 0);%0A    model.addRow(new Object%5B%5D%7Bnew Long(0), %22Hello World%22%7D);%0A    model.addRow(new Object%5B%5D%7Bnew Long(1), %22Your DataFactory works perfectly.%22%7D);%0A    return model;%0A  %7D%0A%0A  public TableModel createSubQuery(Long parameter)%0A  %7B%0A    final TypedTableModel model = new TypedTableModel(new String%5B%5D%7B%22ID%22, %22NUMBER%22, %22DESCRIPTION%22%7D,%0A        new Class%5B%5D%7BLong.class, String.class, String.class%7D, 0);%0A    if (ZERO.equals(parameter))%0A    %7B%0A      model.addRow(new Object%5B%5D%7Bparameter, new Long(0), %22Look, you got a new dataset.%22%7D);%0A      model.addRow(new Object%5B%5D%7Bparameter, new Long(1), %22So Subreport queries work too..%22%7D);%0A      return model;%0A    %7D%0A    else%0A    %7B%0A      model.addRow(new Object%5B%5D%7Bparameter, new Long(0), %22Ahh, another query-parameter, another table.%22%7D);%0A      model.addRow(new Object%5B%5D%7Bparameter, new Long(1), %22Subreports can use parameters to control what data is returned.%22%7D);%0A      return model;%0A    %7D%0A%0A  %7D%0A%0A%0A%7D%0A

Correct support for Kettle 64-bit Integer data type (http://forums.pentaho.com/showthread.php?79881-Definition-of-Data-Types)