Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.ArrayList;
- import java.util.List;
- /**
- * Created by wojni on 10.03.2016.
- */
- public class users {
- long ID;
- string name;
- string surname;
- string email;
- string login;
- string md5pass;
- bool active;
- bool type; // 1 - pracownik wewnetrzny, 0 - pracownik zewnetrzny;
- List<role> roles = new ArrayList<>();
- List<project> projects = new ArrayList<>()
- public users(long id, string name, string surname, string email, string login, string md5pass, bool active, bool type)
- {
- this.ID = id;
- this.name = name;
- this.surname = surname;
- this.email = email;
- this.login = login;
- this.md5pass = md5pass;
- this.active = active;
- this.type = type;
- }
- public addRoleToUser(users user, role rola)
- {
- user.roles.add(rola);
- }
- public addProjectToUser(users user, project project)
- {
- user.projects.add(project);
- }
- }
- /////////////////////////////////////////////////////////////////////////////
- /**
- * Created by wojni on 10.03.2016.
- */
- public class project {
- long ID;
- string name;
- string descritpion;
- string version;
- priority priority;
- public project(long id, string name, string desc, string version, priority priority)
- {
- this.ID = id;
- this.name = name;
- this.descritpion = desc;
- this.version = version;
- this.priority = priority;
- }
- }
- ///////////////////////////////////////////////////////////////////////////////////
- /**
- * Created by wojni on 10.03.2016.
- */
- public class zgloszenie {
- long ID;
- //typ
- string description;
- priority priority;
- project project;
- public zgloszenie(long id, string description, priority priority, project project)
- {
- this.ID = id;
- this.description = description;
- this.priority = priority;
- this.project = project;
- }
- }
- ////////////////////////////////////////////////////////////////////////////////////////
- /**
- * Created by wojni on 10.03.2016.
- */
- public class priority {
- long ID;
- string name;
- string responseTime;
- public priority(long id, string name, string responseTime)
- {
- this.ID = id;
- this.name = name;
- this.responseTime = responseTime;
- }
- }
- ///////////////////////////////////////////////////////////////////////////////////////
- /**
- * Created by wojni on 10.03.2016.
- */
- public class role {
- long ID;
- string name;
- users user;
- public role(long id, string Name, users User)
- {
- this.ID = id;
- this.name = Name;
- this.user = User;
- }
- }
- public class binaria{
- long ID;
- byte bite;
- zalacznik zalacznik;
- public binaria (long Id, byte Bite, zalacznik Zalacznik)
- {
- this.ID = Id;
- this.bite = Bite;
- this.zalacznik = Zalacznik;
- }
- }
- public class zalacznik {
- long ID;
- long ID_ZGLOSZENIA;
- string NAZWA;
- string NAZWA_PLIKU;
- string MINE_TYPE;
- long ID_BINARIA;
- public zgloszenia( long ID,long ID_ZGLOSZENIA,string NAZWA,string NAZWA_PLIKU,string MINE_TYPE,long ID_BINARIA;)
- {
- this.ID=id;
- thisID_ZGLOSZENIA=id_zgloszenia;
- this.NAZWA=nazwa;
- this.NAZWA_PLIKU=nazwa_pliku;
- this.MINE_TYPE=mine_type;
- this.ID_BINARIA=id_binaria;
- }
- }
- public class zgloszenia {
- long ID;
- enum TYP {ZGE, SUG,BŁAD};
- string opis;
- priority priority;
- List<project> projects = new ArrayList<>()
- public zgloszenia(long ID,enum TYP,string opis,priority priority)
- {
- this.ID=id;
- this.TYP=typ;
- this.opis=opis;
- this.priority=priority;
- }
- public addProjectToNotification(Notifications Notification, project project)
- {
- notification.projects.add(project);
- }
- }
- public class zgloszenia_wew {
- long ID;
- enum TYP {ZGE, SUG,BŁAD};
- string opis;
- priority priority;
- List<project> projects = new ArrayList<>()
- public zgloszenia_wew(long ID,enum TYP,string opis,priority priority)
- {
- this.ID=id;
- this.TYP=typ;
- this.opis=opis;
- this.priority=priority;
- }
- public addProjectToNotification(Notifications Notification, project project)
- {
- notification.projects.add(project);
- }
- }
Add Comment
Please, Sign In to add comment