com.virtuosotechnologies.asaph.model.opsemantics
Class OrPredicateSemantics.DefaultImplementation

java.lang.Object
  extended bycom.virtuosotechnologies.asaph.model.opsemantics.OrPredicateSemantics.DefaultImplementation
All Implemented Interfaces:
OrPredicateSemantics, PredicateSemantics, SongOperation
Enclosing class:
OrPredicateSemantics

public static class OrPredicateSemantics.DefaultImplementation
extends Object
implements OrPredicateSemantics

The default implementation of OrPredicateSemantics


Nested Class Summary
 
Nested classes inherited from class com.virtuosotechnologies.asaph.model.opsemantics.OrPredicateSemantics
OrPredicateSemantics.DefaultImplementation
 
Constructor Summary
OrPredicateSemantics.DefaultImplementation(Iterator children)
          Constructor
OrPredicateSemantics.DefaultImplementation(PredicateSemantics[] children)
          Constructor
OrPredicateSemantics.DefaultImplementation(PredicateSemantics child1, PredicateSemantics child2)
          Constructor
 
Method Summary
 boolean equals(Object obj)
          The equals method should return true if the given object is a SongOperation with the same semantics as this one.
 List getChildren()
          Get the immutable collection of child predicates.
 void perform(SongIDResultSet resultSet)
          Performs the operation on the given result set.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrPredicateSemantics.DefaultImplementation

public OrPredicateSemantics.DefaultImplementation(Iterator children)
Constructor

Parameters:
children - iterator over children to add

OrPredicateSemantics.DefaultImplementation

public OrPredicateSemantics.DefaultImplementation(PredicateSemantics child1,
                                                  PredicateSemantics child2)
Constructor

Parameters:
child1 - a child
child2 - a child

OrPredicateSemantics.DefaultImplementation

public OrPredicateSemantics.DefaultImplementation(PredicateSemantics[] children)
Constructor

Parameters:
children - an array of child predicates
Method Detail

getChildren

public List getChildren()
Get the immutable collection of child predicates.

Specified by:
getChildren in interface OrPredicateSemantics
Returns:
Child predicates as an immutable List

perform

public void perform(SongIDResultSet resultSet)
             throws SongDatabaseFailedException
Performs the operation on the given result set.

Specified by:
perform in interface SongOperation
Parameters:
resultSet - the SongIDResultSet
Throws:
SongDatabaseFailedException - Catch-all exception for database-related problems. This will often have a cause exception, which may be exceptions like IOException or SQLException.

equals

public boolean equals(Object obj)
The equals method should return true if the given object is a SongOperation with the same semantics as this one. (i.e. it would perform the same operation.) This may be used to optimize performance. It is always safe to return false from this method, if the semantics of the given object cannot be determined. (This is similar to the equals method in java.util.Comparator.) As a corollary, it is safe just to fall back on the default implementation inherited from java.lang.Object.

Specified by:
equals in interface SongOperation
Parameters:
obj - object to test
Returns:
true if the object is equal