You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
595 B
17 lines
595 B
7 years ago
|
package com.xsn.explorer.parsers
|
||
|
|
||
|
import com.alexitc.playsonify.models.OrderingCondition
|
||
|
import com.alexitc.playsonify.parsers.FieldOrderingParser
|
||
|
import com.xsn.explorer.models.fields.TransactionField
|
||
|
|
||
|
class TransactionOrderingParser extends FieldOrderingParser[TransactionField] {
|
||
|
|
||
|
override protected val defaultField = TransactionField.Time
|
||
|
|
||
|
override protected val defaultOrderingCondition: OrderingCondition = OrderingCondition.DescendingOrder
|
||
|
|
||
|
override protected def parseField(unsafeField: String): Option[TransactionField] = {
|
||
|
TransactionField.withNameOption(unsafeField)
|
||
|
}
|
||
|
}
|