All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jeromeloisel.db.entity.Entity Maven / Gradle / Ivy

package com.jeromeloisel.db.entity;

/**
 * Representation of an immutable entity.
 * 
 * @author jerome
 *
 */
public interface Entity {

  /**
   * Inject this field into the bean by using the {@link Id} annotation.
   * 
   * @return id of the entity
   */
  String getId();
  
  /**
   * Returns a copy of the entity with this {@code id} set.
   * 
   * @param id new id to set
   * @return
   */
  Entity withId(String id);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy