instantiateDataObject
Instantiates a data class based on its metadata.
A missing value and a SQL NULL are two different things here, and resolveValue distinguishes them by returning MissingToken for the first and null for the second:
Absent — a declared default covers it. Without a default, a nullable property is set to
nulland a non-nullable one raisesREQUIRED_ATTRIBUTE_MISSING.Present and
NULL— a value, so a default never replaces it. It reaches a nullable property asnulland raisesREQUIRED_ATTRIBUTE_MISSINGfor a non-nullable one, default or not.
Return
The instantiated object.
Parameters
The data class to instantiate; named in the exception message only.
Pre-computed constructor metadata, from ReflectionCache.getOrCreateDataObjectMetadata.
Supplies the value for one constructor parameter, or MissingToken when the source holds nothing under that name.
Throws
REQUIRED_ATTRIBUTE_MISSING if a non-nullable property has no value to take.