Skip to content

Commit

Permalink
Implemented and tested #80
Browse files Browse the repository at this point in the history
  • Loading branch information
jeaf-anaptecs committed Mar 1, 2024
1 parent 0bed10d commit f9b693e
Show file tree
Hide file tree
Showing 34 changed files with 907 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Objects;
import java.util.Set;

import javax.validation.ConstraintViolationException;
Expand Down Expand Up @@ -295,6 +296,33 @@ final void unsetTransientChild( ) {
transientChild = null;
}

@Override
public int hashCode( ) {
final int lPrime = 31;
int lResult = 1;
lResult = lPrime * lResult + Objects.hashCode(parent);
return lResult;
}

@Override
public boolean equals( Object pObject ) {
boolean lEquals;
if (this == pObject) {
lEquals = true;
}
else if (pObject == null) {
lEquals = false;
}
else if (this.getClass() != pObject.getClass()) {
lEquals = false;
}
else {
BidirectA lOther = (BidirectA) pObject;
lEquals = Objects.equals(parent, lOther.parent);
}
return lEquals;
}

/**
* Method returns a StringBuilder that can be used to create a String representation of this object. The returned
* StringBuilder also takes care about attributes of super classes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/
package com.anaptecs.jeaf.junit.openapi.base;

import java.util.Objects;

import javax.validation.ConstraintViolationException;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
Expand Down Expand Up @@ -198,6 +200,33 @@ public final void unsetA( ) {
}
}

@Override
public int hashCode( ) {
final int lPrime = 31;
int lResult = 1;
lResult = lPrime * lResult + Objects.hashCode(a);
return lResult;
}

@Override
public boolean equals( Object pObject ) {
boolean lEquals;
if (this == pObject) {
lEquals = true;
}
else if (pObject == null) {
lEquals = false;
}
else if (this.getClass() != pObject.getClass()) {
lEquals = false;
}
else {
BidirectB lOther = (BidirectB) pObject;
lEquals = Objects.equals(a, lOther.a);
}
return lEquals;
}

/**
* Method returns a StringBuilder that can be used to create a String representation of this object. The returned
* StringBuilder also takes care about attributes of super classes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/
package com.anaptecs.jeaf.junit.openapi.base;

import java.util.Objects;

import javax.validation.ConstraintViolationException;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
Expand Down Expand Up @@ -321,6 +323,37 @@ public static Channel of( ChannelType pChannelType, ChannelCode pChannelCode, in
*/
public abstract String getDerivedSomething( );

@Override
public int hashCode( ) {
final int lPrime = 31;
int lResult = 1;
lResult = lPrime * lResult + Objects.hashCode(channelType);
lResult = lPrime * lResult + Objects.hashCode(channelCode);
lResult = lPrime * lResult + code;
lResult = lPrime * lResult + Boolean.hashCode(selfServiceChannel);
return lResult;
}

@Override
public boolean equals( Object pObject ) {
boolean lEquals;
if (this == pObject) {
lEquals = true;
}
else if (pObject == null) {
lEquals = false;
}
else if (this.getClass() != pObject.getClass()) {
lEquals = false;
}
else {
ChannelBase lOther = (ChannelBase) pObject;
lEquals = Objects.equals(channelType, lOther.channelType) && Objects.equals(channelCode, lOther.channelCode)
&& code == lOther.code && selfServiceChannel == lOther.selfServiceChannel;
}
return lEquals;
}

/**
* Method returns a StringBuilder that can be used to create a String representation of this object. The returned
* StringBuilder also takes care about attributes of super classes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Objects;
import java.util.Set;
import java.util.UUID;

Expand Down Expand Up @@ -895,6 +896,46 @@ public static Product of( String pName, URL pLink, UUID pProductID, Set<Currency
*/
public abstract Set<Channel> getTheChannels( );

@Override
public int hashCode( ) {
final int lPrime = 31;
int lResult = 1;
lResult = lPrime * lResult + Objects.hashCode(resellers);
lResult = lPrime * lResult + Objects.hashCode(name);
lResult = lPrime * lResult + Arrays.hashCode(image);
lResult = lPrime * lResult + Objects.hashCode(link);
lResult = lPrime * lResult + Objects.hashCode(productID);
lResult = lPrime * lResult + Objects.hashCode(supportedCurrencies);
lResult = lPrime * lResult + Objects.hashCode(productCodes);
lResult = lPrime * lResult + Objects.hashCode(description);
lResult = lPrime * lResult + Objects.hashCode(uri);
return lResult;
}

