Package org.openwms.tms.impl.state
Class TransportStartComparator
java.lang.Object
org.openwms.tms.impl.state.TransportStartComparator
- All Implemented Interfaces:
- Serializable,- Comparator<TransportOrder>
A TransportStartComparator. I used to sort TransportOrders is a particular order. Unfortunately some fields of the TransportOrder class
 are defined as Enums for a better handling in business logic. Persisting these fields as Strings makes it impossible to do a proper
 sorting in the database with JPA. Hence we must do it with Comparators in the application layer.
- Author:
- Heiko Scherrer
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintcompare(TransportOrder o1, TransportOrder o2) First the priority or orders is compared, when both are equals the id is compared too.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparatorequals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
- 
Constructor Details- 
TransportStartComparatorTransportStartComparator()
 
- 
- 
Method Details- 
compareFirst the priority or orders is compared, when both are equals the id is compared too.- Specified by:
- comparein interface- Comparator<TransportOrder>
- Parameters:
- o1- FirstOrder to compare
- o2- Second order to compare
- Returns:
- a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
- See Also:
 
 
-