@Test public void testEntityContainerImpl() { EntityContainerImpl.Builder entityContainerBuilder = new EntityContainerImpl.Builder(); entityContainerBuilder.setName("entityContainer"); NavigationPropertyBinding navigation = new NavigationPropertyBindingImpl("path", "target"); Singleton singleton = new SingletonImpl.Builder() .setName("singleton") .setTypeName("Singleton") .addNavigationPropertyBinding(navigation) .addNavigationPropertyBindings(Collections.singletonList(navigation)) .build(); entityContainerBuilder.addSingletons(Collections.singletonList(singleton)); entityContainerBuilder.setBaseEntityContainerName("baseName"); EntityContainerImpl entityContainer = entityContainerBuilder.build(); assertThat(entityContainer.getName(), is(notNullValue())); assertThat(entityContainer.getName(), is("entityContainer")); assertThat(entityContainer.getSingletons().size(), is(1)); assertThat(entityContainer.getSingleton("singleton"), is(notNullValue())); assertThat(entityContainer.getBaseEntityContainerName(), is("baseName")); assertThat(entityContainer.getEntitySet("singleton"), is(nullValue())); }
private EntityContainerImpl(Builder builder) { this.name = builder.name; this.namespace = builder.namespace; this.baseEntityContainerName = builder.baseEntityContainerName; this.entitySets = Collections.unmodifiableMap(builder.entitySetsBuilder); this.singletons = Collections.unmodifiableMap(builder.singletonsBuilder); this.functionImports = Collections.unmodifiableMap(builder.functionImportsBuilder); this.actionImports = Collections.unmodifiableMap(builder.actionImportsBuilder); }
EntityContainerImpl implements EntityContainer { private EntityContainerImpl(Builder builder) { this.name = builder.name; this.namespace = builder.namespace; this.baseEntityContainerName = builder.baseEntityContainerName; this.entitySets = Collections.unmodifiableMap(builder.entitySetsBuilder); this.singletons = Collections.unmodifiableMap(builder.singletonsBuilder); this.functionImports = Collections.unmodifiableMap(builder.functionImportsBuilder); this.actionImports = Collections.unmodifiableMap(builder.actionImportsBuilder); } }
EntityContainerImpl implements EntityContainer { private EntityContainerImpl(Builder builder) { this.name = builder.name; this.namespace = builder.namespace; this.baseEntityContainerName = builder.baseEntityContainerName; this.entitySets = Collections.unmodifiableMap(builder.entitySetsBuilder); this.singletons = Collections.unmodifiableMap(builder.singletonsBuilder); this.functionImports = Collections.unmodifiableMap(builder.functionImportsBuilder); this.actionImports = Collections.unmodifiableMap(builder.actionImportsBuilder); } private  EntityContainerImpl(Builder builder); }
EntityContainerImpl implements EntityContainer { private EntityContainerImpl(Builder builder) { this.name = builder.name; this.namespace = builder.namespace; this.baseEntityContainerName = builder.baseEntityContainerName; this.entitySets = Collections.unmodifiableMap(builder.entitySetsBuilder); this.singletons = Collections.unmodifiableMap(builder.singletonsBuilder); this.functionImports = Collections.unmodifiableMap(builder.functionImportsBuilder); this.actionImports = Collections.unmodifiableMap(builder.actionImportsBuilder); } private  EntityContainerImpl(Builder builder); @Override String getName(); @Override String getNamespace(); @Override String getBaseEntityContainerName(); @Override List<EntitySet> getEntitySets(); @Override EntitySet getEntitySet(String entitySetName); @Override List<Singleton> getSingletons(); @Override Singleton getSingleton(String singletonName); @Override List<ActionImport> getActionImports(); @Override ActionImport getActionImport(String actionImportName); @Override List<FunctionImport> getFunctionImports(); @Override FunctionImport getFunctionImport(String functionImportName); @Override String toString(); }
EntityContainerImpl implements EntityContainer { private EntityContainerImpl(Builder builder) { this.name = builder.name; this.namespace = builder.namespace; this.baseEntityContainerName = builder.baseEntityContainerName; this.entitySets = Collections.unmodifiableMap(builder.entitySetsBuilder); this.singletons = Collections.unmodifiableMap(builder.singletonsBuilder); this.functionImports = Collections.unmodifiableMap(builder.functionImportsBuilder); this.actionImports = Collections.unmodifiableMap(builder.actionImportsBuilder); } private  EntityContainerImpl(Builder builder); @Override String getName(); @Override String getNamespace(); @Override String getBaseEntityContainerName(); @Override List<EntitySet> getEntitySets(); @Override EntitySet getEntitySet(String entitySetName); @Override List<Singleton> getSingletons(); @Override Singleton getSingleton(String singletonName); @Override List<ActionImport> getActionImports(); @Override ActionImport getActionImport(String actionImportName); @Override List<FunctionImport> getFunctionImports(); @Override FunctionImport getFunctionImport(String functionImportName); @Override String toString();  }