Project

General

Profile

Revision bef37262

IDbef37262272330d5dea02d17b388bc311abd9241
Parent 5069790f
Child 04af63c0

Added by Andreas Müller almost 4 years ago

ref #7201, ref #7155 javadoc

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/CdmBase.java
336 336
    /**
337 337
     * Is <code>true</code> if UUID and created timestamp (is this really needed/make sense?)
338 338
     * is the same for the passed Object and this one.
339
     * This method is final as subclasses should not override it
340
     * (NOTE.
339
     * This method is final as subclasses should not override it.<BR>
340
     *
341 341
     * The contract should be the same for all persistable entities.
342 342
     * 2 instances are equal if they represent the same entity in a given
343
     * database.
343
     * database.<BR>
344
     * NOTE: currently the method is only final in {@link VersionableEntity#equals(Object)}.
345
     * For discussion see #7202.
344 346
     * <BR><BR>
345 347
     *
346 348
     * If one wants to compare 2 CdmBase entities content wise you may use e.g. a
......
348 350
     * {@link IMatchable matching} is implemented for the respective CdmBase subclass.
349 351
     * You may adapt your match strategy to your own needs.
350 352
     *
351
     * @see java.lang.Object#equals(java.lang.Object)
352 353
     * See {@link http://www.hibernate.org/109.html hibernate109}, {@link http://www.geocities.com/technofundo/tech/java/equalhash.html geocities},
353 354
     * or {@link http://www.ibm.com/developerworks/java/library/j-jtp05273.html ibm}
354 355
     * for more information about equals and hashcode.
355 356
     * <BR>
356 357
     * See also https://dev.e-taxonomy.eu/redmine/issues/7155 and related tickets for discussion.
357 358
     *
359
     * @see java.lang.Object#equals(java.lang.Object)
358 360
     *
359 361
     */
360 362
    @Override
361
    public boolean equals(Object obj) {
363
    public final boolean equals(Object obj) {
362 364
        if (obj == this){
363 365
            return true;
364 366
        }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)