-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Custom Value Type for Chess Games in Algebraic Chess Notatn?
PostPosted: Fri Jan 09, 2004 6:50 am 
Regular
Regular

Joined: Tue Jan 06, 2004 3:32 pm
Posts: 80
Location: Munich, Germany
I'm planning to implement a Custom Value Type for Chess Games in Algebraic Chess Notation (ACN)?

The ACN representation of a chess game would be stored in a VARCHAR column.

The object model of a Chess Game would be pretty fine grained - at least a List of Moves or possibly a Tree of Moves (taking variants into account).

The problem is that generating the Object Graph for a Chess Game from an ACN (and the other way round) can be a very expensive process - depending on the length of the game this can easily take 1/2 second or so...

Is a custom value type the right way to go?

Or should I continue to use a "string" type and use two methods for serializing and deserializing the game to/from ACN?

Can lazy loading be applied to just one property of a class?

Regards,

Andreas


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 09, 2004 9:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
There should be no advantage of using custom serialisation/deserialisation over using a UserType, you will have to face the time effort sometimes. There is no way to do lazy loading of single properties, you can however use the Leightweight Class Pattern


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.