├── src
├── main
│ ├── java
│ │ └── com
│ │ │ └── Libra
│ │ │ ├── orm
│ │ │ ├── Serial.java
│ │ │ ├── libraApp
│ │ │ │ ├── Main.java
│ │ │ │ └── Starter.java
│ │ │ ├── dao
│ │ │ │ ├── CirculationDAO.java
│ │ │ │ ├── PatronDAO.java
│ │ │ │ ├── AdministratorDAO.java
│ │ │ │ ├── CirculationImpl.java
│ │ │ │ ├── DAO.java
│ │ │ │ ├── PatronImpl.java
│ │ │ │ └── AdministratorImpl.java
│ │ │ ├── Patron.java
│ │ │ ├── Administrator.java
│ │ │ ├── Acquisition.java
│ │ │ ├── Account.java
│ │ │ ├── util
│ │ │ │ └── SmisSessionFactory.java
│ │ │ ├── Person.java
│ │ │ ├── Report.java
│ │ │ ├── Circulation.java
│ │ │ └── Catalogue.java
│ │ │ ├── DAO
│ │ │ ├── CatalogueDAO.java
│ │ │ ├── DAO.java
│ │ │ └── CatalogueDaoImpl.java
│ │ │ └── util
│ │ │ └── LibraSessionFactory.java
│ └── resources
│ │ └── hibernate.cfg.xml
└── target
│ └── classes
│ └── hibernate.cfg.xml
├── .idea
├── vcs.xml
├── misc.xml
├── compiler.xml
└── dbnavigator.xml
├── .gitignore
├── target
├── maven-status
│ └── maven-compiler-plugin
│ │ └── compile
│ │ └── default-compile
│ │ ├── createdFiles.lst
│ │ └── inputFiles.lst
└── classes
│ └── hibernate.cfg.xml
├── README.md
├── libms.iml
├── Libra.iml
├── pom.xml
└── LICENSE
/src/main/java/com/Libra/orm/Serial.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm;
2 |
3 | import javax.persistence.*;
4 | import java.util.ArrayList;
5 |
6 | public class Serial {
7 |
8 | }
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/libraApp/Main.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm.libraApp;
2 |
3 | import javax.swing.*;
4 |
5 | public class Main {
6 | public static void main(String[] args){
7 | JFrame jframe = new JFrame();
8 | jframe.setSize(450, 450);
9 | jframe.setResizable(false);
10 | jframe.setTitle("JFrame Practice");
11 | jframe.setVisible(true);
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled class file
2 | *.class
3 |
4 | # Log file
5 | *.log
6 |
7 | # BlueJ files
8 | *.ctxt
9 |
10 | # Mobile Tools for Java (J2ME)
11 | .mtj.tmp/
12 |
13 | # Package Files #
14 | *.jar
15 | *.war
16 | *.nar
17 | *.ear
18 | *.zip
19 | *.tar.gz
20 | *.rar
21 |
22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23 | hs_err_pid*
24 | /.idea
25 | *.idea
26 | /regarder
27 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/dao/CirculationDAO.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm.dao;
2 |
3 | import com.Libra.orm.Catalogue;
4 | import com.Libra.orm.Patron;
5 |
6 | import java.util.List;
7 |
8 | public interface CirculationDAO {
9 | public List getAllLenders();
10 | //id, name, id book lent, fine charged
11 | public List getLentBooks();
12 | //book id, book name, id lent patron, dates
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/DAO/CatalogueDAO.java:
--------------------------------------------------------------------------------
1 | package com.Libra.DAO;
2 |
3 | import com.Libra.orm.Catalogue;
4 |
5 | import java.util.List;
6 | import java.util.Optional;
7 |
8 | public interface CatalogueDAO {
9 | public void addCatalogue(Catalogue catalogue);
10 | public Optional getCatalogueById(int id);
11 |
12 | public void updateCatalogue(Catalogue catalogue);
13 |
14 | public void deleteCatalogue(int id);
15 |
16 | public ListgetAllCatalogues();
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/dao/PatronDAO.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm.dao;
2 |
3 | import com.Libra.orm.Administrator;
4 | import com.Libra.orm.Patron;
5 |
6 | import java.util.List;
7 | import java.util.Optional;
8 |
9 | public interface PatronDAO{
10 | public void addPatron(Patron patron);
11 |
12 | public List getAllPatrons();
13 |
14 | public void deletePatron(Integer id);
15 |
16 | public Patron updatePatron(Patron patron);
17 |
18 | public Optional getPatron(int id);
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/Patron.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm;
2 |
3 | import java.util.*;
4 |
5 | import javax.persistence.*;
6 |
7 | @Entity
8 | @Table(name = "patron")
9 | public class Patron extends Person {
10 |
11 | public Patron(String firstName, String lastName, String email, String phoneNumber, String role) {
12 | this.setFirstname(firstName);
13 | this.setLastname(lastName);
14 | this.setEmail(email);
15 | this.setPhoneNumber(phoneNumber);
16 | this.setRole(role);
17 | }
18 |
19 | }
20 |
21 |
22 |
--------------------------------------------------------------------------------
/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst:
--------------------------------------------------------------------------------
1 | com\Libra\orm\Account.class
2 | com\Libra\orm\Patron.class
3 | com\Libra\orm\Acquisition.class
4 | com\Libra\orm\CirculationInterface.class
5 | com\Libra\orm\Report.class
6 | rw\ac\util\SmisSessionFactory.class
7 | com\Libra\orm\Book.class
8 | com\Libra\orm\Serial.class
9 | com\Libra\orm\PatronInterface.class
10 | com\Libra\orm\User.class
11 | com\Libra\orm\Circulation.class
12 | com\Libra\orm\libraApp\Starter.class
13 | com\Libra\orm\Person.class
14 | com\Libra\orm\Catalogue.class
15 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/dao/AdministratorDAO.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm.dao;
2 |
3 | import com.Libra.orm.Administrator;
4 |
5 | import java.util.List;
6 | import java.util.Optional;
7 |
8 | public interface AdministratorDAO {
9 | public void addAdministrator(Administrator administrator);
10 |
11 | public List getAllAdministrators();
12 |
13 | public void deleteAdministrator(Integer id);
14 |
15 | public Administrator updateAdministrator(Administrator administrator);
16 |
17 | public Optional getAdministrator(int id);
18 | }
19 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Libra
2 | Library management system
3 | ___
4 | ### Stack
5 | Used to build it
6 | - Java
7 | - Herbinate
8 | - Maven
9 | - SQL
10 |
11 | ### Maintainers
12 | Maintained by
13 | - [@pacifiquem](https://github.com/pacifiquem)
14 |
15 | ### Contributors
16 | Built by
17 | - [@pacifiquem](https://github.com/pacifiquem)
18 | - [@ndzhwr](https://github.com/ndzhwr)
19 | - [@Ernor1](https://github.com/Ernor1)
20 | - [@Ucynthia](https://github.com/ucynthia13)
21 | - [@Aline](https://github.com/Alineeniyo)
22 |
23 |
24 | ## Licence
25 | This project under [Apance Licence 2.0](LICENCE)
26 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/Administrator.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm;
2 |
3 | import javax.persistence.Entity;
4 | import javax.persistence.Table;
5 | import java.util.Date;
6 |
7 | @Entity
8 | @Table(name = "administrator")
9 | public class Administrator extends Person{
10 | public Administrator(String firstName, String lastName, Date date, String phoneNumber, String role, String email) {
11 | this.setFirstname(firstName);
12 | this.setLastname(lastName);
13 | this.setEmail(email);
14 | this.setPhoneNumber(phoneNumber);
15 | this.setRole(role);
16 | this.setDob(date);
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/dao/CirculationImpl.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm.dao;
2 |
3 | import com.Libra.orm.Catalogue;
4 | import com.Libra.orm.Patron;
5 | import org.hibernate.SessionFactory;
6 |
7 | import java.util.List;
8 |
9 | public class CirculationImpl implements CirculationDAO {
10 |
11 | private SessionFactory sessionFactory;
12 |
13 | @Override
14 | public List getAllLenders() {
15 | return sessionFactory.getCurrentSession().createQuery("from patron").list();
16 | }
17 |
18 | @Override
19 | public List getLentBooks() {
20 | return sessionFactory.getCurrentSession().createQuery("from catalogue").list();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/Acquisition.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm;
2 | import java.util.ArrayList;
3 | import java.util.Date;
4 | import java.util.List;
5 | import java.util.Set;
6 |
7 | import javax.persistence.CascadeType;
8 | import javax.persistence.Column;
9 | import javax.persistence.Entity;
10 | import javax.persistence.FetchType;
11 | import javax.persistence.GeneratedValue;
12 | import javax.persistence.GenerationType;
13 | import javax.persistence.Id;
14 | import javax.persistence.JoinColumn;
15 | import javax.persistence.JoinTable;
16 | import javax.persistence.ManyToMany;
17 | import javax.persistence.ManyToOne;
18 | import javax.persistence.OneToMany;
19 | import javax.persistence.Table;
20 |
21 | public class Acquisition {
22 |
23 | }
--------------------------------------------------------------------------------
/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst:
--------------------------------------------------------------------------------
1 | C:\Users\REGIS\IdeaProjects\Libra\src\main\java\com\Libra\orm\Serial.java
2 | C:\Users\REGIS\IdeaProjects\Libra\src\main\java\com\Libra\orm\Patron.java
3 | C:\Users\REGIS\IdeaProjects\Libra\src\main\java\com\Libra\orm\CirculationInterface.java
4 | C:\Users\REGIS\IdeaProjects\Libra\src\main\java\com\Libra\orm\libraApp\Starter.java
5 | C:\Users\REGIS\IdeaProjects\Libra\src\main\java\com\Libra\orm\Person.java
6 | C:\Users\REGIS\IdeaProjects\Libra\src\main\java\com\Libra\orm\User.java
7 | C:\Users\REGIS\IdeaProjects\Libra\src\main\java\com\Libra\orm\Catalogue.java
8 | C:\Users\REGIS\IdeaProjects\Libra\src\main\java\com\Libra\orm\util\SmisSessionFactory.java
9 | C:\Users\REGIS\IdeaProjects\Libra\src\main\java\com\Libra\orm\Account.java
10 | C:\Users\REGIS\IdeaProjects\Libra\src\main\java\com\Libra\orm\Report.java
11 | C:\Users\REGIS\IdeaProjects\Libra\src\main\java\com\Libra\orm\PatronInterface.java
12 | C:\Users\REGIS\IdeaProjects\Libra\src\main\java\com\Libra\orm\Book.java
13 | C:\Users\REGIS\IdeaProjects\Libra\src\main\java\com\Libra\orm\Acquisition.java
14 | C:\Users\REGIS\IdeaProjects\Libra\src\main\java\com\Libra\orm\Circulation.java
15 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/DAO/DAO.java:
--------------------------------------------------------------------------------
1 | package com.Libra.DAO;
2 | import org.hibernate.HibernateException;
3 | import org.hibernate.Session;
4 | import com.Libra.util.LibraSessionFactory;
5 |
6 |
7 | public class DAO {
8 |
9 | protected DAO() {
10 |
11 | }
12 |
13 | public static Session getSession() {
14 | return LibraSessionFactory.getSession();
15 | }
16 |
17 | protected void begin() {
18 | getSession().beginTransaction();
19 | }
20 |
21 | protected void commit() {
22 | getSession().getTransaction().commit();
23 | }
24 |
25 |
26 | protected void rollback() {
27 | try {
28 | getSession().getTransaction().rollback();
29 | } catch (HibernateException e) {
30 | System.out.println("Cannot rollback: " );
31 | e.printStackTrace();
32 | }
33 | finally{
34 | close();
35 | }
36 | }
37 |
38 | protected void close() {
39 | try {
40 | getSession().close();
41 | } catch (HibernateException e) {
42 | System.out.println("Cannot close: " + e.toString());
43 | }
44 | }
45 |
46 | public void clear() {
47 | getSession().clear();
48 | }
49 | public void flush(){
50 | getSession().flush();
51 | }
52 |
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/dao/DAO.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm.dao;
2 |
3 | import com.Libra.orm.util.*;
4 | import org.hibernate.HibernateException;
5 | import org.hibernate.Session;
6 | import com.Libra.orm.util.SmisSessionFactory;
7 |
8 | public class DAO {
9 |
10 | protected DAO() {
11 |
12 | }
13 |
14 | /**
15 | * @return session
16 | */
17 | public static Session getSession() {
18 | return (Session) SmisSessionFactory.getSession();
19 | }
20 |
21 | /**
22 | * begins transaction
23 | */
24 | protected void begin() {
25 | getSession().beginTransaction();
26 | }
27 |
28 | /**
29 | * saves changes to the database
30 | */
31 | protected void commit() {
32 | getSession().getTransaction().commit();
33 | }
34 |
35 | /**
36 | * rolls back for failed transaction closes databases connection
37 | *
38 | * @throws HibernateException
39 | */
40 | protected void rollback() {
41 | try {
42 | getSession().getTransaction().rollback();
43 | } catch (HibernateException e) {
44 | System.out.println("Cannot rollback: " + e.toString());
45 | } finally {
46 | close();
47 | }
48 | }
49 |
50 | protected void close() {
51 | try {
52 | getSession().close();
53 | } catch (HibernateException e) {
54 | System.out.println("Cannot close: " + e.toString());
55 | }
56 | }
57 |
58 | public void clear() {
59 | getSession().clear();
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/Account.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm;
2 | import java.util.ArrayList;
3 | import java.util.Date;
4 | import java.util.List;
5 | import java.util.Set;
6 |
7 | import javax.persistence.CascadeType;
8 | import javax.persistence.Column;
9 | import javax.persistence.Entity;
10 | import javax.persistence.FetchType;
11 | import javax.persistence.GeneratedValue;
12 | import javax.persistence.GenerationType;
13 | import javax.persistence.Id;
14 | import javax.persistence.JoinColumn;
15 | import javax.persistence.JoinTable;
16 | import javax.persistence.ManyToMany;
17 | import javax.persistence.ManyToOne;
18 | import javax.persistence.OneToMany;
19 | import javax.persistence.Table;
20 |
21 | @Entity(name = "account")
22 | public class Account {
23 | @Id
24 | @Column
25 | @GeneratedValue(strategy = GenerationType.AUTO)
26 | private int id;
27 |
28 | @Column
29 | private String username;
30 |
31 | @Column
32 | private String email ;
33 |
34 | @Column
35 | private String password;
36 |
37 | public int getId() {
38 | return id;
39 | }
40 |
41 | public void setId(int id) {
42 | this.id = id;
43 | }
44 |
45 | public String getUsername() {
46 | return username;
47 | }
48 |
49 | public void setUsername(String username) {
50 | this.username = username;
51 | }
52 |
53 | public String getEmail() {
54 | return email;
55 | }
56 |
57 | public void setEmail(String email) {
58 | this.email = email;
59 | }
60 |
61 | public String getPassword() {
62 | return password;
63 | }
64 |
65 | public void setPassword(String password) {
66 | this.password = password;
67 | }
68 |
69 | }
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/libraApp/Starter.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm.libraApp;
2 |
3 | import com.Libra.orm.Administrator;
4 | import com.Libra.orm.Patron;
5 | import com.Libra.orm.dao.AdministratorDAO;
6 | import com.Libra.orm.dao.AdministratorImpl;
7 | import com.Libra.orm.dao.PatronDAO;
8 | import com.Libra.orm.dao.PatronImpl;
9 |
10 | import java.util.Date;
11 |
12 | import com.Libra.orm.Catalogue;
13 |
14 | import com.Libra.orm.Patron;
15 | import org.hibernate.Session;
16 | import org.hibernate.SessionFactory;
17 | import org.hibernate.Transaction;
18 | import org.hibernate.cfg.Configuration;
19 |
20 |
21 | import java.util.*;
22 |
23 | public class Starter {
24 | public static void main(String[] args){
25 | AdministratorImpl administratorDAO = new AdministratorImpl();
26 | PatronDAO patronDAO = new PatronImpl();
27 |
28 | Administrator administrator = new Administrator("john", "doe", new Date()
29 | ,"1028384","Admin", "johndoe@example.com");
30 | Patron patron = new Patron("john", "doe",
31 | "johndoe@example.com", "8953498539", "user");
32 | patron.setDob(new Date());
33 |
34 | administratorDAO.addAdministrator(administrator);
35 | patronDAO.addPatron(patron);
36 |
37 | Optional administrator1 = administratorDAO.getAdministrator(1);
38 | System.out.println(administrator1);
39 |
40 | Optional patron1 = patronDAO.getPatron(1);
41 | System.out.println(patron1);
42 |
43 | patronDAO.deletePatron(patron.getId());
44 | administratorDAO.deleteAdministrator(administrator.getId());
45 |
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/util/LibraSessionFactory.java:
--------------------------------------------------------------------------------
1 | package com.Libra.util;
2 |
3 | import org.hibernate.HibernateException;
4 | import org.hibernate.Session;
5 | import org.hibernate.SessionFactory;
6 | import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
7 | import org.hibernate.cfg.Configuration;
8 | import org.hibernate.service.ServiceRegistry;
9 |
10 |
11 |
12 | public class LibraSessionFactory {
13 |
14 | private static SessionFactory sessionFactory;
15 | private static StandardServiceRegistryBuilder serviceRegistryBuilder;
16 | private static String configFile = "hibernate.cfg.xml";
17 | private static Configuration configuration;
18 | private static ServiceRegistry serviceRegistry;
19 |
20 | private LibraSessionFactory() {
21 | }
22 |
23 | private static SessionFactory getInstance() throws HibernateException{
24 | if (sessionFactory == null) {
25 | configuration = new Configuration();
26 | serviceRegistryBuilder = new StandardServiceRegistryBuilder();
27 | configuration.configure(configFile);
28 | serviceRegistryBuilder.applySettings(configuration.getProperties());
29 | serviceRegistry = serviceRegistryBuilder.build();
30 | sessionFactory = configuration.buildSessionFactory(serviceRegistry);
31 | }
32 | return sessionFactory;
33 | }
34 |
35 | public static Session getSession() {
36 | Session session = getInstance().getCurrentSession();
37 | if (session == null || !session.isOpen()) {
38 | session = getInstance().openSession();
39 | }
40 | return session;
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/util/SmisSessionFactory.java:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | */
4 | package com.Libra.orm.util;
5 |
6 | import org.hibernate.HibernateException;
7 | import org.hibernate.Session;
8 | import org.hibernate.SessionFactory;
9 | import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
10 | import org.hibernate.cfg.Configuration;
11 | import org.hibernate.service.ServiceRegistry;
12 |
13 |
14 |
15 | public class SmisSessionFactory {
16 |
17 | private static SessionFactory sessionFactory;
18 | private static StandardServiceRegistryBuilder serviceRegistryBuilder;
19 | private static String configFile = "hibernate.cfg.xml";
20 | private static Configuration configuration;
21 | private static ServiceRegistry serviceRegistry;
22 |
23 | private SmisSessionFactory() {
24 | }
25 |
26 | /**
27 | * gets instance
28 | *
29 | * @return sessionFactory
30 | */
31 | private static SessionFactory getInstance() throws HibernateException{
32 | if (sessionFactory == null) {
33 | configuration = new Configuration();
34 | serviceRegistryBuilder = new StandardServiceRegistryBuilder();
35 | configuration.configure(configFile);
36 | serviceRegistryBuilder.applySettings(configuration.getProperties());
37 | serviceRegistry = serviceRegistryBuilder.build();
38 | sessionFactory = configuration.buildSessionFactory(serviceRegistry);
39 | }
40 | return sessionFactory;
41 | }
42 |
43 | /**
44 | * gets session
45 | *
46 | * @return session
47 | */
48 | public static Session getSession() {
49 | Session session = getInstance().getCurrentSession();
50 | if (session == null || !session.isOpen()) {
51 | session = getInstance().openSession();
52 | }
53 | return session;
54 | }
55 |
56 | }
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/Person.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm;
2 |
3 | import javax.persistence.GeneratedValue;
4 | import javax.persistence.GenerationType;
5 | import javax.persistence.Id;
6 | import javax.persistence.MappedSuperclass;
7 | import java.io.Serializable;
8 | import java.util.Date;
9 |
10 | @MappedSuperclass
11 | public class Person implements Serializable {
12 |
13 | @Id
14 | @GeneratedValue(strategy = GenerationType.AUTO)
15 | private int id;
16 | private Date dob;
17 | private String firstname;
18 | private String lastname;
19 | private String email;
20 | private String phoneNumber;
21 | private String role;
22 |
23 | public String getFirstname() {
24 | return firstname;
25 | }
26 |
27 | public void setFirstname(String firstname) {
28 | this.firstname = firstname;
29 | }
30 |
31 | public Date getDob() {
32 | return dob;
33 | }
34 |
35 | public void setDob(Date dob) {
36 | this.dob = dob;
37 | }
38 |
39 | public String getLastname() {
40 | return lastname;
41 | }
42 |
43 | public void setLastname(String lastname) {
44 | this.lastname = lastname;
45 | }
46 |
47 | public String getEmail() {
48 | return email;
49 | }
50 |
51 | public void setEmail(String email) {
52 | this.email = email;
53 | }
54 |
55 | public String getPhoneNumber() {
56 | return phoneNumber;
57 | }
58 |
59 | public void setPhoneNumber(String phoneNumber) {
60 | this.phoneNumber = phoneNumber;
61 | }
62 |
63 | public String getRole() {
64 | return role;
65 | }
66 |
67 | public void setRole(String role) {
68 | this.role = role;
69 | }
70 |
71 | public int getId() {
72 | return id;
73 | }
74 |
75 | public void setId(int id) {
76 | this.id = id;
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/dao/PatronImpl.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm.dao;
2 |
3 | import com.Libra.orm.Administrator;
4 | import com.Libra.orm.Patron;
5 | import com.Libra.orm.util.*;
6 | import org.hibernate.Query;
7 | import org.hibernate.Session;
8 |
9 | import java.util.List;
10 | import java.util.Optional;
11 |
12 | import static com.Libra.orm.dao.DAO.getSession;
13 |
14 | public class PatronImpl extends DAO implements PatronDAO{
15 |
16 | @Override
17 | public void addPatron(Patron patron) {
18 | try{
19 | begin();
20 | getSession().saveOrUpdate(patron);
21 | commit();
22 | } catch (Exception e) {
23 | rollback();
24 | }
25 | }
26 |
27 | @Override
28 | public List getAllPatrons() {
29 | try{
30 | begin();
31 | Query query = getSession().createQuery("from patron");
32 | List patrons = query.list();
33 | commit();
34 | return patrons;
35 | }catch(Exception e){
36 | rollback();
37 | return null;
38 | }
39 | }
40 |
41 | @Override
42 | public void deletePatron(Integer id) {
43 | Patron patron = null;
44 | try{
45 | begin();
46 | patron = (Patron) getSession().get(Patron.class, id);
47 | getSession().delete(patron);
48 | }catch(Exception e){
49 | rollback();
50 | }
51 | }
52 |
53 | @Override
54 | public Patron updatePatron(Patron patron) {
55 | return null;
56 | }
57 |
58 | @Override
59 | public Optional getPatron(int id) {
60 | try {
61 | begin();
62 | Patron patron = (Patron) getSession().get(Patron.class, id);
63 | return Optional.ofNullable(patron);
64 | } catch (Exception e) {
65 | rollback();
66 | return null;
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/dao/AdministratorImpl.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm.dao;
2 |
3 | import com.Libra.orm.Administrator;
4 | import com.Libra.orm.util.*;
5 | import org.hibernate.Query;
6 | import org.hibernate.Session;
7 | import org.springframework.stereotype.Component;
8 |
9 | import java.util.List;
10 | import java.util.Optional;
11 |
12 | public class AdministratorImpl extends DAO implements AdministratorDAO{
13 |
14 |
15 | @Override
16 | public void addAdministrator(Administrator administrator) {
17 | try{
18 | begin();
19 | getSession().saveOrUpdate(administrator);
20 | commit();
21 | } catch (Exception e) {
22 | rollback();
23 | }
24 | }
25 |
26 | @Override
27 | public List getAllAdministrators() {
28 | try{
29 | begin();
30 | Query query = getSession().createQuery("from administrator");
31 | List administrators = query.list();
32 | commit();
33 | return administrators;
34 | }catch(Exception e){
35 | rollback();
36 | return null;
37 | }
38 | }
39 |
40 | @Override
41 | public void deleteAdministrator(Integer id) {
42 | Administrator administrator;
43 | try{
44 | begin();
45 | administrator = (Administrator) getSession().get(Administrator.class, id);
46 | getSession().delete(administrator);
47 | }catch(Exception e){
48 | rollback();
49 | }
50 | }
51 |
52 | @Override
53 | public Administrator updateAdministrator(Administrator administrator) {
54 | return null;
55 | }
56 |
57 | @Override
58 | public Optional getAdministrator(int id) {
59 | try {
60 | begin();
61 | Administrator administrator = (Administrator) getSession().get(Administrator.class, id);
62 | return Optional.ofNullable(administrator);
63 | } catch (Exception e) {
64 | rollback();
65 | return null;
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/DAO/CatalogueDaoImpl.java:
--------------------------------------------------------------------------------
1 | package com.Libra.DAO;
2 | import com.Libra.orm.Catalogue;
3 | import com.Libra.orm.Patron;
4 | import org.hibernate.Query;
5 |
6 | import java.util.List;
7 | import java.util.Optional;
8 |
9 | public class CatalogueDaoImpl extends DAO implements CatalogueDAO {
10 |
11 |
12 | //(String title, String author, String
13 | // ISBN, String publisher, Date publicationDate,
14 | // int edition, String subject,
15 | // String description, int numberOfCopies,
16 | // int availableCopies) {
17 | // this.title = title;
18 |
19 | //public Catalogue get(int id) throws SQLException(){
20 |
21 |
22 |
23 | public void addCatalogue(Catalogue catalogue) {
24 | try{
25 | begin();
26 | getSession().saveOrUpdate(catalogue);
27 | commit();
28 | } catch (Exception e) {
29 | rollback();
30 | }
31 |
32 | }
33 |
34 | @Override
35 | public Optional getCatalogueById(int id) {
36 | try {
37 | begin();
38 | Catalogue catalogue = (Catalogue) getSession().get(Catalogue.class, id);
39 | return Optional.ofNullable(catalogue);
40 | } catch (Exception e) {
41 | rollback();
42 | return null;
43 | }
44 | }
45 |
46 | public void updateCatalogue(Catalogue catalogue) {
47 | try {
48 | begin();
49 | getSession().save(catalogue);
50 | commit();
51 | close();
52 | } catch (Exception e) {
53 | e.printStackTrace();
54 | }
55 | }
56 |
57 | @Override
58 | public void deleteCatalogue(int id) {
59 | Catalogue catalogue = null;
60 | try{
61 | begin();
62 | catalogue = (Catalogue) getSession().get(Catalogue.class, id);
63 | getSession().delete(catalogue);
64 | }catch(Exception e){
65 | rollback();
66 | }
67 | }
68 |
69 |
70 | @Override
71 | public List getAllCatalogues() {
72 | try{
73 | begin();
74 | Query query = getSession().createQuery("from catalogue");
75 | List books = query.list();
76 | commit();
77 | return books;
78 | }catch(Exception e){
79 | rollback();
80 | return null;
81 | }
82 | }
83 | }
--------------------------------------------------------------------------------
/src/target/classes/hibernate.cfg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | org.hibernate.transaction.JDBCTransactionFactory
6 |
7 | com.mysql.jdbc.Driver
8 | jdbc:mysql://localhost:3306/libra
9 | root
10 |
11 | LibraSessionFactory
12 | 1
13 | org.hibernate.cache.NoCacheProvider
14 | org.hibernate.dialect.MySQLDialect
15 | libra
16 | org.hibernate.connection.C3P0ConnectionProvider
17 |
18 | thread
19 | true
20 | true
21 | false
22 | update
23 | false
24 | none
25 |
26 | 10
27 | 100
28 | 1
29 | 1
30 | 1800
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/Report.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm;
2 | import java.util.*;
3 | import javax.persistence.*;
4 | @Entity
5 | @Table(name="reports")
6 | public class Report {
7 | @Id
8 | @GeneratedValue(strategy = GenerationType.IDENTITY)
9 | @Column(name = "id")
10 | private int id;
11 |
12 | @Column(name = "report_name")
13 | private String reportName;
14 |
15 | @Column(name = "report_type")
16 | private String reportType;
17 |
18 | @Column(name = "generation_date")
19 | private Date generationDate;
20 |
21 | @Column(name = "parameters")
22 | private String parameters;
23 |
24 |
25 | // Getters and setters
26 | // ...
27 |
28 | public Report(String reportName, String reportType, Date generationDate, String parameters) {
29 | this.reportName = reportName;
30 | this.reportType = reportType;
31 | this.generationDate = generationDate;
32 | this.parameters = parameters;
33 |
34 | }
35 |
36 | public String getReportName() {
37 | return reportName;
38 | }
39 |
40 | public void setReportName(String reportName) {
41 | this.reportName = reportName;
42 | }
43 |
44 | public String getReportType() {
45 | return reportType;
46 | }
47 |
48 | public void setReportType(String reportType) {
49 | this.reportType = reportType;
50 | }
51 |
52 | public Date getGenerationDate() {
53 | return generationDate;
54 | }
55 |
56 | public void setGenerationDate(Date generationDate) {
57 | this.generationDate = generationDate;
58 | }
59 |
60 | public String getParameters() {
61 | return parameters;
62 | }
63 |
64 | public void setParameters(String parameters) {
65 | this.parameters = parameters;
66 | }
67 |
68 |
69 | public void generateBorrowedBooksReport(Date startDate, Date endDate) {
70 | // Code to generate a report on the number of books borrowed by patrons
71 | // within a specified date range
72 | }
73 |
74 | public void generateReturnedBooksReport(Date startDate, Date endDate) {
75 | // Code to generate a report on the number of books returned
76 | // within a specified date range
77 | }
78 |
79 | public void generateOverdueBooksReport() {
80 | // Code to generate a report on the number of overdue books
81 | }
82 |
83 | public void generatePopularBooksReport(Date startDate, Date endDate) {
84 | // Code to generate a report on the most popular books
85 | // within a specified date range
86 | }
87 |
88 | public void generateMembershipReport(Date startDate, Date endDate) {
89 | }
90 | // Code to generate a
91 |
92 | }
93 |
--------------------------------------------------------------------------------
/target/classes/hibernate.cfg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory
6 | org.hibernate.transaction.JDBCTransactionFactory
7 |
8 | com.mysql.cj.jdbc.Driver
9 | jdbc:mysql://localhost:3306/Libra
10 | root
11 |
12 |
13 | SmisSessionFactory
14 | 1
15 | org.hibernate.cache.NoCacheProvider
16 | org.hibernate.dialect.MySQLDialect
17 | libra
18 | org.hibernate.connection.C3P0ConnectionProvider
19 |
20 | thread
21 | true
22 | true
23 | false
24 | create
25 | update
26 | false
27 | none
28 |
29 | 10
30 | 100
31 | 1
32 | 1
33 | 1800
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/src/main/resources/hibernate.cfg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory
6 | org.hibernate.transaction.JDBCTransactionFactory
7 |
8 | com.mysql.cj.jdbc.Driver
9 | jdbc:mysql://localhost:3306/Libra
10 | root
11 |
12 |
13 | SmisSessionFactory
14 | 1
15 | org.hibernate.cache.NoCacheProvider
16 | org.hibernate.dialect.MySQLDialect
17 | libra
18 | org.hibernate.connection.C3P0ConnectionProvider
19 |
20 | thread
21 | true
22 | true
23 | false
24 | create
25 | update
26 | false
27 | none
28 |
29 | 10
30 | 100
31 | 1
32 | 1
33 | 1800
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/Circulation.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm;
2 |
3 | import javax.persistence.GeneratedValue;
4 | import javax.persistence.GenerationType;
5 | import javax.persistence.Id;
6 | import java.util.Date;
7 | import java.util.List;
8 |
9 |
10 | public class Circulation{
11 |
12 | public Circulation(int bookId, String bookName, int borrowerId, String borrowerName, Date borrowDate, Date dueDate, double borrowFine){
13 | this.bookId = bookId;
14 | this.bookName = bookName;
15 | this.borrowerId = borrowerId;
16 | this.borrowerName = borrowerName;
17 | this.borrowDate = borrowDate;
18 | this.dueDate = dueDate;
19 | this.borrowFine = borrowFine;
20 | }
21 |
22 | @Id
23 | @GeneratedValue(strategy = GenerationType.AUTO)
24 |
25 | private int id;
26 | private int bookId; //book id ( as in book db )
27 | private String bookName; //book name ( as in book db)
28 | private Date borrowDate;
29 | private Date dueDate;
30 | private double borrowFine; //amt charged
31 | private int borrowerId; //patron id (as in db)
32 | private String borrowerName; // patron name (as in db)
33 |
34 |
35 |
36 | public List lentBook(){
37 | //list of lent books
38 | return null;
39 | }
40 | public void returnedBook(){
41 | //list of returned books
42 | }
43 |
44 | public Date getDueDate() {
45 | return dueDate;
46 | }
47 |
48 | public void setDueDate(Date dueDate) {
49 | this.dueDate = dueDate;
50 | }
51 |
52 | public double getBorrowFine() {
53 | return borrowFine;
54 | }
55 |
56 | public void setBorrowFine(double borrowFine) {
57 | this.borrowFine = borrowFine;
58 | }
59 |
60 | public int getId() {
61 | return id;
62 | }
63 |
64 | public void setId(int id) {
65 | this.id = id;
66 | }
67 |
68 | public Date getBorrowDate() {
69 | return borrowDate;
70 | }
71 |
72 | public void setBorrowDate(Date borrowDate) {
73 | this.borrowDate = borrowDate;
74 | }
75 |
76 | public int getBookId() {
77 | return bookId;
78 | }
79 |
80 | public void setBookId(int bookId) {
81 | this.bookId = bookId;
82 | }
83 |
84 | public String getBookName() {
85 | return bookName;
86 | }
87 |
88 | public void setBookName(String bookName) {
89 | this.bookName = bookName;
90 | }
91 |
92 | public String getBorrowerName() {
93 | return borrowerName;
94 | }
95 |
96 | public void setBorrowerName(String borrowerName) {
97 | this.borrowerName = borrowerName;
98 | }
99 |
100 | public int getBorrowerId() {
101 | return borrowerId;
102 | }
103 |
104 | public void setBorrowerId(int borrowerId) {
105 | this.borrowerId = borrowerId;
106 | }
107 | }
108 |
109 |
110 | //Circulation: This class handles the lending and returning of library materials to patrons.
111 | // It keeps track of due dates, fines, and holds, and can generate reports on circulation statistics.
--------------------------------------------------------------------------------
/src/main/java/com/Libra/orm/Catalogue.java:
--------------------------------------------------------------------------------
1 | package com.Libra.orm;
2 | import java.util.*;
3 | import javax.persistence.*;
4 |
5 | @Entity
6 | @Table(name="catalogue")
7 | public class Catalogue {
8 | @Id
9 | @GeneratedValue(strategy = GenerationType.IDENTITY)
10 | @Column(name = "id")
11 | private int id;
12 |
13 | public Catalogue(String title, String author, String ISBN, String publisher, Date publicationDate, int edition, String subject, String description, int numberOfCopies, int availableCopies) {
14 | this.title = title;
15 | this.author = author;
16 | this.ISBN = ISBN;
17 | this.publisher = publisher;
18 | this.publicationDate = publicationDate;
19 | this.edition = edition;
20 | this.subject = subject;
21 | this.description = description;
22 | this.numberOfCopies = numberOfCopies;
23 | this.availableCopies = availableCopies;
24 | }
25 |
26 | @Column(name = "title")
27 | private String title;
28 |
29 | @Column(name = "author")
30 | private String author;
31 |
32 | @Column(name = "ISBN")
33 | private String ISBN;
34 |
35 | @Column(name = "publisher")
36 | private String publisher;
37 |
38 | @Column(name = "publication_date")
39 | private Date publicationDate;
40 |
41 | @Column(name = "edition")
42 | private int edition;
43 |
44 | @Column(name = "subject")
45 | private String subject;
46 |
47 | @Column(name = "description")
48 | private String description;
49 |
50 | public String getTitle() {
51 | return title;
52 | }
53 |
54 | public void setTitle(String title) {
55 | this.title = title;
56 | }
57 |
58 | public String getAuthor() {
59 | return author;
60 | }
61 |
62 | public void setAuthor(String author) {
63 | this.author = author;
64 | }
65 |
66 | public String getISBN() {
67 | return ISBN;
68 | }
69 |
70 | public void setISBN(String ISBN) {
71 | this.ISBN = ISBN;
72 | }
73 |
74 | public String getPublisher() {
75 | return publisher;
76 | }
77 |
78 | public void setPublisher(String publisher) {
79 | this.publisher = publisher;
80 | }
81 |
82 | public Date getPublicationDate() {
83 | return publicationDate;
84 | }
85 |
86 | public void setPublicationDate(Date publicationDate) {
87 | this.publicationDate = publicationDate;
88 | }
89 |
90 | public int getEdition() {
91 | return edition;
92 | }
93 |
94 | public void setEdition(int edition) {
95 | this.edition = edition;
96 | }
97 |
98 | public String getSubject() {
99 | return subject;
100 | }
101 |
102 | public void setSubject(String subject) {
103 | this.subject = subject;
104 | }
105 |
106 | public String getDescription() {
107 | return description;
108 | }
109 |
110 | public void setDescription(String description) {
111 | this.description = description;
112 | }
113 |
114 | public int getNumberOfCopies() {
115 | return numberOfCopies;
116 | }
117 |
118 | public void setNumberOfCopies(int numberOfCopies) {
119 | this.numberOfCopies = numberOfCopies;
120 | }
121 |
122 | public int getAvailableCopies() {
123 | return availableCopies;
124 | }
125 |
126 | public void setAvailableCopies(int availableCopies) {
127 | this.availableCopies = availableCopies;
128 | }
129 |
130 | @Column(name = "number_of_copies")
131 | private int numberOfCopies;
132 |
133 | @Column(name = "available_copies")
134 | private int availableCopies;
135 |
136 |
137 | }
--------------------------------------------------------------------------------
/libms.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/Libra.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 | 4.0.0
3 | libra.com
4 | libms
5 | 0.1-SNAPSHOT
6 | war
7 | Libra
8 |
9 | 11.0.17.
10 | UTF-8
11 | UTF-8
12 |
13 | Library Management Information System is a Software Developed by RCA Students (2023 y2 group 5) for the Purpose of Learning and mastering Software Development and Design with JAVA
14 |
15 | Libra##0.1
16 | ${basedir}/src/main/java
17 | ${basedir}/src/test/java
18 |
19 |
20 | src/main/java
21 |
22 | **/*.java
23 |
24 |
25 |
26 | src/main/resources
27 |
28 | **/*
29 |
30 |
31 |
32 |
33 |
34 | src/test/java
35 |
36 | **/*.java
37 |
38 |
39 |
40 | src/test/resources
41 |
42 | **/*
43 |
44 |
45 |
46 |
47 |
48 |
49 | org.apache.tomcat.maven
50 | tomcat-maven-plugin
51 | 2.1
52 |
53 |
54 |
55 |
56 |
57 | org.apache.maven.plugins
58 | maven-compiler-plugin
59 | 3.10.1
60 |
61 | 1.8
62 | 1.8
63 | true
64 | ${java.version}
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 | javax.servlet
80 | jstl
81 | 1.2
82 |
83 |
84 | antlr
85 | antlr
86 | 2.7.6
87 |
88 |
89 | dom4j
90 | dom4j
91 | 1.6.1
92 |
93 |
94 | commons-beanutils
95 | commons-beanutils
96 | 1.7.0
97 |
98 |
99 | commons-collections
100 | commons-collections
101 | 3.1
102 |
103 |
104 | commons-fileupload
105 | commons-fileupload
106 | 1.3.1
107 |
108 |
109 | commons-io
110 | commons-io
111 | 2.4
112 |
113 |
114 | commons-lang
115 | commons-lang
116 | 2.3
117 |
118 |
119 | commons-logging
120 | commons-logging
121 | 1.1.1
122 |
123 |
124 | org.slf4j
125 | slf4j-api
126 | 1.7.36
127 |
128 |
129 | org.slf4j
130 | jcl-over-slf4j
131 | 1.7.36
132 |
133 |
134 | org.slf4j
135 | slf4j-log4j12
136 | 1.7.36
137 |
138 |
139 |
140 | org.springframework
141 | spring-context
142 | 3.1.2.RELEASE
143 |
144 |
145 | commons-logging
146 | commons-logging
147 |
148 |
149 |
150 |
151 | javax.servlet
152 | servlet-api
153 | 2.5
154 | provided
155 |
156 |
157 |
158 | org.hibernate
159 | hibernate-core
160 | 4.3.1.Final
161 |
162 |
163 | org.hibernate
164 | hibernate-c3p0
165 | 4.3.7.Final
166 |
167 |
168 | c3p0
169 | c3p0
170 | 0.9.1.2
171 | provided
172 |
173 |
174 | org.hibernate.javax.persistence
175 | hibernate-jpa-2.1-api
176 | 1.0.2.Final
177 |
178 |
179 | org.hibernate
180 | hibernate-validator
181 | 4.3.0.Final
182 |
183 |
184 | com.lowagie
185 | itext
186 | 1.3
187 |
188 |
189 | com.itextpdf
190 | itextpdf
191 | 5.1.2
192 |
193 |
194 | javassist
195 | javassist
196 | 3.9.0.GA
197 |
198 |
199 | javax.transaction
200 | jta
201 | 1.1
202 |
203 |
204 | mysql
205 | mysql-connector-java
206 | 8.0.31
207 |
208 |
209 | org.apache.poi
210 | poi
211 | 3.2-FINAL
212 |
213 |
214 | javax.activation
215 | activation
216 | 1.1
217 |
218 |
219 | joda-time
220 | joda-time
221 | 2.7
222 |
223 |
224 |
225 | com.google.zxing
226 | core
227 | 3.2.1
228 |
229 |
230 | com.google.zxing
231 | javase
232 | 3.2.1
233 |
234 |
235 |
236 | com.google.code.gson
237 | gson
238 | 2.8.0
239 |
240 |
241 |
242 |
243 | Pacifique Murangwa
244 | pacifiquemurangwa001@gmail.com
245 |
246 |
247 | Project Manager
248 |
249 |
250 |
251 | Rukundo Honore
252 | honorerukundo74@gmail.com
253 |
254 | Group Captain
255 |
256 |
257 |
258 | Ndizihiwe Regis
259 | ndizihiweregis06@gmail.com
260 |
261 | Contributor
262 |
263 |
264 |
265 | 2022
266 |
267 | Libra
268 | https://github.com/pacifiquem/Libra
269 |
270 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [2023] [RCA Libra Team ] .
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/.idea/dbnavigator.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
--------------------------------------------------------------------------------