Trams API java examples

29 views
Skip to first unread message

Dan Palley

unread,
Nov 4, 2019, 1:56:06 PM11/4/19
to tramsa...@googlegroups.com
We are resuming some work on our Java client API sample code.

The C# sample code uses datasets to represent data from the API.  Datasets in C# are in-memory tables.

Java appears to have a dataset class, but it's somewhat limited.  I suspect that Java developers typically create a native class to represent the object they want to work with instead of using datasets.  Can any Java developers chime in?

For example, we'll have  Invoice, Profile, ResCard and Activity classes which represents the values in their respective tables. 

To load an existing invoice, you'd create a session and then create an instance of the Invoice class, and load the data.

 Invoice invoice = new Invoice();
 invoice.load(Session, 2);
 System.out.println(String.format("Invoice LoadSuccessful, InvoiceNo = %s", invoice.invoiceList.get(0).invoiceNo));

Dan
Reply all
Reply to author
Forward
0 new messages