Well, if you browse the API documentation there's an object called DialectFactory in the org.hibernate.dialect package, that can be used to build Dialect objects, so logically it should have some knowledge of what dialects are available for creation. You can't retrieve this information via its public API though. However, if you view the source code of DialectFactory it contains a private Map (HashMap) that maps database engines to their respective Dialect classes - accompanied by a nice little TODO that suggest this information may be moved to a public properties file in the future. I think for now your best bet would be to retrieve this Map via reflection, as it seems to contain exectly the information you are after.
Edit: Having taken a closer look, this Map doesn't contain all the available Dialects afterall. Well, so much for that idea :)
|