Added writing capabilities to ObjectProcessor, completed db integration

At this moment the client is not able to receive to objects sent
consecutively. This will be worked on in a future commit and should be
fixed before merging this branch into develop.
This commit is contained in:
2020-01-06 14:58:28 +02:00
parent 597385c950
commit 26fc4374ca
9 changed files with 128 additions and 36 deletions

View File

@ -3,6 +3,7 @@ package envoy.server.data;
import java.util.Date;
import java.util.List;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
@ -27,7 +28,7 @@ import javax.persistence.TemporalType;
*/
@Entity
@Table(name = "users")
@NamedQuery(query = "SELECT u FROM DBUser u WHERE u.id = :id", name = "getUserById")
@NamedQuery(query = "SELECT u FROM User u WHERE u.id = :id", name = "getUserById")
public class User {
@Id
@ -35,9 +36,12 @@ public class User {
private long id;
private String name;
private byte[] passwordHash;
@Temporal(TemporalType.TIMESTAMP)
private Date lastSeen;
private envoy.data.User.UserStatus status;
@ElementCollection
private List<User> contacts;
/**