@Test public void testVerify() { PopulateParameterNames.verify(); assert true; }
public static void verify() { Properties props = new Properties(); boolean found = false; try (InputStream fis = PopulateResourceTypes.class.getClassLoader().getResourceAsStream("resource_types.properties")) { props.load(fis); Set<String> resources = new HashSet<>(); for (FHIRResourceType.ValueSet rt : FHIRResourceType.ValueSet.values()) { resources.add(rt.value()); } Integer highestValue = 0; Map<String, Integer> valueMap = new HashMap<>(); for (Entry<Object, Object> valueEntry : props.entrySet()) { Integer curVal = Integer.parseInt((String) valueEntry.getValue()); String resource = (String) valueEntry.getKey(); valueMap.put(resource, curVal); if (highestValue < curVal) { highestValue = curVal; } resources.remove(resource); } for (String resource : resources) { LOGGER.info(resource + "=" + highestValue++); found = true; } } catch (IOException e) { throw new IllegalArgumentException("File access issue for resource_types"); } if (found) { throw new IllegalArgumentException("Resources are missing from resource_types"); } }
PopulateResourceTypes implements IDatabaseStatement { public static void verify() { Properties props = new Properties(); boolean found = false; try (InputStream fis = PopulateResourceTypes.class.getClassLoader().getResourceAsStream("resource_types.properties")) { props.load(fis); Set<String> resources = new HashSet<>(); for (FHIRResourceType.ValueSet rt : FHIRResourceType.ValueSet.values()) { resources.add(rt.value()); } Integer highestValue = 0; Map<String, Integer> valueMap = new HashMap<>(); for (Entry<Object, Object> valueEntry : props.entrySet()) { Integer curVal = Integer.parseInt((String) valueEntry.getValue()); String resource = (String) valueEntry.getKey(); valueMap.put(resource, curVal); if (highestValue < curVal) { highestValue = curVal; } resources.remove(resource); } for (String resource : resources) { LOGGER.info(resource + "=" + highestValue++); found = true; } } catch (IOException e) { throw new IllegalArgumentException("File access issue for resource_types"); } if (found) { throw new IllegalArgumentException("Resources are missing from resource_types"); } } }
PopulateResourceTypes implements IDatabaseStatement { public static void verify() { Properties props = new Properties(); boolean found = false; try (InputStream fis = PopulateResourceTypes.class.getClassLoader().getResourceAsStream("resource_types.properties")) { props.load(fis); Set<String> resources = new HashSet<>(); for (FHIRResourceType.ValueSet rt : FHIRResourceType.ValueSet.values()) { resources.add(rt.value()); } Integer highestValue = 0; Map<String, Integer> valueMap = new HashMap<>(); for (Entry<Object, Object> valueEntry : props.entrySet()) { Integer curVal = Integer.parseInt((String) valueEntry.getValue()); String resource = (String) valueEntry.getKey(); valueMap.put(resource, curVal); if (highestValue < curVal) { highestValue = curVal; } resources.remove(resource); } for (String resource : resources) { LOGGER.info(resource + "=" + highestValue++); found = true; } } catch (IOException e) { throw new IllegalArgumentException("File access issue for resource_types"); } if (found) { throw new IllegalArgumentException("Resources are missing from resource_types"); } } PopulateResourceTypes(String adminSchemaName, String schemaName, Integer tenantId); }
PopulateResourceTypes implements IDatabaseStatement { public static void verify() { Properties props = new Properties(); boolean found = false; try (InputStream fis = PopulateResourceTypes.class.getClassLoader().getResourceAsStream("resource_types.properties")) { props.load(fis); Set<String> resources = new HashSet<>(); for (FHIRResourceType.ValueSet rt : FHIRResourceType.ValueSet.values()) { resources.add(rt.value()); } Integer highestValue = 0; Map<String, Integer> valueMap = new HashMap<>(); for (Entry<Object, Object> valueEntry : props.entrySet()) { Integer curVal = Integer.parseInt((String) valueEntry.getValue()); String resource = (String) valueEntry.getKey(); valueMap.put(resource, curVal); if (highestValue < curVal) { highestValue = curVal; } resources.remove(resource); } for (String resource : resources) { LOGGER.info(resource + "=" + highestValue++); found = true; } } catch (IOException e) { throw new IllegalArgumentException("File access issue for resource_types"); } if (found) { throw new IllegalArgumentException("Resources are missing from resource_types"); } } PopulateResourceTypes(String adminSchemaName, String schemaName, Integer tenantId); @Override void run(IDatabaseTranslator translator, Connection c); static void verify(); }
PopulateResourceTypes implements IDatabaseStatement { public static void verify() { Properties props = new Properties(); boolean found = false; try (InputStream fis = PopulateResourceTypes.class.getClassLoader().getResourceAsStream("resource_types.properties")) { props.load(fis); Set<String> resources = new HashSet<>(); for (FHIRResourceType.ValueSet rt : FHIRResourceType.ValueSet.values()) { resources.add(rt.value()); } Integer highestValue = 0; Map<String, Integer> valueMap = new HashMap<>(); for (Entry<Object, Object> valueEntry : props.entrySet()) { Integer curVal = Integer.parseInt((String) valueEntry.getValue()); String resource = (String) valueEntry.getKey(); valueMap.put(resource, curVal); if (highestValue < curVal) { highestValue = curVal; } resources.remove(resource); } for (String resource : resources) { LOGGER.info(resource + "=" + highestValue++); found = true; } } catch (IOException e) { throw new IllegalArgumentException("File access issue for resource_types"); } if (found) { throw new IllegalArgumentException("Resources are missing from resource_types"); } } PopulateResourceTypes(String adminSchemaName, String schemaName, Integer tenantId); @Override void run(IDatabaseTranslator translator, Connection c); static void verify();  }