diff --git a/.gradle/6.7/executionHistory/executionHistory.lock b/.gradle/6.7/executionHistory/executionHistory.lock
new file mode 100644
index 0000000..1ad5ef0
Binary files /dev/null and b/.gradle/6.7/executionHistory/executionHistory.lock differ
diff --git a/.gradle/6.7/fileChanges/last-build.bin b/.gradle/6.7/fileChanges/last-build.bin
new file mode 100644
index 0000000..f76dd23
Binary files /dev/null and b/.gradle/6.7/fileChanges/last-build.bin differ
diff --git a/.gradle/6.7/fileHashes/fileHashes.lock b/.gradle/6.7/fileHashes/fileHashes.lock
new file mode 100644
index 0000000..ef5471c
Binary files /dev/null and b/.gradle/6.7/fileHashes/fileHashes.lock differ
diff --git a/.gradle/6.7/gc.properties b/.gradle/6.7/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock
new file mode 100644
index 0000000..8cc212f
Binary files /dev/null and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties
new file mode 100644
index 0000000..5359064
--- /dev/null
+++ b/.gradle/buildOutputCleanup/cache.properties
@@ -0,0 +1,2 @@
+#Fri Feb 26 21:25:37 PST 2021
+gradle.version=6.7
diff --git a/.gradle/checksums/checksums.lock b/.gradle/checksums/checksums.lock
new file mode 100644
index 0000000..46f976b
Binary files /dev/null and b/.gradle/checksums/checksums.lock differ
diff --git a/.gradle/configuration-cache/gc.properties b/.gradle/configuration-cache/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..87c9fea
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,64 @@
+
+
+ 4.0.0
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.4.2
+
+
+
+ com.swg
+ swg-api
+ 0.0.1-SNAPSHOT
+ jar
+
+ swg-api
+ API for SWG
+
+
+ 1.11
+ UTF-8
+ UTF-8
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.springframework.boot
+ spring-boot-starter-jdbc
+
+
+ com.oracle.database.jdbc
+ ojdbc10
+ runtime
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ true
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/swg/SwgRestApiApplication.java b/src/main/java/swg/SwgRestApiApplication.java
new file mode 100644
index 0000000..24e136f
--- /dev/null
+++ b/src/main/java/swg/SwgRestApiApplication.java
@@ -0,0 +1,13 @@
+package swg;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.web.bind.annotation.RestController;
+
+@SpringBootApplication
+@RestController
+public class SwgRestApiApplication {
+ public static void main(String[] args) {
+ SpringApplication.run(SwgRestApiApplication.class, args);
+ }
+}
diff --git a/src/main/java/swg/controller/AccountController.java b/src/main/java/swg/controller/AccountController.java
new file mode 100644
index 0000000..a697388
--- /dev/null
+++ b/src/main/java/swg/controller/AccountController.java
@@ -0,0 +1,25 @@
+package swg.controller;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import swg.entity.Account;
+import swg.service.AccountService;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/account")
+public class AccountController {
+ @Autowired
+ AccountService accountService;
+
+ @RequestMapping(value = "/all", method = RequestMethod.GET)
+ public List getAllAccounts() {
+ return accountService.getAllAccounts();
+ }
+
+ @RequestMapping(value = "/{stationId}", method = RequestMethod.GET)
+ public Account getByStationId(@PathVariable("stationId") Long stationId) {
+ return accountService.getAccountByStationId(stationId);
+ }
+}
diff --git a/src/main/java/swg/dao/AccountDao.java b/src/main/java/swg/dao/AccountDao.java
new file mode 100644
index 0000000..580e6a8
--- /dev/null
+++ b/src/main/java/swg/dao/AccountDao.java
@@ -0,0 +1,12 @@
+package swg.dao;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+import swg.entity.Account;
+
+import java.util.List;
+
+@Repository
+public interface AccountDao extends JpaRepository {
+ public Account findByStationId(Long stationId);
+}
diff --git a/src/main/java/swg/entity/Account.java b/src/main/java/swg/entity/Account.java
new file mode 100644
index 0000000..7394a51
--- /dev/null
+++ b/src/main/java/swg/entity/Account.java
@@ -0,0 +1,79 @@
+package swg.entity;
+
+import javax.persistence.*;
+
+@Entity
+@NamedQuery(name = "Account.findByStationId", query = "SELECT a FROM Account a WHERE a.stationId = ?1")
+@Table(name = "ACCOUNTS")
+public class Account {
+ @Column(name = "STATION_ID")
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private Long stationId;
+
+ @Column(name = "NUM_LOTS", nullable = true, length = 38)
+ private Long numLots;
+
+ @Column(name = "IS_OUTCAST", nullable = true, length = 1)
+ private Character outcast;
+
+ @Column(name = "CHEATER_LEVEL", nullable = true, length = 38)
+ private Long cheaterLevel;
+
+ @Column(name = "MAX_LOTS_ADJUSTMENT", nullable = true, length = 38)
+ private Long maxLotsAdjustment;
+
+ @Column(name = "HOUSE_ID", nullable = true, length = 38)
+ private Long houseId;
+
+ protected Account() {
+ }
+
+ public Long getStationId() {
+ return stationId;
+ }
+
+ public void setStationId(Long stationId) {
+ this.stationId = stationId;
+ }
+
+ public Long getNumLots() {
+ return numLots;
+ }
+
+ public void setNumLots(Long numLots) {
+ this.numLots = numLots;
+ }
+
+ public Character getOutcast() {
+ return outcast;
+ }
+
+ public void setOutcast(Character outcast) {
+ this.outcast = outcast;
+ }
+
+ public Long getCheaterLevel() {
+ return cheaterLevel;
+ }
+
+ public void setCheaterLevel(Long cheaterLevel) {
+ this.cheaterLevel = cheaterLevel;
+ }
+
+ public Long getMaxLotsAdjustment() {
+ return maxLotsAdjustment;
+ }
+
+ public void setMaxLotsAdjustment(Long maxLotsAdjustment) {
+ this.maxLotsAdjustment = maxLotsAdjustment;
+ }
+
+ public Long getHouseId() {
+ return houseId;
+ }
+
+ public void setHouseId(Long houseId) {
+ this.houseId = houseId;
+ }
+}
diff --git a/src/main/java/swg/service/AccountService.java b/src/main/java/swg/service/AccountService.java
new file mode 100644
index 0000000..0373f39
--- /dev/null
+++ b/src/main/java/swg/service/AccountService.java
@@ -0,0 +1,22 @@
+package swg.service;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import swg.dao.AccountDao;
+import swg.entity.Account;
+
+import java.util.List;
+
+@Service
+public class AccountService {
+ @Autowired
+ AccountDao accountDao;
+
+ public List getAllAccounts() {
+ return this.accountDao.findAll();
+ }
+
+ public Account getAccountByStationId(Long stationId) {
+ return this.accountDao.findByStationId(stationId);
+ }
+}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
new file mode 100644
index 0000000..947a253
--- /dev/null
+++ b/src/main/resources/application.properties
@@ -0,0 +1,10 @@
+## use create when running the app for the first time
+## then change to "update" which just updates the schema when necessary
+spring.jpa.hibernate.ddl-auto=none
+spring.jpa.database-platform=org.hibernate.dialect.Oracle10gDialect
+spring.datasource.url= jdbc:oracle:thin:@192.168.68.135:1521:swg
+spring.datasource.username=swg
+spring.datasource.password=swg
+spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
+## this shows the sql actions in the terminal logs
+spring.jpa.show-sql=true