-
Notifications
You must be signed in to change notification settings - Fork 21
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 #6 from slubwama/U4X-263
U4X-263 Create stock Item Source Reference backend support
- Loading branch information
Showing
13 changed files
with
279 additions
and
34 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
74 changes: 74 additions & 0 deletions
74
api/src/main/java/org/openmrs/module/stockmanagement/api/model/StockItemReference.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,74 @@ | ||
package org.openmrs.module.stockmanagement.api.model; | ||
|
||
import org.hibernate.search.annotations.DocumentId; | ||
import org.hibernate.search.annotations.Field; | ||
import org.hibernate.search.annotations.Indexed; | ||
import org.openmrs.Concept; | ||
import org.openmrs.Drug; | ||
|
||
import javax.persistence.*; | ||
import java.io.Serializable; | ||
import java.math.BigDecimal; | ||
import java.util.Set; | ||
|
||
/** | ||
* The persistent class for the stockmgmt_stock_item database table. | ||
*/ | ||
@Entity(name = "stockmanagement.StockItemReference") | ||
@Table(name = "stockmgmt_stock_item_reference") | ||
@Indexed | ||
public class StockItemReference extends org.openmrs.BaseChangeableOpenmrsData implements Serializable { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "stock_item_reference_id") | ||
@DocumentId | ||
private Integer id; | ||
|
||
@JoinColumn(name = "stock_source_id") | ||
@ManyToOne(fetch = FetchType.LAZY) | ||
private StockSource referenceSource; | ||
|
||
@JoinColumn(name = "stock_item_id") | ||
@ManyToOne(fetch = FetchType.EAGER) | ||
private StockItem stockItem; | ||
|
||
@Field | ||
@Column(name = "stock_reference_code", length = 255) | ||
private String stockReferenceCode; | ||
|
||
@Override | ||
public Integer getId() { | ||
return id; | ||
} | ||
|
||
@Override | ||
public void setId(Integer id) { | ||
this.id = id; | ||
} | ||
|
||
public StockSource getReferenceSource() { | ||
return referenceSource; | ||
} | ||
|
||
public void setReferenceSource(StockSource referenceSource) { | ||
this.referenceSource = referenceSource; | ||
} | ||
|
||
public StockItem getStockItem() { | ||
return stockItem; | ||
} | ||
|
||
public void setStockItem(StockItem stockItem) { | ||
this.stockItem = stockItem; | ||
} | ||
|
||
public String getStockReferenceCode() { | ||
return stockReferenceCode; | ||
} | ||
|
||
public void setStockReferenceCode(String stockReferenceCode) { | ||
this.stockReferenceCode = stockReferenceCode; | ||
} | ||
|
||
} |
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.