class PrivilegeImpl implements Privilege {

    @Override
    public Privilege[] getAggregatePrivileges() {
        ArrayList<Privilege> list = new ArrayList<Privilege>();
        for (Privilege ap : getDeclaredAggregatePrivileges()) {
            aggregate(list, ap);
        }
        
        Privilege[] res = new Privilege[list.size()];
        list.toArray(res);
        return res;
    }

    public  PrivilegeImpl(Session session, String name, Privilege[] declaredPrivileges);
    public  PrivilegeImpl(Session session, String name, Privilege[] declaredPrivileges, boolean isAbstract);

}