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 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 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 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 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; }
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; }
XVirtualFactTable gotFact = (XVirtualFactTable) gotFactElement.getValue(); assertTrue(gotFact.getName().equalsIgnoreCase(table)); assertEquals(gotFact.getWeight(), 10.0); CubeVirtualFactTable cvf = JAXBUtils.cubeVirtualFactFromFactTable(gotFact, JAXBUtils.cubeFactFromFactTable(source));
XVirtualFactTable gotFact = (XVirtualFactTable) gotFactElement.getValue(); assertTrue(gotFact.getName().equalsIgnoreCase(virtualFactTable)); assertEquals(gotFact.getWeight(), 10.0); CubeVirtualFactTable cvf = JAXBUtils.cubeVirtualFactFromFactTable(gotFact, JAXBUtils.cubeFactFromFactTable(source));
public void createFactTable(XFact fact) throws LensException { if (fact instanceof XVirtualFactTable) { XVirtualFactTable xvf = (XVirtualFactTable) fact; createVirtualFactTable(xvf.getCubeName(), xvf.getName(), xvf.getSourceFactName(), xvf.getWeight(), JAXBUtils.mapFromXProperties(xvf.getProperties())); } else { XFactTable xf = (XFactTable) fact; createCubeFactTable(fact.getCubeName(), fact.getName(), JAXBUtils.fieldSchemaListFromColumns(xf.getColumns()), JAXBUtils.getFactUpdatePeriodsFromStorageTables(xf.getStorageTables()), xf.getWeight(), addFactColStartTimePropertyToFactProperties(xf), JAXBUtils.tableDescPrefixMapFromXStorageTables(xf.getStorageTables()), JAXBUtils.storageTablePrefixMapOfStorage(xf.getStorageTables())); } }
public void createFactTable(XFact fact) throws LensException { if (fact instanceof XVirtualFactTable) { XVirtualFactTable xvf = (XVirtualFactTable) fact; createVirtualFactTable(xvf.getCubeName(), xvf.getName(), xvf.getSourceFactName(), xvf.getWeight(), JAXBUtils.mapFromXProperties(xvf.getProperties())); } else { XFactTable xf = (XFactTable) fact; createCubeFactTable(fact.getCubeName(), fact.getName(), JAXBUtils.fieldSchemaListFromColumns(xf.getColumns()), JAXBUtils.getFactUpdatePeriodsFromStorageTables(xf.getStorageTables()), xf.getWeight(), addFactColStartTimePropertyToFactProperties(xf), JAXBUtils.tableDescPrefixMapFromXStorageTables(xf.getStorageTables()), JAXBUtils.storageTablePrefixMapOfStorage(xf.getStorageTables()), JAXBUtils.getStorageTablePartitionColumnsFromTableDescs(xf.getStorageTables())); } }