Work with Entity Apache Tomcat

Is there an example of working with an entity for an apache?
I need to create an entity, change fields in it and delete it.
What can I use for this? I also need to receive signals that the entity has changed and run processes on them.