org.d2rq.db.op
Class NamedOp

java.lang.Object
  extended by org.d2rq.db.op.NamedOp
All Implemented Interfaces:
Comparable<NamedOp>, DatabaseOp
Direct Known Subclasses:
AliasOp, TableOp

public abstract class NamedOp
extends Object
implements Comparable<NamedOp>, DatabaseOp

A DatabaseOp that can be used directly in the FROM clause of a SQL join. The class doesn't do anything particularly interesting; it is simply used to enforce the rule that only certain kinds of DatabaseOps are allowed as children of an InnerJoin.

Author:
Richard Cyganiak (richard@cyganiak.de)

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.d2rq.db.op.DatabaseOp
DatabaseOp.Wrapper
 
Field Summary
 
Fields inherited from interface org.d2rq.db.op.DatabaseOp
TRUE
 
Constructor Summary
NamedOp(TableName name)
           
 
Method Summary
 int compareTo(NamedOp other)
          Relations without schema are less than relations with schema.
 TableName getTableName()
           
 boolean hasColumn(ColumnName column)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.d2rq.db.op.DatabaseOp
accept, getColumns, getColumnType, getUniqueKeys, isNullable
 

Constructor Detail

NamedOp

public NamedOp(TableName name)
Method Detail

getTableName

public TableName getTableName()
Specified by:
getTableName in interface DatabaseOp
Returns:
Name in [[CATALOG.]SCHEMA.]TABLE notation

hasColumn

public boolean hasColumn(ColumnName column)
Specified by:
hasColumn in interface DatabaseOp
Parameters:
column - A qualified or unqualified column name
Returns:
false for ambiguous unqualified names

compareTo

public int compareTo(NamedOp other)
Relations without schema are less than relations with schema. Relations without schema are ordered by table name, those with schema are ordered by schema name.

Specified by:
compareTo in interface Comparable<NamedOp>