// Path: src/main/java/it/univaq/incipict/profilemanager/business/ProfileInformationService.java
// public interface ProfileInformationService extends CRUDService<ProfileInformationPK, ProfileInformation> {
//    public List<ProfileInformation> findByProfile(Long id) throws ProfileManagerException;
//    public List<ProfileInformation> findByInformation(Long id) throws ProfileManagerException;
// }
// 
// Path: src/main/java/it/univaq/incipict/profilemanager/business/ProfileManagerException.java
// public class ProfileManagerException extends  RuntimeException {
//    private static final long serialVersionUID = -2747157039796007525L;
// 
//    public ProfileManagerException() {
//       super();
//    }
// 
//    public ProfileManagerException(String message, Throwable cause) {
//       super(message, cause);
//    }
// 
//    public ProfileManagerException(String message) {
//       super(message);
//    }
// 
//    public ProfileManagerException(Throwable cause) {
//       super(cause);
//    }
// }
// 
// Path: src/main/java/it/univaq/incipict/profilemanager/business/model/ProfileInformation.java
// @Entity
// @Table(name = "Profile_Information")
// public class ProfileInformation implements java.io.Serializable {
//    private static final long serialVersionUID = 9046973983171068447L;
// 
//    @EmbeddedId
//    private ProfileInformationPK id;
// 
//    @JsonIgnore
//    @ManyToOne
//    @JoinColumn(name = "id_profile", insertable = false, updatable = false)
//    private Profile profile;
// 
//    @JsonIgnore
//    @ManyToOne
//    @JoinColumn(name = "id_information", insertable = false, updatable = false)
//    private Information information;
// 
//    @Column(name = "rank", nullable = false)
//    private Double rank;
// 
//    @Transient
//    public ProfileInformationPK getId() {
//       return id;
//    }
// 
//    @Transient
//    public void setId(ProfileInformationPK id) {
//       this.id = id;
//    }
// 
//    public Profile getProfile() {
//       return profile;
//    }
// 
//    public void setProfile(Profile profile) {
//       this.profile = profile;
//    }
// 
//    public Information getInformation() {
//       return information;
//    }
// 
//    public void setInformation(Information information) {
//       this.information = information;
//    }
// 
//    public Double getRank() {
//       return rank;
//    }
// 
//    public void setRank(Double rank) {
//       this.rank = rank;
//    }
// 
//    @Override
//    public int hashCode() {
//       final int prime = 31;
//       int result = 1;
//       result = prime * result + ((id == null) ? 0 : id.hashCode());
//       return result;
//    }
// 
//    @Override
//    public boolean equals(Object obj) {
//       if (this == obj)
//          return true;
//       if (obj == null)
//          return false;
//       if (getClass() != obj.getClass())
//          return false;
//       ProfileInformation other = (ProfileInformation) obj;
//       if (id == null) {
//          if (other.id != null)
//             return false;
//       }
//       return true;
//    }
// 
// }
// 
// Path: src/main/java/it/univaq/incipict/profilemanager/business/model/ProfileInformationPK.java
// @Embeddable
// public class ProfileInformationPK implements Serializable {
//    private static final long serialVersionUID = -2875398420719600298L;
//    private Long id_information, id_profile;
// 
//    public Long getId_information() {
//       return id_information;
//    }
// 
//    public void setId_information(Long id_information) {
//       this.id_information = id_information;
//    }
// 
//    public Long getId_profile() {
//       return id_profile;
//    }
// 
//    public void setId_profile(Long id_profile) {
//       this.id_profile = id_profile;
//    }
// 
//    @Override
//    public int hashCode() {
//       final int prime = 31;
//       int result = 1;
//       result = prime * result + ((id_information == null) ? 0 : id_information.hashCode());
//       result = prime * result + ((id_profile == null) ? 0 : id_profile.hashCode());
//       return result;
//    }
// 
//    @Override
//    public boolean equals(Object obj) {
//       if (this == obj)
//          return true;
//       if (obj == null)
//          return false;
//       if (getClass() != obj.getClass())
//          return false;
//       ProfileInformationPK other = (ProfileInformationPK) obj;
//       if (id_information == null) {
//          if (other.id_information != null)
//             return false;
//       } else if (!id_information.equals(other.id_information))
//          return false;
//       if (id_profile == null) {
//          if (other.id_profile != null)
//             return false;
//       } else if (!id_profile.equals(other.id_profile))
//          return false;
//       return true;
//    }
// 
// }


import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import it.univaq.incipict.profilemanager.business.ProfileInformationService;
import it.univaq.incipict.profilemanager.business.ProfileManagerException;
import it.univaq.incipict.profilemanager.business.model.ProfileInformation;
import it.univaq.incipict.profilemanager.business.model.ProfileInformationPK;
/*
 * Profile Manager - Copyright (C) 2016  Daniele Tellina
 *
 * Profile Manager is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *  
 * Profile Manager 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 General Public License for more details.
 *  
 * You should have received a copy of the GNU General Public License
 * along with Profile Manager.  If not, see <http://www.gnu.org/licenses/>.
 */
package it.univaq.incipict.profilemanager.business.impl;




/**
 * 
 * @author Daniele Tellina
 *
 */
