title: Preferred way to implement Persistable.isNew for entity with predefined ID in Spring Data
body: <p>The entity is Tile, that uniquely identified with it's coordinates on a map:</p>
  
  <pre><code>import org.springframework.data.domain.Persistable;
  
  @Entity
  class Tile implements Persistable&lt;Tile.Coordinates&gt; {
     @Embeddable
     public static class Coordinates implements Serializable {
         long x;
         long y;
         public Coordinates(x,y){this.x=x; this.y=y;}
     }
  
     @EmbeddedId Coordinates coordinates;
  
     private Tile(){}
     public Tile(long x,long y) {this.coordinates=new Coordinates(x,y);}
  
     @Override
     public boolean isNew(){
        // what is preferred implementation? 
     }
     // other code
  }
  </code></pre>
  
  <p>Tile coordinates are predefined, because Tile without coordinates is senseless.</p>
  
  <pre><code>Tile tile=new Tile(x,y);
  </code></pre>