lockExclusive();
permissionExists = PermissionPeer.checkExists(permission);
if(!permissionExists)
{
// add a row to the table
Criteria criteria = PermissionPeer.buildCriteria(permission);
PermissionPeer.doInsert(criteria);
// try to get the object back using the name as key.
criteria = new Criteria();
criteria.add(PermissionPeer.NAME,
((SecurityObject)permission).getName());
Vector results = PermissionPeer.doSelect(criteria);
if(results.size() != 1)
{
throw new DataBackendException(