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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Permit to get the field translator for properties when only the property name is defined.
    org.eclipse.edc.sql.translation.WhereClause
    getWhereClause(org.eclipse.edc.spi.query.Criterion criterion, org.eclipse.edc.sql.translation.SqlOperator operator)
    Permit to get the WhereClause for properties when only the property name is defined.

    Methods inherited from class org.eclipse.edc.sql.translation.TranslationMapping

    add, add, add

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getFieldTranslator

      public Function<Class<?>,String> getFieldTranslator(String fieldPath)
      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:
      getFieldTranslator in class org.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 the WhereClause 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:
      getWhereClause in class org.eclipse.edc.sql.translation.TranslationMapping
      Parameters:
      criterion - the criterion.
      operator - the operator.
      Returns:
      the WhereClause.