|
|
|
@ -7,10 +7,10 @@ import net.pokeranalytics.android.R |
|
|
|
import net.pokeranalytics.android.exceptions.PAIllegalStateException |
|
|
|
import net.pokeranalytics.android.exceptions.PAIllegalStateException |
|
|
|
import net.pokeranalytics.android.exceptions.PokerAnalyticsException |
|
|
|
import net.pokeranalytics.android.exceptions.PokerAnalyticsException |
|
|
|
import net.pokeranalytics.android.model.Criteria.Bankrolls.comparison |
|
|
|
import net.pokeranalytics.android.model.Criteria.Bankrolls.comparison |
|
|
|
import net.pokeranalytics.android.model.Criteria.Blinds.comparison |
|
|
|
|
|
|
|
import net.pokeranalytics.android.model.Criteria.Games.comparison |
|
|
|
import net.pokeranalytics.android.model.Criteria.Games.comparison |
|
|
|
import net.pokeranalytics.android.model.Criteria.Limits.comparison |
|
|
|
import net.pokeranalytics.android.model.Criteria.Limits.comparison |
|
|
|
import net.pokeranalytics.android.model.Criteria.Locations.comparison |
|
|
|
import net.pokeranalytics.android.model.Criteria.Locations.comparison |
|
|
|
|
|
|
|
import net.pokeranalytics.android.model.Criteria.Stakes.comparison |
|
|
|
import net.pokeranalytics.android.model.Criteria.TableSizes.comparison |
|
|
|
import net.pokeranalytics.android.model.Criteria.TableSizes.comparison |
|
|
|
import net.pokeranalytics.android.model.Criteria.TournamentFeatures.comparison |
|
|
|
import net.pokeranalytics.android.model.Criteria.TournamentFeatures.comparison |
|
|
|
import net.pokeranalytics.android.model.Criteria.TournamentFees.comparison |
|
|
|
import net.pokeranalytics.android.model.Criteria.TournamentFees.comparison |
|
|
|
@ -123,7 +123,7 @@ sealed class Criteria(override var uniqueIdentifier: Int) : IntIdentifiable, Row |
|
|
|
is TournamentFees -> if (session.tournamentEntryFee is S) { |
|
|
|
is TournamentFees -> if (session.tournamentEntryFee is S) { |
|
|
|
session.tournamentEntryFee as S |
|
|
|
session.tournamentEntryFee as S |
|
|
|
} else throw PokerAnalyticsException.QueryValueMapUnexpectedValue |
|
|
|
} else throw PokerAnalyticsException.QueryValueMapUnexpectedValue |
|
|
|
is Blinds -> if (session.cgStakes is S) { |
|
|
|
is Stakes -> if (session.cgStakes is S) { |
|
|
|
session.cgStakes as S |
|
|
|
session.cgStakes as S |
|
|
|
} else throw PokerAnalyticsException.QueryValueMapUnexpectedValue |
|
|
|
} else throw PokerAnalyticsException.QueryValueMapUnexpectedValue |
|
|
|
else -> null |
|
|
|
else -> null |
|
|
|
@ -158,7 +158,7 @@ sealed class Criteria(override var uniqueIdentifier: Int) : IntIdentifiable, Row |
|
|
|
object DayPeriods : SimpleCriteria(listOf(QueryCondition.IsWeekDay, QueryCondition.IsWeekEnd), 14) |
|
|
|
object DayPeriods : SimpleCriteria(listOf(QueryCondition.IsWeekDay, QueryCondition.IsWeekEnd), 14) |
|
|
|
object Years : ListCriteria(15) |
|
|
|
object Years : ListCriteria(15) |
|
|
|
object AllMonthsUpToNow : ListCriteria(16) |
|
|
|
object AllMonthsUpToNow : ListCriteria(16) |
|
|
|
object Blinds : ListCriteria(17) |
|
|
|
object Stakes : ListCriteria(17) |
|
|
|
object TournamentFees : ListCriteria(18) |
|
|
|
object TournamentFees : ListCriteria(18) |
|
|
|
object Cash : SimpleCriteria(listOf(QueryCondition.IsCash), 19) |
|
|
|
object Cash : SimpleCriteria(listOf(QueryCondition.IsCash), 19) |
|
|
|
object Tournament : SimpleCriteria(listOf(QueryCondition.IsTournament), 20) |
|
|
|
object Tournament : SimpleCriteria(listOf(QueryCondition.IsTournament), 20) |
|
|
|
@ -236,7 +236,7 @@ sealed class Criteria(override var uniqueIdentifier: Int) : IntIdentifiable, Row |
|
|
|
realm.close() |
|
|
|
realm.close() |
|
|
|
years |
|
|
|
years |
|
|
|
} |
|
|
|
} |
|
|
|
is Blinds -> comparison<QueryCondition.AnyStake, String>() |
|
|
|
is Stakes -> comparison<QueryCondition.AnyStake, String>() |
|
|
|
is ListCustomFields -> comparison<CustomFieldEntry>() |
|
|
|
is ListCustomFields -> comparison<CustomFieldEntry>() |
|
|
|
is ValueCustomFields -> { |
|
|
|
is ValueCustomFields -> { |
|
|
|
val realm = Realm.getDefaultInstance() |
|
|
|
val realm = Realm.getDefaultInstance() |
|
|
|
@ -270,7 +270,7 @@ sealed class Criteria(override var uniqueIdentifier: Int) : IntIdentifiable, Row |
|
|
|
DayPeriods -> R.string.weekdays_or_weekend |
|
|
|
DayPeriods -> R.string.weekdays_or_weekend |
|
|
|
Years -> R.string.year |
|
|
|
Years -> R.string.year |
|
|
|
AllMonthsUpToNow -> R.string.month |
|
|
|
AllMonthsUpToNow -> R.string.month |
|
|
|
Blinds -> R.string.blind |
|
|
|
Stakes -> R.string.blind |
|
|
|
TournamentFees -> R.string.entry_fees |
|
|
|
TournamentFees -> R.string.entry_fees |
|
|
|
// is ListCustomFields -> this.customField.resId |
|
|
|
// is ListCustomFields -> this.customField.resId |
|
|
|
// is ValueCustomFields -> this.customField.resId |
|
|
|
// is ValueCustomFields -> this.customField.resId |
|
|
|
@ -318,7 +318,8 @@ sealed class Criteria(override var uniqueIdentifier: Int) : IntIdentifiable, Row |
|
|
|
TournamentFeatures, Limits, TableSizes, TournamentTypes, |
|
|
|
TournamentFeatures, Limits, TableSizes, TournamentTypes, |
|
|
|
MonthsOfYear, DaysOfWeek, SessionTypes, |
|
|
|
MonthsOfYear, DaysOfWeek, SessionTypes, |
|
|
|
BankrollTypes, DayPeriods, Years, |
|
|
|
BankrollTypes, DayPeriods, Years, |
|
|
|
AllMonthsUpToNow, Blinds, TournamentFees |
|
|
|
AllMonthsUpToNow, |
|
|
|
|
|
|
|
Stakes, TournamentFees |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|