Code example for ImmutableBiMap.Builder

Methods: put

0
  private Builder<String, EntityType<?>> entityTypeBuilder = ImmutableBiMap.builder();
  private Builder<Class<?>, ManagedType<?>> managedTypeBuilder = ImmutableBiMap.builder();
  private Builder<Class<?>, EmbeddableType<?>> embeddableTypeBuilder = ImmutableBiMap.builder();
 
  <X> void addEntityType(EntityType<X> e) {
    entityTypeBuilder.put(e.getJavaType().getName(), e); 
    managedTypeBuilder.put(e.getJavaType(), e);
  } 
 
  <X> void addManagedType(ManagedType<X> e) {
    managedTypeBuilder.put(e.getJavaType(), e);
  } 
 
  <X> void addEmbeddableType(EmbeddableType<X> e) {
    embeddableTypeBuilder.put(e.getJavaType(), e);
    managedTypeBuilder.put(e.getJavaType(), e);
  } 
 
  /** 
   * Freezes the definition of this metamodel. Once frozen, no more entity