Skip to content

Commit

Permalink
Merge pull request #1195 from US-CBP/release_cand_1.1.3
Browse files Browse the repository at this point in the history
Release cand 1.1.3
  • Loading branch information
originalname51 committed Jun 13, 2019
2 parents 9dc414d + 750e2b0 commit 3a4c133
Show file tree
Hide file tree
Showing 63 changed files with 2,282 additions and 1,248 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@Table(name = "airport", indexes = { @Index(columnList = "iata", name = "airport_iata_index") })
public class Airport extends BaseEntity {
public Airport() { }

private Long originId;
private String name;

@Column(length=3)
Expand All @@ -43,7 +43,14 @@ public Airport() { }

@Column(name = "utc_offset")
private Integer utcOffset;
private String timezone;

public Long getOriginId() {
return originId;
}
public void setOriginId(Long data) {
this.originId = data;
}
public String getName() {
return name;
}
Expand Down Expand Up @@ -77,17 +84,28 @@ public void setCity(String data) {
public BigDecimal getLatitude() {
return latitude;
}
public void setLatitude(BigDecimal data) {
latitude = data;
}
public BigDecimal getLongitude() {
return longitude;
}
public void setLongitude(BigDecimal data) {
longitude = data;
}
public Integer getUtcOffset() {
return utcOffset;
}
public void setUtcOffset(Integer data) {
utcOffset = data;
}
public String getTimezone() {
return timezone;
}
private String timezone;

public void setTimezone(String data) {
timezone = data;
}

@Override
public int hashCode() {
return Objects.hash(this.iata, this.icao);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/*
* All GTAS code is Copyright 2016, The Department of Homeland Security (DHS), U.S. Customs and Border Protection (CBP).
*
* Please see LICENSE.txt for details.
*/
package gov.gtas.model.lookup;

import java.math.BigDecimal;
import java.util.Objects;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

import org.springframework.cache.annotation.Cacheable;

import gov.gtas.model.BaseEntity;

@Cacheable
@Entity
@Table(name = "airportRestore", indexes = { @Index(columnList = "iata", name = "airportRestore_iata_index") })
public class AirportRestore extends BaseEntity {
public AirportRestore() { }
private String name;

@Column(length=3)
private String iata;

@Column(length=4)
private String icao;

private String country;

private String city;

@Column(precision = 9, scale = 6 )
private BigDecimal latitude;

@Column(precision = 9, scale = 6 )
private BigDecimal longitude;

@Column(name = "utc_offset")
private Integer utcOffset;

public String getName() {
return name;
}
public String getIata() {
return iata;
}
public String getIcao() {
return icao;
}
public String getCountry() {
return country;
}
public String getCity() {
return city;
}
public BigDecimal getLatitude() {
return latitude;
}
public BigDecimal getLongitude() {
return longitude;
}
public Integer getUtcOffset() {
return utcOffset;
}
public String getTimezone() {
return timezone;
}
private String timezone;

@Override
public int hashCode() {
return Objects.hash(this.iata, this.icao);
}

@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
final AirportRestore other = (AirportRestore) obj;
return Objects.equals(this.iata, other.iata)
&& Objects.equals(this.icao, other.icao);
}

@Override
public String toString() {
return this.iata;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,21 @@
@Table(name = "carrier", indexes = { @Index(columnList = "iata", name = "carrier_iata_index") })
public class Carrier extends BaseEntity {
public Carrier() { }

private Long originId;
private String name;

@Column(length=2)
private String iata;

@Column(length=3)
private String icao;


public Long getOriginId() {
return originId;
}
public void setOriginId(Long data) {
this.originId = data;
}
public String getName() {
return name;
}
Expand All @@ -40,6 +46,12 @@ public String getIata() {
public void setIata(String data) {
this.iata = data;
}
public String getIcao() {
return icao;
}
public void setIcao(String data) {
this.icao = data;
}
@Override
public int hashCode() {
final int prime = 31;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* All GTAS code is Copyright 2016, The Department of Homeland Security (DHS), U.S. Customs and Border Protection (CBP).
*
* Please see LICENSE.txt for details.
*/
package gov.gtas.model.lookup;

import gov.gtas.model.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

import org.springframework.cache.annotation.Cacheable;

@Cacheable
@Entity
@Table(name = "carrierRestore", indexes = { @Index(columnList = "iata", name = "carrierRestore_iata_index") })
public class CarrierRestore extends BaseEntity {
public CarrierRestore() { }
private String name;

@Column(length=2)
private String iata;

@Column(length=3)
private String icao;

public String getName() {
return name;
}
public String getIata() {
return iata;
}
public String getIcao() {
return icao;
}

@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((iata == null) ? 0 : iata.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
CarrierRestore other = (CarrierRestore) obj;
if (iata == null) {
if (other.iata != null)
return false;
} else if (!iata.equals(other.iata))
return false;
return true;
}

@Override
public String toString() {
return this.iata;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Index;

import org.springframework.cache.annotation.Cacheable;

@Cacheable
@Entity
@Table(name = "country")
@Table(name = "country", indexes = { @Index(columnList = "iso3", name = "country_iso3_index") })
public class Country extends BaseEntity {
public Country() { }

private Long originId;
@Column(length = 2)
private String iso2;

Expand All @@ -31,7 +32,13 @@ public Country() { }

@Column(name = "iso_numeric", length = 3)
private String isoNumeric;


public Long getOriginId() {
return originId;
}
public void setOriginId(Long data) {
this.originId = data;
}
public String getIso2() {
return iso2;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
* All GTAS code is Copyright 2016, The Department of Homeland Security (DHS), U.S. Customs and Border Protection (CBP).
*
* Please see LICENSE.txt for details.
*/
package gov.gtas.model.lookup;

import gov.gtas.model.BaseEntity;

import java.util.Objects;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

import org.springframework.cache.annotation.Cacheable;

@Cacheable
@Entity
@Table(name = "countryRestore", indexes = { @Index(columnList = "iso3", name = "countryRestore_iso3_index") })
public class CountryRestore extends BaseEntity {
public CountryRestore() { }
@Column(length = 2)
private String iso2;

@Column(length = 3)
private String iso3;

private String name;

@Column(name = "iso_numeric", length = 3)
private String isoNumeric;

public String getIso2() {
return iso2;
}
public String getIso3() {
return iso3;
}
public String getName() {
return name;
}
public String getIsoNumeric() {
return isoNumeric;
}

@Override
public int hashCode() {
return Objects.hash(this.iso2, this.iso3);
}

@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
final CountryRestore other = (CountryRestore) obj;
return Objects.equals(this.iso2, other.iso2)
&& Objects.equals(this.iso3, other.iso3);
}

@Override
public String toString() {
return this.iso2;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* All GTAS code is Copyright 2016, The Department of Homeland Security (DHS), U.S. Customs and Border Protection (CBP).
*
* Please see LICENSE.txt for details.
*/
package gov.gtas.repository;

import gov.gtas.model.lookup.Airport;

public interface AirportRepositoryCustom {

Airport restore(Airport airport);
int restoreAll();

}
Loading

0 comments on commit 3a4c133

Please sign in to comment.