@Override
public boolean equals( Object pObject ) {
boolean lEquals;
if (this == pObject) {
lEquals = true;
}
else if (pObject == null) {
lEquals = false;
}
else if (this.getClass() != pObject.getClass()) {
lEquals = false;
}
else {
ProductBase lOther = (ProductBase) pObject;
lEquals = Objects.equals(resellers, lOther.resellers) && Objects.equals(name, lOther.name)
&& Arrays.equals(image, lOther.image) && Objects.equals(link, lOther.link)
&& Objects.equals(productID, lOther.productID)
&& Objects.equals(supportedCurrencies, lOther.supportedCurrencies)
&& Objects.equals(productCodes, lOther.productCodes) && Objects.equals(description, lOther.description)
&& Objects.equals(uri, lOther.uri);
}
return lEquals;
}

/**
* Method returns a StringBuilder that can be used to create a String representation of this object. The returned
* StringBuilder also takes care about attributes of super classes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Set;

import javax.validation.ConstraintViolationException;
Expand Down Expand Up @@ -492,6 +493,36 @@ public static Reseller of( List<Channel> pChannels, String pName, Locale pLangua
*/
public abstract double returnPrimitive( );

@Override
public int hashCode( ) {
final int lPrime = 31;
int lResult = 1;
lResult = lPrime * lResult + Objects.hashCode(channels);
lResult = lPrime * lResult + Objects.hashCode(name);
lResult = lPrime * lResult + Objects.hashCode(language);
return lResult;
}

@Override
public boolean equals( Object pObject ) {
boolean lEquals;
if (this == pObject) {
lEquals = true;
}
else if (pObject == null) {
lEquals = false;
}
else if (this.getClass() != pObject.getClass()) {
lEquals = false;
}
else {
ResellerBase lOther = (ResellerBase) pObject;
lEquals = Objects.equals(channels, lOther.channels) && Objects.equals(name, lOther.name)
&& Objects.equals(language, lOther.language);
}
return lEquals;
}

/**
* Method returns a StringBuilder that can be used to create a String representation of this object. The returned
* StringBuilder also takes care about attributes of super classes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Objects;
import java.util.Set;

import javax.validation.ConstraintViolationException;
Expand Down Expand Up @@ -298,6 +299,34 @@ public Integer getValue( ) {
return value;
}

@Override
public int hashCode( ) {
final int lPrime = 31;
int lResult = 1;
lResult = lPrime * lResult + Objects.hashCode(products);
lResult = lPrime * lResult + Objects.hashCode(value);
return lResult;
}

@Override
public boolean equals( Object pObject ) {
boolean lEquals;
if (this == pObject) {
lEquals = true;
}
else if (pObject == null) {
lEquals = false;
}
else if (this.getClass() != pObject.getClass()) {
lEquals = false;
}
else {
Sortiment lOther = (Sortiment) pObject;
lEquals = Objects.equals(products, lOther.products) && Objects.equals(value, lOther.value);
}
return lEquals;
}

/**
* Method returns a StringBuilder that can be used to create a String representation of this object. The returned
* StringBuilder also takes care about attributes of super classes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;

import javax.validation.ConstraintViolationException;
import javax.validation.Valid;
Expand Down Expand Up @@ -257,6 +258,33 @@ void clearManyMasters( ) {
}
}

@Override
public int hashCode( ) {
final int lPrime = 31;
int lResult = 1;
lResult = lPrime * lResult + Objects.hashCode(name);
return lResult;
}

@Override
public boolean equals( Object pObject ) {
boolean lEquals;
if (this == pObject) {
lEquals = true;
}
else if (pObject == null) {
lEquals = false;
}
else if (this.getClass() != pObject.getClass()) {
lEquals = false;
}
else {
ClientClass lOther = (ClientClass) pObject;
lEquals = Objects.equals(name, lOther.name);
}
return lEquals;
}

/**
* Method returns a StringBuilder that can be used to create a String representation of this object. The returned
* StringBuilder also takes care about attributes of super classes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;

import javax.validation.ConstraintViolationException;
import javax.validation.Valid;
Expand Down Expand Up @@ -381,6 +382,36 @@ public final void unsetSingleClient( ) {
}
}

@Override
public int hashCode( ) {
final int lPrime = 31;
int lResult = 1;
lResult = lPrime * lResult + Objects.hashCode(clients);
lResult = lPrime * lResult + Objects.hashCode(name);
lResult = lPrime * lResult + Objects.hashCode(singleClient);
return lResult;
}

@Override
public boolean equals( Object pObject ) {
boolean lEquals;
if (this == pObject) {
lEquals = true;
}
else if (pObject == null) {
lEquals = false;
}
else if (this.getClass() != pObject.getClass()) {
lEquals = false;
}
else {
MasterClass lOther = (MasterClass) pObject;
lEquals = Objects.equals(clients, lOther.clients) && Objects.equals(name, lOther.name)
&& Objects.equals(singleClient, lOther.singleClient);
}
return lEquals;
}

/**
* Method returns a StringBuilder that can be used to create a String representation of this object. The returned
* StringBuilder also takes care about attributes of super classes.
Expand Down
Loading

0 comments on commit f9b693e

Please sign in to comment.