Interface MetadataRepository

    • Method Detail

      • isDomainDefined

        boolean isDomainDefined​(String name)
        Checks if a ValueDomainSubset with the specified name exists.
        Parameters:
        name - the name of the domain to check
        Returns:
        true if a domain exists.
      • getDomain

        ValueDomainSubset<?,​?> getDomain​(String name)
        Returns a domain with the specified name if it exists.
        Parameters:
        name - the name of the domain
        Returns:
        the domain or null if none exists.
      • registerDomain

        default <S extends ValueDomainSubset<S,​D>,​D extends ValueDomain> S registerDomain​(String name,
                                                                                                      S domain)
        Registers a new domain instance inside this repository (optional operation).
        Type Parameters:
        S - the type of the domain
        Parameters:
        name - the name of the new domain
        domain - the domain instance
        Returns:
        the same domain instance.
      • defineDomain

        default <S extends ValueDomainSubset<S,​D>,​D extends ValueDomain> S defineDomain​(String name,
                                                                                                    Class<S> domainClass,
                                                                                                    Object param)
        Creates a new domain instance and registers it inside this repository (optional operation).
        Type Parameters:
        S - the type of the domain
        Parameters:
        name - the name of the new domain
        domainClass - the class of the domain
        param - optional parameters to pass to the domain class constructor
        Returns:
        the created domain instance.
      • init

        default MetadataRepository init​(Object... params)
        Initialize this MetadataRepository. This method should be always called once per instance, before attempting any other operation.
        Parameters:
        params - optional initialization parameters
        Returns:
        this instance