public XPartSpec withPartSpecElement(Collection<XPartSpecElement> values) { if (values!= null) { getPartSpecElement().addAll(values); } return this; }
public XPartSpec withPartSpecElement(XPartSpecElement... values) { if (values!= null) { for (XPartSpecElement value: values) { getPartSpecElement().add(value); } } return this; }
public XPartSpec withPartSpecElement(XPartSpecElement... values) { if (values!= null) { for (XPartSpecElement value: values) { getPartSpecElement().add(value); } } return this; }
public XPartSpec withPartSpecElement(Collection<XPartSpecElement> values) { if (values!= null) { getPartSpecElement().addAll(values); } return this; }
public static Map<String, String> nonTimePartSpecfromXNonTimePartSpec( XPartSpec xnonTimePartSpec) { Map<String, String> nonTimePartSpec = new HashMap<String, String>(); if (xnonTimePartSpec != null && !xnonTimePartSpec.getPartSpecElement().isEmpty()) { for (XPartSpecElement xPart : xnonTimePartSpec.getPartSpecElement()) { nonTimePartSpec.put(xPart.getKey(), xPart.getValue()); } } return nonTimePartSpec; }
public static Map<String, String> nonTimePartSpecfromXNonTimePartSpec( XPartSpec xnonTimePartSpec) { Map<String, String> nonTimePartSpec = new HashMap<String, String>(); if (xnonTimePartSpec != null && !xnonTimePartSpec.getPartSpecElement().isEmpty()) { for (XPartSpecElement xPart : xnonTimePartSpec.getPartSpecElement()) { nonTimePartSpec.put(xPart.getKey(), xPart.getValue()); } } return nonTimePartSpec; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { List<XPartSpecElement> thePartSpecElement; thePartSpecElement = (((this.partSpecElement!= null)&&(!this.partSpecElement.isEmpty()))?this.getPartSpecElement():null); strategy.appendField(locator, this, "partSpecElement", buffer, thePartSpecElement); } return buffer; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { List<XPartSpecElement> thePartSpecElement; thePartSpecElement = (((this.partSpecElement!= null)&&(!this.partSpecElement.isEmpty()))?this.getPartSpecElement():null); strategy.appendField(locator, this, "partSpecElement", buffer, thePartSpecElement); } return buffer; }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { List<XPartSpecElement> thePartSpecElement; thePartSpecElement = (((this.partSpecElement!= null)&&(!this.partSpecElement.isEmpty()))?this.getPartSpecElement():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partSpecElement", thePartSpecElement), currentHashCode, thePartSpecElement); } return currentHashCode; }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { List<XPartSpecElement> thePartSpecElement; thePartSpecElement = (((this.partSpecElement!= null)&&(!this.partSpecElement.isEmpty()))?this.getPartSpecElement():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partSpecElement", thePartSpecElement), currentHashCode, thePartSpecElement); } return currentHashCode; }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof XPartSpec)) { return false; } if (this == object) { return true; } final XPartSpec that = ((XPartSpec) object); { List<XPartSpecElement> lhsPartSpecElement; lhsPartSpecElement = (((this.partSpecElement!= null)&&(!this.partSpecElement.isEmpty()))?this.getPartSpecElement():null); List<XPartSpecElement> rhsPartSpecElement; rhsPartSpecElement = (((that.partSpecElement!= null)&&(!that.partSpecElement.isEmpty()))?that.getPartSpecElement():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "partSpecElement", lhsPartSpecElement), LocatorUtils.property(thatLocator, "partSpecElement", rhsPartSpecElement), lhsPartSpecElement, rhsPartSpecElement)) { return false; } } return true; }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof XPartSpec)) { return false; } if (this == object) { return true; } final XPartSpec that = ((XPartSpec) object); { List<XPartSpecElement> lhsPartSpecElement; lhsPartSpecElement = (((this.partSpecElement!= null)&&(!this.partSpecElement.isEmpty()))?this.getPartSpecElement():null); List<XPartSpecElement> rhsPartSpecElement; rhsPartSpecElement = (((that.partSpecElement!= null)&&(!that.partSpecElement.isEmpty()))?that.getPartSpecElement():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "partSpecElement", lhsPartSpecElement), LocatorUtils.property(thatLocator, "partSpecElement", rhsPartSpecElement), lhsPartSpecElement, rhsPartSpecElement)) { return false; } } return true; }
public static Map<String, String> getFullPartSpecAsMap(XPartition partition) { Map<String, String> spec = Maps.newHashMap(); if (partition.getTimePartitionSpec() != null) { for (XTimePartSpecElement timePartSpecElement : partition.getTimePartitionSpec().getPartSpecElement()) { spec.put(timePartSpecElement.getKey(), UpdatePeriod.valueOf(partition.getUpdatePeriod().name()).format() .format(getDateFromXML(timePartSpecElement.getValue()))); } } if (partition.getNonTimePartitionSpec() != null) { for (XPartSpecElement partSpecElement : partition.getNonTimePartitionSpec().getPartSpecElement()) { spec.put(partSpecElement.getKey(), partSpecElement.getValue()); } } return spec; } }
public static Map<String, String> getFullPartSpecAsMap(XPartition partition) { Map<String, String> spec = Maps.newHashMap(); if (partition.getTimePartitionSpec() != null) { for (XTimePartSpecElement timePartSpecElement : partition.getTimePartitionSpec().getPartSpecElement()) { spec.put(timePartSpecElement.getKey(), UpdatePeriod.valueOf(partition.getUpdatePeriod().name()).format() .format(getDateFromXML(timePartSpecElement.getValue()))); } } if (partition.getNonTimePartitionSpec() != null) { for (XPartSpecElement partSpecElement : partition.getNonTimePartitionSpec().getPartSpecElement()) { spec.put(partSpecElement.getKey(), partSpecElement.getValue()); } } return spec; } }
e.setKey(entry.getKey()); e.setValue(entry.getValue()); xp.getFullPartitionSpec().getPartSpecElement().add(e); partSpecElement.setKey(entry.getKey()); partSpecElement.setValue(entry.getValue()); xp.getNonTimePartitionSpec().getPartSpecElement().add(partSpecElement);
e.setKey(entry.getKey()); e.setValue(entry.getValue()); xp.getFullPartitionSpec().getPartSpecElement().add(e); partSpecElement.setKey(entry.getKey()); partSpecElement.setValue(entry.getValue()); xp.getNonTimePartitionSpec().getPartSpecElement().add(partSpecElement);
assertNotNull(readPartition.getFullPartitionSpec()); XTimePartSpecElement timePartSpec = readPartition.getTimePartitionSpec().getPartSpecElement().iterator().next(); XPartSpecElement fullPartSpec = readPartition.getFullPartitionSpec().getPartSpecElement().iterator().next(); assertEquals(timePartSpec.getKey(), fullPartSpec.getKey()); assertEquals(
XPartSpecElement fullPartSpec = postedPartition.getFullPartitionSpec().getPartSpecElement().iterator().next(); assertEquals(timePartSpec.getKey(), fullPartSpec.getKey()); assertEquals(UpdatePeriod.valueOf(xp.getUpdatePeriod().name()).format(JAXBUtils.getDateFromXML( assertEquals(latestPartition.getFullPartitionSpec().getPartSpecElement().get(0).getValue(), "latest");
assertNotNull(readPartition.getFullPartitionSpec()); XTimePartSpecElement timePartSpec = readPartition.getTimePartitionSpec().getPartSpecElement().iterator().next(); XPartSpecElement fullPartSpec = readPartition.getFullPartitionSpec().getPartSpecElement().iterator().next(); assertEquals(timePartSpec.getKey(), fullPartSpec.getKey()); assertEquals(UpdatePeriod.valueOf(xp.getUpdatePeriod().name()).format(JAXBUtils.getDateFromXML(