aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes URLyBird 1.3.2 : find method ambiguos Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "URLyBird 1.3.2 : find method ambiguos" Watch "URLyBird 1.3.2 : find method ambiguos" New topic
Author

URLyBird 1.3.2 : find method ambiguos

Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
Hi all, I have a bit problem with find method in URLyBird. the interface written like this :



but in the User Interface criteria is written like this:




See the differents? in the interface, the word "Fred" matches with the word "Freddy", but in the User Interface section wants me to search where the name and/or location fields EXACTLY match values. It means "Fred" match "Fred" but not match "Freddy"

what should I do? Do I have create an private adapter method ? Or do I have to choose only one? Or what? Thanks for the answer.


Jeffry Kristianto Yanuar
SCJP 5.0
SCJA
SCJD (Working on UrlyBird 1.3.2)
rohan tiwari
Ranch Hand

Joined: Sep 13, 2007
Posts: 82
well..
i implemented following searches...
1.by name only
2.by location only...
3.by name and location(match both)
4.by name or location(match either of them)

i interpreted 'exactly' as a case-sensitive search....
meaning Fred would match Fred,Freddy but not fred or fRed....

you explain this in choices.txt...
hope i have been helpful


SCJP 5, SCWCD 1.4, SCJD 5
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11460
    
  94

Hi Jeffry,

I see no problem with those specifications, as they are for 2 completely separate parts of the deliverable.
  • Data access deliverable


  • Completely data agnostic. Designed to be as flexible as possible for potential reuse.

    You happen to be planning on using your Data class with data that matches Hotel reservations. But as long as the schema matches, there is no reason why the same Data class could not be used for Client data, or Contractor information, etc.

    For this reason, it makes sense for the methods in the Data class to be as flexible as possible. The read method returns an array of Strings, not an URLyBird data access object. The update method will allow you to update any field, not just the customer number field. And the find method searches in any field for the widest possible matches, which allows desired restrictions to be implemented where they make sense: in the business methods.

  • End user application


  • Once you are working within the client GUI, it makes sense to deal in terms of known data. So at this point you know that you are dealing with Hotel reservation data, not Clients, Contractors, or any other type of data.

    So your client GUI is going to be very specific in what it allows. You do not allow updates on any field - only on the field that stores the customer number. You do not allow creates or deletes of records. And the find method used by the client GUI (which is not the find method on the server (although it uses it)) restricts to an exact match.
    Did that make sense?

    Personally I suspect the reason this keeps coming up is because the entire specification has been delivered in a single document for a single developer to work on. In an ideal business environment this is less likely to happen: you might only be given the Data class to work on, while another person is working on the server, and yet another person is working on the GUI. Or you might still work on all the parts, but they would be handed to you piece by piece - so this month you develop the Data class, next month you are given the specifications for the server, the following month the specifications for the GUI.

    Hmmm. Perhaps this should go in the JavaRanch SCJD FAQ

    Regards, Andrew


    The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
    Jeffry Kristianto Yanuar
    Ranch Hand

    Joined: Oct 01, 2007
    Posts: 759
    Thanks Andrew, I think I'll use similar solution with Rohan's solution.


    well..
    i implemented following searches...
    1.by name only
    2.by location only...
    3.by name and location(match both)
    4.by name or location(match either of them)

    i interpreted 'exactly' as a case-sensitive search....
    meaning Fred would match Fred,Freddy but not fred or fRed....


    But there is another problem, assuming I already implemented find method, that method only return an array of int, but the user expects to see the list of matching records.

    I think the result of find method which is an array of int will be used by the server to return a List of Hotel object based on the each record number from that array of int. right?

    Jeffry Kristianto Yanuar
    SCJP 5.0
    SCJA
    SCJD (Working on UrlyBird 1.3.2)
    Ge Zhang
    Greenhorn

    Joined: Jul 09, 2002
    Posts: 4
    I just downloaded my assignment today, but it's URLyBird 1.3.1. What's the difference between 1.3.1 and 1.3.2?

    Thanks.
    Jeffry Kristianto Yanuar
    Ranch Hand

    Joined: Oct 01, 2007
    Posts: 759
    maybe the interface and the requirements is a bit different
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: URLyBird 1.3.2 : find method ambiguos