Package org.cedj.geekseek.web.rest.relation.test.model

Source Code of org.cedj.geekseek.web.rest.relation.test.model.SourceObjectConverter

package org.cedj.geekseek.web.rest.relation.test.model;

import javax.ws.rs.core.UriInfo;

import org.cedj.geekseek.domain.relation.test.model.SourceObject;
import org.cedj.geekseek.web.rest.core.RepresentationConverter;

public class SourceObjectConverter extends RepresentationConverter.Base<SourceRepresentation, SourceObject> {

    public SourceObjectConverter() {
        super(SourceRepresentation.class, SourceObject.class);
    }

    @Override
    public SourceRepresentation from(UriInfo uriInfo, SourceObject source) {
        return new SourceRepresentation(source.getId(), uriInfo);
    }

    @Override
    public SourceObject to(UriInfo uriInfo, SourceRepresentation representation) {
        return new SourceObject(representation.getId());
    }

    @Override
    public SourceObject update(UriInfo uriInfo, SourceRepresentation representation, SourceObject target) {
        return target;
    }
}
TOP

Related Classes of org.cedj.geekseek.web.rest.relation.test.model.SourceObjectConverter

TOP
Copyright © 2018 www.massapi.com. 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.