A best of toolkit for DataStoreFactory implementors.
Will also allow me to mess with the interface API without breaking every
last DataStoreFactorySpi out there.
The default implementations often hinge around the use of
getParameterInfo and the correct use of Param by your subclass.
You still have to implement a few methods:
public DataSourceMetadataEnity createMetadata( Map params ) throws IOException {
String host = (String) HOST.lookUp(params);
String user = (String) USER.lookUp(params);
Integer port = (Integer) PORT.lookUp(params);
String database = (String) DATABASE.lookUp(params);
String description = "Connection to "+getDisplayName()+" on "+host+" as "+user ;
return new DataSourceMetadataEnity( host+":"+port, database, description );
}
author: Jody Garnett, Refractions Research |