Skip to content

Commit

Permalink
Deleted fields from location #49
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaugarcia committed May 5, 2017
1 parent 24054d1 commit 18a7627
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 646 deletions.
231 changes: 11 additions & 220 deletions src/main/java/com/arnaugarcia/assessoriatorrelles/domain/Location.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package com.arnaugarcia.assessoriatorrelles.domain;

import com.arnaugarcia.assessoriatorrelles.domain.enumeration.RoadType;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Objects;

/**
* A Location.
Expand All @@ -32,44 +30,12 @@ public class Location implements Serializable {
@Column(name = "town", nullable = false)
private String town;

@NotNull
@Enumerated(EnumType.STRING)
@Column(name = "type_of_road", nullable = false)
private RoadType typeOfRoad;

@NotNull
@Column(name = "name_road", nullable = false)
private String nameRoad;

@NotNull
@Column(name = "number", nullable = false)
private Integer number;

@Column(name = "apartment")
private Integer apartment;

@Column(name = "building")
private Integer building;

@Column(name = "door")
private Integer door;

@Column(name = "stair")
private String stair;

@Column(name = "urlgmaps")
private String urlgmaps;

@Column(name = "latitude")
private Double latitude;

@Column(name = "longitude")
private Double longitude;

@NotNull
@Column(name = "cp", nullable = false)
private String cp;

@OneToOne(mappedBy = "location")
@JsonIgnore
private Company company;
Expand All @@ -78,6 +44,10 @@ public class Location implements Serializable {
@JsonIgnore
private Property property;

public static long getSerialVersionUID() {
return serialVersionUID;
}

public Long getId() {
return id;
}
Expand All @@ -90,11 +60,6 @@ public String getRef() {
return ref;
}

public Location ref(String ref) {
this.ref = ref;
return this;
}

public void setRef(String ref) {
this.ref = ref;
}
Expand All @@ -103,11 +68,6 @@ public String getProvince() {
return province;
}

public Location province(String province) {
this.province = province;
return this;
}

public void setProvince(String province) {
this.province = province;
}
Expand All @@ -116,128 +76,14 @@ public String getTown() {
return town;
}

public Location town(String town) {
this.town = town;
return this;
}

public void setTown(String town) {
this.town = town;
}

public RoadType getTypeOfRoad() {
return typeOfRoad;
}

public Location typeOfRoad(RoadType typeOfRoad) {
this.typeOfRoad = typeOfRoad;
return this;
}

public void setTypeOfRoad(RoadType typeOfRoad) {
this.typeOfRoad = typeOfRoad;
}

public String getNameRoad() {
return nameRoad;
}

public Location nameRoad(String nameRoad) {
this.nameRoad = nameRoad;
return this;
}

public void setNameRoad(String nameRoad) {
this.nameRoad = nameRoad;
}

public Integer getNumber() {
return number;
}

public Location number(Integer number) {
this.number = number;
return this;
}

public void setNumber(Integer number) {
this.number = number;
}

public Integer getApartment() {
return apartment;
}

public Location apartment(Integer apartment) {
this.apartment = apartment;
return this;
}

public void setApartment(Integer apartment) {
this.apartment = apartment;
}

public Integer getBuilding() {
return building;
}

public Location building(Integer building) {
this.building = building;
return this;
}

public void setBuilding(Integer building) {
this.building = building;
}

public Integer getDoor() {
return door;
}

public Location door(Integer door) {
this.door = door;
return this;
}

public void setDoor(Integer door) {
this.door = door;
}

public String getStair() {
return stair;
}

public Location stair(String stair) {
this.stair = stair;
return this;
}

public void setStair(String stair) {
this.stair = stair;
}

public String getUrlgmaps() {
return urlgmaps;
}

public Location urlgmaps(String urlgmaps) {
this.urlgmaps = urlgmaps;
return this;
}

public void setUrlgmaps(String urlgmaps) {
this.urlgmaps = urlgmaps;
}

public Double getLatitude() {
return latitude;
}

public Location latitude(Double latitude) {
this.latitude = latitude;
return this;
}

public void setLatitude(Double latitude) {
this.latitude = latitude;
}
Expand All @@ -246,37 +92,14 @@ public Double getLongitude() {
return longitude;
}

public Location longitude(Double longitude) {
this.longitude = longitude;
return this;
}

public void setLongitude(Double longitude) {
this.longitude = longitude;
}

public String getCp() {
return cp;
}

public Location cp(String cp) {
this.cp = cp;
return this;
}

public void setCp(String cp) {
this.cp = cp;
}

public Company getCompany() {
return company;
}

public Location company(Company company) {
this.company = company;
return this;
}

public void setCompany(Company company) {
this.company = company;
}
Expand All @@ -285,53 +108,21 @@ public Property getProperty() {
return property;
}

public Location property(Property property) {
this.property = property;
return this;
}

public void setProperty(Property property) {
this.property = property;
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Location location = (Location) o;
if(location.id == null || id == null) {
return false;
}
return Objects.equals(id, location.id);
}

@Override
public int hashCode() {
return Objects.hashCode(id);
}

@Override
public String toString() {
return "Location{" +
"id=" + id +
", ref='" + ref + "'" +
", province='" + province + "'" +
", town='" + town + "'" +
", typeOfRoad='" + typeOfRoad + "'" +
", nameRoad='" + nameRoad + "'" +
", number='" + number + "'" +
", apartment='" + apartment + "'" +
", building='" + building + "'" +
", door='" + door + "'" +
", stair='" + stair + "'" +
", urlgmaps='" + urlgmaps + "'" +
", latitude='" + latitude + "'" +
", longitude='" + longitude + "'" +
", cp='" + cp + "'" +
", ref='" + ref + '\'' +
", province='" + province + '\'' +
", town='" + town + '\'' +
", latitude=" + latitude +
", longitude=" + longitude +
", company=" + company +
", property=" + property +
'}';
}
}
18 changes: 0 additions & 18 deletions src/main/webapp/app/entities/location/locations.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ <h2 data-translate="assessoriaTorrellesApp.location.home.title">Locations</h2>
<th jh-sort-by="ref"><span data-translate="assessoriaTorrellesApp.location.ref">Ref</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="province"><span data-translate="assessoriaTorrellesApp.location.province">Province</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="town"><span data-translate="assessoriaTorrellesApp.location.town">Town</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="cp"><span data-translate="assessoriaTorrellesApp.location.cp">CP</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="typeOfRoad"><span data-translate="assessoriaTorrellesApp.location.typeOfRoad">Type Of Road</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="nameRoad"><span data-translate="assessoriaTorrellesApp.location.nameRoad">Name Road</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="number"><span data-translate="assessoriaTorrellesApp.location.number">Number</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="apartment"><span data-translate="assessoriaTorrellesApp.location.apartment">Apartment</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="building"><span data-translate="assessoriaTorrellesApp.location.building">Building</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="door"><span data-translate="assessoriaTorrellesApp.location.door">Door</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="stair"><span data-translate="assessoriaTorrellesApp.location.stair">Stair</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="urlgmaps"><span data-translate="assessoriaTorrellesApp.location.urlgmaps">Urlgmaps</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="latitude"><span data-translate="assessoriaTorrellesApp.location.latitude">Latitude</span> <span class="glyphicon glyphicon-sort"></span></th>
<th jh-sort-by="longitude"><span data-translate="assessoriaTorrellesApp.location.longitude">Longitude</span> <span class="glyphicon glyphicon-sort"></span></th>
<th></th>
Expand All @@ -42,15 +33,6 @@ <h2 data-translate="assessoriaTorrellesApp.location.home.title">Locations</h2>
<td>{{location.ref}}</td>
<td>{{location.province}}</td>
<td>{{location.town}}</td>
<td>{{location.cp}}</td>
<td data-translate="{{'assessoriaTorrellesApp.RoadType.' + location.typeOfRoad}}">{{location.typeOfRoad}}</td>
<td>{{location.nameRoad}}</td>
<td>{{location.number}}</td>
<td>{{location.apartment}}</td>
<td>{{location.building}}</td>
<td>{{location.door}}</td>
<td>{{location.stair}}</td>
<td>{{location.urlgmaps}}</td>
<td>{{location.latitude}}</td>
<td>{{location.longitude}}</td>
<td class="text-right">
Expand Down
Loading

0 comments on commit 18a7627

Please sign in to comment.