[LIB-10] SerialVersionUID for Serializable classes
[snooker-score-api.git] / src / main / java / org / hedgecode / snooker / json / JsonIdEntity.java
index 6b6c213..ec84274 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017. Developed by Hedgecode.
+ * Copyright (c) 2017-2020. Developed by Hedgecode.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,11 +19,11 @@ package org.hedgecode.snooker.json;
 import org.hedgecode.snooker.api.IdEntity;
 
 /**
- * Abstract Entity to JSON deserialize.
+ * Abstract ID Entity to JSON deserialize.
  *
  * @author Dmitry Samoshin aka gotty
  */
-public abstract class JsonIdEntity implements IdEntity, JsonSerializable {
+public abstract class JsonIdEntity extends JsonURLEntity implements IdEntity {
 
     @Override
     public boolean equals(Object obj) {
@@ -39,9 +39,8 @@ public abstract class JsonIdEntity implements IdEntity, JsonSerializable {
 
     @Override
     public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + getId();
+        int result = getClass().getSimpleName().hashCode();
+        result = 31 * result + getId();
         return result;
     }