Search in sources :

Example 26 with ProfileFundingEntity

use of org.orcid.persistence.jpa.entities.ProfileFundingEntity in project ORCID-Source by ORCID.

the class ProfileFundingDaoImpl method getProfileFundingEntity.

/**
     * Get the funding associated with the given profileFunding id
     * 
     * @param profileFundingId
     *            The id of the ProfileFundingEntity object
     * 
     * @return the ProfileFundingEntity object
     * */
@Override
public ProfileFundingEntity getProfileFundingEntity(Long profileFundingId) {
    Query query = entityManager.createQuery("from ProfileFundingEntity where id=:id");
    query.setParameter("id", profileFundingId);
    return (ProfileFundingEntity) query.getSingleResult();
}
Also used : Query(javax.persistence.Query) TypedQuery(javax.persistence.TypedQuery) ProfileFundingEntity(org.orcid.persistence.jpa.entities.ProfileFundingEntity)

Aggregations

ProfileFundingEntity (org.orcid.persistence.jpa.entities.ProfileFundingEntity)26 Test (org.junit.Test)9 Funding (org.orcid.jaxb.model.record_v2.Funding)8 ProfileEntity (org.orcid.persistence.jpa.entities.ProfileEntity)5 SourceEntity (org.orcid.persistence.jpa.entities.SourceEntity)5 Transactional (org.springframework.transaction.annotation.Transactional)5 OrgEntity (org.orcid.persistence.jpa.entities.OrgEntity)4 Query (javax.persistence.Query)3 TypedQuery (javax.persistence.TypedQuery)3 BaseTest (org.orcid.core.BaseTest)3 ClientDetailsEntity (org.orcid.persistence.jpa.entities.ClientDetailsEntity)3 EmailEntity (org.orcid.persistence.jpa.entities.EmailEntity)3 ExternalIdentifierEntity (org.orcid.persistence.jpa.entities.ExternalIdentifierEntity)3 OrgAffiliationRelationEntity (org.orcid.persistence.jpa.entities.OrgAffiliationRelationEntity)3 OtherNameEntity (org.orcid.persistence.jpa.entities.OtherNameEntity)3 ProfileKeywordEntity (org.orcid.persistence.jpa.entities.ProfileKeywordEntity)3 ResearcherUrlEntity (org.orcid.persistence.jpa.entities.ResearcherUrlEntity)3 BigDecimal (java.math.BigDecimal)2 TreeSet (java.util.TreeSet)2 Funding (org.orcid.jaxb.model.message.Funding)2