content: /*
  # Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  #
  # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
  #
  #     http://aws.amazon.com/apache2.0/
  #
  # or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
  
  */
  
  package com.awstrainers.devcourse.sdkdemos;
  
  import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBAttribute;
  import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBHashKey;
  import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBRangeKey;
  import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTable;
  
  @DynamoDBTable(tableName = "patients")
  public class Patient implements java.io.Serializable  {
  	private static final long serialVersionUID = 7336392782218661341L;
  
  
  	private long id;
  	private long timestamp;
  	private String payload;
  
  	public Patient(long id, long timestamp, String payload) {
  		super();
  		this.id = id;
  		this.timestamp = timestamp;
  		this.payload = payload;
  	}
  
  	@DynamoDBHashKey
  	public long getId() {
  		return id;
  	}
  
  	public void setId(long id) {
  		this.id = id;
  	}
  
  	@DynamoDBRangeKey
  	public long getTimestamp() {
  		return timestamp;
  	}
  
  	public void setTimestamp(long timestamp) {
  		this.timestamp = timestamp;
  	}
  
      @DynamoDBAttribute
  	public String getPayload() {
  		return payload;
  	}
  
  	public void setPayload(String payload) {
  		this.payload = payload;
  	}
  
  	@Override
  	public int hashCode() {
  		final int prime = 31;
  		int result = 1;
  		result = prime * result + (int) (id ^ (id >>> 32));
  		result = prime * result + (int) (timestamp ^ (timestamp >>> 32));
  		return result;
  	}
  
  	@Override
  	public boolean equals(Object obj) {
  		if (this == obj)
  			return true;
  		if (obj == null)
  			return false;
  		if (getClass() != obj.getClass())
  			return false;
  		Patient other = (Patient) obj;
  		if (id != other.id)
  			return false;
  		if (timestamp != other.timestamp)
  			return false;
  		return true;
  	}
  
  
  
  }
  