From 78dd8f8fd188b8564163022af1b0d488f43b9162 Mon Sep 17 00:00:00 2001
From: Lathifah Nurrahmah <13515046@std.stei.itb.ac.id>
Date: Tue, 7 Nov 2017 12:14:26 +0700
Subject: [PATCH] added SQL

---
 .gitignore                                    |   1 +
 .../WEB-INF/classes/SOAP/NewWebService.class  | Bin 848 -> 0 bytes
 data/account.sql                              |  57 ++++++++++
 data/ojekonline.sql                           | 102 ++++++++++++++++++
 nbproject/jax-ws.xml                          |   2 +-
 nbproject/jaxws-build.xml                     |   4 +-
 src/java/{SOAP => }/NewWebService.java        |   2 +-
 src/java/SOAP/newXMLDocument.xml              |  11 --
 .../SOAP => src/java}/newXMLDocument.xml      |   0
 9 files changed, 164 insertions(+), 15 deletions(-)
 create mode 100644 .gitignore
 delete mode 100644 build/web/WEB-INF/classes/SOAP/NewWebService.class
 create mode 100644 data/account.sql
 create mode 100644 data/ojekonline.sql
 rename src/java/{SOAP => }/NewWebService.java (97%)
 delete mode 100644 src/java/SOAP/newXMLDocument.xml
 rename {build/web/WEB-INF/classes/SOAP => src/java}/newXMLDocument.xml (100%)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f3d6549
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/build/
\ No newline at end of file
diff --git a/build/web/WEB-INF/classes/SOAP/NewWebService.class b/build/web/WEB-INF/classes/SOAP/NewWebService.class
deleted file mode 100644
index 1c4882a9e37d5184d7497332b8d9841b751854c9..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 848
zcma)4O>Yx15PjZ!l5S`l(zGdGNr95Iz+Si&Ar&OVAx$fSf;c*f)i~PN(XP|>XThbF
zK;j4RqYz_nM6`qhE7`Mto_RC##y@|3`vKr3o|SM5jRKk_cxV){XYHdR9$WjQfc*lV
zGUQ)LCCzJwOsm~z$iCGh!LZ(uN_6MbfrvixK}blYqlY}~^GMqB0?eARj2Wt(-s$mK
z&=r@T#Gogl3po@=47srgL(Q<?>P+|r4??cagPw_`IzMW!LR5meGB(qSH$(lyTp2kP
zeHly2f2@=?+(@k`{gw;33MQ9vKn0u#Gu9)@U)D1bIj1h4QVV-&jx!z+Y($hItES1E
z6LDpgqbT+CJQ|93(n*qP_=T;Sp_Yzcs<9R)!X&knQ?WiuSYz1!yYV-38ID9mQ+jWu
zZ1`xQ&EPefJ`Qk5TCEDtu(6~$9ZbZKG|ltbOsEmV^Z%N~A}{q_G&-3WO}X`tp`nQ)
zJu~}xV73j~eL4kX8QI*y4cJ$AU8X(nz)jqye?M`+IyUIUu!#yXF8GAVJi_YV;eEbA
zrjorz?vPd`Pun#LU+B`ql5ocn){>wFA%)`(szkg+-nOn9t?iid>=5AF`s%cHW9(Ak
QT}OHEkMn)HdJyB`ZzCwh+W-In

diff --git a/data/account.sql b/data/account.sql
new file mode 100644
index 0000000..ef4faaa
--- /dev/null
+++ b/data/account.sql
@@ -0,0 +1,57 @@
+-- MySQL dump 10.13  Distrib 5.7.17, for Win64 (x86_64)
+--
+-- Host: localhost    Database: go-young
+-- ------------------------------------------------------
+-- Server version	5.7.18-log
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `user`
+--
+
+DROP TABLE IF EXISTS `user`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `user` (
+  `username` varchar(15) NOT NULL,
+  `email` varchar(45) NOT NULL,
+  `name` varchar(45) DEFAULT NULL,
+  `password` varchar(45) NOT NULL,
+  `phone_no` varchar(15) DEFAULT NULL,
+  `profile_pict` varchar(50) DEFAULT NULL,
+  PRIMARY KEY (`username`),
+  UNIQUE KEY `email_UNIQUE` (`email`),
+  UNIQUE KEY `username_UNIQUE` (`username`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `user`
+--
+
+LOCK TABLES `user` WRITE;
+/*!40000 ALTER TABLE `user` DISABLE KEYS */;
+INSERT INTO `user` VALUES ('ahlfaith','tipehtipeh@google.com','Lathifah Nurrahmah','ewewew','0899999999','wow'),('kucing','sayamaung@google.com','Sebastian Loki','yuyuyu','081208120812','wow'),('lazuardilazu','lazuardifirdaus369@yahoo.com','Lazuardi Firdaus','mamayugero','08567718483','wow'),('matthewrichard','mattrich34@yahoo.com','Richard Matthew','uwouwo','08179222323','wow');
+/*!40000 ALTER TABLE `user` ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2017-10-04 18:27:51
diff --git a/data/ojekonline.sql b/data/ojekonline.sql
new file mode 100644
index 0000000..03d30e4
--- /dev/null
+++ b/data/ojekonline.sql
@@ -0,0 +1,102 @@
+-- MySQL dump 10.13  Distrib 5.7.17, for Win64 (x86_64)
+--
+-- Host: localhost    Database: go-young
+-- ------------------------------------------------------
+-- Server version	5.7.18-log
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `driver`
+--
+
+DROP TABLE IF EXISTS `driver`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `driver` (
+  `username` varchar(15) NOT NULL,
+  `status` binary(1) NOT NULL,
+  PRIMARY KEY (`username`),
+  UNIQUE KEY `username_UNIQUE` (`username`),
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `driver`
+--
+
+LOCK TABLES `driver` WRITE;
+/*!40000 ALTER TABLE `driver` DISABLE KEYS */;
+INSERT INTO `driver` VALUES ('ahlfaith','1');
+/*!40000 ALTER TABLE `driver` ENABLE KEYS */;
+UNLOCK TABLES;
+--
+-- Table structure for table `preferred_location`
+--
+
+DROP TABLE IF EXISTS `preferred_location`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `preferred_location` (
+  `username` varchar(15) NOT NULL,
+  `location` varchar(50) NOT NULL,
+  PRIMARY KEY (`username`,`location`),
+  KEY `location_foreign_location_idx` (`location`),
+  CONSTRAINT `username_foreign_driver` FOREIGN KEY (`username`) REFERENCES `driver` (`username`) ON DELETE NO ACTION ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `preferred_location`
+--
+
+LOCK TABLES `preferred_location` WRITE;
+/*!40000 ALTER TABLE `preferred_location` DISABLE KEYS */;
+INSERT INTO `preferred_location` VALUES ('ahlfaith','cimohay'),('ahlfaith','dago');
+/*!40000 ALTER TABLE `preferred_location` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `transaction`
+--
+
+DROP TABLE IF EXISTS `transaction`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `transaction` (
+  `driver_name` varchar(15) NOT NULL,
+  `id` int(11) NOT NULL,
+  `user_name` varchar(15) DEFAULT NULL,
+  `picking_point` varchar(50) DEFAULT NULL,
+  `destination` varchar(50) DEFAULT NULL,
+  `date` date DEFAULT NULL,
+  `comment` mediumtext,
+  `rating` int(11) DEFAULT NULL,
+  `user_hide` binary(1) DEFAULT NULL,
+  `driver_hide` binary(1) DEFAULT NULL,
+  PRIMARY KEY (`driver_name`,`id`),
+  KEY `name_foreign_user_idx` (`user_name`),
+  KEY `picking_foreign_location_idx` (`picking_point`),
+  KEY `destination_foreign_location_idx` (`destination`),
+  CONSTRAINT `name_foreign_driver` FOREIGN KEY (`driver_name`) REFERENCES `driver` (`username`) ON DELETE NO ACTION ON UPDATE NO ACTION,
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `transaction`
+--
+
+LOCK TABLES `transaction` WRITE;
+/*!40000 ALTER TABLE `transaction` DISABLE KEYS */;
+INSERT INTO `transaction` VALUES ('ahlfaith',1,'matthewrichard','dago','cimohay','2017-10-04','mantap nih mbak-mbaknya. ngebut banget',5,'0','0');
+/*!40000 ALTER TABLE `transaction` ENABLE KEYS */;
+UNLOCK TABLES;
diff --git a/nbproject/jax-ws.xml b/nbproject/jax-ws.xml
index 85ec8a6..3bc97fd 100644
--- a/nbproject/jax-ws.xml
+++ b/nbproject/jax-ws.xml
@@ -2,7 +2,7 @@
 <jax-ws xmlns="http://www.netbeans.org/ns/jax-ws/1">
   <services>
     <service name="NewWebService">
-      <implementation-class>SOAP.NewWebService</implementation-class>
+      <implementation-class>NewWebService</implementation-class>
     </service>
   </services>
   <clients/>
diff --git a/nbproject/jaxws-build.xml b/nbproject/jaxws-build.xml
index 6e45daa..522a89e 100644
--- a/nbproject/jaxws-build.xml
+++ b/nbproject/jaxws-build.xml
@@ -21,9 +21,9 @@
     </target>
     <target name="wsgen-NewWebService" depends="wsgen-init">
         <copy todir="${build.classes.dir}/META-INF">
-            <fileset dir="${webinf.dir}" includes="wsit-SOAP.NewWebService.xml"/>
+            <fileset dir="${webinf.dir}" includes="wsit-NewWebService.xml"/>
         </copy>
-        <wsgen sourcedestdir="${build.generated.sources.dir}/jax-ws" resourcedestdir="${build.generated.sources.dir}/jax-ws/resources/" destdir="${build.generated.sources.dir}/jax-ws" verbose="true" keep="true" genwsdl="true" sei="SOAP.NewWebService" xendorsed="true">
+        <wsgen sourcedestdir="${build.generated.sources.dir}/jax-ws" resourcedestdir="${build.generated.sources.dir}/jax-ws/resources/" destdir="${build.generated.sources.dir}/jax-ws" verbose="true" keep="true" genwsdl="true" sei="NewWebService" xendorsed="true">
             <classpath path="${java.home}/../lib/tools.jar:${build.classes.dir}:${j2ee.platform.wsgen.classpath}:${javac.classpath}"/>
         </wsgen>
     </target>
diff --git a/src/java/SOAP/NewWebService.java b/src/java/NewWebService.java
similarity index 97%
rename from src/java/SOAP/NewWebService.java
rename to src/java/NewWebService.java
index a03e48e..0b42753 100644
--- a/src/java/SOAP/NewWebService.java
+++ b/src/java/NewWebService.java
@@ -3,7 +3,7 @@
  * To change this template file, choose Tools | Templates
  * and open the template in the editor.
  */
-package SOAP;
+
 
 import javax.jws.WebService;
 import javax.jws.WebMethod;
diff --git a/src/java/SOAP/newXMLDocument.xml b/src/java/SOAP/newXMLDocument.xml
deleted file mode 100644
index 5b2eb49..0000000
--- a/src/java/SOAP/newXMLDocument.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-To change this license header, choose License Headers in Project Properties.
-To change this template file, choose Tools | Templates
-and open the template in the editor.
--->
-
-
-<root>
-    
-</root>
diff --git a/build/web/WEB-INF/classes/SOAP/newXMLDocument.xml b/src/java/newXMLDocument.xml
similarity index 100%
rename from build/web/WEB-INF/classes/SOAP/newXMLDocument.xml
rename to src/java/newXMLDocument.xml
-- 
GitLab