Class AssetMapping
java.lang.Object
org.eclipse.edc.sql.translation.TranslationMapping
org.eclipse.edc.connector.controlplane.store.sql.assetindex.schema.postgres.AssetMapping
public class AssetMapping
extends org.eclipse.edc.sql.translation.TranslationMapping
Maps fields of a
Asset onto the
corresponding SQL schema (= column names) enabling access through Postgres JSON operators where applicable-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFieldTranslator(String fieldPath) Permit to get the field translator for properties when only the property name is defined.org.eclipse.edc.sql.translation.WhereClausegetWhereClause(org.eclipse.edc.spi.query.Criterion criterion, org.eclipse.edc.sql.translation.SqlOperator operator) Permit to get theWhereClausefor properties when only the property name is defined.Methods inherited from class org.eclipse.edc.sql.translation.TranslationMapping
add, add, add
-
Constructor Details
-
AssetMapping
-
-
Method Details
-
getFieldTranslator
Permit to get the field translator for properties when only the property name is defined. It tries to get it with the argument passed, if null is returned it looks up into 'properties', if null is returned it looks into properties wrapping the left operand with '', to permit handling property keys that contain a dot.- Overrides:
getFieldTranslatorin classorg.eclipse.edc.sql.translation.TranslationMapping- Parameters:
fieldPath- the path name.- Returns:
- a function that translates the right operand class into the left operand.
-
getWhereClause
public org.eclipse.edc.sql.translation.WhereClause getWhereClause(org.eclipse.edc.spi.query.Criterion criterion, org.eclipse.edc.sql.translation.SqlOperator operator) Permit to get theWhereClausefor properties when only the property name is defined. It tries to get it with the argument passed, if null is returned it looks up into 'properties', if null is returned it looks into properties wrapping the left operand with '', to permit handling property keys that contain a dot.- Overrides:
getWhereClausein classorg.eclipse.edc.sql.translation.TranslationMapping- Parameters:
criterion- the criterion.operator- the operator.- Returns:
- the
WhereClause.
-