SOAP: Generating sys_table and sys_table_field from object model
sys_table
and sys_table_field
are at the very core of the legacy GG and its SOAP web services.
In this ticket we implement a new @Component
that generates SysTable
and SysTableField
from our Java object: Accession
java object is described using SysTable
and all properties of Accession
class as List<SysTableField> fields
.
The new JUnit tests in SysTableTests
will assure that the component generates entries compatible with legacy GG (check your ggce database for contents of sys_table
and sys_table_field
for accession
table):
@Test
public testAccession() {
sysTable = x.getSysTable(Accession.class);
assertThat(sysTable, not(nullvalue());
assertThat(sysTable.get...)
sysTableFields = x.getSysTableFields(Accession.class);
assertThat...
sysField = x.getSysTableField(Accession.class, "accession_id");
...
}
We want the SysTable
and their SysTableFields
to be generated only once (per JVM startup). They will be kept in either HZ map or in a JVM-bound HashMap<>
.
New components go in org.gringlobal.compatibility
.