Package org.socialmusicdiscovery.server.business.model

Examples of org.socialmusicdiscovery.server.business.model.SMDIdentityReference


    @Produces(MediaType.APPLICATION_JSON)
    public Collection<ContributorEntity> search(@QueryParam("release") String release, @QueryParam("work") String work, @QueryParam("recording") String recording, @QueryParam("recordingSession") String recordingSession, @QueryParam("artist") String artist, @QueryParam("owner") String owner) {
        try {
            transactionManager.begin();
            if (owner!=null) {
                SMDIdentityReference reference = smdIdentityReferenceRepository.findById(owner);
                if(reference==null) {
                    return new ArrayList<ContributorEntity>();
                }
                if(reference.getType().equals(SMDIdentityReferenceEntity.typeForClass(ReleaseEntity.class))) {
                    release = owner;
                }else if(reference.getType().equals(SMDIdentityReferenceEntity.typeForClass(WorkEntity.class))) {
                    work = owner;
                }else if(reference.getType().equals(SMDIdentityReferenceEntity.typeForClass(RecordingEntity.class))) {
                    recording = owner;
                }else if(reference.getType().equals(SMDIdentityReferenceEntity.typeForClass(RecordingSessionEntity.class))) {
                    recordingSession = owner;
                }else {
                    return new ArrayList<ContributorEntity>();
                }
            }
View Full Code Here

TOP

Related Classes of org.socialmusicdiscovery.server.business.model.SMDIdentityReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.