Commit 33735034 authored by michael.simon's avatar michael.simon
Browse files

Create Entity classes

parent 57a4960d
/*******************************************************************************
* Copyright (c) 2014 Michael Simon.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Michael Simon - initial
******************************************************************************/
package edu.kit.scc.webreg.entity.as;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
@Entity(name = "ASUserAttrDateEntity")
public class ASUserAttrDateEntity extends ASUserAttrEntity {
private static final long serialVersionUID = 1L;
@Column(name = "value_date")
private Date valueDate;
public Date getValueDate() {
return valueDate;
}
public void setValueDate(Date valueDate) {
this.valueDate = valueDate;
}
}
/*******************************************************************************
* Copyright (c) 2014 Michael Simon.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Michael Simon - initial
******************************************************************************/
package edu.kit.scc.webreg.entity.as;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import edu.kit.scc.webreg.entity.AbstractBaseEntity;
import edu.kit.scc.webreg.entity.UserEntity;
@Entity(name = "ASUserAttrEntity")
@Table(name = "attribute_src_ua")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class ASUserAttrEntity extends AbstractBaseEntity {
private static final long serialVersionUID = 1L;
@ManyToOne
@JoinColumn(name = "user_id", nullable = false)
private UserEntity user;
@ManyToOne
@JoinColumn(name = "attribute_src_id", nullable = false)
private AttributeSourceEntity attributeSource;
@Column(name = "key", nullable = false, length = 512)
private String key;
public UserEntity getUser() {
return user;
}
public void setUser(UserEntity user) {
this.user = user;
}
public AttributeSourceEntity getAttributeSource() {
return attributeSource;
}
public void setAttributeSource(AttributeSourceEntity attributeSource) {
this.attributeSource = attributeSource;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
}
/*******************************************************************************
* Copyright (c) 2014 Michael Simon.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Michael Simon - initial
******************************************************************************/
package edu.kit.scc.webreg.entity.as;
import javax.persistence.Column;
import javax.persistence.Entity;
@Entity(name = "ASUserAttrLongEntity")
public class ASUserAttrLongEntity extends ASUserAttrEntity {
private static final long serialVersionUID = 1L;
@Column(name = "value_long")
private Long valueLong;
public Long getValueLong() {
return valueLong;
}
public void setValueLong(Long valueLong) {
this.valueLong = valueLong;
}
}
/*******************************************************************************
* Copyright (c) 2014 Michael Simon.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Michael Simon - initial
******************************************************************************/
package edu.kit.scc.webreg.entity.as;
import javax.persistence.Column;
import javax.persistence.Entity;
@Entity(name = "ASUserAttrStringEntity")
public class ASUserAttrStringEntity extends ASUserAttrEntity {
private static final long serialVersionUID = 1L;
@Column(name = "value_string")
private String valueString;
public String getValueString() {
return valueString;
}
public void setValueString(String valueString) {
this.valueString = valueString;
}
}
/*******************************************************************************
* Copyright (c) 2014 Michael Simon.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Michael Simon - initial
******************************************************************************/
package edu.kit.scc.webreg.entity.as;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import edu.kit.scc.webreg.entity.AbstractBaseEntity;
@Entity(name = "AttributeSourceEntity")
@Table(name = "attribute_src")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class AttributeSourceEntity extends AbstractBaseEntity {
private static final long serialVersionUID = 1L;
@Column(name = "name", nullable = false, length = 128)
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
/*******************************************************************************
* Copyright (c) 2014 Michael Simon.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Michael Simon - initial
******************************************************************************/
package edu.kit.scc.webreg.entity.as;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import edu.kit.scc.webreg.entity.AbstractBaseEntity;
import edu.kit.scc.webreg.entity.ServiceEntity;
@Entity(name = "AttributeSourceServiceEntity")
@Table(name = "attribute_src_service")
public class AttributeSourceServiceEntity extends AbstractBaseEntity {
private static final long serialVersionUID = 1L;
@ManyToOne
@JoinColumn(name = "service_id", nullable = false)
private ServiceEntity service;
@ManyToOne
@JoinColumn(name = "attribute_src_id", nullable = false)
private AttributeSourceEntity attributeSource;
public AttributeSourceEntity getAttributeSource() {
return attributeSource;
}
public void setAttributeSource(AttributeSourceEntity attributeSource) {
this.attributeSource = attributeSource;
}
public ServiceEntity getService() {
return service;
}
public void setService(ServiceEntity service) {
this.service = service;
}
}
/*******************************************************************************
* Copyright (c) 2014 Michael Simon.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Michael Simon - initial
******************************************************************************/
package edu.kit.scc.webreg.entity.as;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import edu.kit.scc.webreg.entity.AbstractBaseEntity;
import edu.kit.scc.webreg.entity.UserEntity;
@Entity(name = "AttributeSourceUserEntity")
@Table(name = "attribute_src_user")
public class AttributeSourceUserEntity extends AbstractBaseEntity {
private static final long serialVersionUID = 1L;
@ManyToOne
@JoinColumn(name = "user_id", nullable = false)
private UserEntity user;
@ManyToOne
@JoinColumn(name = "attribute_src_id", nullable = false)
private AttributeSourceEntity attributeSource;
public AttributeSourceEntity getAttributeSource() {
return attributeSource;
}
public void setAttributeSource(AttributeSourceEntity attributeSource) {
this.attributeSource = attributeSource;
}
public UserEntity getUser() {
return user;
}
public void setUser(UserEntity user) {
this.user = user;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment