ItEr52S11RFInfraestucturaEscenariosItEr51S11: Adding relation between users and scenarios.
This commit is contained in:
parent
da8ae03954
commit
2e224bf44a
2 changed files with 13 additions and 0 deletions
|
|
@ -28,6 +28,7 @@ import org.hibernate.validator.NotEmpty;
|
|||
import org.navalplanner.business.common.BaseEntity;
|
||||
import org.navalplanner.business.common.Registry;
|
||||
import org.navalplanner.business.common.exceptions.InstanceNotFoundException;
|
||||
import org.navalplanner.business.scenarios.entities.Scenario;
|
||||
import org.navalplanner.business.users.daos.IUserDAO;
|
||||
|
||||
/**
|
||||
|
|
@ -50,6 +51,8 @@ public class User extends BaseEntity {
|
|||
|
||||
private Boolean disabled = false;
|
||||
|
||||
private Scenario lastConnectedScenario;
|
||||
|
||||
/**
|
||||
* Necessary for Hibernate. Please, do not call it.
|
||||
*/
|
||||
|
|
@ -153,4 +156,12 @@ public class User extends BaseEntity {
|
|||
|
||||
}
|
||||
|
||||
public void setLastConnectedScenario(Scenario lastConnectedScenario) {
|
||||
this.lastConnectedScenario = lastConnectedScenario;
|
||||
}
|
||||
|
||||
public Scenario getLastConnectedScenario() {
|
||||
return lastConnectedScenario;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@
|
|||
<many-to-many column="PROFILE_ID"
|
||||
class="org.navalplanner.business.users.entities.Profile"/>
|
||||
</set>
|
||||
<many-to-one name="lastConnectedScenario"
|
||||
class="org.navalplanner.business.scenarios.entities.Scenario" />
|
||||
</class>
|
||||
|
||||
<class name="Profile" table="NAVAL_PROFILE">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue