Search in sources :

Example 1 with FaultResponseParameter

use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.FaultResponseParameter in project open-smart-grid-platform by OSGP.

the class FaultResponseConverter method createFaultResponseParameterList.

private List<FaultResponseParameterDto> createFaultResponseParameterList(final FaultResponseParameters faultResponseParameters) {
    final List<FaultResponseParameterDto> faultResponseParameterList = new ArrayList<>();
    for (final FaultResponseParameter parameter : faultResponseParameters.getParameterList()) {
        final String key = parameter.getKey();
        final String value = parameter.getValue();
        final FaultResponseParameterDto parameterDto = new FaultResponseParameterDto(key, value);
        faultResponseParameterList.add(parameterDto);
    }
    return faultResponseParameterList;
}
Also used : FaultResponseParameterDto(org.opensmartgridplatform.dto.valueobjects.smartmetering.FaultResponseParameterDto) FaultResponseParameter(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.FaultResponseParameter) ArrayList(java.util.ArrayList)

Example 2 with FaultResponseParameter

use of org.opensmartgridplatform.domain.core.valueobjects.smartmetering.FaultResponseParameter in project open-smart-grid-platform by OSGP.

the class FaultResponseConverter method createFaultResponseParameterList.

private List<FaultResponseParameter> createFaultResponseParameterList(final FaultResponseParametersDto faultResponseParametersDto) {
    final List<FaultResponseParameter> faultResponseParameterList = new ArrayList<>();
    for (final FaultResponseParameterDto parameterDto : faultResponseParametersDto.getParameterList()) {
        final String key = parameterDto.getKey();
        final String value = parameterDto.getValue();
        final FaultResponseParameter parameter = new FaultResponseParameter(key, value);
        faultResponseParameterList.add(parameter);
    }
    return faultResponseParameterList;
}
Also used : FaultResponseParameter(org.opensmartgridplatform.domain.core.valueobjects.smartmetering.FaultResponseParameter) FaultResponseParameterDto(org.opensmartgridplatform.dto.valueobjects.smartmetering.FaultResponseParameterDto) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)2 FaultResponseParameter (org.opensmartgridplatform.domain.core.valueobjects.smartmetering.FaultResponseParameter)2 FaultResponseParameterDto (org.opensmartgridplatform.dto.valueobjects.smartmetering.FaultResponseParameterDto)2