@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); return hashCode; }
/** * Constructs a new ReplaceableItem object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name * The name of the replaceable item. * @param attributes * The list of attributes for a replaceable item. */ public ReplaceableItem(String name, java.util.List<ReplaceableAttribute> attributes) { setName(name); setAttributes(attributes); }
public ReplaceableItem unmarshall(StaxUnmarshallerContext context) throws Exception { ReplaceableItem replaceableItem = new ReplaceableItem(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return replaceableItem; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("ItemName", targetDepth)) { replaceableItem.setName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Attribute", targetDepth)) { replaceableItem.withAttributes(ReplaceableAttributeStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return replaceableItem; } } } }
/** * The list of attributes for a replaceable item. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param attributes The list of attributes for a replaceable item. * * @return A reference to this updated object so that method calls can be chained * together. */ public ReplaceableItem withAttributes(ReplaceableAttribute... attributes) { if (getAttributes() == null) setAttributes(new java.util.ArrayList<ReplaceableAttribute>(attributes.length)); for (ReplaceableAttribute value : attributes) { getAttributes().add(value); } return this; }
/** * Constructs a new ReplaceableItem object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name * The name of the replaceable item. */ public ReplaceableItem(String name) { setName(name); }
/** * The list of attributes for a replaceable item. * * @param attributes * The list of attributes for a replaceable item. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplaceableItem withAttributes(java.util.Collection<ReplaceableAttribute> attributes) { setAttributes(attributes); return this; }
while (iter.hasNext()) { Item item = iter.next(); updateItems.add(new ReplaceableItem(item.getName(), attributes)); count++; if (count%25 == 0) {
public ReplaceableItem unmarshall(StaxUnmarshallerContext context) throws Exception { ReplaceableItem replaceableItem = new ReplaceableItem(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return replaceableItem; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("ItemName", targetDepth)) { replaceableItem.setName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Attribute", targetDepth)) { replaceableItem.withAttributes(ReplaceableAttributeStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return replaceableItem; } } } }
/** * The name of the replaceable item. * * @param name * The name of the replaceable item. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplaceableItem withName(String name) { setName(name); return this; }
/** * The list of attributes for a replaceable item. * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setAttributes(java.util.Collection)} or {@link #withAttributes(java.util.Collection)} if you want to * override the existing values. * </p> * * @param attributes * The list of attributes for a replaceable item. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplaceableItem withAttributes(ReplaceableAttribute... attributes) { if (this.attributes == null) { setAttributes(new com.amazonaws.internal.SdkInternalList<ReplaceableAttribute>(attributes.length)); } for (ReplaceableAttribute ele : attributes) { this.attributes.add(ele); } return this; }
throw new TranslatorException("ItemName() column value is not specified, it can not be null. Please provide a value."); insertItems.add(new ReplaceableItem(itemName, attributes)); count++; if (count%25 == 0) {
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReplaceableItem == false) return false; ReplaceableItem other = (ReplaceableItem) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getAttributes() == null ^ this.getAttributes() == null) return false; if (other.getAttributes() != null && other.getAttributes().equals(this.getAttributes()) == false) return false; return true; }
/** * Constructs a new ReplaceableItem object. * Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name The name of the replaceable item. * @param attributes The list of attributes for a replaceable item. */ public ReplaceableItem(String name, java.util.List<ReplaceableAttribute> attributes) { setName(name); setAttributes(attributes); }
/** * Constructs a new ReplaceableItem object. * Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name The name of the replaceable item. */ public ReplaceableItem(String name) { setName(name); }
/** * The list of attributes for a replaceable item. * * @param attributes * The list of attributes for a replaceable item. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplaceableItem withAttributes(java.util.Collection<ReplaceableAttribute> attributes) { setAttributes(attributes); return this; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getAttributes() != null) sb.append("Attributes: ").append(getAttributes()); sb.append("}"); return sb.toString(); }
/** * Constructs a new ReplaceableItem object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name * The name of the replaceable item. * @param attributes * The list of attributes for a replaceable item. */ public ReplaceableItem(String name, java.util.List<ReplaceableAttribute> attributes) { setName(name); setAttributes(attributes); }
/** * Constructs a new ReplaceableItem object. Callers should use the setter or fluent setter (with...) methods to * initialize any additional object members. * * @param name * The name of the replaceable item. */ public ReplaceableItem(String name) { setName(name); }
/** * The list of attributes for a replaceable item. * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setAttributes(java.util.Collection)} or {@link #withAttributes(java.util.Collection)} if you want to * override the existing values. * </p> * * @param attributes * The list of attributes for a replaceable item. * @return Returns a reference to this object so that method calls can be chained together. */ public ReplaceableItem withAttributes(ReplaceableAttribute... attributes) { if (this.attributes == null) { setAttributes(new com.amazonaws.internal.SdkInternalList<ReplaceableAttribute>(attributes.length)); } for (ReplaceableAttribute ele : attributes) { this.attributes.add(ele); } return this; }
if (itemsListValue.getName() != null) { request.addParameter("Item." + itemsListIndex + ".ItemName", StringUtils.fromString(itemsListValue.getName())); if (!itemsListValue.getAttributes().isEmpty() || !((com.amazonaws.internal.SdkInternalList<ReplaceableAttribute>) itemsListValue.getAttributes()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<ReplaceableAttribute> attributesList = (com.amazonaws.internal.SdkInternalList<ReplaceableAttribute>) itemsListValue .getAttributes(); int attributesListIndex = 1;