/** * Convert JAXB properties to Map<String, String> * * @param xProperties * @return {@link Map} */ public static Map<String, String> mapFromXProperties(XProperties xProperties) { Map<String, String> properties = new HashMap<String, String>(); if (xProperties != null && !xProperties.getProperty().isEmpty()) { for (XProperty xp : xProperties.getProperty()) { properties.put(xp.getName(), xp.getValue()); } } return properties; }
/** * Convert JAXB properties to Map<String, String> * * @param xProperties * @return {@link Map} */ public static Map<String, String> mapFromXProperties(XProperties xProperties) { Map<String, String> properties = new HashMap<String, String>(); if (xProperties != null && !xProperties.getProperty().isEmpty()) { for (XProperty xp : xProperties.getProperty()) { properties.put(xp.getName(), xp.getValue()); } } return properties; }
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) { { String theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName); } { String theValue; theValue = this.getValue(); strategy.appendField(locator, this, "value", buffer, theValue); } return buffer; }
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 StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { String theName; theName = this.getName(); strategy.appendField(locator, this, "name", buffer, theName); } { String theValue; theValue = this.getValue(); strategy.appendField(locator, this, "value", buffer, theValue); } return buffer; }
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 int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { String theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName); } { String theValue; theValue = this.getValue(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "value", theValue), currentHashCode, theValue); } return currentHashCode; }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { String theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName); } { String theValue; theValue = this.getValue(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "value", theValue), currentHashCode, theValue); } return currentHashCode; }
indent(stringBuilder).append(property.getName()).append(": ").append(property.getValue());
indent(stringBuilder).append(property.getName()).append(": ").append(property.getValue());
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof XProperty)) { return false; } if (this == object) { return true; } final XProperty that = ((XProperty) object); { String lhsName; lhsName = this.getName(); String rhsName; rhsName = that.getName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName)) { return false; } } { String lhsValue; lhsValue = this.getValue(); String rhsValue; rhsValue = that.getValue(); if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue)) { return false; } } return true; }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof XProperty)) { return false; } if (this == object) { return true; } final XProperty that = ((XProperty) object); { String lhsName; lhsName = this.getName(); String rhsName; rhsName = that.getName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName)) { return false; } } { String lhsValue; lhsValue = this.getValue(); String rhsValue; rhsValue = that.getValue(); if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue)) { return false; } } return true; }
boolean foundProp = false; for (XProperty prop : actual.getStorageDescriptor().getTableParameters().getProperty()) { if (prop.getName().equals("test.hive.table.prop")) { assertTrue(prop.getValue().equals("tvalue")); foundProp = true;