Skip to content
mguymon edited this page Apr 2, 2011 · 20 revisions

<pre> public class Car { private String make; private String manufacturer; private Integer mileage; private Map status; private Wheel wheel;

public Car() { } public String getMake() { return make; } public void setMake(String make) { this.make = make; } public String getManufacturer() { return manufacturer; } public void setManufacturer(String manufacturer) { this.manufacturer = manufacturer; } public Integer getMileage() { return mileage; } public void setMileage(Integer mileage) { this.milage = mileage; } public Map getStatus() { return status; } public void setStatus(Map status) { this.status = status; } public Wheel getWheel() { return wheel; } public void setWheel(Wheel wheel) { this.wheel = wheel; }

}


public class CarBlueprint implements Blueprint {
    
    @Default
    public String make = "car make";
        
    @Default
    public String manufacturer = "car manufacturer";
        
    @Default
    public Integer mileage = 100;
        
    @Default
    public Map status = new HashMap();
        
    @Mapped
    public Wheel wheel;
        
    public Class getTarget() {
        return Car.class;
    }

    public BlueprintTemplate getTemplate() {
        return new JavaBeanTemplate();
    }
        
}
Clone this wiki locally