org.israfil.sqlelements
Class SimpleColumn
java.lang.Object
org.israfil.sqlelements.AbstractAliasedSQLElement
org.israfil.sqlelements.SimpleColumn
- All Implemented Interfaces:
- java.lang.Cloneable, AliasedSQLElement, Column, SQLElement
public class SimpleColumn
- extends AbstractAliasedSQLElement
- implements Column
A simple implementation of a Column which takes a name and a table. The table
can be any Table object.
- Version:
- $Revision: 25 $
- Author:
- Christian Edward Gruber , Latest: $Author: cgruber $
Constructor Summary |
SimpleColumn(Table table,
java.lang.String colName)
Constructs a Column implementation instance |
SimpleColumn(Table table,
java.lang.String colName,
java.lang.String alias)
Constructs a Column implementation instance |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
table
protected Table table
name
protected java.lang.String name
SimpleColumn
public SimpleColumn(Table table,
java.lang.String colName)
- Constructs a Column implementation instance
- Parameters:
table
- A Table object of which this Column is a field.colName
- The name of this column
SimpleColumn
public SimpleColumn(Table table,
java.lang.String colName,
java.lang.String alias)
- Constructs a Column implementation instance
- Parameters:
table
- A Table object of which this Column is a field.colName
- The name of this columnalias
- An alternate designation for this column - usually shorter
getTable
public Table getTable()
- Specified by:
getTable
in interface Column
getName
public java.lang.String getName()
- Specified by:
getName
in interface Column
render
public java.lang.String render(SQLRenderContext context)
- Specified by:
render
in interface SQLElement
createColumns
public static SimpleColumn[] createColumns(Table table,
java.lang.String... names)
- Convenience method to create batches of SimpleColumns from an array
of names. Note: this cannot be used to create SimpleColumns with
aliases.
- Parameters:
table
- A table, within whom the columns will be created.names
- An array of column names
- Returns:
- an array of SimpleColumns
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright 2005-2005-2006 null. All Rights Reserved.