Search function in databinding

Discussion in 'Java' started by C. Kindle, Oct 22, 2003.

  1. C. Kindle

    C. Kindle Guest

    Hello

    Marshalling and unmarshalling data of an xml file to java objects works fine
    with databinding-frameworks like castor.

    But is it possible to query the java objects, or instances, easily, e.g. get
    me all adress(instances) where the name is 'bill'?

    Going through the instances from top down is not quite fast...

    I'm not sure if I have to use additionally a database or is it possible with
    only a xml file and databinding to java objects.

    Thanks
    Christoph
     
    C. Kindle, Oct 22, 2003
    #1
    1. Advertising

  2. C. Kindle wrote:

    > Marshalling and unmarshalling data of an xml file to java objects works fine
    > with databinding-frameworks like castor.
    >
    > But is it possible to query the java objects, or instances, easily, e.g. get
    > me all adress(instances) where the name is 'bill'?
    >
    > Going through the instances from top down is not quite fast...


    But that's the only method. If you want fast queries, represeting the data
    as XML is the *wrong* choice. That's not what it is intended for.
     
    Michael Borgwardt, Oct 22, 2003
    #2
    1. Advertising

  3. C. Kindle

    C. Kindle Guest

    Thanks for your reply. Because I don't use the xml file for a big amount of
    data I thought that probably there's some sort of query function for the
    java-classes, so that a database is not necessary.

    Christoph

    "Michael Borgwardt" <> schrieb im Newsbeitrag
    news:bn68ni$tb7va$-berlin.de...
    > C. Kindle wrote:
    >
    > > Marshalling and unmarshalling data of an xml file to java objects works

    fine
    > > with databinding-frameworks like castor.
    > >
    > > But is it possible to query the java objects, or instances, easily, e.g.

    get
    > > me all adress(instances) where the name is 'bill'?
    > >
    > > Going through the instances from top down is not quite fast...

    >
    > But that's the only method. If you want fast queries, represeting the data
    > as XML is the *wrong* choice. That's not what it is intended for.
    >
     
    C. Kindle, Oct 24, 2003
    #3
  4. C. Kindle wrote:
    > Thanks for your reply. Because I don't use the xml file for a big amount of
    > data I thought that probably there's some sort of query function for the
    > java-classes, so that a database is not necessary.


    If the amount if data is small, you probably have no reason to hesitate doing
    a sequential scan. Or if performance is really a problem, put the data into
    a HashMap keyed on the field you want to search for.
     
    Michael Borgwardt, Oct 24, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nathan Sokalski
    Replies:
    2
    Views:
    663
    Hemang Shah
    Jun 13, 2005
  2. Jl_G_0

    DataGrid - Databinding a function

    Jl_G_0, Apr 26, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    379
    Eliyahu Goldin
    Apr 29, 2007
  3. jobs
    Replies:
    0
    Views:
    1,775
  4. Earl Teigrob
    Replies:
    1
    Views:
    446
    Shravan
    Mar 1, 2004
  5. Abby Lee
    Replies:
    5
    Views:
    481
    Abby Lee
    Aug 2, 2004
Loading...

Share This Page