Advertisement
anta40

Untitled

Oct 28th, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. Class ActicatedAlbum:
  2. public class ActivatedAlbum implements Persistable {
  3.  
  4. private String albumID;
  5. private String albumKey;
  6.  
  7. public ActivatedAlbum(String albumID, String albumKey){
  8. this.albumID = CommonUtils.getMD5(albumID);
  9. this.albumKey = albumKey;
  10. }
  11.  
  12. public String getAlbumID(){
  13. return albumID;
  14. }
  15.  
  16. public String getAlbumKey(){
  17. return albumKey;
  18. }
  19.  
  20. }
  21.  
  22. Untuk menyimpan di PersistentStore, gunakan method ini:
  23. public void addActivatedAlbum(ActivatedAlbum album){
  24. PersistentObject po = PersistentStore.getPersistentObject(LITE_AUDIO_PLAYER_ALBUM);
  25.  
  26. synchronized (po) {
  27. list.addElement(album);
  28. po.setContents(list);
  29. po.commit();
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement