switch from jpa to orientdb

This commit is contained in:
2014-08-16 01:49:39 +02:00
parent 07b78c520c
commit cb9032ce30
17 changed files with 89 additions and 173 deletions

View File

@@ -25,16 +25,11 @@
*/
package de.geofroggerfx.model;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author Andreas Billmann
*/
@Entity
public class Attribute {
@Id
private Long id;
private boolean inc;
private String text;

View File

@@ -25,16 +25,13 @@
*/
package de.geofroggerfx.model;
import javax.persistence.*;
import java.util.List;
/**
* @author Andreas Billmann
*/
@Entity
public class Cache {
@Id
private Long id;
private boolean available;
private boolean archived;
@@ -58,7 +55,6 @@ public class Cache {
private List<TravelBug> travelBugs;
private Waypoint mainWayPoint;
@OneToOne(fetch=FetchType.LAZY)
public Waypoint getMainWayPoint() {
return mainWayPoint;
}
@@ -107,7 +103,6 @@ public class Cache {
this.placedBy = placedBy;
}
@OneToOne(fetch=FetchType.LAZY)
public User getOwner() {
return owner;
}
@@ -116,7 +111,6 @@ public class Cache {
this.owner = owner;
}
@Enumerated(EnumType.STRING)
public Type getType() {
return type;
}
@@ -133,7 +127,6 @@ public class Cache {
this.container = container;
}
@ManyToMany(fetch=FetchType.LAZY)
public List<Attribute> getAttributes() {
return attributes;
}
@@ -214,7 +207,6 @@ public class Cache {
this.encodedHints = encodedHints;
}
@OneToMany(fetch=FetchType.LAZY)
public List<Log> getLogs() {
return logs;
}
@@ -223,7 +215,6 @@ public class Cache {
this.logs = logs;
}
@OneToMany(fetch=FetchType.LAZY)
public List<TravelBug> getTravelBugs() {
return travelBugs;
}

View File

@@ -25,19 +25,13 @@
*/
package de.geofroggerfx.model;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import java.util.List;
/**
* @author Andreas Billmann
*/
@Entity
public class CacheList {
@Id
private String name;
private List<Cache> caches;
@@ -50,7 +44,6 @@ public class CacheList {
this.name = name;
}
@OneToMany(fetch= FetchType.LAZY)
public List<Cache> getCaches() {
return caches;
}

View File

@@ -25,18 +25,16 @@
*/
package de.geofroggerfx.model;
import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.Date;
/**
* @author Andreas Billmann
*/
@Entity
public class Log {
@Id
private Long id;
private LocalDateTime date;
private Date date;
private String type;
private User finder;
private boolean textEncoded;
@@ -50,11 +48,11 @@ public class Log {
this.id = id;
}
public LocalDateTime getDate() {
public Date getDate() {
return date;
}
public void setDate(LocalDateTime date) {
public void setDate(Date date) {
this.date = date;
}
@@ -66,7 +64,6 @@ public class Log {
this.type = type;
}
@OneToOne(cascade = CascadeType.PERSIST)
public User getFinder() {
return finder;
}

View File

@@ -1,17 +1,12 @@
package de.geofroggerfx.model;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* This class represents the application settings, like current user, etc.
*
* @author abi
*/
@Entity
public class Settings {
@Id
private Long id;
private Long currentUserID = new Long(3906456);

View File

@@ -25,16 +25,11 @@
*/
package de.geofroggerfx.model;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author Andreas Billmann
*/
@Entity
public class TravelBug {
@Id
private Long id;
private String ref;
private String name;

View File

@@ -25,16 +25,11 @@
*/
package de.geofroggerfx.model;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author Andreas Billmann
*/
@Entity
public class User {
@Id
private Long id;
private String name;

View File

@@ -25,25 +25,22 @@
*/
package de.geofroggerfx.model;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.net.URL;
import java.time.LocalDateTime;
import java.util.Date;
/**
* @author Andreas Billmann
*/
@Entity
public class Waypoint {
@Id
private Long id;
private double latitude;
private double longitude;
private String name;
private LocalDateTime time;
private Date time;
private String description;
private URL url;
private String url;
private String urlName;
private String symbol;
private String type;
@@ -72,11 +69,11 @@ public class Waypoint {
this.longitude = longitude;
}
public void setTime(LocalDateTime time) {
public void setTime(Date time) {
this.time = time;
}
public LocalDateTime getTime() {
public Date getTime() {
return time;
}
@@ -96,11 +93,11 @@ public class Waypoint {
this.description = description;
}
public URL getUrl() {
public String getUrl() {
return url;
}
public void setUrl(URL url) {
public void setUrl(String url) {
this.url = url;
}