• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Serialization

 
Rolf Johansson
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:
I have a question about the requirement:


The program must be able to work in a non-networked mode. In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking, and must not involve the serialization of any objects when communicating between the GUI and database elements.

In my Data class, I have methods that need to return a collection of objects. These methods return an ArrayList. For example, I have a method with this signature:
public ArrayList find(Contractor)
This will return an ArrayList of Integers, representing the record numbers matching the Contractor passed in.
If this method is used in the non-networked mode, would that violate the requirement that

must not involve the serialization of any objects when communicating between the GUI and database elements.

If so, what collection to use?
- Rolf.
[ March 14, 2004: Message edited by: Mark Spritzler ]
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rolf,
must not involve the serialization of any objects when communicating between the GUI and database elements.

There is no issue: the fact that an object is *serializable* doesn't imply that it is *serialized*.
Regards,
Phil.
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rolf, I think it is OK to use ArrayList.
Good Luck.
 
Rolf Johansson
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, thanks!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rolf, I deleted the other sort of dup post thread. So I will change the topic of this thread to remove the "read this one" since people won't get confused anymore with the other thread.
Mark
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic