// Path: distribution/src/main/java/nl/crowndov/displaydirect/distribution/chb/StopStore.java
// public class StopStore {
// 
//     private static final Logger LOGGER = LoggerFactory.getLogger(StopStore.class);
// 
//     private static Map<String, String> store = new HashMap<>();
//     private static Set<String> missing = new HashSet<>();
// 
//     public static Optional<String> getQuayFromCode(String dataOwner, String stopCode) {
//         String key = dataOwner+"|"+stopCode;
//         if (store.containsKey(key)) {
//             return Optional.of(store.get(key));
//         }
//         missing.add(key);
//         return Optional.empty();
//     }
// 
//     public static boolean stopExists(String quayOrStopCode) {
//         return store.values().contains(quayOrStopCode);
//     }
// 
//     public static Map<String, String> getStore() {
//         return store;
//     }
// 
//     public static Set<String> getMissing() {
//         return missing;
//     }
// 
//     public static void setStore(Map<String, String> storeData) {
//         store = storeData;
//     }
// }


import nl.crowndov.displaydirect.distribution.chb.StopStore;
import java.util.ArrayList;
import java.util.List;

    public FieldDelivery getGeneratedTimestamp() {
        return generatedTimestamp;
    }

    public void setGeneratedTimestamp(FieldDelivery generatedTimestamp) {
        this.generatedTimestamp = generatedTimestamp;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public boolean isValid() {
        return email != null && subscribedQuayCodes != null && subscribedQuayCodes.size() >= 1;
    }

    public boolean hasValidStop() {
// Path: distribution/src/main/java/nl/crowndov/displaydirect/distribution/chb/StopStore.java
// public class StopStore {
// 
//     private static final Logger LOGGER = LoggerFactory.getLogger(StopStore.class);
// 
//     private static Map<String, String> store = new HashMap<>();
//     private static Set<String> missing = new HashSet<>();
// 
//     public static Optional<String> getQuayFromCode(String dataOwner, String stopCode) {
//         String key = dataOwner+"|"+stopCode;
//         if (store.containsKey(key)) {
//             return Optional.of(store.get(key));
//         }
//         missing.add(key);
//         return Optional.empty();
//     }
// 
//     public static boolean stopExists(String quayOrStopCode) {
//         return store.values().contains(quayOrStopCode);
//     }
// 
//     public static Map<String, String> getStore() {
//         return store;
//     }
// 
//     public static Set<String> getMissing() {
//         return missing;
//     }
// 
//     public static void setStore(Map<String, String> storeData) {
//         store = storeData;
//     }
// }


// Path: distribution/src/main/java/nl/crowndov/displaydirect/distribution/domain/client/Subscription.java
import nl.crowndov.displaydirect.distribution.chb.StopStore;
import java.util.ArrayList;
import java.util.List;


    public FieldDelivery getGeneratedTimestamp() {
        return generatedTimestamp;
    }

    public void setGeneratedTimestamp(FieldDelivery generatedTimestamp) {
        this.generatedTimestamp = generatedTimestamp;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public boolean isValid() {
        return email != null && subscribedQuayCodes != null && subscribedQuayCodes.size() >= 1;
    }

    public boolean hasValidStop() {
        return subscribedQuayCodes.stream().allMatch(StopStore::stopExists);