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

com.github.saphyra.randwo.key.repository.KeyConverter Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package com.github.saphyra.randwo.key.repository;

import org.springframework.stereotype.Component;

import com.github.saphyra.converter.ConverterBase;
import com.github.saphyra.randwo.key.domain.Key;

@Component
public class KeyConverter extends ConverterBase {
    @Override
    protected Key processEntityConversion(KeyEntity keyEntity) {
        return Key.builder()
            .keyId(keyEntity.getKeyId())
            .keyValue(keyEntity.getKeyValue())
            .build();
    }

    @Override
    protected KeyEntity processDomainConversion(Key key) {
        return KeyEntity.builder()
            .keyId(key.getKeyId())
            .keyValue(key.getKeyValue())
            .build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy