Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Question about API listed "Field Summary" items

Reply
Thread Tools

Question about API listed "Field Summary" items

 
 
icmrn@netscape.net
Guest
Posts: n/a
 
      09-23-2005
When you look in the API at a class or interface, before the methods
comes a section called "Field Summary". I dont understand what these
are for.

In the interface ResultSet, there is one called TYPE_FORWARD_ONLY.
Does this mean that any ResultSet object has a field called
TYPE_FORWARD_ONLY ? Can I set it ? The field is static and returns an
int. An int ? wouldnt it seem more reasonable boolean ?

If you can give me a hint about this, I'd be grateful, but even better
would be if you can point me to something that explains what these
"Field Summary" items are about and how to use them.

 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      09-23-2005
On 23 Sep 2005 07:48:15 -0700, wrote or quoted :

>When you look in the API at a class or interface, before the methods
>comes a section called "Field Summary". I dont understand what these
>are for.


these are just he members of the class -- variables and constants.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      09-23-2005
On 23 Sep 2005 07:48:15 -0700, wrote or quoted :

>In the interface ResultSet, there is one called TYPE_FORWARD_ONLY.
>Does this mean that any ResultSet object has a field called
>TYPE_FORWARD_ONLY ? Can I set it ? The field is static and returns an
>int. An int ? wouldnt it seem more reasonable boolean ?


Don't be afraid to peek at Sun's code with an IDE. It lives in src.zip

/**
* The constant indicating the type for a <code>ResultSet</code>
object
* whose cursor may move only forward.
* @since 1.2
*/
int TYPE_FORWARD_ONLY = 1003;

....
* @return <code>ResultSet.TYPE_FORWARD_ONLY</code>,
* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>,
* or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
* @exception SQLException if a database access error occurs
* @since 1.2
*/
int getType() throws SQLException;



These are CONSTANTS representing an enum in the days before enums.

You will typically see these constants being used as parameters or
returned from methods, or rarely that you can use to set some variable
directly or make sense of some other variable''s coding int value..
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      09-23-2005
On Fri, 23 Sep 2005 17:15:26 GMT, Roedy Green
<look-> wrote or quoted :

> /**
> * The constant indicating the type for a <code>ResultSet</code>
>object
> * whose cursor may move only forward.
> * @since 1.2
> */
> int TYPE_FORWARD_ONLY = 1003;


this is inside an interface so you have an implied static final.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I AM BUYING ANY OF THE FOLLOWING CISCO ITEMS & LOTS MORE NOT LISTED Network/Software Buyer Cisco 0 12-24-2010 11:33 AM
Sendto Shortcut not displaying in LISTED items Corey Windows 64bit 1 01-09-2009 03:38 PM
Stubborn Address Bar drop down list...how do I rid the listed items. MC Computer Support 7 06-01-2004 09:05 AM
distutils question-> Why data_files listed in setup.py being ignored?! How fix? Christian Seberino Python 5 10-09-2003 10:18 PM
grouping items among a list according to items subtag value Gilles Kuhn XML 0 09-15-2003 12:01 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57