/**
 * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License 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 io.gravitee.repository.management.model;

import java.util.Date;

/**
 * @author David BRASSELY (brasseld at gmail.com)
 */
public class ApiKey {

	/**
	 * Api Key
	 */
	private String key;

	/**
	 * Is the key revoked ?
	 */
	private boolean revoked;

	/**
	 * Token expiration date
	 */
	private Date expiration;

	/**
	 * The API key creation date
	 */
	private Date createdAt;

	/**
	 * The API key update date
	 */
	private Date updatedAt;

	/**
	 * The API for which the key is defined.
	 */
	private String api;

	public boolean isRevoked() {
		return revoked;
	}

	public void setRevoked(boolean revoked) {
		this.revoked = revoked;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public Date getExpiration() {
		return expiration;
	}

	public void setExpiration(Date expiration) {
		this.expiration = expiration;
	}

	public Date getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	public Date getUpdatedAt() {
		return updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}

	public String getApi() {
		return api;
	}

	public void setApi(String api) {
		this.api = api;
	}
}
@@ -696,16 +696,42 @@
 il.Date;
+%0Aimport java.util.Objects;
 %0A%0A/**%0A *
@@ -1178,16 +1178,106 @@
 g api;%0A%0A
+%09/**%0A%09 * The application for which the key is defined.%0A%09 */%0A%09private String application;%0A%0A
 %09public 
@@ -1969,24 +1969,24 @@
 ring api) %7B%0A
-
 %09%09this.api =
@@ -1993,10 +1993,439 @@
  api;%0A%09%7D
+%0A%0A%09public String getApplication() %7B%0A%09%09return application;%0A%09%7D%0A%0A%09public void setApplication(String application) %7B%0A%09%09this.application = application;%0A%09%7D%0A%0A%09@Override%0A%09public boolean equals(Object o) %7B%0A%09%09if (this == o) return true;%0A%09%09if (o == null %7C%7C getClass() != o.getClass()) return false;%0A%09%09ApiKey apiKey = (ApiKey) o;%0A%09%09return Objects.equals(key, apiKey.key);%0A%09%7D%0A%0A%09@Override%0A%09public int hashCode() %7B%0A%09%09return Objects.hash(key);%0A%09%7D
 %0A%7D

Add missing application property in API Key entity