SimpleModel
  • 03 Nov 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light

SimpleModel

  • Dark
    Light

Article summary

net.comactivity.core.datamodel.SimpleModel

Removed methods

getTableColumnsMap

Parameter operationType had no effect.

getTableColumnsMap returned a Map where the keys were a simple index, ranging from 1. A minor rewrite is needed if the keys where used.

Removed

getTableColumnsMap(int operationType)

Replace With

net.comactivity.core.datamodel.SimpleModel.getDataSet().getAllFields()  

Example

From project ComActivityERP-V1.

Change

Map cols = model.getTableColumnsMap(-1);
ColumnContainer[] cc = (ColumnContainer[]) cols.values().toArray(new ColumnContainer[0]);

[…]

to

ColumnContainer[] cc = model.getDataSet().getAllFields().stream()
  .map(field -> field.getDataType().getColumnContainer())
  .toArray(i -> new ColumnContainer[i]);

[…]

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.