Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.jcr.query.model
Class Selector

    java.lang.Object
      org.modeshape.jcr.query.model.Selector

All Implemented Interfaces:
  Serializable, Selector, Source, LanguageObject, Visitable

Direct Known Subclasses:
  AllNodes, NamedSelector

    @Immutable
    public abstract class Selector

extends Object
implements Source, Selector

See Also:
  Serialized Form

Constructor Summary
`protected` | `Selector(SelectorName name)` Create a selector with a name.
`protected` | `Selector(SelectorName name, SelectorName alias)` Create a selector with the supplied name and alias.

Method Summary
`SelectorName` | `alias()` Get the alias name for this source, if there is one.
`SelectorName` | `aliasOrName()` Get the alias if this selector has one, or the name.
`String` | `getNodeTypeName()`
`String` | `getSelectorName()`
`boolean` | `hasAlias()` Determine if this selector has an alias.
`SelectorName` | `name()` Get the name for this selector.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.modeshape.jcr.query.model.Visitable
`accept`

Constructor Detail

### Selector

    protected Selector(SelectorName name)

  Create a selector with a name.

  Parameters:
    `name` - the name for this selector
  Throws:
    `IllegalArgumentException` - if the selector name is null

### Selector

    protected Selector(SelectorName name,
                       SelectorName alias)

  Create a selector with the supplied name and alias.

  Parameters:
    `name` - the name for this selector
    `alias` - the alias for this selector; may be null
  Throws:
    `IllegalArgumentException` - if the selector name is null

Method Detail

### name

    public SelectorName name()

  Get the name for this selector.

  Returns:
    the selector name; never null

### alias

    public SelectorName alias()

  Get the alias name for this source, if there is one.

  Returns:
    the alias name, or null if there is none.

### aliasOrName

    public SelectorName aliasOrName()

  Get the alias if this selector has one, or the name.

  Returns:
    the alias or name; never null

### hasAlias

    public boolean hasAlias()

  Determine if this selector has an alias.

  Returns:
    true if this selector has an alias, or false otherwise.

### getNodeTypeName

    public String getNodeTypeName()

  Specified by:
    `getNodeTypeName` in interface `Selector`

### getSelectorName

    public String getSelectorName()

  Specified by:
    `getSelectorName` in interface `Selector`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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