@Bean(typeName="dataset", properties="metadata,data") public class DataSet extends Object
When serialized to XML, creates the following construct (example pulled from
Only 2-dimensional POJOs (arrays or collections of maps or beans) can be serialized to Cognos.
Column[] items = {
Modifier and Type | Class and Description |
---|---|
static class |
DataSet.Row
Represents a row of data.
|
Constructor and Description |
---|
DataSet()
Bean constructor.
|
DataSet(Column[] columns,
Object o,
BeanSession session)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
List<DataSet.Row> |
getData()
Bean property getter:
|
Column[] |
getMetaData()
Bean property getter:
|
DataSet |
setData(List<DataSet.Row> data)
Bean property setter:
|
DataSet |
setMetaData(Column[] metaData)
Bean property setter:
|
public DataSet()
public DataSet(Column[] columns, Object o, BeanSession session) throws Exception
columns
- The meta-data that represents the columns in the dataset.o
- The POJO being serialized to Cognos.
Must be an array/collection of beans/maps.session
- The bean session used to convert POJOs to strings.Exception
- An error occurred trying to serialize the POJO.@BeanProperty(value="metadata") public Column[] getMetaData()
@BeanProperty(value="metadata") public DataSet setMetaData(Column[] metaData)
metaData
- The new value for the @BeanProperty(value="data") public List<DataSet.Row> getData()
@BeanProperty(value="data") public DataSet setData(List<DataSet.Row> data)
data
- The new value for the Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.