|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fuberlin.wiwiss.d2rq.algebra.Attribute
public class Attribute
A database column. TODO: Attribute should track its DataType TODO: Attribute should track whether it is nullable
Constructor Summary | |
---|---|
Attribute(RelationName relationName,
String attributeName)
|
|
Attribute(String schemaName,
String tableName,
String attributeName)
Constructs a new attribute from a schema name, table name and attribute name. |
Method Summary | |
---|---|
String |
attributeName()
Extracts the database column name from a tablename.columnname combination. |
int |
compareTo(ProjectionSpec other)
Compares columns alphanumerically by qualified name, case sensitive. |
boolean |
equals(Object other)
Compares this instance to another object. |
int |
hashCode()
Returns a hash code for this intance. |
Expression |
notNullExpression(ConnectedDB db,
AliasMap aliases)
|
String |
qualifiedName()
Returns the column name in Table.Column form |
RelationName |
relationName()
Returns the table name, including the schema if the table is in a schema. |
ProjectionSpec |
renameAttributes(ColumnRenamer renamer)
|
Set<Attribute> |
requiredAttributes()
|
String |
schemaName()
Extracts the database schema name from a schema.table.colum combination. |
Expression |
selectValue(String value)
|
String |
tableName()
Returns the database table name. |
Expression |
toExpression()
|
String |
toSQL(ConnectedDB database,
AliasMap aliases)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Attribute(String schemaName, String tableName, String attributeName)
schemaName
- The schema name, or null if not in a schematableName
- The table nameattributeName
- The column namepublic Attribute(RelationName relationName, String attributeName)
Method Detail |
---|
public String qualifiedName()
public String toSQL(ConnectedDB database, AliasMap aliases)
toSQL
in interface ProjectionSpec
public String attributeName()
public String tableName()
public RelationName relationName()
public String schemaName()
public Set<Attribute> requiredAttributes()
requiredAttributes
in interface ProjectionSpec
public Expression selectValue(String value)
public ProjectionSpec renameAttributes(ColumnRenamer renamer)
renameAttributes
in interface ProjectionSpec
public Expression toExpression()
toExpression
in interface ProjectionSpec
public Expression notNullExpression(ConnectedDB db, AliasMap aliases)
notNullExpression
in interface ProjectionSpec
public String toString()
toString
in class Object
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int compareTo(ProjectionSpec other)
compareTo
in interface Comparable<ProjectionSpec>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |