/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.yao.oa.domains.user;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 *
 * @author 世宁
 */
@Embeddable
public class GroupAuthoritiesPK implements Serializable {
    
    @ManyToOne
    @JoinColumn(name = "group_id",nullable = false)
    private Groups group_;
    @Column(nullable = false)
    private String authority;

    public Groups getGroup_() {
        return group_;
    }

    public void setGroup_(Groups group_) {
        this.group_ = group_;
    }

    public String getAuthority() {
        return authority;
    }

    public void setAuthority(String authority) {
        this.authority = authority;
    }
    
}

@@ -941,15 +941,520 @@
 ;%0A    %7D%0A
+%0A
     
+@Override%0A    public boolean equals(Object obj) %7B%0A        if (obj == this) return true;%0A        if (!(obj instanceof GroupAuthoritiesPK)) %7B%0A            return false;%0A        %7D%0A        GroupAuthoritiesPK pk = (GroupAuthoritiesPK)obj;%0A        if (!(this.group_ == pk.group_)) return false;%0A        if (!this.authority.equals(pk.getAuthority())) return false;%0A        return true;%0A    %7D%0A    @Override%0A    public int hashCode( )%0A    %7B%0A        return this.group_.hashCode( ) + this.authority.hashCode();%0A    %7D
 %0A%7D%0A

Add basic authorization to restful webservices controller.