• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Clarification on findByCriteria interface documentation (B&S )

Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I was wondering if I could get some clarification about what this exactly means. I get that the method is supposed to return an array of which record numbers contain the information the user searched by. However:

Field n in the database file is described by criteria[n]

does this mean that the "column" the search is supposed to go through is the last element in the array?

Such that:

A null value in criteria[n] matches any field value.

means that there's no specific "column" to search through and everything should be searched.


A non-null value in criteria[n] matches any field value that begins with criteria[n]

means that if criteria[n] == Name and a String in the criteria array happens to be "Fred" then any Strings in the Name "column" that contain "Fred" are valid records to return.

I have already finished my findByCriteria method and it works up to what I think the this documentation says but I just wanted to know if my train of thought for it was correct.


Posts: 3648
Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may want to check this thread about searching for URLyBird, but the idea is the same.
Curse your sudden but inevitable betrayal! And this tiny ad too!
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic