Interface classes often extend existing
XQJ interface classes
and do not break the
XQJ Specification, for instance XQConnection2
simply extends
XQConnection
, so the user of an XQJ implementation can only make
use of
XQJ2 features by explicitly
casting a standard XQJ object into an XQJ2 instance which has everything the
previous instance had and more, for instance:
XQConnection xqc = xqds.getConnection(); XQConnection2 xqc2 = (XQConnection2)conn; // or quicker approach ... XQConnection2 conn = (XQConnection2)xqds.getConnection();
Despite the XQJ2 API being experimental, effort has been made to keep different versions of XQJ2 compatible between releases.