@Service
public class JPAProfileInformation extends JPACRUDService<ProfileInformationPK, ProfileInformation>
      implements ProfileInformationService {

   @Transactional
// Path: src/main/java/it/univaq/incipict/profilemanager/business/ProfileInformationService.java
// public interface ProfileInformationService extends CRUDService<ProfileInformationPK, ProfileInformation> {
//    public List<ProfileInformation> findByProfile(Long id) throws ProfileManagerException;
//    public List<ProfileInformation> findByInformation(Long id) throws ProfileManagerException;
// }
// 
// Path: src/main/java/it/univaq/incipict/profilemanager/business/ProfileManagerException.java
// public class ProfileManagerException extends  RuntimeException {
//    private static final long serialVersionUID = -2747157039796007525L;
// 
//    public ProfileManagerException() {
//       super();
//    }
// 
//    public ProfileManagerException(String message, Throwable cause) {
//       super(message, cause);
//    }
// 
//    public ProfileManagerException(String message) {
//       super(message);
//    }
// 
//    public ProfileManagerException(Throwable cause) {
//       super(cause);
//    }
// }
// 
// Path: src/main/java/it/univaq/incipict/profilemanager/business/model/ProfileInformation.java
// @Entity
// @Table(name = "Profile_Information")
// public class ProfileInformation implements java.io.Serializable {
//    private static final long serialVersionUID = 9046973983171068447L;
// 
//    @EmbeddedId
//    private ProfileInformationPK id;
// 
//    @JsonIgnore
//    @ManyToOne
//    @JoinColumn(name = "id_profile", insertable = false, updatable = false)
//    private Profile profile;
// 
//    @JsonIgnore
//    @ManyToOne
//    @JoinColumn(name = "id_information", insertable = false, updatable = false)
//    private Information information;
// 
//    @Column(name = "rank", nullable = false)
//    private Double rank;
// 
//    @Transient
//    public ProfileInformationPK getId() {
//       return id;
//    }
// 
//    @Transient
//    public void setId(ProfileInformationPK id) {
//       this.id = id;
//    }
// 
//    public Profile getProfile() {
//       return profile;
//    }
// 
//    public void setProfile(Profile profile) {
//       this.profile = profile;
//    }
// 
//    public Information getInformation() {
//       return information;
//    }
// 
//    public void setInformation(Information information) {
//       this.information = information;
//    }
// 
//    public Double getRank() {
//       return rank;
//    }
// 
//    public void setRank(Double rank) {
//       this.rank = rank;
//    }
// 
//    @Override
//    public int hashCode() {
//       final int prime = 31;
//       int result = 1;
//       result = prime * result + ((id == null) ? 0 : id.hashCode());
//       return result;
//    }
// 
//    @Override
//    public boolean equals(Object obj) {
//       if (this == obj)
//          return true;
//       if (obj == null)
//          return false;
//       if (getClass() != obj.getClass())
//          return false;
//       ProfileInformation other = (ProfileInformation) obj;
//       if (id == null) {
//          if (other.id != null)
//             return false;
//       }
//       return true;
//    }
// 
// }
// 
// Path: src/main/java/it/univaq/incipict/profilemanager/business/model/ProfileInformationPK.java
// @Embeddable
// public class ProfileInformationPK implements Serializable {
//    private static final long serialVersionUID = -2875398420719600298L;
//    private Long id_information, id_profile;
// 
//    public Long getId_information() {
//       return id_information;
//    }
// 
//    public void setId_information(Long id_information) {
//       this.id_information = id_information;
//    }
// 
//    public Long getId_profile() {
//       return id_profile;
//    }
// 
//    public void setId_profile(Long id_profile) {
//       this.id_profile = id_profile;
//    }
// 
//    @Override
//    public int hashCode() {
//       final int prime = 31;
//       int result = 1;
//       result = prime * result + ((id_information == null) ? 0 : id_information.hashCode());
//       result = prime * result + ((id_profile == null) ? 0 : id_profile.hashCode());
//       return result;
//    }
// 
//    @Override
//    public boolean equals(Object obj) {
//       if (this == obj)
//          return true;
//       if (obj == null)
//          return false;
//       if (getClass() != obj.getClass())
//          return false;
//       ProfileInformationPK other = (ProfileInformationPK) obj;
//       if (id_information == null) {
//          if (other.id_information != null)
//             return false;
//       } else if (!id_information.equals(other.id_information))
//          return false;
//       if (id_profile == null) {
//          if (other.id_profile != null)
//             return false;
//       } else if (!id_profile.equals(other.id_profile))
//          return false;
//       return true;
//    }
// 
// }


// Path: src/main/java/it/univaq/incipict/profilemanager/business/impl/JPAProfileInformation.java
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import it.univaq.incipict.profilemanager.business.ProfileInformationService;
import it.univaq.incipict.profilemanager.business.ProfileManagerException;
import it.univaq.incipict.profilemanager.business.model.ProfileInformation;
import it.univaq.incipict.profilemanager.business.model.ProfileInformationPK;

/*
 * Profile Manager - Copyright (C) 2016  Daniele Tellina
 *
 * Profile Manager is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *  
 * Profile Manager 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 General Public License for more details.
 *  
 * You should have received a copy of the GNU General Public License
 * along with Profile Manager.  If not, see <http://www.gnu.org/licenses/>.
 */
package it.univaq.incipict.profilemanager.business.impl;




/**
 * 
 * @author Daniele Tellina
 *
 */
@Service
public class JPAProfileInformation extends JPACRUDService<ProfileInformationPK, ProfileInformation>
      implements ProfileInformationService {

   @Transactional
   public List<ProfileInformation> findByProfile(Long id) throws ProfileManagerException {