Remove the following line from setElement()
method:
persistentObject.setContents(mElements);
by doing this, you are overwriting the contents of the persitent object, which were earlier a SaiHashTable object. So next time you try to cast the contents of the persistent object, you get an exception which you catch and then reset the instance.
Also you should try to get the same value you have set:
SaiPersistentStore.getInstance().getElement("Registration")