Package edu.caltech.nanodb.expressions
Class ColumnName
- java.lang.Object
-
- edu.caltech.nanodb.expressions.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 isnull
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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
int
compareTo(ColumnName other)
boolean
equals(java.lang.Object obj)
java.lang.String
getColumnName()
java.lang.String
getTableName()
int
hashCode()
boolean
isColumnWildcard()
boolean
isTableSpecified()
void
setColumnName(java.lang.String columnName)
void
setTableName(java.lang.String tableName)
java.lang.String
toString()
-
-
-
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 isnull
then the table name is not specified.
-
columnName
private java.lang.String columnName
The name of the column, or if this value isnull
then it represents a wildcard value *.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
compareTo
public int compareTo(ColumnName other)
- Specified by:
compareTo
in interfacejava.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 classjava.lang.Object
-
-