Skip to content

Commit

Permalink
Refactor code according to Hypernate API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bzp99 committed May 15, 2024
1 parent 47be7fd commit 7cebd82
Show file tree
Hide file tree
Showing 21 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion smart-contract/hyperledger-fabric/v2/java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies {
implementation("org.hyperledger.fabric:fabric-protos:0.3.0")
implementation("org.json:json:20230227")
implementation("org.projectlombok:lombok:1.18.28")
implementation(files("libs/hypernate-0.1.0.jar"))
implementation(files("libs/hypernate-0.1.0-alpha.jar"))
// Included also as implementation dependency so shadow will package it
implementation(files("$openJMLDir/jmlruntime.jar"))

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package hu.bme.mit.ftsrg.chaincode.tpcc.data.entity;

import hu.bme.mit.ftsrg.hypernate.entity.Entity;

public class Customer implements Entity<Customer> {
public class Customer implements Entity {

public /*@ pure @*/ int getC_id();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package hu.bme.mit.ftsrg.chaincode.tpcc.data.entity;

import hu.bme.mit.ftsrg.hypernate.entity.Entity;

public final class District implements Entity<District> {
public final class District implements Entity {

public /*@ pure @*/ int getD_id();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package hu.bme.mit.ftsrg.chaincode.tpcc.data.entity;

import hu.bme.mit.ftsrg.hypernate.entity.Entity;

public final class History implements Entity<History> {
public final class History implements Entity {

public /*@ pure @*/ int getH_c_id();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package hu.bme.mit.ftsrg.chaincode.tpcc.data.entity;

import hu.bme.mit.ftsrg.hypernate.entity.Entity;

public final class Item implements Entity<Item> {
public final class Item implements Entity {

public /*@ pure @*/ int getI_id();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package hu.bme.mit.ftsrg.chaincode.tpcc.data.entity;

import hu.bme.mit.ftsrg.hypernate.entity.Entity;

public final class NewOrder implements Entity<NewOrder> {
public final class NewOrder implements Entity {

public /*@ pure @*/ int getNo_o_id();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package hu.bme.mit.ftsrg.chaincode.tpcc.data.entity;

import hu.bme.mit.ftsrg.hypernate.entity.Entity;

public final class Order implements Entity<Order> {
public final class Order implements Entity {

public /*@ pure @*/ int getO_id();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package hu.bme.mit.ftsrg.chaincode.tpcc.data.entity;

import hu.bme.mit.ftsrg.hypernate.entity.Entity;

public final class OrderLine implements Entity<OrderLine> {
public final class OrderLine implements Entity {

public /*@ pure @*/ int getOl_o_id();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package hu.bme.mit.ftsrg.chaincode.tpcc.data.entity;

import hu.bme.mit.ftsrg.hypernate.entity.Entity;

public final class Stock implements Entity<Stock> {
public final class Stock implements Entity {

public /*@ pure @*/ int getS_i_id();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package hu.bme.mit.ftsrg.chaincode.tpcc.data.entity;

import hu.bme.mit.ftsrg.hypernate.entity.Entity;

public class Warehouse implements Entity<Warehouse> {
public class Warehouse implements Entity {

public /*@ pure @*/ int getW_id();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public String generateParamsString(final Context ctx, final int... params) {
return "%s,%s".formatted(ctx.toString(), generateParamsString(params));
}

public <Type extends Entity<Type>> String generateParamsString(
public <Type extends Entity> String generateParamsString(
final Context ctx, final Type obj) {
return "%s,%s".formatted(ctx.toString(), obj.toString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/** Essentially, the CUSTOMER table. */
@EqualsAndHashCode
@DataType()
public class Customer implements Entity<Customer> {
public class Customer implements Entity {

/** The customer ID. Primary key. */
@KeyPart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/** Essentially, the DISTRICT table. */
@EqualsAndHashCode
@DataType()
public final class District implements Entity<District> {
public final class District implements Entity {

/** The district ID. Primary key. */
@KeyPart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/** Essentially, the HISTORY table. */
@EqualsAndHashCode
@DataType
public final class History implements Entity<History> {
public final class History implements Entity {

/** The customer ID. Primary key. */
@KeyPart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/** Essentially, the ITEM table. */
@EqualsAndHashCode
@DataType
public final class Item implements Entity<Item> {
public final class Item implements Entity {

/** The ID of the item. Primary key. */
@KeyPart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/** Essentially, the NEW-ORDER table. */
@EqualsAndHashCode
@DataType
public final class NewOrder implements Entity<NewOrder> {
public final class NewOrder implements Entity {

/** The order ID. Primary key. */
@KeyPart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/** Essentially, the ORDER table. */
@EqualsAndHashCode
@DataType
public final class Order implements Entity<Order> {
public final class Order implements Entity {

/** The order ID. Primary key. */
@KeyPart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/** Essentially, the ORDER-LINE table. */
@EqualsAndHashCode
@DataType
public final class OrderLine implements Entity<OrderLine> {
public final class OrderLine implements Entity {

/** The order ID associated with the order line. Primary key. */
@KeyPart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/** Essentially, the STOCK table. */
@EqualsAndHashCode
@DataType
public final class Stock implements Entity<Stock> {
public final class Stock implements Entity {

/** The ID of the item associated with the stock. Primary key. */
@KeyPart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/** Essentially, the WAREHOUSE table. */
@EqualsAndHashCode
@DataType
public class Warehouse implements Entity<Warehouse> {
public class Warehouse implements Entity {

/** The warehouse ID. Primary key. */
@KeyPart
Expand Down

0 comments on commit 7cebd82

Please sign in to comment.