@Test public void shouldReturnFalseIfGeoLevelIsNotRoot() throws Exception { GeographicLevel level = new GeographicLevel(1234L, "non root level", "non root level", 2); GeographicZone zone = new GeographicZone(); zone.setLevel(level); assertFalse(zone.isRootLevel()); }
@JsonIgnore public boolean isRootLevel() { return level.isRootLevel(); }
GeographicZone extends BaseModel implements Importable { @JsonIgnore public boolean isRootLevel() { return level.isRootLevel(); } }
GeographicZone extends BaseModel implements Importable { @JsonIgnore public boolean isRootLevel() { return level.isRootLevel(); } GeographicZone(Long id, String code, String name, GeographicLevel level, GeographicZone parent); }
GeographicZone extends BaseModel implements Importable { @JsonIgnore public boolean isRootLevel() { return level.isRootLevel(); } GeographicZone(Long id, String code, String name, GeographicLevel level, GeographicZone parent); @JsonIgnore boolean isParentHigherInHierarchy(); @JsonIgnore boolean isRootLevel(); @JsonIgnore void validateLevel(); @JsonIgnore void validateParentIsHigherInHierarchy(); @JsonIgnore void validateParentExists(); void validateMandatoryFields(); }
GeographicZone extends BaseModel implements Importable { @JsonIgnore public boolean isRootLevel() { return level.isRootLevel(); } GeographicZone(Long id, String code, String name, GeographicLevel level, GeographicZone parent); @JsonIgnore boolean isParentHigherInHierarchy(); @JsonIgnore boolean isRootLevel(); @JsonIgnore void validateLevel(); @JsonIgnore void validateParentIsHigherInHierarchy(); @JsonIgnore void validateParentExists(); void validateMandatoryFields();  }