@@ -44,11 +44,11 @@ import kotlin.reflect.jvm.jvmErasure
4444 *
4545 * ### Creating Entity Objects
4646 *
47- * As everyone knows, interfaces cannot be instantiated, so Ktorm provides [Entity.create] functions for us to
48- * create entity objects. Those functions generate implementations for entity interfaces via JDK dynamic proxy
47+ * As everyone knows, interfaces cannot be instantiated, so Ktorm provides a [Entity.create] function for us to
48+ * create entity objects. This function generate implementations for entity interfaces via JDK dynamic proxy
4949 * and create their instances.
5050 *
51- * If you don't like creating objects by [Entity.create] functions , Ktorm also provides an abstract factory class
51+ * In case you don't like creating objects by [Entity.create], Ktorm also provides an abstract factory class
5252 * [Entity.Factory]. This class overloads the `invoke` operator of Kotlin, so we just need to add a companion
5353 * object to our entity class extending from [Entity.Factory], then entity objects can be created just like there
5454 * is a constructor: `val department = Department()`.
@@ -209,6 +209,27 @@ public interface Entity<E : Entity<E>> : Serializable {
209209 */
210210 public fun copy (): E
211211
212+ /* *
213+ * Indicate whether some other object is "equal to" this entity.
214+ * Two entities are equal only if they have the same [entityClass] and [properties].
215+ *
216+ * @since 3.4.0
217+ */
218+ public override fun equals (other : Any? ): Boolean
219+
220+ /* *
221+ * Return a hash code value for this entity.
222+ *
223+ * @since 3.4.0
224+ */
225+ public override fun hashCode (): Int
226+
227+ /* *
228+ * Return a string representation of this table.
229+ * The format is like `Employee{id=1, name=Eric, job=contributor, hireDate=2021-05-05, salary=50}`.
230+ */
231+ public override fun toString (): String
232+
212233 /* *
213234 * Companion object provides functions to create entity instances.
214235 */
0 commit comments