-
Notifications
You must be signed in to change notification settings - Fork 0
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 #20 from project-tsurugi/update-stock-delete
update-stock delete old history
- Loading branch information
Showing
14 changed files
with
399 additions
and
29 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
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
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
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
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
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
62 changes: 62 additions & 0 deletions
62
.../src/main/java/com/tsurugidb/benchmark/costaccounting/db/entity/StockHistoryDateTime.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,62 @@ | ||
package com.tsurugidb.benchmark.costaccounting.db.entity; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalTime; | ||
import java.util.Objects; | ||
|
||
/** | ||
* key(s_date, s_time) for stock_history | ||
*/ | ||
public class StockHistoryDateTime implements Comparable<StockHistoryDateTime> { | ||
|
||
/** s_date date(8) */ | ||
private LocalDate sDate; | ||
|
||
/** s_time time(6) */ | ||
private LocalTime sTime; | ||
|
||
public void setSDate(LocalDate value) { | ||
this.sDate = value; | ||
} | ||
|
||
public LocalDate getSDate() { | ||
return this.sDate; | ||
} | ||
|
||
public void setSTime(LocalTime value) { | ||
this.sTime = value; | ||
} | ||
|
||
public LocalTime getSTime() { | ||
return this.sTime; | ||
} | ||
|
||
@Override | ||
public int compareTo(StockHistoryDateTime o) { | ||
int c = sDate.compareTo(o.getSDate()); | ||
if (c != 0) { | ||
return c; | ||
} | ||
return sTime.compareTo(o.getSTime()); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(sDate, sTime); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (obj == null || !(obj instanceof StockHistoryDateTime)) { | ||
return false; | ||
} | ||
|
||
var other = (StockHistoryDateTime) obj; | ||
return Objects.equals(sDate, other.sDate) && Objects.equals(sTime, other.sTime); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "(s_date=" + sDate + ", s_time=" + sTime + ")"; | ||
} | ||
} |
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
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
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
Oops, something went wrong.