You might wanna have a look at this question,
It may clear your confusion,
Hope It helps!!
Mendix will always create a Java proxy class to allow you to easily access attributes in a Mendix Object.
If you have a module called MyModule, with an entity called MyEntity, and a String attribute called MyAttribute, then in your javasource folder you’ll have a mymodule/proxies/MyEntity.java proxy file. These will have getters and setters for all attributes inside.
To get the value of MyAttribute from an instance of MyEntity, you can use something like
String myAttribute = myEntity.getMyAttribute();
I hope this helps.