站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

Contents | Prev | Next JDBCTM Guide: Getting Started


Appendix A: Rejected Design Choices

A.1    Design Alternative: Create new subtypes of the existing java.sql types.

We have chosen to add new methods to existing JDBC interfaces and classes in order to add new functionality to the JDBC API.

An alternative design, which we considered, was instead to extend the existing java.sql types with new subtypes that contained any new methods. This approach was judged to be too unwieldy. For example, since we needed to add methods to the java.sql.Statement interface, such as Statement.setFetchSize(), it would have been necessary to create three new statement interfaces related to the old interfaces in a fairly complex inheritance hierarchy (see below). This approach seemed to add too much complexity to the JDBC API.






Contents | Prev | Next
jdbc@eng.sun.com or jdbc-business@eng.sun.com
Copyright © 1996, 1997 Sun Microsystems, Inc. All rights reserved.