parent
5321ca85f4
commit
2733b6d52d
@ -1,55 +1,56 @@
|
||||
package fr.uca.iut.entities;
|
||||
|
||||
import fr.uca.iut.utils.enums.MoveCategoryName;
|
||||
|
||||
public class Move extends GenericEntity {
|
||||
public static final String COLLECTION_NAME = "moves";
|
||||
|
||||
private String name;
|
||||
private MoveCategoryName category;
|
||||
private Integer power;
|
||||
private Integer accuracy;
|
||||
private Type type;
|
||||
|
||||
public Move() {}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public MoveCategoryName getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(MoveCategoryName category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public Integer getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
public void setPower(Integer power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public Integer getAccuracy() {
|
||||
return accuracy;
|
||||
}
|
||||
|
||||
public void setAccuracy(Integer accuracy) {
|
||||
this.accuracy = accuracy;
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Type type) {
|
||||
this.type = type;
|
||||
}
|
||||
package fr.uca.iut.entities;
|
||||
|
||||
import fr.uca.iut.entities.embedded.Type;
|
||||
import fr.uca.iut.utils.enums.MoveCategoryName;
|
||||
|
||||
public class Move extends GenericEntity {
|
||||
public static final String COLLECTION_NAME = "moves";
|
||||
|
||||
private String name;
|
||||
private MoveCategoryName category;
|
||||
private Integer power;
|
||||
private Integer accuracy;
|
||||
private Type type;
|
||||
|
||||
public Move() {}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public MoveCategoryName getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(MoveCategoryName category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public Integer getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
public void setPower(Integer power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
public Integer getAccuracy() {
|
||||
return accuracy;
|
||||
}
|
||||
|
||||
public void setAccuracy(Integer accuracy) {
|
||||
this.accuracy = accuracy;
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Type type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
@ -1,16 +1,18 @@
|
||||
package fr.uca.iut.entities;
|
||||
|
||||
public class PokemongMove extends GenericEntity {
|
||||
|
||||
private String name;
|
||||
|
||||
public PokemongMove() {}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
package fr.uca.iut.entities.denormalized;
|
||||
|
||||
import fr.uca.iut.entities.GenericEntity;
|
||||
|
||||
public class PokemongMove extends GenericEntity {
|
||||
|
||||
private String name;
|
||||
|
||||
public PokemongMove() {}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package fr.uca.iut.entities;
|
||||
package fr.uca.iut.entities.denormalized;
|
||||
|
||||
import com.mongodb.lang.Nullable;
|
||||
import fr.uca.iut.entities.GenericEntity;
|
||||
import fr.uca.iut.utils.enums.PokemongName;
|
||||
|
||||
public class TrainerPokemong extends GenericEntity {
|
@ -1,56 +1,56 @@
|
||||
package fr.uca.iut.entities;
|
||||
|
||||
import fr.uca.iut.utils.enums.TypeName;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class Type {
|
||||
|
||||
private TypeName name;
|
||||
private List<TypeName> weakAgainst;
|
||||
private List<TypeName> effectiveAgainst;
|
||||
|
||||
public Type() {}
|
||||
|
||||
public TypeName getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(TypeName name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<TypeName> getWeakAgainst() {
|
||||
return Collections.unmodifiableList(weakAgainst);
|
||||
}
|
||||
|
||||
public void setWeakAgainst(List<TypeName> weakAgainst) {
|
||||
this.weakAgainst = weakAgainst;
|
||||
}
|
||||
|
||||
public List<TypeName> getEffectiveAgainst() {
|
||||
return Collections.unmodifiableList(effectiveAgainst);
|
||||
}
|
||||
|
||||
public void setEffectiveAgainst(List<TypeName> effectiveAgainst) {
|
||||
this.effectiveAgainst = effectiveAgainst;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, weakAgainst, effectiveAgainst);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Type type = (Type) o;
|
||||
return Objects.equals(name, type.name) &&
|
||||
Objects.equals(weakAgainst, type.weakAgainst) &&
|
||||
Objects.equals(effectiveAgainst, type.effectiveAgainst);
|
||||
}
|
||||
|
||||
package fr.uca.iut.entities.embedded;
|
||||
|
||||
import fr.uca.iut.utils.enums.TypeName;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class Type {
|
||||
|
||||
private TypeName name;
|
||||
private List<TypeName> weakAgainst;
|
||||
private List<TypeName> effectiveAgainst;
|
||||
|
||||
public Type() {}
|
||||
|
||||
public TypeName getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(TypeName name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<TypeName> getWeakAgainst() {
|
||||
return Collections.unmodifiableList(weakAgainst);
|
||||
}
|
||||
|
||||
public void setWeakAgainst(List<TypeName> weakAgainst) {
|
||||
this.weakAgainst = weakAgainst;
|
||||
}
|
||||
|
||||
public List<TypeName> getEffectiveAgainst() {
|
||||
return Collections.unmodifiableList(effectiveAgainst);
|
||||
}
|
||||
|
||||
public void setEffectiveAgainst(List<TypeName> effectiveAgainst) {
|
||||
this.effectiveAgainst = effectiveAgainst;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, weakAgainst, effectiveAgainst);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Type type = (Type) o;
|
||||
return Objects.equals(name, type.name) &&
|
||||
Objects.equals(weakAgainst, type.weakAgainst) &&
|
||||
Objects.equals(effectiveAgainst, type.effectiveAgainst);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue