org.modeshape.graph.query.model
Class Column

java.lang.Object
  extended by org.modeshape.graph.query.model.Column
All Implemented Interfaces:
Serializable, LanguageObject, Visitable

@Immutable
public class Column
extends Object
implements LanguageObject

See Also:
Serialized Form

Constructor Summary
Column(SelectorName selectorName)
          Include a column for each of the single-valued, accessible properties on the node identified by the selector.
Column(SelectorName selectorName, String propertyName, String columnName)
          A column with the given name representing the named property on the node identified by the selector.
 
Method Summary
 void accept(Visitor visitor)
          Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.
 boolean equals(Object obj)
          
 String getColumnName()
          Get the name of the column.
 String getPropertyName()
          Get the name of the property that this column represents.
 SelectorName getSelectorName()
          Get the name of the selector for the node.
 int hashCode()
          
 String toString()
          
 Column with(SelectorName newSelectorName)
          Create a copy of this Column except that uses the supplied selector name instead.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Column

public Column(SelectorName selectorName)
Include a column for each of the single-valued, accessible properties on the node identified by the selector.

Parameters:
selectorName - the selector name

Column

public Column(SelectorName selectorName,
              String propertyName,
              String columnName)
A column with the given name representing the named property on the node identified by the selector.

Parameters:
selectorName - the selector name
propertyName - the name of the property
columnName - the name of the column
Method Detail

getSelectorName

public final SelectorName getSelectorName()
Get the name of the selector for the node.

Returns:
the selector name; never null

getPropertyName

public final String getPropertyName()
Get the name of the property that this column represents.

Returns:
the property name; or null if this represents all selectable columns on the selector

getColumnName

public final String getColumnName()
Get the name of the column.

Returns:
the column name; or null if this represents all selectable columsn on the selector

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

with

public Column with(SelectorName newSelectorName)
Create a copy of this Column except that uses the supplied selector name instead.

Parameters:
newSelectorName - the new selector name
Returns:
a new Column with the supplied selector name and the property and column names from this object; never null
Throws:
IllegalArgumentException - if the supplied selector name is null

accept

public void accept(Visitor visitor)
Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.

Specified by:
accept in interface Visitable
Parameters:
visitor - the visitor; never null
See Also:
Visitable.accept(org.modeshape.graph.query.model.Visitor)


Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.