public Connector updateConnector ( Long chargingStationTypeId , Long evseId , Connector connector ) { ChargingStationType chargingStationType = chargingStationTypeRepository . findOne ( chargingStationTypeId ) ; Evse evse = getEvseById ( chargingStationType , evseId ) ; Connector existingConnector = getConnectorById ( evse , connector . getId ( ) , false ) ; if ( existingConnector != null ) { evse . getConnectors ( ) . remove ( existingConnector ) ; } evse . getConnectors ( ) . add ( connector ) ; chargingStationType = chargingStationTypeRepository . createOrUpdate ( chargingStationType ) ; evse = getEvseById ( chargingStationType , evseId ) ; return getConnectorById ( evse , connector . getId ( ) ) ; }
Update a connector .