org.d2rq.db.renamer
Class Renamer
java.lang.Object
org.d2rq.db.renamer.Renamer
- Direct Known Subclasses:
- ColumnRenamer, TableRenamer
public abstract class Renamer
- extends Object
Something that can rename tables and columns in various objects.
- Author:
- Richard Cyganiak (richard@cyganiak.de)
Field Summary |
static Renamer |
IDENTITY
An optimized ColumnRenamer that leaves every column unchanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IDENTITY
public static final Renamer IDENTITY
- An optimized ColumnRenamer that leaves every column unchanged
Renamer
public Renamer()
applyTo
public abstract ColumnName applyTo(ColumnName original)
- Parameters:
original
- A column name
- Returns:
- The renamed version of that column name, or the same column name
if the renamer does not apply to this argument
applyTo
public abstract TableName applyTo(TableName original)
- Parameters:
original
- A table name
- Returns:
- The renamed version of that table name, or the original if the
renamer does not apply to this argument
applyTo
public Expression applyTo(Expression original)
- Parameters:
original
- An expression
- Returns:
- An expression with all columns renamed according to this Renamer
applyTo
public Identifier applyTo(TableName table,
Identifier identifier)
applyTo
public ForeignKey applyTo(TableName table,
ForeignKey foreignKey)
- Renames tables/columns in a
ForeignKey
.
- Parameters:
table
- The table on which the foreign key is definedforeignKey
- The foreign key to be renamed
- Returns:
- A foreign key with all columns renamed according to this Renamer
applyToJoinConditions
public Set<ColumnListEquality> applyToJoinConditions(Set<ColumnListEquality> joins)
applyTo
public Key applyTo(TableName table,
Key key)
applyTo
public ProjectionSpec applyTo(ProjectionSpec original)
applyToProjections
public Collection<ProjectionSpec> applyToProjections(Collection<ProjectionSpec> projections)
applyTo
public List<OrderOp.OrderSpec> applyTo(List<OrderOp.OrderSpec> orderSpecs)
applyToTabulars
public Set<DatabaseOp> applyToTabulars(Set<DatabaseOp> originals)
applyTo
public NodeMaker applyTo(NodeMaker nodeMaker)
applyToColumns
public List<ColumnName> applyToColumns(List<ColumnName> columns)