This is pretty cool stuff: http://www.springsource.org/roo/why
This:
@RooEntity public class Hello {
private String world;
}becomes this at compile time via mixins:
public class Hello {
private String world {..}
public String getWorld() {..}
public void setWorld(String world) {..}
public Long getId() {..}
public void setId(Long id) {..}
public Integer getVersion() {..}
public void setVersion(Integer version) {..}
public String toString() {..}
public void persist() {..}
public void remove() {..}
public void flush() {..}
public static Long countHellos() {..}
public static Hello findHello(Long id) {..}
public static List findAllHellos() {..}
public static List findHelloEntries(int start, int finish) {..}
// there are even more methods
}Now admittedly, we may not want a bloated
API - some of these magic methods we may not need or use - but this is a pretty damn cool idea.
Is mixin support something new in JDK 1.6 or is that available in 1.5 as well?
Have a look at Seam Forge.