|
Oracle OLAP Java API Reference 10g Release 1 (10.1) B10994-01 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--oracle.olapi.data.source.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 its subclasses have an acceptVisitor method. The acceptVisitor method takes as its input parameters a CursorSpecificationVisitor object and a context Object. When an application calls the acceptVisitor method on a CursorSpecification, the acceptVisitor method calls the corresponding visit method on the CursorSpecificationVisitor. The acceptVisitor method passes the CursorSpecification and the context to the visit method. For example, if an application calls the acceptVisitor method on a CompoundCursorSpecification and passes it a CursorSpecificationVisitor and a context, then the acceptVisitor method passes the CompoundCursorSpecification and the context to the visitCompoundCursorSpecification method of the CursorSpecificationVisitor.
Your context 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 on 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 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.
|
Oracle OLAP Java API Reference 10g Release 1 (10.1) B10994-01 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||