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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:25:42+00:00 2026-06-10T07:25:42+00:00

I followed https://developers.google.com/web-toolkit/articles/mvp-architecture . In their model, they use one class ‘Contact’ and a

  • 0

I followed https://developers.google.com/web-toolkit/articles/mvp-architecture .
In their model, they use one class ‘Contact’ and a light version of that class called ‘ContactDetails’.
Since I don’t really need a light version, I removed ContactDetails and replaced it by Contact.

Now I run into exceptions like

Type 'org.eclipse.persistence.indirection.IndirectList' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.: instance = {IndirectList: not instantiated}

The reason is, as I found out here (http://stackoverflow.com/a/6778986/1141785), that the Contact class is a class which uses Persistence API techniques, which should not be sent to the wire.

So is the ContactDetails class my DTO class which should be sent through the wire?
Is there no way to avoid using this extra class?

The reason I want to avoid using the ‘light’ version is, that I want to edit the Contact class in a DataGrid using the FieldUpdater.

Do I have any advantages in my case when I use the DTO class?

How can I avoid that I have so many duplicated code in the Contact and ContactDetails classes, when they should by nearly the name?

  • 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-10T07:25:43+00:00Added an answer on June 10, 2026 at 7:25 am

    When using JPA, you can have a class containing a List such as:

    public class Contact implements IsSerializable {
        // ...
        private List<Address> addresses;
        // ...
    }
    

    But when Contact is created, addresses is set to an instance of IndirectList. This allows lazy loading of the collection from the database, but won’t work on the client. You would need to replace it with something like an ArrayList before sending it to the client. You can set it to an empty list, or copy the contents to a new list.

    If the elements of the list contain collections themselves, then you need to replace these collections as well. You’d need to be careful about circular references and pulling too many items from the database.

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

Sidebar

Related Questions

I have followed these instructions: https://developers.google.com/console/help/#generatingdevkeys/ . I registered the freebase service and added
I followed the tutorial on https://dev.twitter.com/docs/auth/implementing-sign-twitter to use OAuth on my homepage. Everything worked
I'm trying to use phantom.js custom buildpack on Heroku ( https://github.com/stomita/heroku-buildpack-phantomjs ) I followed
I followed steps here: https://developers.facebook.com/docs/guides/mobile/#android but I really don't get how use Graph API
I followed the login instructions for my native iOS app here https://developers.facebook.com/docs/mobile/ios/build/ I have
I followed the tutorial here: https://developers.facebook.com/docs/mobile/android/build/#enablesso I am able to authenticate on the android
I followed https://docs.djangoproject.com/en/dev/ref/contrib/flatpages/ and I created a flatpage using my own template in http://localhost:8000/about-me/
I followed this tutorial: https://github.com/EllisLab/CodeIgniter/wiki/PDF-generation-using-dompdf However, I can't seem to set the path right.
I downloaded the codeigniter extension of HybridAuth here: https://github.com/andacata/HybridIgniter I followed instructions on its
In my Android app, I want to use my existing sqlite database.I followed http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/

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.