public Object copyTo(Object target, CopyBuilder copyBuilder) { final GetCurrentMessageResponse copy = ((target == null)?new GetCurrentMessageResponse():((GetCurrentMessageResponse) target)); { List<Object> sourceAny; sourceAny = this.getAny(); List<Object> copyAny = ((List<Object> ) copyBuilder.copy(sourceAny)); copy.any = null; List<Object> uniqueAnyl = copy.getAny(); uniqueAnyl.addAll(copyAny); } return copy; }
public void toString(ToStringBuilder toStringBuilder) { { List<Object> theAny; theAny = this.getAny(); toStringBuilder.append("any", theAny); } }
/** * Create an instance of {@link GetCurrentMessageResponse } * */ public GetCurrentMessageResponse createGetCurrentMessageResponse() { return new GetCurrentMessageResponse(); }
public int hashCode() { final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder(); hashCode(hashCodeBuilder); return hashCodeBuilder.toHashCode(); }
public String toString() { final ToStringBuilder toStringBuilder = new JAXBToStringBuilder(this); toString(toStringBuilder); return toStringBuilder.toString(); }
public boolean equals(Object object) { if (!(object instanceof GetCurrentMessageResponse)) { return false; } if (this == object) { return true; } final EqualsBuilder equalsBuilder = new JAXBEqualsBuilder(); equals(object, equalsBuilder); return equalsBuilder.isEquals(); }
public Object copyTo(Object target) { final CopyBuilder copyBuilder = new JAXBCopyBuilder(); return copyTo(target, copyBuilder); }
public void hashCode(HashCodeBuilder hashCodeBuilder) { hashCodeBuilder.append(this.getAny()); }
/** * Create an instance of {@link GetCurrentMessageResponse } * */ public GetCurrentMessageResponse createGetCurrentMessageResponse() { return new GetCurrentMessageResponse(); }
public void equals(Object object, EqualsBuilder equalsBuilder) { if (!(object instanceof GetCurrentMessageResponse)) { equalsBuilder.appendSuper(false); return ; } if (this == object) { return ; } final GetCurrentMessageResponse that = ((GetCurrentMessageResponse) object); equalsBuilder.append(this.getAny(), that.getAny()); }
@Override public final List<NotificationMessageHolderType.Message> getNotifications() { List<NotificationMessageHolderType.Message> notifications = new ArrayList<NotificationMessageHolderType.Message>(); List<Object> jaxbNotif = this.jaxbTypeObj.getAny(); if (jaxbNotif != null){ for (Object jaxbNotifItem : jaxbNotif) { if (jaxbNotifItem instanceof Element){ notifications.add(new NotificationMessageHolderTypeImpl.MessageImpl((Element)jaxbNotifItem)); } } } return notifications; }
@Override public final void addCurrentMessage(Message notification) { this.jaxbTypeObj.getAny().add(notification.getAny()); }
/** * Default constructor */ protected GetCurrentMessageResponseImpl(NotificationMessageHolderType.Message notification) { this.jaxbTypeObj = WsnbJAXBContext.WSNB_JAXB_FACTORY.createGetCurrentMessageResponse(); this.jaxbTypeObj.getAny().add(notification.getAny()); }
public void setNotifMessageContent(Message notifMsgContent) throws WSNotificationException { final List<Object> listObj = ((com.ebmwebsourcing.wsstar.jaxb.notification.base.GetCurrentMessageResponse) ((AbstractSchemaElementImpl<?>)this).getModel()).getAny(); if (listObj!= null){ final Element messageAsElt = WSNotificationWriter.getInstance().writeMessageType(notifMsgContent).getDocumentElement(); listObj.add(messageAsElt); } }
public Message getNotifMessageContent() throws WSNotificationException { Message result = null; final List<Object> listOfObj = ((com.ebmwebsourcing.wsstar.jaxb.notification.base.GetCurrentMessageResponse) ((AbstractSchemaElementImpl<?>) this).getModel()).getAny(); if (listOfObj!= null) { for (final Object item : listOfObj) { if (item instanceof Element && ((Element)item).getLocalName().compareTo(WsnbConstants.MESSAGE_QNAME.getLocalPart()) == 0 && ((Element)item).getNamespaceURI().compareTo(WsnbConstants.MESSAGE_QNAME.getNamespaceURI()) == 0){ final Document doc = ((Element)item).getOwnerDocument(); doc.setDocumentURI(WsnbConstants.WS_BASE_NOTIFICATION_NAMESPACE_URI); result = WSNotificationReader.getInstance().readMessageType(doc); } else if ((item instanceof JAXBElement<?>) && (((JAXBElement<?>)item).getName().equals(WsnbConstants.MESSAGE_QNAME)) && (((JAXBElement<?>)item).getValue() instanceof com.ebmwebsourcing.wsstar.jaxb.notification.base.NotificationMessageHolderType.Message) ) { result = new NotificationMessageHolderTypeImpl.MessageImpl((com.ebmwebsourcing.wsstar.jaxb.notification.base.NotificationMessageHolderType.Message)((JAXBElement<?>)item).getValue(),null); } } } return result; }
/** * A way to create a {@link com.ebmwebsourcing.wsstar.notification.base.GetCurrentMessageResponse} * "Jaxb model type" object from a {@link GetCurrentMessageResponse} "api type" one * * @param apiTypeObj */ public static com.ebmwebsourcing.wsstar.jaxb.notification.base.GetCurrentMessageResponse toJaxbModel(GetCurrentMessageResponse apiTypeObj) { com.ebmwebsourcing.wsstar.jaxb.notification.base.GetCurrentMessageResponse jaxbTypeObj = null; if (apiTypeObj instanceof GetCurrentMessageResponseImpl){ jaxbTypeObj = ((GetCurrentMessageResponseImpl)apiTypeObj).getJaxbTypeObj(); } else { jaxbTypeObj = WsnbJAXBContext.WSNB_JAXB_FACTORY.createGetCurrentMessageResponse(); // ~~~~ Set Notification(s) ~~~~ List<NotificationMessageHolderType.Message> notifications = apiTypeObj.getNotifications(); List<Object> jaxbAny = jaxbTypeObj.getAny(); if (notifications != null){ for (NotificationMessageHolderType.Message notificationItem : notifications) { jaxbAny.add(notificationItem.getAny()); } } } return jaxbTypeObj; } }