Class SQLAlias

java.lang.Object
no.sikt.graphitron.definitions.sql.SQLAlias

public class SQLAlias extends Object
For multiple joins on the same table, aliases are required to distinguish them.
  • Constructor Details

    • SQLAlias

      public SQLAlias(String name, String shortName, String joinTargetMethod, String joinSourceTable)
      Parameters:
      joinTargetMethod - The table to be joined with, using the provided method.
      joinSourceTable - The table to be joined from.
  • Method Details

    • getJoinSourceTable

      public String getJoinSourceTable()
      Returns:
      Source table to join from. The "left" side of a join statement.
    • getJoinTargetMethod

      public String getJoinTargetMethod()
      Returns:
      The target table to be joined with. The "right" side of a join statement.
    • getName

      public String getName()
      Returns:
      The alias to be used to uniquely distinguish this join operation.
    • getShortName

      public String getShortName()
      Returns:
      Shortened alias name that will not exceed the max character limit for aliases.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object