POJO (Plain Old Java Object): The simpler...the better.
Posted: | Categories: Java, Programming | Tags: POJO
A POJO is simply an object built using a Java class that does not implement any special interfaces such as those defined by the EJB 2 framework. An example of a POJO is a class composed by only:
- Properties, representing the object’s state.
- Getter and setter methods for the properties.
- Business methods, representing behaviour.
Some properties can represent associations with other POJOs. Here is an example of implementation of the
Person
entity using a POJO: