Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Additional test for reported unmarshalling problem
- Loading branch information
Michael Anstis
committed
Jul 14, 2014
1 parent
795e45f
commit ee23226
Showing
4 changed files
with
309 additions
and
0 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
87 changes: 87 additions & 0 deletions
87
...java/org/drools/workbench/models/commons/backend/rule/classes/ProducerMasterForRules.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,87 @@ | ||
package org.drools.workbench.models.commons.backend.rule.classes; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class ProducerMasterForRules { | ||
|
||
private String _id; | ||
|
||
private float distance; | ||
|
||
private List<RuleFactor> sortFactors = new ArrayList<RuleFactor>(); | ||
|
||
private List<RuleFactor> priceFactors = new ArrayList<RuleFactor>(); | ||
|
||
private int sortScore; | ||
|
||
private int priceScore; | ||
|
||
private String primaryCuisine; | ||
|
||
private String secondaryCuisine; | ||
|
||
public String get_id() { | ||
return _id; | ||
} | ||
|
||
public void set_id( String _id ) { | ||
this._id = _id; | ||
} | ||
|
||
public float getDistance() { | ||
return distance; | ||
} | ||
|
||
public void setDistance( float distance ) { | ||
this.distance = distance; | ||
} | ||
|
||
public List<RuleFactor> getSortFactors() { | ||
return sortFactors; | ||
} | ||
|
||
public void setSortFactors( List<RuleFactor> sortFactors ) { | ||
this.sortFactors = sortFactors; | ||
} | ||
|
||
public List<RuleFactor> getPriceFactors() { | ||
return priceFactors; | ||
} | ||
|
||
public void setPriceFactors( List<RuleFactor> pricFactors ) { | ||
this.priceFactors = pricFactors; | ||
} | ||
|
||
public int getSortScore() { | ||
return sortScore; | ||
} | ||
|
||
public void setSortScore( int sortScore ) { | ||
this.sortScore = sortScore; | ||
} | ||
|
||
public int getPriceScore() { | ||
return priceScore; | ||
} | ||
|
||
public void setPriceScore( int priceScore ) { | ||
this.priceScore = priceScore; | ||
} | ||
|
||
public String getPrimaryCuisine() { | ||
return primaryCuisine; | ||
} | ||
|
||
public void setPrimaryCuisine( String primaryCuisine ) { | ||
this.primaryCuisine = primaryCuisine; | ||
} | ||
|
||
public String getSecondaryCuisine() { | ||
return secondaryCuisine; | ||
} | ||
|
||
public void setSecondaryCuisine( String secondaryCuisine ) { | ||
this.secondaryCuisine = secondaryCuisine; | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
...ns/src/test/java/org/drools/workbench/models/commons/backend/rule/classes/RuleFactor.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,54 @@ | ||
package org.drools.workbench.models.commons.backend.rule.classes; | ||
|
||
public class RuleFactor { | ||
|
||
private String name; | ||
|
||
private int defaultPriority; | ||
|
||
private int defaultWeightage; | ||
|
||
private int priorityImpact; | ||
|
||
private int weightageImpact; | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName( String name ) { | ||
this.name = name; | ||
} | ||
|
||
public int getDefaultPriority() { | ||
return defaultPriority; | ||
} | ||
|
||
public void setDefaultPriority( int defaultPriority ) { | ||
this.defaultPriority = defaultPriority; | ||
} | ||
|
||
public int getDefaultWeightage() { | ||
return defaultWeightage; | ||
} | ||
|
||
public void setDefaultWeightage( int defaultWeightage ) { | ||
this.defaultWeightage = defaultWeightage; | ||
} | ||
|
||
public int getPriorityImpact() { | ||
return priorityImpact; | ||
} | ||
|
||
public void setPriorityImpact( int priorityImpact ) { | ||
this.priorityImpact = priorityImpact; | ||
} | ||
|
||
public int getWeightageImpact() { | ||
return weightageImpact; | ||
} | ||
|
||
public void setWeightageImpact( int weightageImpact ) { | ||
this.weightageImpact = weightageImpact; | ||
} | ||
} |
118 changes: 118 additions & 0 deletions
118
...src/test/java/org/drools/workbench/models/commons/backend/rule/classes/SearchContext.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,118 @@ | ||
package org.drools.workbench.models.commons.backend.rule.classes; | ||
|
||
public class SearchContext { | ||
|
||
private int partySize; | ||
|
||
private int currentFDMDemand; | ||
|
||
private int currentProducerDemand; | ||
|
||
private int couponRedeemedInLastThirtyDays; | ||
|
||
private boolean fdmPeakHour; | ||
|
||
private boolean producerPeakHour; | ||
|
||
private String serviceStyle; | ||
|
||
// Populated only if last three eateries are same | ||
private String lastThreeProducerId; | ||
|
||
// Populated only if last three eatery type are same | ||
private String lastThreeEateryType; | ||
|
||
// Populated only if last three cuisines are same | ||
private String lastThreeCuisines; | ||
|
||
private String partySizeVSCCap; | ||
|
||
public int getPartySize() { | ||
return partySize; | ||
} | ||
|
||
public void setPartySize( int partySize ) { | ||
this.partySize = partySize; | ||
} | ||
|
||
public int getCurrentFDMDemand() { | ||
return currentFDMDemand; | ||
} | ||
|
||
public void setCurrentFDMDemand( int currentFDMDemand ) { | ||
this.currentFDMDemand = currentFDMDemand; | ||
} | ||
|
||
public int getCurrentProducerDemand() { | ||
return currentProducerDemand; | ||
} | ||
|
||
public void setCurrentProducerDemand( int currentProducerDemand ) { | ||
this.currentProducerDemand = currentProducerDemand; | ||
} | ||
|
||
public int getCouponRedeemedInLastThirtyDays() { | ||
return couponRedeemedInLastThirtyDays; | ||
} | ||
|
||
public void setCouponRedeemedInLastThirtyDays( int couponRedeemedInLastThirtyDays ) { | ||
this.couponRedeemedInLastThirtyDays = couponRedeemedInLastThirtyDays; | ||
} | ||
|
||
public boolean isFdmPeakHour() { | ||
return fdmPeakHour; | ||
} | ||
|
||
public void setFdmPeakHour( boolean fdmPeakHour ) { | ||
this.fdmPeakHour = fdmPeakHour; | ||
} | ||
|
||
public boolean isProducerPeakHour() { | ||
return producerPeakHour; | ||
} | ||
|
||
public void setProducerPeakHour( boolean producerPeakHour ) { | ||
this.producerPeakHour = producerPeakHour; | ||
} | ||
|
||
public String getServiceStyle() { | ||
return serviceStyle; | ||
} | ||
|
||
public void setServiceStyle( String serviceStyle ) { | ||
this.serviceStyle = serviceStyle; | ||
} | ||
|
||
public String getLastThreeProducerId() { | ||
return lastThreeProducerId; | ||
} | ||
|
||
public void setLastThreeProducerId( String lastThreeProducerId ) { | ||
this.lastThreeProducerId = lastThreeProducerId; | ||
} | ||
|
||
public String getLastThreeEateryType() { | ||
return lastThreeEateryType; | ||
} | ||
|
||
public void setLastThreeEateryType( String lastThreeEateryType ) { | ||
this.lastThreeEateryType = lastThreeEateryType; | ||
} | ||
|
||
public String getLastThreeCuisines() { | ||
return lastThreeCuisines; | ||
} | ||
|
||
public void setLastThreeCuisines( String lastThreeCuisines ) { | ||
this.lastThreeCuisines = lastThreeCuisines; | ||
} | ||
|
||
public String getPartySizeVSCCap() { | ||
return partySizeVSCCap; | ||
} | ||
|
||
public void setPartySizeVSCCap( String partySizeVSCCap ) { | ||
this.partySizeVSCCap = partySizeVSCCap; | ||
} | ||
|
||
} |