Skip to content

eleves-ig2i/ig2i-le4-poo-2018-tp1

Repository files navigation

Session 1 Build Status License: MIT

Description

This TP was realized with the concept of object-relational mapping. It allows to illustrate the following notions :

  • object-relational mapping
  • JPA API (Java Persistence API)
  • mapping association relationships

Table of contents

Installation

Prerequisites

You need to :

  • Java
  • NetBeans

Java

Resources
Install
sudo aptitude update
sudo aptitude install openjdk-8-jdk
#Probably useless stuff
#sudo apt-get purge openjdk-\*
#sudo apt-get purge oracle-java8-installer
#sudo apt-get purge oracle-java9-installer
#sudo aptitude install libderby-java libderbyclient-java
#sudo apt-get install python-software-properties software-properties-common
#sudo add-apt-repository ppa:webupd8team/java
#sudo apt-get install oracle-java8-installer
#sudo apt-get install oracle-java8-set-default

NetBeans

Resources
Install
cd ~
mv Downloads/netbeans-8.2-javaee-linux.sh ./
chmod +x ./netbeans-8.2-javaee-linux.sh
# Select Glassfish AND Tomcat
# For JDK installation path, select /usr/lib/jvm/java-8-openjdk-amd64
./netbeans-8.2-javaee-linux.sh

Installing

Create the project

  • File > New Project > Java > Java Application
    • Project Name : 2017-2018-poo4-seance1
    • Project Location : ~
    • Project Folder : ~/2017-2018-poo4-seance1
    • x Use dedicated ...
    • Main class : centralellile._2017_2018.poo4.seance1.Main

Setup Database

  • Open Netbeans
  • Services > Databases > Java DB > Start Server
  • Services > Databases > Java DB > Create Database
    • Database Name : database
    • User Name : username
    • Password : password
    • Password : password
  • [OK]
  • Services > Databases > jdbc:derby... > connect

Setup Project

  • Open Netbeans
  • File > Project Properties ${project name} > Build > Compilation
    • [Check] Compile on Save
    • [Check] Enable Annotation Processing
  • [OK]

Setup JDBC

  • Projects > 2017-2018-poo4-seance1 > Librairies > Add Librairies
    • [Import] > Java DB Driver
    • [Add Library]

Persistance Unit

  • centralellile._2017_2018.poo4.seance1 > new > other > Persistence > Persitence Unit > ...
    • Pu name : 2017-2018-poo4-seance1-pu
    • Database Connection : jdbc:derby...

Tools conf

Authors

License

This TP is licensed under the MIT License - see the LICENSE file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published