Class ColumnName

  • All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Comparable<ColumnName>

    public class ColumnName
    extends java.lang.Object
    implements java.lang.Comparable<ColumnName>, java.lang.Cloneable
    This class represents a column name that appears in an SQL expression. The name may be a simple column name (e.g. "price"), a table name and column name (e.g. "product.price"), or it may be a wildcard specifier with or without the table name (e.g. "*" or "product.*").
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String columnName
      The name of the column, or if this value is null then it represents a wildcard value *.
      private java.lang.String tableName
      The name of the table that the column name (or wildcard) is associated with.
    • Constructor Summary

      Constructors 
      Constructor Description
      ColumnName()
      Creates a new object corresponding to the wildcard column specifier "*".
      ColumnName​(java.lang.String columnName)  
      ColumnName​(java.lang.String tableName, java.lang.String columnName)  
    • Field Detail

      • tableName

        private java.lang.String tableName
        The name of the table that the column name (or wildcard) is associated with. If this value is null then the table name is not specified.
      • columnName

        private java.lang.String columnName
        The name of the column, or if this value is null then it represents a wildcard value *.
    • Constructor Detail

      • ColumnName

        public ColumnName​(java.lang.String tableName,
                          java.lang.String columnName)
      • ColumnName

        public ColumnName​(java.lang.String columnName)
      • ColumnName

        public ColumnName()
        Creates a new object corresponding to the wildcard column specifier "*".
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException
      • compareTo

        public int compareTo​(ColumnName other)
        Specified by:
        compareTo in interface java.lang.Comparable<ColumnName>
      • getTableName

        public java.lang.String getTableName()
      • setTableName

        public void setTableName​(java.lang.String tableName)
      • getColumnName

        public java.lang.String getColumnName()
      • setColumnName

        public void setColumnName​(java.lang.String columnName)
      • isTableSpecified

        public boolean isTableSpecified()
      • isColumnWildcard

        public boolean isColumnWildcard()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object