Yes, it's possible to add columns which are only available in-memory. It's also possible disable write-back feature for single columns..
You have different options:
Add the column to the databook, e.g.
- Code: Select all
//before book.open();
book.getRowDefinition().addColumnDefinition(new ColumnDefinition("MYCOL",
new ObjectDataType()));
Use the right datatype, e.g. StringDataType, BigDecimalDataType, ...
Fill the values with a custom row calculator:
- Code: Select all
book.setRowCalculator(IRowCalculator)
The other option is that you define a column on server-side. The advantage is that such column will be sent automatically back to the server/storage. This doesn't mean that the column will be used for database operations.
The server-code:
- Code: Select all
storage.getMetaData().addColumnMetaData(new ColumnMetaData("MYCOL",
BigDecimalDataType.TYPE_IDENTIFIER));
storage.eventCalculateRow().addListener(...);