package ervu_dashboard.component.converter;

import java.util.UUID;

import component.field.dataconvert.DataConverter;

/**
 * @author Vitaly Chekushkin
 */
public class UUIDValueConverter implements DataConverter<UUID, String> {
  @Override
  public UUID convertValueForSave(String value) {
    return value != null ? UUID.fromString(value) : null;
  }

  @Override
  public String convertValueForLoad(UUID uuid) {
    return uuid != null ? uuid.toString() : null;
  }
}
