This interface is only used for documentation of what is meant by the term POJO:
A
POJO is a shortcut for
Plain Old Java Object and simply means any Java object containing or
providing data. While the java beans specification is generally a good idea to follow, it is sometimes too
restrictive. E.g. you might want to name a boolean getter with the prefix "has" or want to have a primitive type as
setter argument while the getter has the according object type. A POJO is NOT limited by such restrictions. However
the following conventions should be considered:
- You should NOT have two setter-methods with the same name in the same class. If you have
setFoo(Foo foo)
do NOT add setFoo(String foo)
. Simply add setFooAsString(String fooAsString)
instead.
- A
Pojo
should have a public non-argument constructor. Otherwise consider
Datatype
or use PojoFactory
to provide custom-logic to the implementation in
order to create instances of your Pojo
with the utilities offered here.