Package org.apache.calcite.sql.validate
Class SqlMonikerImpl
- java.lang.Object
-
- org.apache.calcite.sql.validate.SqlMonikerImpl
-
- All Implemented Interfaces:
SqlMoniker
public class SqlMonikerImpl extends java.lang.Object implements SqlMoniker
A generic implementation ofSqlMoniker
.
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.collect.ImmutableList<java.lang.String>
names
private SqlMonikerType
type
-
Fields inherited from interface org.apache.calcite.sql.validate.SqlMoniker
COMPARATOR
-
-
Constructor Summary
Constructors Constructor Description SqlMonikerImpl(java.lang.String name, SqlMonikerType type)
Creates a moniker with a single name.SqlMonikerImpl(java.util.List<java.lang.String> names, SqlMonikerType type)
Creates a moniker with an array of names.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.util.List<java.lang.String>
getFullyQualifiedNames()
Returns the array of component names.SqlMonikerType
getType()
Returns the type of object referred to by this moniker.int
hashCode()
java.lang.String
id()
SqlIdentifier
toIdentifier()
Creates aSqlIdentifier
containing the fully-qualified name.java.lang.String
toString()
-
-
-
Field Detail
-
names
private final com.google.common.collect.ImmutableList<java.lang.String> names
-
type
private final SqlMonikerType type
-
-
Constructor Detail
-
SqlMonikerImpl
public SqlMonikerImpl(java.util.List<java.lang.String> names, SqlMonikerType type)
Creates a moniker with an array of names.
-
SqlMonikerImpl
public SqlMonikerImpl(java.lang.String name, SqlMonikerType type)
Creates a moniker with a single name.
-
-
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
-
getType
public SqlMonikerType getType()
Description copied from interface:SqlMoniker
Returns the type of object referred to by this moniker. Never null.- Specified by:
getType
in interfaceSqlMoniker
-
getFullyQualifiedNames
public java.util.List<java.lang.String> getFullyQualifiedNames()
Description copied from interface:SqlMoniker
Returns the array of component names.- Specified by:
getFullyQualifiedNames
in interfaceSqlMoniker
-
toIdentifier
public SqlIdentifier toIdentifier()
Description copied from interface:SqlMoniker
Creates aSqlIdentifier
containing the fully-qualified name.- Specified by:
toIdentifier
in interfaceSqlMoniker
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
id
public java.lang.String id()
- Specified by:
id
in interfaceSqlMoniker
-
-