Package it.eng.spagobi.tools.dataset.common.datastore

Examples of it.eng.spagobi.tools.dataset.common.datastore.Record.appendField()


            Object columnValue = rs.getObject(columnIndex);
            IField field = new Field( columnValue );
          if(columnValue != null) {
            dataStoreMeta.getFieldMeta(columnIndex-1).setType( columnValue.getClass() );
          }
          record.appendField( field );
          }
          dataStore.appendRecord(record);
          recCount++;
          logger.debug("[" + recCount + "] - Records [" + rs.getRow()  + "] succesfully readed");
        }
View Full Code Here


            value = new Boolean(columnValue);
          } else {
            throw new RuntimeException("Impossible to resolve field type [" + fieldType + "]");
          }
          IField field = new Field(value);
          record.appendField(field);
        }
          dataStore.appendRecord(record);
      }
      
      
View Full Code Here

            fieldMeta.setType(String.class);
            dataStoreMeta.addFiedMeta(fieldMeta);
          } else {
            if (token != null) {
              IField field = new Field(token);
              record.appendField(field);
            }
          }
        }
       
        if (lineReader.getLineNumber() != 1){
View Full Code Here

            fieldMeta.setType( columnType );
            dataStoreMeta.addFiedMeta(fieldMeta);
          }
           
            IField field = new Field(columnValue);
          record.appendField(field);
          }
         
          dataStore.appendRecord(record);
      }
      
View Full Code Here

              logger.debug("Column [" + fieldMetaData.getName() + "] of type [" + (value!=null? value.getClass(): "undef") + "] is equal to [" + value + "]");         
              IField field = new Field( value );
              if(value != null) {
                dataStoreMeta.getFieldMeta(i).setType( value.getClass() );
              }
              record.appendField( field );
            } catch(Throwable t ) {
              throw new RuntimeException("Impossible to read column [" + fieldMetaData.getName()+ "] value", t);
            }
          }
          dataStore.appendRecord(record);
View Full Code Here

        for(int i = 0,  j = 0; i < dataStoreMeta.getFieldCount(); i++) {
        IFieldMetaData fieldMeta = dataStoreMeta.getFieldMeta(i);
        Boolean calculated = (Boolean)fieldMeta.getProperty("calculated");
        if(calculated.booleanValue() == false) {
          Assert.assertTrue(j < row.length, "Impossible to read field [" + fieldMeta.getName() + "] from resultset");
          record.appendField( new Field( row[j] ) );
          if(row[j] != null) fieldMeta.setType(row[j].getClass());
          j++;         
        } else {
          DataSetVariable variable = (DataSetVariable)fieldMeta.getProperty("variable");
          if(variable.getResetType() == DataSetVariable.RESET_TYPE_RECORD) {
View Full Code Here

          DataSetVariable variable = (DataSetVariable)fieldMeta.getProperty("variable");
          if(variable.getResetType() == DataSetVariable.RESET_TYPE_RECORD) {
            variable.reset();
          }
         
          record.appendField( new Field( variable.getValue()) );
          if(variable.getValue() != nullfieldMeta.setType(variable.getValue().getClass());
        }
      }
       
        processCalculatedFields(record, dataStore);
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.