Java Action for Different Entities with Similar Name Attributes

I have a bunch of entities that have similar name attributes. The attributes share the same name and serve the same purpose. Can I write a Java Action that takes any of those entities and work on the attributes, and modify the aforementioned attributes? If so, how would I structure my java action to take an arbitrary entity?
1 answers

Could you make a single entity that your Java action accepts, and have your other entities generalise from this? It would probably make it easier to work with those entities elsewhere in the Mendix app.