public static CubeVirtualFactTable cubeVirtualFactFromFactTable(XVirtualFactTable fact, FactTable sourceFactTable) throws LensException { Optional<Double> optionalWeight = Optional.fromNullable(fact.getWeight()); return new CubeVirtualFactTable(fact.getCubeName(), fact.getName(), optionalWeight, mapFromXProperties(fact.getProperties()), sourceFactTable); }
@Override public XVirtualFactTable withCubeName(String value) { setCubeName(value); return this; }
@Override public XVirtualFactTable withName(String value) { setName(value); return this; }
public static XVirtualFactTable virtualFactTableFromVirtualCubeFactTable(CubeVirtualFactTable vFact) { XVirtualFactTable fact = XCF.createXVirtualFactTable(); fact.setName(vFact.getName()); fact.setProperties(new XProperties()); fact.getProperties().getProperty().addAll(xPropertiesFromMap(vFact.getProperties())); fact.setWeight(vFact.weight()); fact.setSourceFactName(vFact.getSourceCubeFactTable().getName()); fact.setCubeName(vFact.getCubeName()); return fact; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { XProperties theProperties; theProperties = this.getProperties(); strategy.appendField(locator, this, "properties", buffer, theProperties); } { String theSourceFactName; theSourceFactName = this.getSourceFactName(); strategy.appendField(locator, this, "sourceFactName", buffer, theSourceFactName); } { Double theWeight; theWeight = this.getWeight(); strategy.appendField(locator, this, "weight", buffer, theWeight); } return buffer; }
public XVirtualFactTable withSourceFactName(String value) { setSourceFactName(value); return this; }
public void alterCubeFactTable(XFact fact) throws LensException, HiveException { if (fact instanceof XVirtualFactTable) { XVirtualFactTable xvf = (XVirtualFactTable) fact; alterCubeFactTable(xvf.getName(), JAXBUtils.cubeVirtualFactFromFactTable(xvf, getFactTable(xvf.getSourceFactName())), null, new HashMap<>()); } else { XFactTable xf = (XFactTable) fact; alterCubeFactTable(fact.getName(), JAXBUtils.cubeFactFromFactTable(xf), JAXBUtils.tableDescPrefixMapFromXStorageTables(xf.getStorageTables()), JAXBUtils.columnStartAndEndTimeFromXColumns(xf.getColumns())); } }
public XVirtualFactTable withProperties(XProperties value) { setProperties(value); return this; }
public XVirtualFactTable withWeight(Double value) { setWeight(value); return this; }
public static XVirtualFactTable virtualFactTableFromVirtualCubeFactTable(CubeVirtualFactTable vFact) { XVirtualFactTable fact = XCF.createXVirtualFactTable(); fact.setName(vFact.getName()); fact.setProperties(new XProperties()); fact.getProperties().getProperty().addAll(xPropertiesFromMap(vFact.getProperties())); fact.setWeight(vFact.weight()); fact.setSourceFactName(vFact.getSourceCubeFactTable().getName()); fact.setCubeName(vFact.getCubeName()); return fact; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { XProperties theProperties; theProperties = this.getProperties(); strategy.appendField(locator, this, "properties", buffer, theProperties); } { String theSourceFactName; theSourceFactName = this.getSourceFactName(); strategy.appendField(locator, this, "sourceFactName", buffer, theSourceFactName); } { Double theWeight; theWeight = this.getWeight(); strategy.appendField(locator, this, "weight", buffer, theWeight); } return buffer; }
}); XVirtualFactTable gotFact = (XVirtualFactTable) gotFactElement.getValue(); assertTrue(gotFact.getName().equalsIgnoreCase(virtualFactTable)); assertEquals(gotFact.getWeight(), 10.0); CubeVirtualFactTable cvf = JAXBUtils.cubeVirtualFactFromFactTable(gotFact, JAXBUtils.cubeFactFromFactTable(source));
public XVirtualFactTable withSourceFactName(String value) { setSourceFactName(value); return this; }
public void alterCubeFactTable(XFact fact) throws LensException, HiveException { if (fact instanceof XVirtualFactTable) { XVirtualFactTable xvf = (XVirtualFactTable) fact; alterCubeFactTable(xvf.getName(), JAXBUtils.cubeVirtualFactFromFactTable(xvf, getFactTable(xvf.getSourceFactName())), null, new HashMap<>()); } else { XFactTable xf = (XFactTable) fact; alterCubeFactTable(fact.getName(), JAXBUtils.cubeFactFromFactTable(xf), JAXBUtils.tableDescPrefixMapFromXStorageTables(xf.getStorageTables()), JAXBUtils.columnStartAndEndTimeFromXColumns(xf.getColumns())); } }
public XVirtualFactTable withProperties(XProperties value) { setProperties(value); return this; }
public XVirtualFactTable withWeight(Double value) { setWeight(value); return this; }
private XVirtualFactTable createVirtualFactTable(String factName, final String cubeName, String sourceFactName) { XVirtualFactTable f = cubeObjectFactory.createXVirtualFactTable(); f.setProperties(new XProperties()); f.setName(factName); f.setWeight(10.0); f.setCubeName(cubeName); f.setSourceFactName(sourceFactName); Map<String, String> properties = LensUtil.getHashMap("foo1", "bar1"); f.getProperties().getProperty().addAll(JAXBUtils.xPropertiesFromMap(properties)); return f; }
public static CubeVirtualFactTable cubeVirtualFactFromFactTable(XVirtualFactTable fact, FactTable sourceFactTable) throws LensException { Optional<Double> optionalWeight = Optional.fromNullable(fact.getWeight()); return new CubeVirtualFactTable(fact.getCubeName(), fact.getName(), optionalWeight, mapFromXProperties(fact.getProperties()), sourceFactTable); }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = super.hashCode(locator, strategy); { XProperties theProperties; theProperties = this.getProperties(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "properties", theProperties), currentHashCode, theProperties); } { String theSourceFactName; theSourceFactName = this.getSourceFactName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "sourceFactName", theSourceFactName), currentHashCode, theSourceFactName); } { Double theWeight; theWeight = this.getWeight(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "weight", theWeight), currentHashCode, theWeight); } return currentHashCode; }