If we use the annotations as internal model then the relevant Jandex data will need to be
converted to annotation literals. Which might require some overhead.
If we use Jandex as the internal model, then we ask the generator to produce Jandex types.
That means we expose the datastore provider to Jandex types - at least AnnotationInstance and AnnotationValue
and this model being generic is not type-safe.
> I'm thinking if we can re-map the other configuration source all to the DSL definition: if the DSL defines standard bean setters for the option, we invoke them?
In some ways the generator is the getter to get an internal model from the programmatic API.
So if we have a source X to generator call, we could do that you are describing.
> Downside of committing to the annotations
If we use the annotations as internal model then the relevant Jandex data will need to be
converted to annotation literals. Which might require some overhead.
If we use Jandex as the internal model, then we ask the generator to produce Jandex types.
That means we expose the datastore provider to Jandex types - at least AnnotationInstance and AnnotationValue
and this model being generic is not type-safe.
> I'm thinking if we can re-map the other configuration source all to the DSL definition: if the DSL defines standard bean setters for the option, we invoke them?
In some ways the generator is the getter to get an internal model from the programmatic API.
So if we have a source X to generator call, we could do that you are describing.
eg
> 1. global options
> 2. XML
> 3. annotations
> 4. programmatic
> 5. runtime: session
> 6. runtime: statement
I more or less agree, though XML probably should have precedence over an XML mapping file unless you're
talking about persistence.xml.
The complex part is when you need to decide the following:
What is the value for unsafe on Sample?