[BAEL-2894] remove Lombok
This commit is contained in:
		
							parent
							
								
									f833bc18d1
								
							
						
					
					
						commit
						b83362799d
					
				| @ -44,11 +44,6 @@ | |||||||
| 			<artifactId>spring-boot-configuration-processor</artifactId> | 			<artifactId>spring-boot-configuration-processor</artifactId> | ||||||
| 			<optional>true</optional> | 			<optional>true</optional> | ||||||
| 		</dependency> | 		</dependency> | ||||||
| 		<dependency> |  | ||||||
| 			<groupId>org.projectlombok</groupId> |  | ||||||
| 			<artifactId>lombok</artifactId> |  | ||||||
| 			<optional>true</optional> |  | ||||||
| 		</dependency> |  | ||||||
| 		<dependency> | 		<dependency> | ||||||
| 			<groupId>org.springframework.boot</groupId> | 			<groupId>org.springframework.boot</groupId> | ||||||
| 			<artifactId>spring-boot-starter-test</artifactId> | 			<artifactId>spring-boot-starter-test</artifactId> | ||||||
|  | |||||||
| @ -12,10 +12,7 @@ import javax.persistence.OneToMany; | |||||||
| import javax.persistence.Table; | import javax.persistence.Table; | ||||||
| import javax.validation.constraints.NotNull; | import javax.validation.constraints.NotNull; | ||||||
| 
 | 
 | ||||||
| import lombok.Data; |  | ||||||
| 
 |  | ||||||
