this.builder = builder;
//
// Created date.
this.init(
ReadOnlyProperty.wrap(
new DateProperty(
this,
FruitNode.CREATED_PROPERTY_URI
){
@Override
protected Date getDate()
{
return object().created();
}
@Override
protected void setDate(Date value)
{
//
// This should be trapped by theReadOnlyProperty wrapper, so if it gets this far it is an error.
log.error("Attempt to set a readonly property [" + this + "] to [" + value + "]");
throw new IllegalArgumentException(
"Attempt to set a readonly property [" + this + "] to [" + value + "]"
);
}
}
)
);
//
// Modified date.
this.init(
new DateProperty(
this,
FruitNode.MODIFIED_PROPERTY_URI
){
@Override
protected Date getDate()