public XProperties withProperty(XProperty... values) { if (values!= null) { for (XProperty value: values) { getProperty().add(value); } } return this; }
public XProperties withProperty(Collection<XProperty> values) { if (values!= null) { getProperty().addAll(values); } return this; }
public XProperties withProperty(Collection<XProperty> values) { if (values!= null) { getProperty().addAll(values); } return this; }
public XProperties withProperty(XProperty... values) { if (values!= null) { for (XProperty value: values) { getProperty().add(value); } } return this; }
public static Map<String, String> mapFromXProperties(XProperties xProperties) { Map<String, String> properties = new HashMap<String, String>(); if (xProperties != null && xProperties.getProperty() != null && !xProperties.getProperty().isEmpty()) { for (XProperty xp : xProperties.getProperty()) { properties.put(xp.getName(), xp.getValue()); } } return properties; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { List<XProperty> theProperty; theProperty = (((this.property!= null)&&(!this.property.isEmpty()))?this.getProperty():null); strategy.appendField(locator, this, "property", buffer, theProperty); } return buffer; }
public static XProperties getXProperties(List<XProperty> prop) { XProperties properties = XCF.createXProperties(); properties.getProperty().addAll(prop); return properties; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { List<XProperty> theProperty; theProperty = (((this.property!= null)&&(!this.property.isEmpty()))?this.getProperty():null); strategy.appendField(locator, this, "property", buffer, theProperty); } return buffer; }
public static XProperties getXProperties(List<XProperty> prop) { XProperties properties = XCF.createXProperties(); properties.getProperty().addAll(prop); return properties; }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { List<XProperty> theProperty; theProperty = (((this.property!= null)&&(!this.property.isEmpty()))?this.getProperty():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "property", theProperty), currentHashCode, theProperty); } return currentHashCode; }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { List<XProperty> theProperty; theProperty = (((this.property!= null)&&(!this.property.isEmpty()))?this.getProperty():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "property", theProperty), currentHashCode, theProperty); } return currentHashCode; }
public static XProperties getXpropertiesFromSegment(Segment cseg) { XProperties xproperties = XCF.createXProperties(); for (String prop : cseg.getProperties().keySet()) { String segPrefix = MetastoreUtil.getSegmentPropertyKey(cseg.getName()); if (prop.startsWith(segPrefix)){ XProperty xprop = XCF.createXProperty(); xprop.setName(prop.replace(segPrefix, "")); xprop.setValue(cseg.getProperties().get(prop)); xproperties.getProperty().add(xprop); } } return xproperties; }
public static Set<Segment> segmentsFromXSegments(XSegments segs) { Set<Segment> cubeSegs = new HashSet<>(); for (XSegment xcube : segs.getSegment()){ Map<String, String> segProp = new HashMap<>(); if (xcube.getSegmentParameters() != null) { for (XProperty prop : xcube.getSegmentParameters().getProperty()) { segProp.put(prop.getName(), prop.getValue()); } } cubeSegs.add(new Segment(xcube.getCubeName(), segProp)); } return cubeSegs; }
public static XStorage xstorageFromStorage(Storage storage) { if (storage == null) { return null; } XStorage xstorage = null; xstorage = XCF.createXStorage(); xstorage.setProperties(new XProperties()); xstorage.setName(storage.getName()); xstorage.setClassname(storage.getClass().getCanonicalName()); xstorage.getProperties().getProperty().addAll(xPropertiesFromMap(storage.getProperties())); return xstorage; }
public static XStorage xstorageFromStorage(Storage storage) { if (storage == null) { return null; } XStorage xstorage = null; xstorage = XCF.createXStorage(); xstorage.setProperties(new XProperties()); xstorage.setName(storage.getName()); xstorage.setClassname(storage.getClass().getCanonicalName()); xstorage.getProperties().getProperty().addAll(xPropertiesFromMap(storage.getProperties())); return xstorage; }
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 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 static XFactTable factTableFromCubeFactTable(FactTable cFact) { XFactTable fact = XCF.createXFactTable(); fact.setName(cFact.getName()); fact.setColumns(new XColumns()); fact.setProperties(new XProperties()); fact.setStorageTables(new XStorageTables()); fact.getProperties().getProperty().addAll(xPropertiesFromMap(cFact.getProperties())); fact.getColumns().getColumn().addAll(columnsFromFieldSchemaList(cFact.getColumns())); fact.setWeight(cFact.weight()); fact.setCubeName(cFact.getCubeName()); return fact; }
public static XFactTable factTableFromCubeFactTable(FactTable cFact) { XFactTable fact = XCF.createXFactTable(); fact.setName(cFact.getName()); fact.setColumns(new XColumns()); fact.setProperties(new XProperties()); fact.setStorageTables(new XStorageTables()); fact.getProperties().getProperty().addAll(xPropertiesFromMap(cFact.getProperties())); fact.getColumns().getColumn().addAll(columnsFromFieldSchemaList(cFact.getColumns())); fact.setWeight(cFact.weight()); fact.setCubeName(cFact.getCubeName()); return fact; }
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; }