Package org.socialmusicdiscovery.server.business.model.core

Examples of org.socialmusicdiscovery.server.business.model.core.WorkEntity


    public WorkEntity create(Work work) {
        try {
            transactionManager.begin();
            ((WorkEntity)work).setLastUpdated(new Date());
            ((WorkEntity)work).setLastUpdatedBy(super.CHANGED_BY);
            WorkEntity createdEntity = super.createEntity(((WorkEntity)work));
            getRepository().refresh(createdEntity);
            return new CopyHelper().copy(createdEntity, Expose.class);
        }catch (RuntimeException e) {
            transactionManager.setRollbackOnly();
            throw e;
View Full Code Here


    public WorkEntity update(@PathParam("id") String id, Work work) {
        try {
            transactionManager.begin();
            ((WorkEntity)work).setLastUpdated(new Date());
            ((WorkEntity)work).setLastUpdatedBy(super.CHANGED_BY);
            WorkEntity updatedEntity = super.updateEntity(id, ((WorkEntity)work));
            getRepository().refresh(updatedEntity);
            return new CopyHelper().copy(updatedEntity, Expose.class);
        }catch (RuntimeException e) {
            transactionManager.setRollbackOnly();
            throw e;
View Full Code Here

TOP

Related Classes of org.socialmusicdiscovery.server.business.model.core.WorkEntity

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.