Skip to content

Commit

Permalink
MONDRIAN/UTIL: Fix coding standards for a new file and for .cup files…
Browse files Browse the repository at this point in the history
… in general.

[git-p4: depot-paths = "//open/mondrian/": change = 11562]
  • Loading branch information
julianhyde committed Sep 16, 2008
1 parent 39c5f30 commit 3e0b7db
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 21 deletions.
57 changes: 43 additions & 14 deletions src/main/mondrian/olap/Parser.cup
Expand Up @@ -1043,12 +1043,24 @@ else_clause_opt ::=
// | <greater_than_or_equals_operator>
// "IS" is not a comp_op because of conflict with "<expr> IS EMPTY"
comp_op ::=
EQ {: RESULT = "="; :}
| NE {: RESULT = "<>"; :}
| LT {: RESULT = "<"; :}
| GT {: RESULT = ">"; :}
| LE {: RESULT = "<="; :}
| GE {: RESULT = ">="; :}
EQ {:
RESULT = "=";
:}
| NE {:
RESULT = "<>";
:}
| LT {:
RESULT = "<";
:}
| GT {:
RESULT = ">";
:}
| LE {:
RESULT = "<=";
:}
| GE {:
RESULT = ">=";
:}
;
//
// <equals_operator> ::= =
Expand Down Expand Up @@ -1256,7 +1268,9 @@ exp_list ::=
// [<cell_props>]
statement ::=
select_statement
| _VALUE_EXPRESSION expression:e {: RESULT = (QueryPart) e; :}
| _VALUE_EXPRESSION expression:e {:
RESULT = (QueryPart) e;
:}
;

select_statement ::=
Expand Down Expand Up @@ -1303,7 +1317,10 @@ axis_specification_list ::=
;
where_clause_opt ::=
/* empty */
| WHERE slicer_specification:s {: RESULT = s; :};
| WHERE slicer_specification:s {:
RESULT = s;
:}
;
cell_props_opt ::=
/* empty */ {:
RESULT = new LinkedList();
Expand Down Expand Up @@ -1449,8 +1466,12 @@ axis_specification ::=
;

non_empty_opt ::=
/* empty */ {: RESULT = Boolean.FALSE; :}
| NON EMPTY {: RESULT = Boolean.TRUE; :}
/* empty */ {:
RESULT = Boolean.FALSE;
:}
| NON EMPTY {:
RESULT = Boolean.TRUE;
:}
;
dim_props_opt ::=
/* empty */
Expand All @@ -1464,17 +1485,23 @@ dim_props_opt ::=
// | SECTIONS
// | AXIS(<index>)
axis_name ::=
identifier:i {: RESULT = i.name; :}
identifier:i {:
RESULT = i.name;
:}
;

axis_number ::=
NUMBER
| AXIS LPAREN NUMBER:n RPAREN {: RESULT = n; :}
| AXIS LPAREN NUMBER:n RPAREN {:
RESULT = n;
:}
;
//
// <dim_props> ::= [DIMENSION] PROPERTIES <property> [, <property>...]
dim_props ::=
dimension_opt PROPERTIES property_list:pl {: RESULT = pl; :}
dimension_opt PROPERTIES property_list:pl {:
RESULT = pl;
:}
;
dimension_opt ::=
/* empty */
Expand Down Expand Up @@ -1506,7 +1533,9 @@ slicer_specification ::=
//
// <cell_props> ::= [CELL] PROPERTIES <cell_property> [, <cell_property>...]
cell_props ::=
cell_opt PROPERTIES cell_property_list:p1 {: RESULT = p1; :}
cell_opt PROPERTIES cell_property_list:p1 {:
RESULT = p1;
:}
;
cell_opt ::=
/* empty */
Expand Down
15 changes: 8 additions & 7 deletions src/main/mondrian/rolap/MemberNoCacheHelper.java
Expand Up @@ -21,12 +21,13 @@

/**
* Encapsulation of member caching for no caching.
*
*
* @author Luis F. Canals (lcanals@tasecurity.net)
* @version $Id$
*/
public class MemberNoCacheHelper extends MemberCacheHelper {
DataSourceChangeListener changeListener;

public MemberNoCacheHelper() {
super(null);
}
Expand All @@ -44,7 +45,7 @@ public RolapMember getMember(
public Object putMember(Object key, RolapMember value) {
return value;
}

// implement MemberCache
public Object makeKey(RolapMember parent, Object key) {
return new MemberKey(parent, key);
Expand All @@ -55,13 +56,13 @@ public Object makeKey(RolapMember parent, Object key) {
public synchronized RolapMember getMember(Object key) {
return getMember(key, true);
}

public void checkCacheStatus() {
}

/**
* ???
*
*
* @param level
* @param constraint
* @param members
Expand Down Expand Up @@ -95,7 +96,7 @@ public DataSourceChangeListener getChangeListener() {
}

public void setChangeListener(DataSourceChangeListener listener) {
changeListener = listener;
changeListener = listener;
}

public boolean isMutable() {
Expand All @@ -107,7 +108,7 @@ public synchronized RolapMember removeMember(Object key) {
}

public synchronized RolapMember removeMemberAndDescendants(Object key) {
return null;
return null;
}
}

Expand Down

0 comments on commit 3e0b7db

Please sign in to comment.