Skip to content

Commit

Permalink
Merge 0261ce0 into 4fba636
Browse files Browse the repository at this point in the history
  • Loading branch information
22Sandu committed Oct 13, 2016
2 parents 4fba636 + 0261ce0 commit 9de882e
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 33 deletions.
Empty file.
13 changes: 13 additions & 0 deletions api/src/main/java/org/openmrs/OrderFrequency.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class OrderFrequency extends BaseOpenmrsMetadata {
private String uuid;

private Concept concept;

private Double sortWeight;

/**
* Get the orderFrequencyId
Expand Down Expand Up @@ -115,6 +117,17 @@ public String getDescription() {
}
return null;
}

public Double getSortWeight() {
return sortWeight;
}

public void setSortWeight(Double sortWeight) {
// if(sortWeight != null)
this.sortWeight = sortWeight;
//else
//this.sortWeight = 0.0;
}

@Override
public String toString() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,34 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="org.openmrs.OrderFrequency" table="order_frequency">

<id name="orderFrequencyId" type="java.lang.Integer" column="order_frequency_id">
<generator class="native">
<param name="sequence">order_frequency_id_seq</param>
</generator>
</id>



<many-to-one name="concept" class="org.openmrs.Concept"
not-null="true" column="concept_id" unique="true" />
<property name="frequencyPerDay" type="double" column="frequency_per_day"
length="22" />
<many-to-one name="creator" class="org.openmrs.User"
not-null="true" />
<property name="dateCreated" type="java.util.Date" column="date_created"
not-null="true" length="19" />
<property name="retired" type="java.lang.Boolean" length="1"
not-null="true" />
<many-to-one name="retiredBy" class="org.openmrs.User"
not-null="false" column="retired_by" />
<property name="dateRetired" type="java.util.Date" column="date_retired"
not-null="false" length="19" />
<property name="retireReason" type="java.lang.String" column="retire_reason"
length="255" />
<property name="uuid" type="java.lang.String" column="uuid"
length="38" unique="true" />

<class name="org.openmrs.OrderFrequency" table="order_frequency">

<id name="orderFrequencyId" type="java.lang.Integer" column="order_frequency_id">
<generator class="native">
<param name="sequence">order_frequency_id_seq</param>
</generator>
</id>
<many-to-one name="concept" class="org.openmrs.Concept"
not-null="true" column="concept_id" unique="true" />
<property name="frequencyPerDay" type="double" column="frequency_per_day"
length="22" />
<property name="sortWeight" type="double" column="sort_weight" length="22" />
<many-to-one name="creator" class="org.openmrs.User"
not-null="true" />
<property name="dateCreated" type="java.util.Date" column="date_created"
not-null="true" length="19" />
<property name="retired" type="java.lang.Boolean" length="1"
not-null="true" />
<many-to-one name="retiredBy" class="org.openmrs.User"
not-null="false" column="retired_by" />
<property name="dateRetired" type="java.util.Date" column="date_retired"
not-null="false" length="19" />
<property name="retireReason" type="java.lang.String" column="retire_reason"
length="255" />
<property name="uuid" type="java.lang.String" column="uuid"
length="38" unique="true" />
<many-to-one name="changedBy" class="org.openmrs.User" column="changed_by" />

<property name="dateChanged" type="java.util.Date" column="date_changed" length="19" />

</class>
</class>
</hibernate-mapping>
1 change: 0 additions & 1 deletion tools/src/main/resources/checkstyle/openmrs-checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@
java.lang.Throwable, java.lang.Error, and java.lang.RuntimeException.
-->
<module name="IllegalThrows" />

<!--
Check for instantiation of specific classes. For example, check for
constructor invocations for java.lang.Boolean, which should be
Expand Down

0 comments on commit 9de882e

Please sign in to comment.