Class TypeNameIndexingAdapter

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.String> getNames()
      Provides information about model names
      java.util.Optional<java.lang.String> getTypeName​(java.lang.String typeId)
      Returns type for the model
      void registerType​(java.lang.String typeName, java.lang.String typeId)
      Add model name as is without adjusting
      void registerUniqueType​(java.lang.String typeName, java.lang.String typeId)
      Register model name to keep it unique
      void setEqualityFor​(java.lang.String typeIdOf, java.lang.String typeIdTo)
      Sets equality of two models to make sure, that models will be treated as one
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TypeNameIndexingAdapter

        public TypeNameIndexingAdapter()
    • Method Detail

      • getNames

        public java.util.Map<java.lang.String,​java.lang.String> getNames()
        Description copied from interface: UniqueTypeNameAdapter
        Provides information about model names
        Specified by:
        getNames in interface UniqueTypeNameAdapter
        Returns:
        a map with Models id and name
      • getTypeName

        public java.util.Optional<java.lang.String> getTypeName​(java.lang.String typeId)
        Description copied from interface: UniqueTypeNameAdapter
        Returns type for the model
        Specified by:
        getTypeName in interface UniqueTypeNameAdapter
        Parameters:
        typeId - - id of model type
        Returns:
        Optional of a model names
      • registerType

        public void registerType​(java.lang.String typeName,
                                 java.lang.String typeId)
        Description copied from interface: UniqueTypeNameAdapter
        Add model name as is without adjusting
        Specified by:
        registerType in interface UniqueTypeNameAdapter
        Parameters:
        typeName - - string representation of the models name
        typeId - - id of model type
      • registerUniqueType

        public void registerUniqueType​(java.lang.String typeName,
                                       java.lang.String typeId)
        Description copied from interface: UniqueTypeNameAdapter
        Register model name to keep it unique
        Specified by:
        registerUniqueType in interface UniqueTypeNameAdapter
        Parameters:
        typeName - - string representation of the models name
        typeId - - id of model type
      • setEqualityFor

        public void setEqualityFor​(java.lang.String typeIdOf,
                                   java.lang.String typeIdTo)
        Description copied from interface: UniqueTypeNameAdapter
        Sets equality of two models to make sure, that models will be treated as one
        Specified by:
        setEqualityFor in interface UniqueTypeNameAdapter
        Parameters:
        typeIdOf - - id of current model type
        typeIdTo - - id of existing model type