@Override public Set<String> getMeasureNames() { Set<String> measureNames = new HashSet<>(); for (CubeMeasure f : getMeasures()) { measureNames.add(f.getName().toLowerCase()); } return measureNames; }
@Override public Set<String> getMeasureNames() { Set<String> measureNames = new HashSet<>(); for (CubeMeasure f : getMeasures()) { measureNames.add(f.getName().toLowerCase()); } return measureNames; }
public Set<CubeColumn> getAllFields() { Set<CubeColumn> columns = Sets.newHashSet(); columns.addAll(getMeasures()); columns.addAll(getDimAttributes()); columns.addAll(getExpressions()); return columns; }
public Set<CubeColumn> getAllFields() { Set<CubeColumn> columns = Sets.newHashSet(); columns.addAll(getMeasures()); columns.addAll(getDimAttributes()); columns.addAll(getExpressions()); return columns; }
@Override public boolean equals(Object obj) { if (!super.equals(obj)) { return false; } Cube other = (Cube) obj; if (this.getMeasures() == null) { if (other.getMeasures() != null) { return false; } } else if (!this.getMeasures().equals(other.getMeasures())) { return false; } if (this.getDimAttributes() == null) { if (other.getDimAttributes() != null) { return false; } } else if (!this.getDimAttributes().equals(other.getDimAttributes())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (!super.equals(obj)) { return false; } Cube other = (Cube) obj; if (this.getMeasures() == null) { if (other.getMeasures() != null) { return false; } } else if (!this.getMeasures().equals(other.getMeasures())) { return false; } if (this.getDimAttributes() == null) { if (other.getDimAttributes() != null) { return false; } } else if (!this.getDimAttributes().equals(other.getDimAttributes())) { return false; } return true; }
public Cube(Table tbl) { super(tbl); this.measures = getMeasures(getName(), getProperties()); this.dimensions = getDimensions(getName(), getProperties()); measureMap = new HashMap<>(); for (CubeMeasure m : measures) { measureMap.put(m.getName().toLowerCase(), m); } dimMap = new HashMap<>(); for (CubeDimAttribute dim : dimensions) { addAllDimsToMap(dim); } }
public Cube(Table tbl) { super(tbl); this.measures = getMeasures(getName(), getProperties()); this.dimensions = getDimensions(getName(), getProperties()); measureMap = new HashMap<>(); for (CubeMeasure m : measures) { measureMap.put(m.getName().toLowerCase(), m); } dimMap = new HashMap<>(); for (CubeDimAttribute dim : dimensions) { addAllDimsToMap(dim); } }
assertEquals(moreCubeMeasures.size(), cube2.getMeasures().size()); assertEquals(cubeExpressions.size(), cube2.getExpressions().size()); assertEquals(cubeExpressions.size(), cube2.getExpressionNames().size());
assertEquals(cubeMeasures.size(), cube2.getMeasures().size()); assertEquals(cubeExpressions.size(), cube2.getExpressions().size()); assertEquals(cubeExpressions.size(), cube2.getExpressionNames().size()); assertEquals(cubeMeasures.size(), cube2.getMeasureNames().size()); assertEquals(cubeDimensions.size() + 8, cube2.getDimAttributeNames().size()); assertEquals(cubeMeasures.size(), cube2.getMeasures().size()); assertEquals(cubeDimensions.size(), cube2.getDimAttributes().size()); assertNotNull(cube2.getMeasureByName("msr4"));