It would be nice to have a class which provides constants for QueryHints like hibernate does:
This makes development easier, because:
1. brings in type safety when using the constants instead of string literals, thus during datanucleus upgrades immediately detecting changed/removed hints through compiler errors.
2. it is an easy to find reference for available query hints, thus not having to memorize the strings and not needing to look them up in the documentation on the datanucleus website.
Also it might be a good design decision in datanucleus to use string constants for property names instead of string literals all over the code, thus making datanucleus more maintainable and transparent to developers. Having constants for this also eases the navigation during development, because reference searches are possible to look for places where the properties are actually put or read. The current state is kind of an anti-pattern like "magic numbers", though not being as bad with the string literals, but nevertheless a redundancy in code that could be removed. But anyway, this is just a hint for a refactoring. I would be satisfied if there is a QueryHints class with constants. ;)
See attached file for a proposed solution. org.datanucleus.store.query.Query.getSupportedExtensions() would then look like this:
public Set<String> getSupportedExtensions()
I did not include the hint from the jpa spec "javax.persistence.query.timeout", because I dunno if datanucleus actually supports it.