protected void set_GDate(GDateSpecification v)
{
int code = schemaType().getPrimitiveType().getBuiltinTypeCode();
GDate candidate;
if (v.isImmutable() && (v instanceof GDate) && v.getBuiltinTypeCode() == code)
candidate = (GDate)v;
else
{
// truncate extra fields from the date if necessary.
if (v.getBuiltinTypeCode() != code)
{
GDateBuilder gDateBuilder = new GDateBuilder(v);
gDateBuilder.setBuiltinTypeCode(code);
v = gDateBuilder;
}
candidate = new GDate(v);
}
if (_validateOnSet())
validateValue(candidate, _schemaType, _voorVc);