@Test public void shouldReturnTrueIfGeoLevelIsRoot() throws Exception { GeographicLevel rootLevel = new GeographicLevel(1234L, "root level", "root level", 1); GeographicZone root = new GeographicZone(); root.setLevel(rootLevel); assertTrue(root.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();  }