| @Entity | @Entity | ||||||
| @Data |  | ||||||
| @Table(name = "car_maker") | @Table(name = "car_maker") | ||||||
| public class CarMaker { | public class CarMaker { | ||||||
| 
 | 
 | ||||||
| @ -27,10 +24,92 @@ public class CarMaker { | |||||||
|     @Column(name = "name") |     @Column(name = "name") | ||||||
|     private String name; |     private String name; | ||||||
| 
 | 
 | ||||||
|     @OneToMany(mappedBy="maker", |     @OneToMany(mappedBy = "maker", orphanRemoval = true, cascade = CascadeType.ALL) | ||||||
|       orphanRemoval = true, |  | ||||||
|       cascade=CascadeType.ALL) |  | ||||||
|     private List<CarModel> models; |     private List<CarModel> models; | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the id | ||||||
|  |      */ | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param id the id to set | ||||||
|  |      */ | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the name | ||||||
|  |      */ | ||||||
|  |     public String getName() { | ||||||
|  |         return name; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param name the name to set | ||||||
|  |      */ | ||||||
|  |     public void setName(String name) { | ||||||
|  |         this.name = name; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the models | ||||||
|  |      */ | ||||||
|  |     public List<CarModel> getModels() { | ||||||
|  |         return models; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param models the models to set | ||||||
|  |      */ | ||||||
|  |     public void setModels(List<CarModel> models) { | ||||||
|  |         this.models = models; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /* (non-Javadoc) | ||||||
|  |      * @see java.lang.Object#hashCode() | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public int hashCode() { | ||||||
|  |         final int prime = 31; | ||||||
|  |         int result = 1; | ||||||
|  |         result = prime * result + ((id == null) ? 0 : id.hashCode()); | ||||||
|  |         result = prime * result + ((models == null) ? 0 : models.hashCode()); | ||||||
|  |         result = prime * result + ((name == null) ? 0 : name.hashCode()); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /* (non-Javadoc) | ||||||
|  |      * @see java.lang.Object#equals(java.lang.Object) | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public boolean equals(Object obj) { | ||||||
|  |         if (this == obj) | ||||||
|  |             return true; | ||||||
|  |         if (obj == null) | ||||||
|  |             return false; | ||||||
|  |         if (getClass() != obj.getClass()) | ||||||
|  |             return false; | ||||||
|  |         CarMaker other = (CarMaker) obj; | ||||||
|  |         if (id == null) { | ||||||
|  |             if (other.id != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!id.equals(other.id)) | ||||||
|  |             return false; | ||||||
|  |         if (models == null) { | ||||||
|  |             if (other.models != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!models.equals(other.models)) | ||||||
|  |             return false; | ||||||
|  |         if (name == null) { | ||||||
|  |             if (other.name != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!name.equals(other.name)) | ||||||
|  |             return false; | ||||||
|  |         return true; | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,6 +1,5 @@ | |||||||
| package org.baeldung.examples.olingo2.domain; | package org.baeldung.examples.olingo2.domain; | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| import javax.persistence.Entity; | import javax.persistence.Entity; | ||||||
| import javax.persistence.FetchType; | import javax.persistence.FetchType; | ||||||
| import javax.persistence.GeneratedValue; | import javax.persistence.GeneratedValue; | ||||||
| @ -11,10 +10,7 @@ import javax.persistence.ManyToOne; | |||||||
| import javax.persistence.Table; | import javax.persistence.Table; | ||||||
| import javax.validation.constraints.NotNull; | import javax.validation.constraints.NotNull; | ||||||
| 
 | 
 | ||||||
| import lombok.Data; |  | ||||||
| 
 |  | ||||||
| @Entity | @Entity | ||||||
| @Data |  | ||||||
| @Table(name = "car_model") | @Table(name = "car_model") | ||||||
| public class CarModel { | public class CarModel { | ||||||
| 
 | 
 | ||||||
| @ -35,4 +31,129 @@ public class CarModel { | |||||||
|     @JoinColumn(name = "maker_fk") |     @JoinColumn(name = "maker_fk") | ||||||
|     private CarMaker maker; |     private CarMaker maker; | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the id | ||||||
|  |      */ | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param id the id to set | ||||||
|  |      */ | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the name | ||||||
|  |      */ | ||||||
|  |     public String getName() { | ||||||
|  |         return name; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param name the name to set | ||||||
|  |      */ | ||||||
|  |     public void setName(String name) { | ||||||
|  |         this.name = name; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the year | ||||||
|  |      */ | ||||||
|  |     public Integer getYear() { | ||||||
|  |         return year; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param year the year to set | ||||||
|  |      */ | ||||||
|  |     public void setYear(Integer year) { | ||||||
|  |         this.year = year; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the sku | ||||||
|  |      */ | ||||||
|  |     public String getSku() { | ||||||
|  |         return sku; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param sku the sku to set | ||||||
|  |      */ | ||||||
|  |     public void setSku(String sku) { | ||||||
|  |         this.sku = sku; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the maker | ||||||
|  |      */ | ||||||
|  |     public CarMaker getMaker() { | ||||||
|  |         return maker; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param maker the maker to set | ||||||
|  |      */ | ||||||
|  |     public void setMaker(CarMaker maker) { | ||||||
|  |         this.maker = maker; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /* (non-Javadoc) | ||||||
|  |      * @see java.lang.Object#hashCode() | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public int hashCode() { | ||||||
|  |         final int prime = 31; | ||||||
|  |         int result = 1; | ||||||
|  |         result = prime * result + ((id == null) ? 0 : id.hashCode()); | ||||||
|  |         result = prime * result + ((maker == null) ? 0 : maker.hashCode()); | ||||||
|  |         result = prime * result + ((name == null) ? 0 : name.hashCode()); | ||||||
|  |         result = prime * result + ((sku == null) ? 0 : sku.hashCode()); | ||||||
|  |         result = prime * result + ((year == null) ? 0 : year.hashCode()); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /* (non-Javadoc) | ||||||
|  |      * @see java.lang.Object#equals(java.lang.Object) | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public boolean equals(Object obj) { | ||||||
|  |         if (this == obj) | ||||||
|  |             return true; | ||||||
|  |         if (obj == null) | ||||||
|  |             return false; | ||||||
|  |         if (getClass() != obj.getClass()) | ||||||
|  |             return false; | ||||||
|  |         CarModel other = (CarModel) obj; | ||||||
|  |         if (id == null) { | ||||||
|  |             if (other.id != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!id.equals(other.id)) | ||||||
|  |             return false; | ||||||
|  |         if (maker == null) { | ||||||
|  |             if (other.maker != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!maker.equals(other.maker)) | ||||||
|  |             return false; | ||||||
|  |         if (name == null) { | ||||||
|  |             if (other.name != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!name.equals(other.name)) | ||||||
|  |             return false; | ||||||
|  |         if (sku == null) { | ||||||
|  |             if (other.sku != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!sku.equals(other.sku)) | ||||||
|  |             return false; | ||||||
|  |         if (year == null) { | ||||||
|  |             if (other.year != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!year.equals(other.year)) | ||||||
|  |             return false; | ||||||
|  |         return true; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
| } | } | ||||||
|  | |||||||
| @ -38,11 +38,6 @@ | |||||||
| 			<scope>runtime</scope> | 			<scope>runtime</scope> | ||||||
| 		</dependency> | 		</dependency> | ||||||
| 
 | 
 | ||||||
| 		<dependency> |  | ||||||
| 			<groupId>org.projectlombok</groupId> |  | ||||||
| 			<artifactId>lombok</artifactId> |  | ||||||
| 			<optional>true</optional> |  | ||||||
| 		</dependency> |  | ||||||
| 		<dependency> | 		<dependency> | ||||||
| 			<groupId>org.springframework.boot</groupId> | 			<groupId>org.springframework.boot</groupId> | ||||||
| 			<artifactId>spring-boot-starter-test</artifactId> | 			<artifactId>spring-boot-starter-test</artifactId> | ||||||
|  | |||||||
| @ -9,12 +9,8 @@ import org.apache.olingo.server.api.ODataHttpHandler; | |||||||
| import org.apache.olingo.server.api.ServiceMetadata; | import org.apache.olingo.server.api.ServiceMetadata; | ||||||
| import org.apache.olingo.server.api.processor.Processor; | import org.apache.olingo.server.api.processor.Processor; | ||||||
| 
 | 
 | ||||||
| import lombok.Builder; |  | ||||||
| 
 |  | ||||||
| @Builder |  | ||||||
| public class ODataHttpHandlerFactoryImpl implements ODataHttpHandlerFactory { | public class ODataHttpHandlerFactoryImpl implements ODataHttpHandlerFactory { | ||||||
| 
 | 
 | ||||||
|      |  | ||||||
|     private final ODataFactory odataFactory; |     private final ODataFactory odataFactory; | ||||||
|     private final CsdlEdmProvider edmProvider; |     private final CsdlEdmProvider edmProvider; | ||||||
|     private final List<Processor> processors; |     private final List<Processor> processors; | ||||||
| @ -35,8 +31,34 @@ public class ODataHttpHandlerFactoryImpl implements ODataHttpHandlerFactory { | |||||||
|         // Register all available processors |         // Register all available processors | ||||||
|         processors.forEach(p -> handler.register(p)); |         processors.forEach(p -> handler.register(p)); | ||||||
| 
 | 
 | ||||||
|          |  | ||||||
|         return handler; |         return handler; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     public static class ODataHttpHandlerFactoryImplBuilder { | ||||||
|  | 
 | ||||||
|  |         private ODataFactory odataFactory; | ||||||
|  |         private CsdlEdmProvider edmProvider; | ||||||
|  |         private List<Processor> processors; | ||||||
|  | 
 | ||||||
|  |         public ODataHttpHandlerFactoryImplBuilder odataFactory(ODataFactory odataFactory) { | ||||||
|  |             this.odataFactory = odataFactory; | ||||||
|  |             return this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public ODataHttpHandlerFactoryImplBuilder edmProvider(CsdlEdmProvider edmProvider) { | ||||||
|  |             this.edmProvider = edmProvider; | ||||||
|  |             return this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public ODataHttpHandlerFactoryImplBuilder processors(List<Processor> processors) { | ||||||
|  |             this.processors = processors; | ||||||
|  |             return this; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public ODataHttpHandlerFactoryImpl build() { | ||||||
|  |             return new ODataHttpHandlerFactoryImpl(odataFactory, edmProvider, processors); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  | 
 | ||||||
| } | } | ||||||
|  | |||||||
| @ -12,10 +12,7 @@ import javax.persistence.OneToMany; | |||||||
| import javax.persistence.Table; | import javax.persistence.Table; | ||||||
| import javax.validation.constraints.NotNull; | import javax.validation.constraints.NotNull; | ||||||
| 
 | 
 | ||||||
| import lombok.Data; |  | ||||||
| 
 |  | ||||||
| @Entity | @Entity | ||||||
| @Data |  | ||||||
| @Table(name = "car_maker") | @Table(name = "car_maker") | ||||||
| public class CarMaker { | public class CarMaker { | ||||||
| 
 | 
 | ||||||
| @ -27,10 +24,92 @@ public class CarMaker { | |||||||
|     @Column(name = "name") |     @Column(name = "name") | ||||||
|     private String name; |     private String name; | ||||||
| 
 | 
 | ||||||
|     @OneToMany(mappedBy="maker", |     @OneToMany(mappedBy = "maker", orphanRemoval = true, cascade = CascadeType.ALL) | ||||||
|       orphanRemoval = true, |  | ||||||
|       cascade=CascadeType.ALL) |  | ||||||
|     private List<CarModel> models; |     private List<CarModel> models; | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the id | ||||||
|  |      */ | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param id the id to set | ||||||
|  |      */ | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the name | ||||||
|  |      */ | ||||||
|  |     public String getName() { | ||||||
|  |         return name; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param name the name to set | ||||||
|  |      */ | ||||||
|  |     public void setName(String name) { | ||||||
|  |         this.name = name; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the models | ||||||
|  |      */ | ||||||
|  |     public List<CarModel> getModels() { | ||||||
|  |         return models; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param models the models to set | ||||||
|  |      */ | ||||||
|  |     public void setModels(List<CarModel> models) { | ||||||
|  |         this.models = models; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /* (non-Javadoc) | ||||||
|  |      * @see java.lang.Object#hashCode() | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public int hashCode() { | ||||||
|  |         final int prime = 31; | ||||||
|  |         int result = 1; | ||||||
|  |         result = prime * result + ((id == null) ? 0 : id.hashCode()); | ||||||
|  |         result = prime * result + ((models == null) ? 0 : models.hashCode()); | ||||||
|  |         result = prime * result + ((name == null) ? 0 : name.hashCode()); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /* (non-Javadoc) | ||||||
|  |      * @see java.lang.Object#equals(java.lang.Object) | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public boolean equals(Object obj) { | ||||||
|  |         if (this == obj) | ||||||
|  |             return true; | ||||||
|  |         if (obj == null) | ||||||
|  |             return false; | ||||||
|  |         if (getClass() != obj.getClass()) | ||||||
|  |             return false; | ||||||
|  |         CarMaker other = (CarMaker) obj; | ||||||
|  |         if (id == null) { | ||||||
|  |             if (other.id != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!id.equals(other.id)) | ||||||
|  |             return false; | ||||||
|  |         if (models == null) { | ||||||
|  |             if (other.models != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!models.equals(other.models)) | ||||||
|  |             return false; | ||||||
|  |         if (name == null) { | ||||||
|  |             if (other.name != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!name.equals(other.name)) | ||||||
|  |             return false; | ||||||
|  |         return true; | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,6 +1,5 @@ | |||||||
| package org.baeldung.examples.olingo4.domain; | package org.baeldung.examples.olingo4.domain; | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| import javax.persistence.Entity; | import javax.persistence.Entity; | ||||||
| import javax.persistence.FetchType; | import javax.persistence.FetchType; | ||||||
| import javax.persistence.GeneratedValue; | import javax.persistence.GeneratedValue; | ||||||
| @ -11,10 +10,7 @@ import javax.persistence.ManyToOne; | |||||||
| import javax.persistence.Table; | import javax.persistence.Table; | ||||||
| import javax.validation.constraints.NotNull; | import javax.validation.constraints.NotNull; | ||||||
| 
 | 
 | ||||||
| import lombok.Data; |  | ||||||
| 
 |  | ||||||
| @Entity | @Entity | ||||||
| @Data |  | ||||||
| @Table(name = "car_model") | @Table(name = "car_model") | ||||||
| public class CarModel { | public class CarModel { | ||||||
| 
 | 
 | ||||||
| @ -35,4 +31,129 @@ public class CarModel { | |||||||
|     @JoinColumn(name = "maker_fk") |     @JoinColumn(name = "maker_fk") | ||||||
|     private CarMaker maker; |     private CarMaker maker; | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the id | ||||||
|  |      */ | ||||||
|  |     public Long getId() { | ||||||
|  |         return id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param id the id to set | ||||||
|  |      */ | ||||||
|  |     public void setId(Long id) { | ||||||
|  |         this.id = id; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the name | ||||||
|  |      */ | ||||||
|  |     public String getName() { | ||||||
|  |         return name; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param name the name to set | ||||||
|  |      */ | ||||||
|  |     public void setName(String name) { | ||||||
|  |         this.name = name; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the year | ||||||
|  |      */ | ||||||
|  |     public Integer getYear() { | ||||||
|  |         return year; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param year the year to set | ||||||
|  |      */ | ||||||
|  |     public void setYear(Integer year) { | ||||||
|  |         this.year = year; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the sku | ||||||
|  |      */ | ||||||
|  |     public String getSku() { | ||||||
|  |         return sku; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param sku the sku to set | ||||||
|  |      */ | ||||||
|  |     public void setSku(String sku) { | ||||||
|  |         this.sku = sku; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @return the maker | ||||||
|  |      */ | ||||||
|  |     public CarMaker getMaker() { | ||||||
|  |         return maker; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * @param maker the maker to set | ||||||
|  |      */ | ||||||
|  |     public void setMaker(CarMaker maker) { | ||||||
|  |         this.maker = maker; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /* (non-Javadoc) | ||||||
|  |      * @see java.lang.Object#hashCode() | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public int hashCode() { | ||||||
|  |         final int prime = 31; | ||||||
|  |         int result = 1; | ||||||
|  |         result = prime * result + ((id == null) ? 0 : id.hashCode()); | ||||||
|  |         result = prime * result + ((maker == null) ? 0 : maker.hashCode()); | ||||||
|  |         result = prime * result + ((name == null) ? 0 : name.hashCode()); | ||||||
|  |         result = prime * result + ((sku == null) ? 0 : sku.hashCode()); | ||||||
|  |         result = prime * result + ((year == null) ? 0 : year.hashCode()); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /* (non-Javadoc) | ||||||
|  |      * @see java.lang.Object#equals(java.lang.Object) | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public boolean equals(Object obj) { | ||||||
|  |         if (this == obj) | ||||||
|  |             return true; | ||||||
|  |         if (obj == null) | ||||||
|  |             return false; | ||||||
|  |         if (getClass() != obj.getClass()) | ||||||
|  |             return false; | ||||||
|  |         CarModel other = (CarModel) obj; | ||||||
|  |         if (id == null) { | ||||||
|  |             if (other.id != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!id.equals(other.id)) | ||||||
|  |             return false; | ||||||
|  |         if (maker == null) { | ||||||
|  |             if (other.maker != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!maker.equals(other.maker)) | ||||||
|  |             return false; | ||||||
|  |         if (name == null) { | ||||||
|  |             if (other.name != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!name.equals(other.name)) | ||||||
|  |             return false; | ||||||
|  |         if (sku == null) { | ||||||
|  |             if (other.sku != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!sku.equals(other.sku)) | ||||||
|  |             return false; | ||||||
|  |         if (year == null) { | ||||||
|  |             if (other.year != null) | ||||||
|  |                 return false; | ||||||
|  |         } else if (!year.equals(other.year)) | ||||||
|  |             return false; | ||||||
|  |         return true; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user