while (allows.hasNext())
{
SecurityAllowDbEntry sa = (SecurityAllowDbEntry)allows.next();
if (sa.getAllowType().equals(ALLOW_OWNER))
{
SecurityAllow allow = new BaseSecurityAllowOwner(sa.getId());
allow.setOwner(true);
access.getOwnerAllows().add(allow);
}
else if (sa.getAllowType().equals(ALLOW_BOTH))
{
SecurityAllow allow = new BaseSecurityAllow(sa.getId());
allow.setRole(sa.getAllowValue());
allow.setGroup(sa.getAllowGroup());
access.getAllows().add(allow);
}
else if (sa.getAllowType().equals(ALLOW_ROLE))
{
SecurityAllow allow = new BaseSecurityAllow(sa.getId());
allow.setRole(sa.getAllowValue());
access.getAllows().add(allow);
}
else if (sa.getAllowType().equals(ALLOW_GROUP))
{
SecurityAllow allow = new BaseSecurityAllow(sa.getId());
allow.setGroup(sa.getAllowValue());
access.getAllows().add(allow);
}
else
{
SecurityAllow allow = new BaseSecurityAllow(sa.getId());
allow.setUser(sa.getAllowValue());
access.getAllows().add(allow);
}
}
se.getAccesses().add(access);
}