org.xcmis.search.model.source
Class Selector

java.lang.Object
  extended by org.xcmis.search.model.source.Source
      extended by org.xcmis.search.model.source.Selector
All Implemented Interfaces:
Serializable, QueryElement

public class Selector
extends Source

Created by The eXo Platform SAS.

Version:
$Id: SelectorImpl.java 2 2010-02-04 17:21:49Z andrew00x $
Author:
Sergey Kabashnyuk
See Also:
Serialized Form

Constructor Summary
Selector(SelectorName name)
          Create a selector with a name.
Selector(SelectorName name, SelectorName alias)
          Create a selector with the supplied name and alias.
 
Method Summary
 void accept(QueryObjectModelVisitor visitor)
          Accepts a visitor and calls the appropriate visit method depending on the type of this QOM node.
 boolean equals(Object obj)
          
 SelectorName getAlias()
          Get the alias name for this source, if there is one.
 SelectorName getAliasOrName()
          Get the alias if this selector has one, or the name.
 SelectorName getName()
          Get the name for this selector.
 boolean hasAlias()
          Determine if this selector has an alias.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Selector

public 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

public 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

accept

public void accept(QueryObjectModelVisitor visitor)
            throws VisitException
Accepts a visitor and calls the appropriate visit method depending on the type of this QOM node.

Parameters:
visitor - the visitor.
Throws:
VisitException

getAlias

public SelectorName getAlias()
Get the alias name for this source, if there is one.

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

getAliasOrName

public SelectorName getAliasOrName()
Get the alias if this selector has one, or the name.

Returns:
the alias or name; never null

getName

public SelectorName getName()
Get the name for this selector.

Returns:
the selector 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.

equals

public boolean equals(Object obj)

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

hashCode

public int hashCode()

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

toString

public String toString()

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


Copyright © 2010 eXo Platform SAS. All Rights Reserved.