Class ComponentMapping
- All Implemented Interfaces:
Queryable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
ComponentMapping.ComponentMappingBuilder<C extends ComponentMapping,
B extends ComponentMapping.ComponentMappingBuilder<C, B>> static class
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentMapping.ComponentMappingBuilder<?,
?> builder()
static ComponentMapping
boolean
existsByFirstColumn
(String query) Determines if the mapping contains at least one row, where the first column is equal to the provided query string.getData()
Gets all data of this mapping.com.iqser.red.service.persistence.service.v1.api.shared.model.component.ComponentMappingMetadata
Returns the metadata associated with this component mapping.Queries the data using the provided query.
-
Method Details
-
empty
-
where
Description copied from interface:Queryable
Queries the data using the provided query.A simple query string might look something like this:
number = 10
"number" must match one of the column labels exactly, "=" describes the operator, and "10" the value.
Other operators include:
- =, equals
- contains
- matches
- soundslike
For more details, see:
QueryOperator
.It's also important to note all strings containing whitespaces must be escaped using the char ' as such:
name contains 'John Doe'
If the query is supposed to contain the character ', the character must be escaped using \. e.g.
name = Peter\\'s
The escape character \ needs to be escaped itself due to java's string handling.
When performance is of concern due to very large component mapping files, the first query should use the EQUALS operator and be performed on the first column of the CSV.
Then a binary search will be performed, significantly speeding up the first lookup.
-
existsByFirstColumn
Determines if the mapping contains at least one row, where the first column is equal to the provided query string.- Parameters:
query
- String to search for- Returns:
- true, if the mapping has at least one row, which has the query string as its first value.
-
getData
Gets all data of this mapping. -
getMetaData
public com.iqser.red.service.persistence.service.v1.api.shared.model.component.ComponentMappingMetadata getMetaData()Description copied from interface:Queryable
Returns the metadata associated with this component mapping.- Specified by:
getMetaData
in interfaceQueryable
- Returns:
- metadata of the component mapping
-
builder
-