Skip to content

Commit

Permalink
Merge pull request #11 from allabors/master
Browse files Browse the repository at this point in the history
Set Java 9 as code-base; completed missing ui-bindings in the 'Project'-Component
  • Loading branch information
jmnietsch authored May 2, 2018
2 parents 1933b70 + ab7660d commit cd500c7
Show file tree
Hide file tree
Showing 9 changed files with 228 additions and 127 deletions.
8 changes: 4 additions & 4 deletions nfabackend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<version>2.5.1</version>
<inherited>true</inherited>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>9</source>
<target>9</target>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -73,12 +73,12 @@
<artifactId>hibernate-core</artifactId>
<version>5.2.12.Final</version>
</dependency>
<!-- <dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
<scope>provided</scope>
</dependency> -->
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
178 changes: 121 additions & 57 deletions nfabackend/src/main/java/com/msg/nfabackend/entities/Project.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,126 +10,190 @@
import javax.xml.bind.annotation.XmlType;

/**
* Entity-Mapping for the table 'nfaprojekt'.
* Entity-Mapping for the table 'NFA_PROJECT'.
*
* @author <a href="mailto:[email protected]">Alla Bors</a>
*/
@Entity
@Table(name="nfaprojekt")
@Table(name="NFA_PROJECT")
public class Project {

public Project() {}

@Id
@SequenceGenerator(name="seq-gen",sequenceName="nfaprojekt_id_seq" , initialValue = 1, allocationSize=1)
@SequenceGenerator(name="seq-gen",sequenceName="NFA_PROJECT_ID_SEQ" , initialValue = 1, allocationSize=1)
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seq-gen")
@Column(name="ID")
private Long id;

@Column(name="nfa_projektnummer")
private String nfaProjektnummer;
@Column(name="NFA_PROJECT_NUMBER")
private String nfaProjectNumber;

@Column(name="kundenname")
private String kundenname;
@Column(name="CUSTOMER_NAME")
private String customerName;

@Column(name="ansprechpartner_kunde")
private String ansprechpartnerKunde;
@Column(name="CONTACT_PERS_CUSTOMER")
private String contactPersCustomer;

@Column(name="ansprechpartner_msg")
private String ansprechpartnerMsg;
@Column(name="CONTACT_PERS_MSG")
private String contactPersMsg;

@Column(name="branche")
private String branche;
@Column(name="BRANCH")
private String branch;

@Column(name="projektart")
private String projektart;
@Column(name="PROJECT_TYPE")
private String projectType;

@Column(name="entwicklungsprozess")
private String entwicklungsprozess;
@Column(name="DEVELOPMENT_PROCESS")
private String developmentProcess;

@Column(name="projektphase")
private String projektphase;
@Column(name="PROJECT_PHASE")
private String projectPhase;

@Column(name="projektstatus")
private String projektstatus;
@Column(name="PROJECT_STATUS")
private String projectStatus;

/**
* @return the id
*/
public Long getId() {
return id;
}

/**
* @param id the id to set
*/
public void setId(Long id) {
this.id = id;
}

public String getNfaProjektnummer() {
return nfaProjektnummer;
/**
* @return the nfaProjectNumber
*/
public String getNfaProjectNumber() {
return nfaProjectNumber;
}

public void setNfaProjektnummer(String nfaProjektnummer) {
this.nfaProjektnummer = nfaProjektnummer;
/**
* @param nfaProjectNumber the nfaProjectNumber to set
*/
public void setNfaProjectNumber(String nfaProjectNumber) {
this.nfaProjectNumber = nfaProjectNumber;
}

public String getKundenname() {
return kundenname;
/**
* @return the customerName
*/
public String getCustomerName() {
return customerName;
}

public void setKundenname(String kundenname) {
this.kundenname = kundenname;
/**
* @param customerName the customerName to set
*/
public void setCustomerName(String customerName) {
this.customerName = customerName;
}

public String getAnsprechpartnerKunde() {
return ansprechpartnerKunde;
/**
* @return the contactPersCustomer
*/
public String getContactPersCustomer() {
return contactPersCustomer;
}

public void setAnsprechpartnerKunde(String ansprechpartnerKunde) {
this.ansprechpartnerKunde = ansprechpartnerKunde;
/**
* @param contactPersCustomer the contactPersCustomer to set
*/
public void setContactPersCustomer(String contactPersCustomer) {
this.contactPersCustomer = contactPersCustomer;
}

public String getAnsprechpartnerMsg() {
return ansprechpartnerMsg;
/**
* @return the contactPersMsg
*/
public String getContactPersMsg() {
return contactPersMsg;
}

public void setAnsprechpartnerMsg(String ansprechpartnerMsg) {
this.ansprechpartnerMsg = ansprechpartnerMsg;
/**
* @param contactPersMsg the contactPersMsg to set
*/
public void setContactPersMsg(String contactPersMsg) {
this.contactPersMsg = contactPersMsg;
}

public String getBranche() {
return branche;
/**
* @return the branch
*/
public String getBranch() {
return branch;
}

public void setBranche(String branche) {
this.branche = branche;
/**
* @param branch the branch to set
*/
public void setBranch(String branch) {
this.branch = branch;
}

public String getProjektart() {
return projektart;
/**
* @return the projectType
*/
public String getProjectType() {
return projectType;
}

public void setProjektart(String projektart) {
this.projektart = projektart;
/**
* @param projectType the projectType to set
*/
public void setProjectType(String projectType) {
this.projectType = projectType;
}

public String getEntwicklungsprozess() {
return entwicklungsprozess;
/**
* @return the developmentProcess
*/
public String getDevelopmentProcess() {
return developmentProcess;
}

public void setEntwicklungsprozess(String entwicklungsprozess) {
this.entwicklungsprozess = entwicklungsprozess;
/**
* @param developmentProcess the developmentProcess to set
*/
public void setDevelopmentProcess(String developmentProcess) {
this.developmentProcess = developmentProcess;
}

public String getProjektphase() {
return projektphase;
/**
* @return the projectPhase
*/
public String getProjectPhase() {
return projectPhase;
}

public void setProjektphase(String projektphase) {
this.projektphase = projektphase;
/**
* @param projectPhase the projectPhase to set
*/
public void setProjectPhase(String projectPhase) {
this.projectPhase = projectPhase;
}

public String getProjektstatus() {
return projektstatus;
/**
* @return the projectStatus
*/
public String getProjectStatus() {
return projectStatus;
}

public void setProjektstatus(String projektstatus) {
this.projektstatus = projektstatus;
/**
* @param projectStatus the projectStatus to set
*/
public void setProjectStatus(String projectStatus) {
this.projectStatus = projectStatus;
}




}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.net.URI;
import java.util.List;
import java.util.stream.Stream;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
Expand Down Expand Up @@ -38,6 +39,7 @@ public List<Project> getAllProject() {
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response createProject(Project project, @Context UriInfo uriInfo) {

Project createProject = queryService.createProject(project);
String newId = String.valueOf(createProject.getId());
URI uri = uriInfo.getAbsolutePathBuilder().path(newId).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public Project createProject(Project project) {
tx.commit();
}
catch(Exception e) {
LOG.log(Level.SEVERE, "Projekt-Anlegen gescheitert...", e);
LOG.log(Level.SEVERE, "Creating project failed...", e);
tx.rollback();
}finally {
em.close();
Expand Down
30 changes: 15 additions & 15 deletions nfabackend/src/main/resources/ddl/nfa_projekt.ddl
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
CREATE TABLE public.nfaprojekt
CREATE TABLE NFA_PROJECT
(
id bigint serial PRIMARY KEY,
nfa_projektnummer character varying(20),
kundenname character varying(20),
ansprechpartner_kunde character varying(20),
ansprechpartner_msg character varying(20),
branche character varying(20),
projektart character varying(20),
entwicklungsprozess character varying(20),
projektphase character varying(20),
projektstatus character varying(20)
ID bigint PRIMARY KEY,
NFA_PROJECT_NUMBER character varying(40),
CUSTOMER_NAME character varying(40),
CONTACT_PERS_CUSTOMER character varying(40),
CONTACT_PERS_MSG character varying(40),
BRANCH character varying(40),
PROJECT_TYPE character varying(40),
DEVELOPMENT_PROCESS character varying(40),
PROJECT_PHASE character varying(40),
PROJECT_STATUS character varying(40)
)
WITH (
OIDS=FALSE
);
CREATE SEQUENCE public.nfaprojekt_id_seq
INCREMENT 0
CREATE SEQUENCE NFA_PROJECT_ID_SEQ
INCREMENT 1
MINVALUE 0
MAXVALUE 0
MAXVALUE 1000000000
START 0
CACHE 0;
CACHE 1;
2 changes: 1 addition & 1 deletion nfafrontend/src/app/header/header.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import {TranslateService} from "@ngx-translate/core";
import {TranslateService} from '@ngx-translate/core';

@Component({
selector: 'app-header',
Expand Down
Loading

0 comments on commit cd500c7

Please sign in to comment.