Interface DataDictionary
-
- All Implemented Interfaces:
-
com.embabel.common.core.types.Named
public interface DataDictionary implements NamedExposes access to a set of known data types
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDataDictionary.Companion
-
Method Summary
Modifier and Type Method Description DataDictionaryfilter(Function1<DomainType, Boolean> predicate)Returns a new DataDictionary containing only domain types that match the predicate. DataDictionaryexcluding(Class<?> classes)Returns a new DataDictionary excluding the specified classes. DataDictionaryexcluding(Collection<Class<?>> classes)Returns a new DataDictionary excluding the specified classes. DataDictionaryminus(Class<?> clazz)Kotlin operator for excluding a single class. DataDictionaryminus(Collection<Class<?>> classes)Kotlin operator for excluding multiple classes. List<AllowedRelationship>allowedRelationships()Get all relationships between domain types in this dictionary. DomainTypedomainTypeForLabels(Set<String> labels)The domain type matching these labels, if we have one abstract Collection<DomainType>getDomainTypes()All known types referenced by this component. Collection<DynamicType>getDynamicTypes()Collection<JvmType>getJvmTypes()-
-
Method Detail
-
filter
DataDictionary filter(Function1<DomainType, Boolean> predicate)
Returns a new DataDictionary containing only domain types that match the predicate.
- Parameters:
predicate- Filter function applied to each DomainType- Returns:
A new DataDictionary with filtered types
-
excluding
DataDictionary excluding(Class<?> classes)
Returns a new DataDictionary excluding the specified classes. Only affects JvmType entries; DynamicTypes are preserved.
- Parameters:
classes- Classes to exclude- Returns:
A new DataDictionary without the specified classes
-
excluding
DataDictionary excluding(Collection<Class<?>> classes)
Returns a new DataDictionary excluding the specified classes. Only affects JvmType entries; DynamicTypes are preserved.
- Parameters:
classes- Collection of classes to exclude- Returns:
A new DataDictionary without the specified classes
-
minus
DataDictionary minus(Class<?> clazz)
Kotlin operator for excluding a single class. Usage:
dictionary - Foo::class.java- Parameters:
clazz- Class to exclude- Returns:
A new DataDictionary without the specified class
-
minus
DataDictionary minus(Collection<Class<?>> classes)
Kotlin operator for excluding multiple classes. Usage:
dictionary - setOf(Foo::class.java, Bar::class.java)- Parameters:
classes- Classes to exclude- Returns:
A new DataDictionary without the specified classes
-
allowedRelationships
List<AllowedRelationship> allowedRelationships()
Get all relationships between domain types in this dictionary. A relationship is a property that references another DomainType (not a simple property).
- Returns:
List of all possible relationships
-
domainTypeForLabels
DomainType domainTypeForLabels(Set<String> labels)
The domain type matching these labels, if we have one
-
getDomainTypes
abstract Collection<DomainType> getDomainTypes()
All known types referenced by this component. These may or may not be backed by JVM objects.
-
getDynamicTypes
Collection<DynamicType> getDynamicTypes()
-
getJvmTypes
Collection<JvmType> getJvmTypes()
-
-
-
-