Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Luis Mata
Added: Mar 8, 2019 2:54 PM
Modified: Oct 18, 2019 3:50 PM
Views: 22
Tags: converter java
  1. public class [CLASS_NAME]Converter extends Converter<POJO, Entity> {
  2.  
  3.     @Override
  4.     @PostConstruct
  5.     protected void initFunction() {
  6.         setFunction(pojo -> new Entity(pojo.getId(), pojo.getCode(), pojo.getDiferent(), pojo.getCity(),
  7.                 pojo.getCurrency(), pojo.getNemo(), pojo.getCalendarTitle(), pojo.getHtmlName(), pojo.getCountryISO()),
  8.                 entity -> new POJO(entity.getId(), entity.getCode(), entity.getDiferent(), entity.getCity(),
  9.                         entity.getCurrency(), entity.getNemo(), entity.getCalendarTitle(), entity.getHtmlName(), entity.getCountryISO()));
  10.     }
  11.  
  12. }