@Override public EventClassFamilyVersionStateDto toDto() { EventClassFamilyVersionStateDto dto = new EventClassFamilyVersionStateDto(); dto.setEcfId(ecfId); dto.setVersion(version); return dto; }
public CassandraEventClassFamilyVersionState(EventClassFamilyVersionStateDto dto) { this.ecfId = dto.getEcfId(); this.version = dto.getVersion(); }
@Override public EventClassFamilyVersionStateDto toDto() { EventClassFamilyVersionStateDto dto = new EventClassFamilyVersionStateDto(); dto.setEcfId(ecfId); dto.setVersion(version); return dto; }
public EventClassFamilyVersionState(EventClassFamilyVersionStateDto dto) { this.ecfId = dto.getEcfId(); this.version = dto.getVersion(); }
protected void populateVersionStates(String tenantId, EndpointProfileDto dto, SdkProfileDto sdkProfile) { dto.setClientProfileVersion(sdkProfile.getProfileSchemaVersion()); dto.setConfigurationVersion(sdkProfile.getConfigurationSchemaVersion()); dto.setUserNfVersion(sdkProfile.getNotificationSchemaVersion()); dto.setLogSchemaVersion(sdkProfile.getLogSchemaVersion()); if (sdkProfile.getAefMapIds() != null) { List<ApplicationEventFamilyMapDto> aefMaps = cacheService.getApplicationEventFamilyMapsByIds( sdkProfile.getAefMapIds()); List<EventClassFamilyVersionStateDto> ecfVersionStates = new ArrayList<>(aefMaps.size()); for (ApplicationEventFamilyMapDto aefMap : aefMaps) { EventClassFamilyVersionStateDto ecfVersionDto = new EventClassFamilyVersionStateDto(); String ecfId = cacheService.getEventClassFamilyIdByName(new EventClassFamilyIdKey( tenantId, aefMap.getEcfName())); if (ecfId != null) { ecfVersionDto.setEcfId(ecfId); ecfVersionDto.setVersion(aefMap.getVersion()); ecfVersionStates.add(ecfVersionDto); } else { LOG.warn("Failed to add ecf version state for ecf name {} and version {}", aefMap.getEcfName(), aefMap.getVersion()); } } dto.setEcfVersionStates(ecfVersionStates); } }
/** * Convert event class family version state to event class family version. * * @param ecfVersionStates the event class family version state for converting * @return event class family version */ public static List<EventClassFamilyVersion> convertToEcfVersions( List<EventClassFamilyVersionStateDto> ecfVersionStates) { List<EventClassFamilyVersion> result = new ArrayList<>(ecfVersionStates.size()); for (EventClassFamilyVersionStateDto dto : ecfVersionStates) { result.add(new EventClassFamilyVersion(dto.getEcfId(), dto.getVersion())); } return result; } }
/** * Specific method for converting list of <code>EventClassFamilyVersionStateDto</code> objects * to list of model objects <code>EventClassFamilyVersionState</code>. * * @param stateDtoList the stateDtoList * @return converted list of <code>EndpointGroupState</code> objects */ public static List<EventClassFamilyVersionState> convertEcfVersionDtoToModelList( List<EventClassFamilyVersionStateDto> stateDtoList) { List<EventClassFamilyVersionState> states = null; if (stateDtoList != null && !stateDtoList.isEmpty()) { states = new ArrayList<>(); for (EventClassFamilyVersionStateDto dto : stateDtoList) { EventClassFamilyVersionState state = new EventClassFamilyVersionState(); state.setEcfId(dto.getEcfId()); state.setVersion(dto.getVersion()); states.add(state); } } return states; }
/** * Specific method for converting list of <code>EventClassFamilyVersionStateDto</code> objects * to list of model objects <code>CassandraEventClassFamilyVersionState</code>. * * @return converted list of <code>CassandraEventClassFamilyVersionState</code> objects */ public static List<CassandraEventClassFamilyVersionState> convertEcfVersionDtoToModelList( List<EventClassFamilyVersionStateDto> stateDtoList) { List<CassandraEventClassFamilyVersionState> states = null; if (stateDtoList != null && !stateDtoList.isEmpty()) { states = new ArrayList<>(); for (EventClassFamilyVersionStateDto dto : stateDtoList) { CassandraEventClassFamilyVersionState state = new CassandraEventClassFamilyVersionState(); state.setEcfId(dto.getEcfId()); state.setVersion(dto.getVersion()); states.add(state); } } return states; }
int version = 0; for (EventClassFamilyVersionStateDto ecfVersionDto : profile.getEcfVersionStates()) { if (ecfVersionDto.getEcfId().equals(ecfId)) { version = ecfVersionDto.getVersion(); break; if (ecfVersionDto.getEcfId().equals(routeTableKey.getEcfVersion().getEcfId()) && ecfVersionDto.getVersion() == routeTableKey.getEcfVersion().getVersion()) { eventClassSet.add( EndpointObjectHash.fromBytes(endpointProfile.getEndpointKeyHash()));