All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.hyperfoil.tools.horreum.mapper.SchemaMapper Maven / Gradle / Ivy

The newest version!
package io.hyperfoil.tools.horreum.mapper;

import io.hyperfoil.tools.horreum.api.data.Schema;
import io.hyperfoil.tools.horreum.entity.data.SchemaDAO;

public class SchemaMapper {
    public static Schema from(SchemaDAO s) {
        Schema dto = new Schema();
        dto.id = s.id;
        dto.name = s.name;
        dto.schema = s.schema;
        dto.description = s.description;
        dto.uri = s.uri;
        dto.owner = s.owner;
        dto.access = s.access;

        return dto;
    }

    public static SchemaDAO to(Schema dto) {
        SchemaDAO s = new SchemaDAO();
        s.id = dto.id;
        s.name = dto.name;
        s.schema = dto.schema;
        s.description = dto.description;
        s.uri = dto.uri;
        s.owner = dto.owner;
        s.access = dto.access;

        return s;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy