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

  • SEARCH
  • Home
  • 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 8715033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:44:57+00:00 2026-06-13T05:44:57+00:00

I have a hierarchical data structure (using Entity beans)like say a Book Class which

  • 0

I have a hierarchical data structure (using Entity beans)like say a Book Class which has a Book ID and references to a bunch of Chapter classes.And each chapter class has a Chapter number and references to a number of Page classes. In my Display class, I would like to display the book id of a Book object.

But when I call getBook() , the existing code loads up the chapters and pages too, even though I just want to get only the Book ID from the Book object.This is resulting in heavy database querying.

I am looking for a design pattern to solve this problem.Any ideas guys?

  • 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-06-13T05:44:58+00:00Added an answer on June 13, 2026 at 5:44 am

    You should use lazy loading design pattern.

    Here is a good example.
    http://www.precisejava.com/javaperf/j2ee/EJB.htm#EJB133

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

Sidebar

Related Questions

I have a hierarchical data structure which I'm displaying in a webpage as a
In flex 3 I have a hierarchical data structure. I would like to display
I have a hierarchical class structure like this: Category -> Template -> Instance A
I have a hierarchical data structure which, as far as I can see, needs
I have a data structure that looks like this: public class Node { public
I have a hierarchical structure stored in a table. Each element has a pointer
I'm using the Composite pattern to represent a hierarchical data structure: CompositeNodeA Leaf1 Leaf2
I am using jsTree to display a tree structure of hierarchical data within my
I have a hierarchical data structure with two similar sub-trees: Iteration: string Name string
I have a hierarchical generic data structure. There is a root node and under

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.