|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Pojo
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:
setFoo(Foo foo) do NOT add
setFoo(String foo). Simply add
setFooAsString(String fooAsString) instead.Pojo should have a public non-argument constructor. However
this is NOT always suitable especially for data-types that should be
immutable and therefore require constructor parameters rather than
setter-methods. Otherwise you might need to provide custom-logic to the
implementation of PojoFactory in order to create instances of that
Pojo with the utilities offered here.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||