-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Derivative Redeem after Order Termination
- Loading branch information
Showing
9 changed files
with
151 additions
and
12 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
59 changes: 59 additions & 0 deletions
59
app/src/main/java/eu/_5gzorro/manager/api/model/entity/OrderOfferMapping.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,59 @@ | ||
package eu._5gzorro.manager.api.model.entity; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import javax.persistence.*; | ||
import java.util.UUID; | ||
|
||
@Entity | ||
@Table(name = "order_offer_mappings") | ||
public class OrderOfferMapping { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.AUTO) | ||
@JsonIgnore | ||
private UUID id; | ||
|
||
@JsonProperty("offerDid") | ||
private String offerDid; | ||
|
||
@JsonProperty("orderDid") | ||
private String orderDid; | ||
|
||
public OrderOfferMapping() { | ||
} | ||
|
||
@JsonCreator | ||
public OrderOfferMapping(@JsonProperty("offerDid") String offerDid, | ||
@JsonProperty("orderDid") String orderDid) { | ||
this.offerDid = offerDid; | ||
this.orderDid = orderDid; | ||
} | ||
|
||
public UUID getId() { | ||
return id; | ||
} | ||
|
||
public void setId(UUID id) { | ||
this.id = id; | ||
} | ||
|
||
public String getOfferDid() { | ||
return offerDid; | ||
} | ||
|
||
public void setOfferDid(String offerDid) { | ||
this.offerDid = offerDid; | ||
} | ||
|
||
public String getOrderDid() { | ||
return orderDid; | ||
} | ||
|
||
public void setOrderDid(String orderDid) { | ||
this.orderDid = orderDid; | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
app/src/main/java/eu/_5gzorro/manager/api/repository/OrderOfferMappingRepository.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,22 @@ | ||
package eu._5gzorro.manager.api.repository; | ||
|
||
import eu._5gzorro.manager.api.model.entity.OrderOfferMapping; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
import java.util.UUID; | ||
|
||
public interface OrderOfferMappingRepository extends JpaRepository<OrderOfferMapping, UUID> { | ||
|
||
@NotNull | ||
Optional<OrderOfferMapping> findById(@NotNull UUID id); | ||
|
||
@Query("SELECT oom FROM OrderOfferMapping oom WHERE oom.orderDid = ?1") | ||
Optional<OrderOfferMapping> findByOrderDid(String orderDid); | ||
|
||
@NotNull | ||
List<OrderOfferMapping> findAll(); | ||
} |
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