Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: Which databases are the most used with Java Date: Sun, 13 Aug 2017 23:24:30 +0200 Organization: Decebal Computing Lines: 45 Message-ID: <87wp67qhyp.fsf@munus.decebal.nl> References: <87y3qovwjb.fsf@munus.decebal.nl> <87tw1bx2c9.fsf@munus.decebal.nl> <878tins1li.fsf@munus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="1615173a1409002a85fbdd25ac4b9ead"; logging-data="21323"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ATJZsMBJzvmRJyzwmATWH+lJY8IbWX5U=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Homepage: http://www.decebal.nl/ Cancel-Lock: sha1:IVJCdos2mALwaRnlUUsoJnPX3uY= sha1:kUQmJTS2F3ecDPAbQ9+P2NEri4M= Xref: csiph.com comp.lang.java.programmer:37205 Cecil Westerhof writes: > Robert Klemme writes: > >> Another aspect of the original question that puzzled me right from the >> start: why does it matter at all what JDBC driver is really used. Since >> all the types are interfaces anyway _any_ JDBC driver should work with >> the wrapper library (except vendor specific things which require >> specific types anyway). > > The only things that differs (as long as you only use generic > functionality) is the URLPrefix. That is why I think it is not much > work to generate the other concrete classes when the abstract and > first concrete class are finished. I think that everything that is needed to generate a new concrete class is: package nl.decebal.sql; import java.sql.SQLException; public class SQLFoo extends AbstractSQL { // ################ main public static void main(final String[] args) throws SQLException { AbstractSQL.mainWork(SQLFoo.class.getCanonicalName(), args); } // ################ constructors public SQLFoo(String database) throws SQLException { super(database); } // ################ default @Override String getURLPrefix() { return "jdbc:foo:"; } } -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof