How can I access another field in a Getter routine. What I want to do is to look at other fields (in the same bean) so I can calculate the value of the getLiabilityType routine.
I've tried lots of different syntaxes and I either get a NULL for the answer or a JBOSS error.
Here is what seems strange and I don't understand how they interrelate. There are two pieces of code named lineOfServiceBean.java - one is on the back end (voxware) and one is on the front end (voxportal). The back end lineOfServiceBean.java displays all the right values in the export routine. I don't have a good handle on what the export routine does.
In the front end (code in previous post of this thread), the fields I need are null.
posted 5 years ago
It is difficult to tell what has been called as this system is very large and I inherited the code (ie-I didn't write it). I don't understand how the back end and front end systems are talking to each other. My System.out's in the backend show all the data that I'm expecting. My System.out's in the frontend do NOT show all the data which makes me think that it has to do with how the back end and front end transfer data between themselves.
Although I am not seeing the data for the change I am trying to make, the back end is clearly sending data to the front end as the front end is displaying the data on the browser.
Your class VoxLineOfService is a JPA entity. Instances of this class can be stored to and retrieved from a database using JPA (the Java Persistence API). The source code you posted of class VoxLineOfService is incomplete and will not compile, because some of the methods are using member variables that are not declared anywhere in the class. The methods unlinkLineOfService, reasignLineOfService and export are using member variables: endUser, billPayer, custodian and owner that are not declared in the class. You'll get compiler errors when you would try to compile this.
Your class LineOfServiceBean is just a regular Java class (a POJO = Plain Old Java Object), that seems to have the same fields as VoxLineOfService.
Probably somewhere in your system, objects of type VoxLineOfService are converted into objects of type LineOfServiceBean. Maybe, somewhere in that code, the original programmer forgot to set some fields, such as the enduser field in LineOfServiceBean.
It's really hard to debug a system with so much code through the forum.
I would use an IDE to automatically find all the places where a LineOfServiceBean is created, and investigate there how those objects are being initialized and where they go.