- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {SimpleDateFormat s =
String pattern;new SimpleDateFormat(pattern)
String template;Locale locale;new SimpleDateFormat(template, locale)
new SimpleDateFormat()
- Smart code suggestions by Codota
}
/** * Create a database connection * * @param driver * String name of the driver to use * @param url * String name of the url used to create the connection. * * @return IDatabaseConnection for the given parameters */ @GET @Path( "/createDatabaseConnection" ) @Produces( { APPLICATION_JSON } ) @Facet( name = "Unsupported" ) public IDatabaseConnection createDatabaseConnection( @QueryParam( "driver" ) String driver, @QueryParam( "url" ) String url ) { for ( IDatabaseDialect dialect : dialectService.getDatabaseDialects() ) { if ( dialect.getNativeDriver() != null && dialect.getNativeDriver().equals( driver ) ) { if ( dialect.getNativeJdbcPre() != null && url.startsWith( dialect.getNativeJdbcPre() ) ) { return dialect.createNativeConnection( url ); } } } // if no native driver was found, create a custom dialect object. IDatabaseConnection conn = genericDialect.createNativeConnection( url ); conn.getAttributes().put( GenericDatabaseDialect.ATTRIBUTE_CUSTOM_DRIVER_CLASS, driver ); return conn; }