/* * Copyright 2013 Cloud4SOA, www.cloud4soa.eu * * 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 eu.cloud4soa.relational.datamodel; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import javax.persistence.UniqueConstraint; import static javax.persistence.GenerationType.IDENTITY; /** * @author pgouvas */ @Entity @Table(name = "Account") public class Account extends AbstractModel<Account> implements java.io.Serializable { @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "id", nullable = false) private Long id; @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "paas", nullable = false) private Paas paas; @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "c4suser", nullable = false) private User user; @Column(name = "accountname", nullable = true) private String accountname; @Column(name = "publickey", nullable = true) private String publickey; @Column(name = "privatekey", nullable = true) private String privatekey; public Account() { } @Override public Long getId() { return this.id; } @Override public void setId(Long id) { this.id = id; } public Paas getPaas() { return this.paas; } public void setPaas(Paas paas) { this.paas = paas; } public User getUser() { return this.user; } public void setUser(User user) { this.user = user; } public String getAccountname() { return accountname; } public void setAccountname(String accountname) { this.accountname = accountname; } public String getPublickey() { return publickey; } public void setPublickey(String publickey) { this.publickey = publickey; } public String getPrivatekey() { return privatekey; } public void setPrivatekey(String privatekey) { this.privatekey = privatekey; } public String toString() { return "Credential [ id=" + id + " ]"; } }