uwaga nie dziala
This commit is contained in:
1 parent
a733249665
commit
1e281381f2
8 files changed
+232
-4
No files matched your search
@@ -0,0 +1,97 @@
|
||||
package application.events.impl;
|
||||
|
||||
import application.events.EventObject;
|
||||
import application.model.Door;
|
||||
import application.model.User;
|
||||
import application.repositories.DoorRepository;
|
||||
import application.repositories.UserRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* Created by lukasgol on 10.02.15.
|
||||
*/
|
||||
@Entity
|
||||
public class EntryEvent implements EventObject {
|
||||
|
||||
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
private Long entryEventId;
|
||||
|
||||
@Basic
|
||||
private Long door;
|
||||
|
||||
@Basic
|
||||
private Long who;
|
||||
|
||||
@Basic
|
||||
private Long user;
|
||||
|
||||
public EntryEvent(int i, int i1, int i2) {
|
||||
this.door = Long.valueOf(i);
|
||||
this.who = Long.valueOf(i1);
|
||||
this.user = Long.valueOf(i2);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void validEvent() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleEvent() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public EntryEvent(Long door, Long user) {
|
||||
this.door = door;
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public Long getDoor() {
|
||||
return door;
|
||||
}
|
||||
|
||||
public void setDoor(Long door) {
|
||||
this.door = door;
|
||||
}
|
||||
|
||||
public Long getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public void setUser(Long user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public Long getWho() {
|
||||
return who;
|
||||
}
|
||||
|
||||
public void setWho(Long who) {
|
||||
this.who = who;
|
||||
}
|
||||
|
||||
public EntryEvent(Long door, Long who, Long user) {
|
||||
this.door = door;
|
||||
this.who = who;
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public EntryEvent() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String createMessage() {
|
||||
return "User: "+who+" passed through door: " +door;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user