Interface CopyingIdentity<K,C extends Identity<K>>

All Superinterfaces:
Comparable<K>, Identity<K>

public interface CopyingIdentity<K,C extends Identity<K>> extends Identity<K>
API for an identity with copying support.
Since:
2.9
Version:
1.0
Author:
matt
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    copyTo(C entity)
    Copy the properties of this entity into another entity.
    Create a new copy of this entity with a given ID.

    Methods inherited from interface java.lang.Comparable

    compareTo

    Methods inherited from interface net.solarnetwork.domain.Identity

    getId, hasId
  • Method Details

    • copyWithId

      C copyWithId(K id)
      Create a new copy of this entity with a given ID.
      Parameters:
      id - the ID to use in the copy
      Returns:
      the new copy
    • copyTo

      void copyTo(C entity)
      Copy the properties of this entity into another entity.
      Parameters:
      entity - the entity to copy the properties from this instance