do composite key classes have to follow the JavaBean specification, that is, do they have to have getters and setters?
OCJP JavaSE 6 (86%)
posted 5 years ago
By composite key class I assume you mean the JPA IdClass?
The IdClass in JPA must match your Entity Id fields. So if you use field access (annotated the fields) then your IdClass only needs the fields, does not need to methods (although your app may still want the methods). If you use property access (annotate the methods), then your IdClass must have those same methods.