Added table definition files for the model classes. Note that these are untested and may need modification. TODO: the Maven replacer plugin needs to be configured in order to replace the DB_URL, etc variables in data-context.xml with local values.

pull/59/head
Amanda Anganes 2012-01-12 16:01:34 -05:00
parent b47d22e0fd
commit 01ec777af6
9 changed files with 55 additions and 1 deletions

View File

@ -4,7 +4,6 @@ import java.util.Date;
import java.util.Set;
import javax.persistence.Basic;
import javax.persistence.CollectionTable;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.FetchType;

View File

@ -3,6 +3,7 @@ package org.mitre.openid.connect.model;
import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
@ -233,6 +234,7 @@ public class UserInfo {
* @return the address
*/
@OneToOne
@JoinColumn(name="address_id")
public Address getAddress() {
return address;
}

View File

@ -0,0 +1,9 @@
CREATE TABLE address (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
formatted VARCHAR(256),
streetAddress VARCHAR(256),
locality VARCHAR(256),
region VARCHAR(256),
postalCode VARCHAR(256),
country VARCHAR(256)
);

View File

@ -0,0 +1,8 @@
CREATE TABLE approvedsite (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
userinfo_id VARCHAR(256),
clientdetails_id VARCHAR(256),
creationDate DATE,
accessDate DATE,
timeoutDate DATE
);

View File

@ -0,0 +1,5 @@
CREATE TABLE event (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
type INT(3),
timestamp DATE
);

View File

@ -0,0 +1,3 @@
CREATE TABLE idtoken (
id BIGINT AUTO_INCREMENT PRIMARY KEY
);

View File

@ -0,0 +1,3 @@
CREATE TABLE idtokenclaims (
id BIGINT AUTO_INCREMENT PRIMARY KEY
);

View File

@ -0,0 +1,20 @@
CREATE TABLE userinfo (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
userId VARCHAR(256),
name VARCHAR(256),
givenName VARCHAR(256),
familyName VARCHAR(256),
middleName VARCHAR(256),
nickname VARCHAR(256),
profile VARCHAR(256),
picture VARCHAR(256),
website VARCHAR(256),
email VARCHAR(256),
verified BOOLEAN,
gender VARCHAR(256),
zoneinfo VARCHAR(256),
locale VARCHAR(256),
phoneNumber VARCHAR(256),
address_id VARCHAR(256),
updatedTime VARCHAR(256)
);

View File

@ -0,0 +1,5 @@
CREATE TABLE whitelistedsite (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
userinfo_id VARCHAR(256),
clientdetails_id VARCHAR(256)
);