All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bonitasoft.engine.profile.impl.ExportedProfileMapping Maven / Gradle / Ivy

There is a newer version: 10.2.0
Show newest version
/**
 * Copyright (C) 2015 BonitaSoft S.A.
 * BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble
 * This library is free software; you can redistribute it and/or modify it under the terms
 * of the GNU Lesser General Public License as published by the Free Software Foundation
 * version 2.1 of the License.
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 * You should have received a copy of the GNU Lesser General Public License along with this
 * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
 * Floor, Boston, MA 02110-1301, USA.
 **/
package org.bonitasoft.engine.profile.impl;

import java.util.ArrayList;
import java.util.List;

import org.bonitasoft.engine.commons.Pair;

/**
 * @author Zhao Na
 * @author Celine Souchet
 */
public class ExportedProfileMapping {

    private List users;

    private List groups;

    private List roles;

    private List> memberships;

    public ExportedProfileMapping() {
        users = new ArrayList();
        groups = new ArrayList();
        roles = new ArrayList();
        memberships = new ArrayList>();
    }

    public List getUsers() {
        return users;
    }

    public void setUsers(final List users) {
        this.users = users;
    }

    public List getGroups() {
        return groups;
    }

    public void setGroups(final List groups) {
        this.groups = groups;
    }

    public List getRoles() {
        return roles;
    }

    public void setRoles(final List roles) {
        this.roles = roles;
    }

    public List> getMemberships() {
        return memberships;
    }

    public void setMemberships(final List> memberships) {
        this.memberships = memberships;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (groups == null ? 0 : groups.hashCode());
        result = prime * result + (memberships == null ? 0 : memberships.hashCode());
        result = prime * result + (roles == null ? 0 : roles.hashCode());
        result = prime * result + (users == null ? 0 : users.hashCode());
        return result;
    }

    @Override
    public boolean equals(final Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ExportedProfileMapping other = (ExportedProfileMapping) obj;
        if (groups == null) {
            if (other.groups != null) {
                return false;
            }
        } else if (!groups.equals(other.groups)) {
            return false;
        }
        if (memberships == null) {
            if (other.memberships != null) {
                return false;
            }
        } else if (!memberships.equals(other.memberships)) {
            return false;
        }
        if (roles == null) {
            if (other.roles != null) {
                return false;
            }
        } else if (!roles.equals(other.roles)) {
            return false;
        }
        if (users == null) {
            if (other.users != null) {
                return false;
            }
        } else if (!users.equals(other.users)) {
            return false;
        }
        return true;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy