|
Oracle® OLAP Java API Reference 11g Release 2 (11.2) E10794-03 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectoracle.olapi.data.source.CursorSpecificationVisitor
public abstract class CursorSpecificationVisitor
A visitor object that can execute operations on
CursorSpecification objects.
A CursorSpecificationVisitor can implement polymorphic
behavior without having access to the internal code of the
CursorSpecification subclasses.
CursorSpecificationVisitor has a visit method for each
of the classes in the CursorSpecification hierarchy.
CursorSpecification and the subclasses of it have an
acceptVisitor method.
The acceptVisitor method takes as input parameters a
CursorSpecificationVisitor object and an Object.
When an application calls the acceptVisitor method of a
CursorSpecification, the acceptVisitor method
calls the corresponding visit method of the
CursorSpecificationVisitor.
The acceptVisitor method passes the
CursorSpecification and the Object to the visit method.
For example, if an application calls the acceptVisitor method of a
CompoundCursorSpecification and passes it a
CursorSpecificationVisitor and an Object,
then the acceptVisitor method passes the
CompoundCursorSpecification and the Object
to the visitCompoundCursorSpecification method of the
CursorSpecificationVisitor.
Your context parameter Object can be anything you
want it to be.
A visit method of your CursorSpecificationVisitor can perform
whatever operations you want it to on the CursorSpecification
it receives.
For example, a visitCompoundCursorSpecification method might
call the isExtentCalculationSpecified method of the
CompoundCursorSpecification to discover if the
CompoundCursorSpecification specifies that the extent should
be calculated for the CompoundCursor.
The method might then call methods on the context Object to format
and display the resulting information.
A visit method must return a java.lang.Object, which can be
whatever you want it to be.
| Constructor Summary | |
|---|---|
protected |
CursorSpecificationVisitor()
Creates a new CursorSpecificationVisitor. |
| Method Summary | |
|---|---|
java.lang.Object |
visitCompoundCursorSpecification(CompoundCursorSpecification cursorSpecification,
java.lang.Object context)
Executes operations on the specified CompoundCursorSpecification. |
java.lang.Object |
visitCursorSpecification(CursorSpecification cursorSpecification,
java.lang.Object context)
Executes operations on any object that is a subclass of CursorSpecification, which is useful when you do not need
subclass-specific information. |
java.lang.Object |
visitValueCursorSpecification(ValueCursorSpecification cursorSpecification,
java.lang.Object context)
Executes operations on the specified ValueCursorSpecification. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected CursorSpecificationVisitor()
CursorSpecificationVisitor.
| Method Detail |
|---|
public java.lang.Object visitCursorSpecification(CursorSpecification cursorSpecification,
java.lang.Object context)
CursorSpecification, which is useful when you do not need
subclass-specific information.
The default implementation of this method returns null.
cursorSpecification - A CursorSpecification.context - An Object.
Object.
public java.lang.Object visitCompoundCursorSpecification(CompoundCursorSpecification cursorSpecification,
java.lang.Object context)
CompoundCursorSpecification.
The default implementation of this method calls
visitCursorSpecification.
cursorSpecification - A CompoundCursorSpecification.context - An Object.
Object.
public java.lang.Object visitValueCursorSpecification(ValueCursorSpecification cursorSpecification,
java.lang.Object context)
ValueCursorSpecification.
The default implementation of this method calls
visitCursorSpecification.
cursorSpecification - A ValueCursorSpecification.context - An Object.
Object.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||