Skip to content

Commit

Permalink
Fixed javadoc warnings and added override of hashCode for base XMLA m…
Browse files Browse the repository at this point in the history
…etadata object.

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@254 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
lucboudreau committed Jun 30, 2009
1 parent e4b2fdb commit 9d30869
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 deletions.
2 changes: 0 additions & 2 deletions src/org/olap4j/OlapDatabaseMetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,6 @@ ResultSet getDimensions(
* function description
*
* @exception OlapException if a database access error occurs
*
* @see java.sql.DatabaseMetaData#getFunctions(String, String, String)
* @see #getSearchStringEscape
*/
ResultSet getOlapFunctions(
Expand Down
9 changes: 9 additions & 0 deletions src/org/olap4j/driver/xmla/XmlaOlap4jElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ abstract class XmlaOlap4jElement implements MetadataElement, Named {
protected final String name;
protected final String caption;
protected final String description;
private int hash = 0;

XmlaOlap4jElement(
String uniqueName,
Expand Down Expand Up @@ -58,6 +59,14 @@ public String getCaption(Locale locale) {
public String getDescription(Locale locale) {
return description;
}

public int hashCode() {
// By the book implementation of a hash code identifier.
if (this.hash == 0) {
hash = (getClass().hashCode() << 8) ^ getUniqueName().hashCode();
}
return hash;
}
}

// End XmlaOlap4jElement.java
2 changes: 1 addition & 1 deletion src/org/olap4j/query/QueryEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public QueryEvent.Type getOperation() {
/**
* Returns a map of objects affected by the event and
* their index in the list of the source children.
* If the event is of type {@link QueryEvent.Type.SELECTION_CHANGED},
* If the event is of type QueryEvent.Type.SELECTION_CHANGED,
* this method will return null because the source object was affected
* and not the children.
*/
Expand Down
23 changes: 11 additions & 12 deletions src/org/olap4j/query/QueryNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,19 @@
interface QueryNode {

/**
* Registers a new listener for a {@link QueryNode}.
*
* @param listener Listener
* Registers a new listener for a QueryNode.
* @param l The new listener object, implementation of QueryNodeListener
* @see org.olap4j.query.QueryNodeListener
*/
public void addQueryNodeListener(QueryNodeListener listener);
public void addQueryNodeListener(QueryNodeListener l);

/**
* De-registers a listener for a {@link QueryNode}.
*
* <p>REVIEW: Is it an error if the listener does not exist?
*
* @param listener Listener
* De-registers a new listener for a QueryNode.
* If the listener object passed as a parameter was not registered,
* the method will return silently.
* @param l The listener object to de-register.
* @see org.olap4j.query.QueryNodeListener
*/
public void removeQueryNodeListener(QueryNodeListener listener);
public void removeQueryNodeListener(QueryNodeListener l);
}

// End QueryNode.java
// End QueryNode.java
8 changes: 4 additions & 4 deletions src/org/olap4j/query/QueryNodeListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
*/
public interface QueryNodeListener {
/**
* Invoked when one or more children of a {@link QueryNode} are removed
* Invoked when one or more children of a QueryNode are removed
* from its list.
*
* @param event Describes in detail the actual event that just happened.
*/
public void childrenRemoved(QueryEvent event);

/**
* Invoked when one or more children are added to a {@link QueryNode}
* Invoked when one or more children are added to a QueryNode
* list of children.
*
* @param event Describes in detail the actual event that just happened.
Expand All @@ -39,8 +39,8 @@ public interface QueryNodeListener {
* it only means that its operator value was modified.
*
* @param event Describes in detail the actual event that just happened.
* @see Selection
*/
* @see org.olap4j.query.Selection
**/
public void selectionChanged(QueryEvent event);
}

Expand Down

0 comments on commit 9d30869

Please sign in to comment.