Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7006769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:31:13+00:00 2026-05-27T21:31:13+00:00

These are my sample classes on what I what to perform queries. class TObject

  • 0

These are my sample classes on what I what to perform queries.

class TObject 
{
    String id;
    public String getId()
    {
        return id;
    }
    public void setId(String id)
    {
        this.id=id;
    }
}

class TStructure
{
    TObject tObject;
    public TObject getTObject()
    {
        return tObject;
    }
    public void setTObject(TObject tObject)
    {
        this.tObject=tObject;
    }
}
class TStructureRow
{
    TStructure tStructure;
    TObject tObject;

    public TStructure getTStructure()
    {
        return tStructure;
    }
    public void setTStructure(TStructure tStructure)
    {
        this.tStructure=tStructure;
    }


    public TObject getTObject()
    {
        return tObject;
    }
    public void setTObject(TObject tObject)
    {
        this.tObject=tObject;
    }
}

I have created this classes for my sample xml data to query them. I have created Lists(data) for these classes to maitain the data in them. How can i query these lists to retrieve the results in less overhead.
For ex, these are queries:

1) o<-tobject{tstructure}<-tstructure{tstructure_row})

Meaning: for every object o, as tobject in tstructure, return tstructure_row of tstructure…this is the syntactic meaning

2) o<-tobject{tstructure}<-tstructure{tstructure_row}::tobject{tobject | id = "XYZ"}<-tobject{tstructure}<-tstructure{structure_row}

Meaning: for every object o, as tobject in tstructure, as tstructure in tstructurerow,tobject in tstructurerow whose id is “XYZ”,for such tobject, as tobject in tstructure, as tstructure in tstructure row, return tstructurerow….this is the syntactic meaning

I have written bunch of nested for statements but I believe they are killing my processor if the data huge. I have to quickly find the dat from these lists on even complex queries like searching for tObjects of more than one relevant type in the child tobjects of their respective structures.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:31:13+00:00Added an answer on May 27, 2026 at 9:31 pm

    If you only wish to query based on TObject id, use HashMap HashMap<String,List<TStructureRow>.Store List against the id of TObject.You can retrieve list of all TStructureRow corresponding to a particular TObject id in (theoretically)constant average time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is a sample code: class Base { public: virtual void common(); }; class
well i have this messages table with sample values like these: msg_id recipient_id read
Say you have a string 3.4564. A sample set in the database has these
In some sample codes there are methods and classes declared WITHIN other methods and/or
there'are these lines in the sample Win32 app created default by VS. Can you
excuse me for my ugly english) ! Imagine these very simple models : class
I have a DependencyObject class composition that looks like the following: public class A
Given this HTML: <button id=buttonId1 class=hello universe> <button id=buttonId2 class=hello world> What's the correct
is there a way to limit the access to the members of these classes
I'm using this MSDN sample in my project and by default on startup the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.