Class AbstractTranslator

    • Field Detail

      • properties

        @Inject
        protected PdbProperties properties
        The properties in place.
      • injector

        @Inject
        protected com.google.inject.Injector injector
        The Guice injector.
    • Constructor Detail

      • AbstractTranslator

        public AbstractTranslator()
    • Method Detail

      • inject

        protected void inject​(Expression... objs)
        Injects dependencies on the given objects.
        Parameters:
        objs - The objects to be injected.
      • inject

        protected void inject​(Collection<? extends Expression> objs)
        Injects dependencies on the given objects.
        Parameters:
        objs - The objects to be injected.
      • join

        protected String join​(Collection<?> list,
                              String delimiter)
        Joins a collection of objects given the delimiter.
        Parameters:
        list - The collection of objects to join.
        delimiter - The delimiter.
        Returns:
        A String representing the given objects separated by the delimiter.
      • translate

        public String translate​(Name n)
        Translates Name.
        Parameters:
        n - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public String translate​(Between b)
        Translates Between.
        Parameters:
        b - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public String translate​(Coalesce c)
        Translates Coalesce.
        Parameters:
        c - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public String translate​(Delete d)
        Translates Delete.
        Parameters:
        d - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public String translate​(Join j)
        Translates Join.
        Parameters:
        j - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public String translate​(K k)
        Translates K.
        Parameters:
        k - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public String translate​(Literal l)
        Translates Literal.
        Parameters:
        l - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public String translate​(Truncate t)
        Translates Truncate.
        Parameters:
        t - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public String translate​(Update u)
        Translates Update.
        Parameters:
        u - The object to translate.
        Returns:
        The string representation of the given object.
      • translateUpdate

        protected String translateUpdate​(Update update)
        Translates Update.
        Parameters:
        update - The update to translate.
        Returns:
        The string representation of the given object.
      • translateUpdateFrom

        protected String translateUpdateFrom​(Update update)
        Translates Update considering the FROM clause.
        Parameters:
        update - The update to translate.
        Returns:
        The string representation of the given object.
      • translateUpdateSetClause

        protected String translateUpdateSetClause​(Update update)
        Translates Update SET clause.
        Parameters:
        update - The update to translate.
        Returns:
        The string representation of the SET clause.
      • translate

        public String translate​(With with)
      • translate

        public String translate​(When when)
        Translates When.
        Parameters:
        when - a when.
        Returns:
        when translation.
      • translate

        public String translate​(Case aCase)
        Translates Case.
        Parameters:
        aCase - a case.
        Returns:
        case translation.
      • translate

        public abstract String translate​(Cast cast)
        Translates Cast.
        Parameters:
        cast - a cast expression.
        Returns:
        cast translation.
      • translate

        public String translate​(Union union)
        Translates Union.
        Parameters:
        union - a union.
        Returns:
        union translation.
      • translate

        public String translate​(Values values)
        Translates Values.
        Parameters:
        values - a values.
        Returns:
        values translation.
      • translate

        public String translate​(Values.Row row)
        Translates Values.Row.
        Parameters:
        row - a values.row.
        Returns:
        values.row translation.
      • rowsToUnion

        protected Union rowsToUnion​(List<Expression> rows)
        Transform values' rows into a union.
        Parameters:
        rows - the values' rows
        Returns:
        the resulting union
      • translate

        public String translate​(Concat concat)
        Transform the concat keyword.
        Parameters:
        concat - the concat.
        Returns:
        the translated concat.
      • translateEscape

        public abstract String translateEscape()
        Translates the escape character.
        Returns:
        The string representation of the escape character.
      • translateTrue

        public abstract String translateTrue()
        Translates the boolean true.
        Returns:
        The string representation of the true keyword.
      • translateFalse

        public abstract String translateFalse()
        Translates the boolean false.
        Returns:
        The string representation of the false keyword.
      • translate

        public abstract String translate​(AlterColumn ac)
        Translates Name.
        Parameters:
        ac - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public abstract String translate​(DropPrimaryKey dpk)
        Translates DropPrimaryKey.
        Parameters:
        dpk - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public abstract String translate​(Function f)
        Translates Function.
        Parameters:
        f - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public abstract String translate​(Modulo m)
        Translates Modulo.
        Parameters:
        m - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public abstract String translate​(Rename r)
        Translates Rename.
        Parameters:
        r - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public abstract String translate​(RepeatDelimiter rd)
        Translates RepeatDelimiter.
        Parameters:
        rd - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public abstract String translate​(Query q)
        Translates Query.
        Parameters:
        q - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public abstract String translate​(View v)
        Translates View.
        Parameters:
        v - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public abstract String translate​(DbColumn dc)
        Translates DbColumn.
        Parameters:
        dc - The object to translate.
        Returns:
        The string representation of the given object.
      • translate

        public abstract String translate​(StringAgg stringAgg)
        Translates StringAgg.
        Parameters:
        stringAgg - The object to translate.
        Returns:
        The string representation of the given object.