* Performance: optimized cards database to increase tests and boosters generation;

This commit is contained in:
Oleg Agafonov 2021-08-12 23:59:08 +04:00
parent dc4bde0646
commit 49308bcd4f
3 changed files with 8 additions and 75 deletions

View file

@ -19,6 +19,8 @@ import java.util.*;
import java.util.stream.Collectors;
/**
* Auto-generated table on each release, so no need SQL-updates on structure changes.
*
* @author North
*/
@DatabaseTable(tableName = "card")
@ -41,9 +43,9 @@ public class CardInfo {
@DatabaseField(indexName = "lower_name_index")
protected String lower_name;
@DatabaseField(indexName = "setCode_cardNumber_index")
protected String cardNumber;
@DatabaseField(indexName = "setCode_cardNumber_index")
protected String setCode;
@DatabaseField(indexName = "setCode_cardNumber_index")
protected String cardNumber;
@DatabaseField(indexName = "className_index")
protected String className;
@DatabaseField

View file

@ -126,14 +126,14 @@ public class PermanentCard extends PermanentImpl {
}
this.subtype.copyFrom(card.getSubtype());
this.supertype.clear();
supertype.addAll(card.getSuperType());
this.supertype.addAll(card.getSuperType());
this.expansionSetCode = card.getExpansionSetCode();
this.rarity = card.getRarity();
this.cardNumber = card.getCardNumber();
this.usesVariousArt = card.getUsesVariousArt();
transformable = card.isTransformable();
if (transformable) {
this.transformable = card.isTransformable();
if (this.transformable) {
this.nightCard = card.isNightCard();
if (!this.nightCard) {
this.secondSideCard = card.getSecondCardFace();