public EquipmentTemplate( String name, String description, MaterialComposition composition, MagicalMaterial material, ItemCost cost) { this.name = name; this.description = description; this.composition = composition.getId(); if (material == null) { this.material = null; } else { this.material = material.getId(); } this.cost = cost; }
@Override public MaterialComposition getComposition() { return MaterialComposition.valueOf(composition); }