@Test public void testIsValid2() { CubeDesc cube = getTestKylinCubeWithoutSeller(); try { assertEquals(false, Cuboid.isValid(cube, toLong("111111111"))); fail(); } catch (IllegalArgumentException ex) { } assertEquals(false, Cuboid.isValid(cube, 0)); assertEquals(true, Cuboid.isValid(cube, toLong("11111111"))); assertEquals(true, Cuboid.isValid(cube, toLong("10000111"))); assertEquals(false, Cuboid.isValid(cube, toLong("10001111"))); assertEquals(false, Cuboid.isValid(cube, toLong("11001111"))); assertEquals(true, Cuboid.isValid(cube, toLong("10000001"))); assertEquals(true, Cuboid.isValid(cube, toLong("10000101"))); assertEquals(true, Cuboid.isValid(cube, toLong("10100000"))); assertEquals(true, Cuboid.isValid(cube, toLong("10110000"))); assertEquals(true, Cuboid.isValid(cube, toLong("10111000"))); assertEquals(false, Cuboid.isValid(cube, toLong("10001000"))); assertEquals(false, Cuboid.isValid(cube, toLong("10011000"))); }
public static boolean isValid(CubeDesc cube, long cuboidID) { RowKeyDesc rowkey = cube.getRowkey(); if (cuboidID < 0) { throw new IllegalArgumentException("Cuboid " + cuboidID + " should be greater than 0"); } if (checkBaseCuboid(rowkey, cuboidID)) { return true; } if (checkMandatoryColumns(rowkey, cuboidID) == false) { return false; } if (checkAggregationGroup(rowkey, cuboidID) == false) { return false; } if (checkHierarchy(rowkey, cuboidID) == false) { return false; } return true; }
Cuboid implements Comparable<Cuboid> { public static boolean isValid(CubeDesc cube, long cuboidID) { RowKeyDesc rowkey = cube.getRowkey(); if (cuboidID < 0) { throw new IllegalArgumentException("Cuboid " + cuboidID + " should be greater than 0"); } if (checkBaseCuboid(rowkey, cuboidID)) { return true; } if (checkMandatoryColumns(rowkey, cuboidID) == false) { return false; } if (checkAggregationGroup(rowkey, cuboidID) == false) { return false; } if (checkHierarchy(rowkey, cuboidID) == false) { return false; } return true; } }
Cuboid implements Comparable<Cuboid> { public static boolean isValid(CubeDesc cube, long cuboidID) { RowKeyDesc rowkey = cube.getRowkey(); if (cuboidID < 0) { throw new IllegalArgumentException("Cuboid " + cuboidID + " should be greater than 0"); } if (checkBaseCuboid(rowkey, cuboidID)) { return true; } if (checkMandatoryColumns(rowkey, cuboidID) == false) { return false; } if (checkAggregationGroup(rowkey, cuboidID) == false) { return false; } if (checkHierarchy(rowkey, cuboidID) == false) { return false; } return true; } private  Cuboid(CubeDesc cube, long originalID, long validID); }
Cuboid implements Comparable<Cuboid> { public static boolean isValid(CubeDesc cube, long cuboidID) { RowKeyDesc rowkey = cube.getRowkey(); if (cuboidID < 0) { throw new IllegalArgumentException("Cuboid " + cuboidID + " should be greater than 0"); } if (checkBaseCuboid(rowkey, cuboidID)) { return true; } if (checkMandatoryColumns(rowkey, cuboidID) == false) { return false; } if (checkAggregationGroup(rowkey, cuboidID) == false) { return false; } if (checkHierarchy(rowkey, cuboidID) == false) { return false; } return true; } private  Cuboid(CubeDesc cube, long originalID, long validID); static Cuboid findById(CubeDesc cube, byte[] cuboidID); static Cuboid findById(CubeDesc cube, long cuboidID); static boolean isValid(CubeDesc cube, long cuboidID); static long getBaseCuboidId(CubeDesc cube); CubeDesc getCube(); List<TblColRef> getColumns(); List<TblColRef> getAggregationColumns(); long getId(); byte[] getBytes(); long getInputID(); boolean useAncestor(); boolean requirePostAggregation(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(Cuboid o); }
Cuboid implements Comparable<Cuboid> { public static boolean isValid(CubeDesc cube, long cuboidID) { RowKeyDesc rowkey = cube.getRowkey(); if (cuboidID < 0) { throw new IllegalArgumentException("Cuboid " + cuboidID + " should be greater than 0"); } if (checkBaseCuboid(rowkey, cuboidID)) { return true; } if (checkMandatoryColumns(rowkey, cuboidID) == false) { return false; } if (checkAggregationGroup(rowkey, cuboidID) == false) { return false; } if (checkHierarchy(rowkey, cuboidID) == false) { return false; } return true; } private  Cuboid(CubeDesc cube, long originalID, long validID); static Cuboid findById(CubeDesc cube, byte[] cuboidID); static Cuboid findById(CubeDesc cube, long cuboidID); static boolean isValid(CubeDesc cube, long cuboidID); static long getBaseCuboidId(CubeDesc cube); CubeDesc getCube(); List<TblColRef> getColumns(); List<TblColRef> getAggregationColumns(); long getId(); byte[] getBytes(); long getInputID(); boolean useAncestor(); boolean requirePostAggregation(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(Cuboid o);  }