Class InMemoryMetadataRepository
- java.lang.Object
-
- it.bancaditalia.oss.vtl.impl.domains.InMemoryMetadataRepository
-
- All Implemented Interfaces:
MetadataRepository
,Serializable
- Direct Known Subclasses:
CSVMetadataRepository
,SDMXMetadataRepository
public class InMemoryMetadataRepository extends Object implements MetadataRepository, Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InMemoryMetadataRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <S extends ValueDomainSubset<S,D>,D extends ValueDomain>
SdefineDomain(String alias, Class<S> domainClass, Object param)
Creates a new domain instance and registers it inside this repository (optional operation).protected <S extends ValueDomainSubset<S,D>,D extends ValueDomain>
BiConsumer<? super String,? super Object>defineDomainOf(Class<S> domainClass)
ValueDomainSubset<?,?>
getDomain(String alias)
Returns a domain with the specified name if it exists.Collection<ValueDomainSubset<?,?>>
getValueDomains()
boolean
isDomainDefined(String domain)
Checks if aValueDomainSubset
with the specified name exists.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface it.bancaditalia.oss.vtl.session.MetadataRepository
init, registerDomain
-
-
-
-
Method Detail
-
getValueDomains
public Collection<ValueDomainSubset<?,?>> getValueDomains()
- Specified by:
getValueDomains
in interfaceMetadataRepository
- Returns:
- a collection of all
ValueDomainSubset
s defined in thisMetadataRepository
.
-
isDomainDefined
public boolean isDomainDefined(String domain)
Description copied from interface:MetadataRepository
Checks if aValueDomainSubset
with the specified name exists.- Specified by:
isDomainDefined
in interfaceMetadataRepository
- Parameters:
domain
- the name of the domain to check- Returns:
- true if a domain exists.
-
getDomain
public ValueDomainSubset<?,?> getDomain(String alias)
Description copied from interface:MetadataRepository
Returns a domain with the specified name if it exists.- Specified by:
getDomain
in interfaceMetadataRepository
- Parameters:
alias
- the name of the domain- Returns:
- the domain or null if none exists.
-
defineDomain
public <S extends ValueDomainSubset<S,D>,D extends ValueDomain> S defineDomain(String alias, Class<S> domainClass, Object param)
Description copied from interface:MetadataRepository
Creates a new domain instance and registers it inside this repository (optional operation).- Specified by:
defineDomain
in interfaceMetadataRepository
- Type Parameters:
S
- the type of the domain- Parameters:
alias
- the name of the new domaindomainClass
- the class of the domainparam
- optional parameters to pass to the domain class constructor- Returns:
- the created domain instance.
-
defineDomainOf
protected <S extends ValueDomainSubset<S,D>,D extends ValueDomain> BiConsumer<? super String,? super Object> defineDomainOf(Class<S> domainClass)
-
-