Add a @PrimaryKey annotation, or a value inside the @Attribute
annotation. This will tell the framework to treat map this object by a
certain primary key, and whenever there is another object with the same
primary key it will be taken from the cache and placed instead of being
parsed.
An option is to also reparse the element, and check that it is the same as
the one in the cache, and if not throw an exception (to tell the user that
maybe the primary key selected wasn't the correct one).
Aviad Ben Dov
Parse
End of Alpha
Public
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use