-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1195 from US-CBP/release_cand_1.1.3
Release cand 1.1.3
- Loading branch information
Showing
63 changed files
with
2,282 additions
and
1,248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
gtas-parent/gtas-commons/src/main/java/gov/gtas/model/lookup/AirportRestore.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
gtas-parent/gtas-commons/src/main/java/gov/gtas/model/lookup/CarrierRestore.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
gtas-parent/gtas-commons/src/main/java/gov/gtas/model/lookup/CountryRestore.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
gtas-parent/gtas-commons/src/main/java/gov/gtas/repository/AirportRepositoryCustom.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
|
||
} |
Oops, something went wrong.