package net.sourceforge.fenixedu.domain; import pt.iscte.ci.metadata.ISCTE; /** * * @author rjmvo * */ public class Parish extends Parish_Base { public Parish() { super(); } public Parish(String code, String name, County county) { this(); setCode(code); setName(name); setCounty(county); } // ------------------------------------------------------------- // read static methods // ------------------------------------------------------------- @ISCTE(author="Claudia Ribeiro") public static Parish readParishByName(final String name) { for (final Parish parish: RootDomainObject.getInstance().getParishesSet()) { if (parish.getName().equals(name)) { return parish; } } return null; } @ISCTE(author="Claudia Ribeiro") public static Parish readParishByCode(final String code) { for (final Parish parish: RootDomainObject.getInstance().getParishesSet()) { if (parish.getCode().equals(code)) { return parish; } } return null; } }