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 8645537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:34:34+00:00 2026-06-12T12:34:34+00:00

For this specific project I need to serialize my entity layer (made of POJO’s)

  • 0

For this specific project I need to serialize my entity layer (made of POJO’s) to files. As I have the need for updating specific objects I would like to use one file per serialized object.

Example: Customer –ArrayList-> Order –ArrayList-> Product

When I edit a customer, and then serialize it using the java.io.Serializable interface, all fields, and their fields (please correct me if wrong), get serialized.

How would I apply serialization in such a way that only one object per file is used? I already have given each object a uniqe UUID which is used as filename when serializing.

If there are any frameworks that do File based ORM, that would be even better 😉

  • 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-12T12:34:36+00:00Added an answer on June 12, 2026 at 12:34 pm

    I’m not familiar with such framework.
    What you can do is use other frameworks such as apache BeanUtils in order to perform the following recursive algorithm:
    A. For each object gets its properties (assuming the object is a Java bean).
    B. For each primitive field , write all primitives to file (you can use reflection to determine if a field is primitive or not).
    C. For each non primitive file, write a special section in the file, pointing to the file name that will contain the object that is the value of the field.
    D. Call recursively the algorithm for each non primitive field.

    Similar approach can be done for collections –
    HashMap, ArrayList and others.

    The serializing code for the primitive elements can be the code provided by @Anshu

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

Sidebar

Related Questions

I have a specific project where I need to wrap every code line at
i have this specific question to do to you, i have a database from
This question might seem very specific but I am in need of some ideas
In my project I need to generate a cpp file from the specific project
I have a C# project where I include some resources which I need to
Working on a project an need a specific effect on the homepage. When a
I have a multi-module project in maven, where other projects need to use the
For a current project i need to setup a specific view to display a
I am using a NivoSlider in one of my projects, this specific client has
This specific questions stems from the attempt to handle large data sets produced by

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.