Added static ORM property

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
Jim Martens 2017-04-14 17:04:56 +02:00
parent ecac6eba38
commit 2bdc92748a
1 changed files with 5 additions and 3 deletions

View File

@ -7,11 +7,14 @@ import de.dis2017.data.db.ORM;
* Main class
*/
public class Main {
private static ORM _orm;
/**
* Starts the application.
*/
public static void main(String[] args) {
showMainMenu();
_orm = new ORM();
showMainMenu();
}
/**
@ -79,8 +82,7 @@ public class Main {
agent.setLogin(FormUtil.readString("Login"));
agent.setPassword(FormUtil.readString("Password"));
ORM orm = new ORM();
orm.persist(agent);
_orm.persist(agent);
System.out.println("EstateAgent with the ID " + agent.getId() + " was created.");
}