/* * Copyright 2011 Serbian Object Laboratories (SOL) * * Licensed under the GPL licence * * http://www.gnu.org/licenses/gpl.html */ package configuration; import rs.sol.soloist.helpers.init.Initializer; import rs.sol.soloist.server.builtindomains.builtindatatypes.Boolean; import rs.sol.soloist.server.builtindomains.builtindatatypes.Integer; import rs.sol.soloist.server.builtindomains.builtindatatypes.Text; import companyorganization.Department; import companyorganization.Employee; import companyorganization.Gender; public class ObjectSpaceInit implements Initializer { private static Department rootDepartment; public static Department getRootDepartment() { return rootDepartment; } public void init() { // Adding departments rootDepartment = new Department(); rootDepartment.name.set(Text.fromString("SOL")); Department d2 = new Department(); d2.name.set(Text.fromString("Headquarters")); Department d3 = new Department(); d3.name.set(Text.fromString("Research & Development")); Department d4 = new Department(); d4.name.set(Text.fromString("Production")); Department d5 = new Department(); d5.name.set(Text.fromString("Commerce")); Department d6 = new Department(); d6.name.set(Text.fromString("Development")); Department d7 = new Department(); d7.name.set(Text.fromString("Quality Assurance")); Department d8 = new Department(); d8.name.set(Text.fromString("Marketing")); Department d9 = new Department(); d9.name.set(Text.fromString("Sales")); Department d10 = new Department(); d10.name.set(Text.fromString("Support")); // Adding employees Employee e1 = new Employee(); e1.name.set(Text.fromString("Dragan Milicev")); e1.gender.set(Gender.MALE); e1.isMarried.set(new Boolean(true)); e1.numberOfChildren.set(new Integer(3)); Employee e2 = new Employee(); e2.name.set(Text.fromString("Zarko Mijailovic")); e2.gender.set(Gender.MALE); Employee e3 = new Employee(); e3.name.set(Text.fromString("Milorad Pop-Tosic")); e3.gender.set(Gender.MALE); Employee e4 = new Employee(); e4.name.set(Text.fromString("Nemanja Kojic")); e4.gender.set(Gender.MALE); Employee e5 = new Employee(); e5.name.set(Text.fromString("Sanja Mitrovic")); e5.gender.set(Gender.FEMALE); Employee e6 = new Employee(); e6.name.set(Text.fromString("Andrija Misevic")); e6.gender.set(Gender.MALE); Employee e7 = new Employee(); e7.name.set(Text.fromString("Pedja Radenkovic")); e7.gender.set(Gender.FEMALE); Employee e8 = new Employee(); e8.name.set(Text.fromString("Srdjan Lukovic")); e8.gender.set(Gender.FEMALE); Employee e9 = new Employee(); e9.name.set(Text.fromString("Vukasin Milovanovic")); e9.gender.set(Gender.MALE); Employee e10 = new Employee(); e10.name.set(Text.fromString("Ljubica Kuzelka")); e10.gender.set(Gender.MALE); } }