package net.sourceforge.fenixedu.domain; import pt.iscte.ci.metadata.ISCTE; /** * * @author rjmvo * */ public class County extends County_Base { public County() { super(); } public County(String code, String name, District district) { this(); setCode(code); setName(name); setDistrict(district); } // ------------------------------------------------------------- // read static methods // ------------------------------------------------------------- @ISCTE(author="Claudia Ribeiro") public static County readCountyByName(final String name) { for (final County county : RootDomainObject.getInstance().getCountiesSet()) { if (county.getName().equals(name)) { return county; } } return null; } @ISCTE(author="Claudia Ribeiro") public static County readCountyByCode(final String code) { for (final County county : RootDomainObject.getInstance().getCountiesSet()) { if (county.getCode().equals(code)) { return county; } } return null; } }