org.d2rq.db.op
Class ProjectOp

java.lang.Object
  extended by org.d2rq.db.op.DatabaseOp.Wrapper
      extended by org.d2rq.db.op.ProjectOp
All Implemented Interfaces:
DatabaseOp

public class ProjectOp
extends DatabaseOp.Wrapper

Also forces all projected columns and expression to be not null.

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
 
Method Summary
 void accept(OpVisitor visitor)
           
static ProjectOp create(DatabaseOp wrapped, Collection<ProjectionSpec> specs)
           
static ProjectOp create(DatabaseOp wrapped, ColumnName... columns)
           
static ProjectOp create(DatabaseOp wrapped, ProjectionSpec... specs)
           
 boolean equals(Object o)
           
static DatabaseOp extend(DatabaseOp wrapped, Map<ColumnName,Expression> extensions, Vendor vendor)
           
 List<ColumnName> getColumns()
           
 DataType getColumnType(ColumnName column)
           
 List<ProjectionSpec> getProjections()
           
 Collection<Key> getUniqueKeys()
           
 boolean hasColumn(ColumnName column)
           
 int hashCode()
           
 boolean isNullable(ColumnName column)
           
 String toString()
           
 
Methods inherited from class org.d2rq.db.op.DatabaseOp.Wrapper
getTableName, getWrapped
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static ProjectOp create(DatabaseOp wrapped,
                               ColumnName... columns)

create

public static ProjectOp create(DatabaseOp wrapped,
                               Collection<ProjectionSpec> specs)

create

public static ProjectOp create(DatabaseOp wrapped,
                               ProjectionSpec... specs)

extend

public static DatabaseOp extend(DatabaseOp wrapped,
                                Map<ColumnName,Expression> extensions,
                                Vendor vendor)

getProjections

public List<ProjectionSpec> getProjections()

hasColumn

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

getColumns

public List<ColumnName> getColumns()
Specified by:
getColumns in interface DatabaseOp
Overrides:
getColumns in class DatabaseOp.Wrapper
Returns:
Fully qualified column names if possible, no duplicates

isNullable

public boolean isNullable(ColumnName column)
Specified by:
isNullable in interface DatabaseOp
Overrides:
isNullable in class DatabaseOp.Wrapper

getColumnType

public DataType getColumnType(ColumnName column)
Specified by:
getColumnType in interface DatabaseOp
Overrides:
getColumnType in class DatabaseOp.Wrapper

getUniqueKeys

public Collection<Key> getUniqueKeys()
Specified by:
getUniqueKeys in interface DatabaseOp
Overrides:
getUniqueKeys in class DatabaseOp.Wrapper

accept

public void accept(OpVisitor visitor)

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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