aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Create method: impossible to call from lock/unlock. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Create method: impossible to call from lock/unlock." Watch "Create method: impossible to call from lock/unlock." New topic
Author

Create method: impossible to call from lock/unlock.

Anton Golovin
Ranch Hand

Joined: Jul 02, 2004
Posts: 476
Hi, guys. I have another question, this time related to the create method. This method can not require that a record it is about to create be locked, since it cannot know the record number. My create method reuses deleted records. Here is what I came up with:



Any opinions are welcome, including those which think I overcomplicated things.


Anton Golovin (anton.golovin@gmail.com) SCJP, SCJD, SCBCD, SCWCD, OCEJWSD, SCEA/OCMJEA [JEE certs from Sun/Oracle]
Michael Couck
Ranch Hand

Joined: Nov 15, 2003
Posts: 46
Hi Anton,

Looks pretty good to me.

I will say that it was not specifically mentioned in the spec that the create method was to be implemented. As it turns out I did, as well as the delete if I remember correctly, but I didn't expose these functions to the client, i.e. the gui, so just a book and search function. But the specs are slightly different.

Anyway, looks fine.

See ya

Michael
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Create method: impossible to call from lock/unlock.