public static Map<String, Date> timePartSpecfromXTimePartSpec( XTimePartSpec xtimePartSpec) { Map<String, Date> timePartSpec = new HashMap<String, Date>(); if (xtimePartSpec != null && !xtimePartSpec.getPartSpecElement().isEmpty()) { for (XTimePartSpecElement xtimePart : xtimePartSpec.getPartSpecElement()) { timePartSpec.put(xtimePart.getKey(), getDateFromXML(xtimePart.getValue())); } } return timePartSpec; }
public static Map<String, Date> timePartSpecfromXTimePartSpec( XTimePartSpec xtimePartSpec) { Map<String, Date> timePartSpec = new HashMap<String, Date>(); if (xtimePartSpec != null && !xtimePartSpec.getPartSpecElement().isEmpty()) { for (XTimePartSpecElement xtimePart : xtimePartSpec.getPartSpecElement()) { timePartSpec.put(xtimePart.getKey(), getDateFromXML(xtimePart.getValue())); } } return timePartSpec; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { String theKey; theKey = this.getKey(); strategy.appendField(locator, this, "key", buffer, theKey); } { XMLGregorianCalendar theValue; theValue = this.getValue(); strategy.appendField(locator, this, "value", buffer, theValue); } return buffer; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { String theKey; theKey = this.getKey(); strategy.appendField(locator, this, "key", buffer, theKey); } { XMLGregorianCalendar theValue; theValue = this.getValue(); strategy.appendField(locator, this, "value", buffer, theValue); } return buffer; }
indent(stringBuilder).append(partSpecElement.getKey()).append(": ").append(partSpecElement.getValue());
indent(stringBuilder).append(partSpecElement.getKey()).append(": ").append(partSpecElement.getValue());
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { String theKey; theKey = this.getKey(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "key", theKey), currentHashCode, theKey); } { XMLGregorianCalendar 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 theKey; theKey = this.getKey(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "key", theKey), currentHashCode, theKey); } { XMLGregorianCalendar theValue; theValue = this.getValue(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "value", theValue), currentHashCode, theValue); } return currentHashCode; }
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; } }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof XTimePartSpecElement)) { return false; } if (this == object) { return true; } final XTimePartSpecElement that = ((XTimePartSpecElement) object); { String lhsKey; lhsKey = this.getKey(); String rhsKey; rhsKey = that.getKey(); if (!strategy.equals(LocatorUtils.property(thisLocator, "key", lhsKey), LocatorUtils.property(thatLocator, "key", rhsKey), lhsKey, rhsKey)) { return false; } } { XMLGregorianCalendar lhsValue; lhsValue = this.getValue(); XMLGregorianCalendar 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 XTimePartSpecElement)) { return false; } if (this == object) { return true; } final XTimePartSpecElement that = ((XTimePartSpecElement) object); { String lhsKey; lhsKey = this.getKey(); String rhsKey; rhsKey = that.getKey(); if (!strategy.equals(LocatorUtils.property(thisLocator, "key", lhsKey), LocatorUtils.property(thatLocator, "key", rhsKey), lhsKey, rhsKey)) { return false; } } { XMLGregorianCalendar lhsValue; lhsValue = this.getValue(); XMLGregorianCalendar rhsValue; rhsValue = that.getValue(); if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue)) { return false; } } return true; }
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(timePartSpec.getValue())),
assertEquals(timePartSpec.getKey(), fullPartSpec.getKey()); assertEquals(UpdatePeriod.valueOf(xp.getUpdatePeriod().name()).format(JAXBUtils.getDateFromXML( timePartSpec.getValue())), fullPartSpec.getValue());
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( timePartSpec.getValue())), fullPartSpec.getValue());