Package org.socialmusicdiscovery.server.business.model.classification

Examples of org.socialmusicdiscovery.server.business.model.classification.ClassificationReferenceEntity


                            }
                            validate(existingClassification);
                        }
                    }
                }
                ClassificationReferenceEntity classificationReference = new ClassificationReferenceEntity();
                classificationReference.setReferenceTo(reference);
                classificationReference.setLastUpdated(new Date());
                classificationReference.setLastUpdatedBy(getId());
                if (existingClassifications.size() == 0) {
                    ClassificationEntity classification = new ClassificationEntity();
                    classification.setName(classificationName);
                    if (sortValues.containsKey(sortPrefix + classificationName)) {
                        classification.setSortAs(sortValues.get(sortPrefix + classificationName));
View Full Code Here


            Release release = releaseRepository.findByName("The Bodyguard (Original Soundtrack Album)").iterator().next();

            ClassificationEntity classification = new ClassificationEntity();
            classification.setName("Pop");
            classification.setType(Classification.GENRE);
            ClassificationReferenceEntity classificationReference = new ClassificationReferenceEntity();
            classificationReference.setReferenceTo(SMDIdentityReferenceEntity.forEntity(release));
            classificationReference.setLastUpdated(new Date());
            classificationReference.setLastUpdatedBy("JUnit");
            classification.addReference(classificationReference);
            classification.setLastUpdated(new Date());
            classification.setLastUpdatedBy("JUnit");

            for (Track track : release.getTracks()) {
                classificationReference = new ClassificationReferenceEntity();
                classificationReference.setReferenceTo(SMDIdentityReferenceEntity.forEntity(track));
                classificationReference.setLastUpdated(new Date());
                classificationReference.setLastUpdatedBy("JUnit");
                classification.addReference(classificationReference);
            }
            classificationRepository.create(classification);

            Collection<ClassificationEntity> classifications = classificationRepository.findByNameAndType("Pop", Classification.GENRE);
View Full Code Here

TOP

Related Classes of org.socialmusicdiscovery.server.business.model.classification.ClassificationReferenceEntity

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.