/** * Constructor to create DTO from the local user session. */ public TransferSimpSession(SimpSession session) { this.id = session.getId(); this.user = new TransferSimpUser(); Set<SimpSubscription> subscriptions = session.getSubscriptions(); this.subscriptions = new HashSet<>(subscriptions.size()); for (SimpSubscription subscription : subscriptions) { this.subscriptions.add(new TransferSimpSubscription(subscription)); } }
@Override public int hashCode() { return getId().hashCode() * 31 + ObjectUtils.nullSafeHashCode(getSession()); }
/** * Constructor to create DTO from the local user session. */ public TransferSimpSession(SimpSession session) { this.id = session.getId(); this.user = new TransferSimpUser(); Set<SimpSubscription> subscriptions = session.getSubscriptions(); this.subscriptions = new HashSet<>(subscriptions.size()); for (SimpSubscription subscription : subscriptions) { this.subscriptions.add(new TransferSimpSubscription(subscription)); } }
@Override public int hashCode() { return getId().hashCode() * 31 + ObjectUtils.nullSafeHashCode(getSession()); }
@Override public int hashCode() { return getId().hashCode() * 31 + ObjectUtils.nullSafeHashCode(getSession()); }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof SimpSubscription)) { return false; } SimpSubscription otherSubscription = (SimpSubscription) other; return (getId().equals(otherSubscription.getId()) && ObjectUtils.nullSafeEquals(getSession(), otherSubscription.getSession())); }
private void afterDeserialization() { for (TransferSimpSubscription subscription : this.subscriptions) { subscription.setSession(this); } }
private void afterDeserialization() { for (TransferSimpSubscription subscription : this.subscriptions) { subscription.setSession(this); } }
/** * Constructor to create DTO from the local user session. */ public TransferSimpSession(SimpSession session) { this.id = session.getId(); this.user = new TransferSimpUser(); Set<SimpSubscription> subscriptions = session.getSubscriptions(); this.subscriptions = new HashSet<>(subscriptions.size()); for (SimpSubscription subscription : subscriptions) { this.subscriptions.add(new TransferSimpSubscription(subscription)); } }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof SimpSubscription)) { return false; } SimpSubscription otherSubscription = (SimpSubscription) other; return (getId().equals(otherSubscription.getId()) && ObjectUtils.nullSafeEquals(getSession(), otherSubscription.getSession())); }
@Override public int hashCode() { return getId().hashCode() * 31 + ObjectUtils.nullSafeHashCode(getSession()); }
private void afterDeserialization() { for (TransferSimpSubscription subscription : this.subscriptions) { subscription.setSession(this); } }
/** * Constructor to create DTO from the local user session. */ public TransferSimpSession(SimpSession session) { this.id = session.getId(); this.user = new TransferSimpUser(); Set<SimpSubscription> subscriptions = session.getSubscriptions(); this.subscriptions = new HashSet<>(subscriptions.size()); for (SimpSubscription subscription : subscriptions) { this.subscriptions.add(new TransferSimpSubscription(subscription)); } }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof SimpSubscription)) { return false; } SimpSubscription otherSubscription = (SimpSubscription) other; return (getId().equals(otherSubscription.getId()) && ObjectUtils.nullSafeEquals(getSession(), otherSubscription.getSession())); }
private void afterDeserialization() { for (TransferSimpSubscription subscription : this.subscriptions) { subscription.setSession(this); } }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof SimpSubscription)) { return false; } SimpSubscription otherSubscription = (SimpSubscription) other; return (getId().equals(otherSubscription.getId()) && ObjectUtils.nullSafeEquals(getSession(), otherSubscription.getSession())); }