IPersistentTeacher persistentTeacher = sp.getIPersistentTeacher(); ITeacher teacher = (Teacher) persistentTeacher.readByOID(Teacher.class, teacherId); InfoTeacher infoTeacher = Cloner.copyITeacher2InfoTeacher(teacher); infoSitePublications.setInfoTeacher(infoTeacher);  IPersistentPublication persistentPublication = sp.getIPersistentPublication();    List infoPublications = getInfoPublications(teacher, persistentTeacher, publicationId, persistentPublication);  List infoPublicationCientifics = getInfoPublicationsType(infoPublications, PublicationConstants.CIENTIFIC);  List infoPublicationDidatics = getInfoPublicationsType(infoPublications, PublicationConstants.DIDATIC);  infoSitePublications.setInfoCientificPublications(infoPublicationCientifics); infoSitePublications.setInfoDidaticPublications(infoPublicationDidatics);  return new SiteView(infoSitePublications); } catch (ExcepcaoPersistencia e) { throw new FenixServiceException(e); }
ITeacher teacher = (Teacher) persistentTeacher.readByOID(Teacher.class,teacherId); persistentTeacher.simpleLockWrite(teacher); CollectionUtils.filter(teacher.getTeacherPublications(), new Predicate() { public boolean evaluate(Object arg0) { IPublication publication = (IPublication) arg0; return publication.getIdInternal().equals(publicationId); }});
	public SiteView run(Integer teacherId, Integer publicationId) throws FenixServiceException {		InfoSitePublications infoSitePublications = new InfoSitePublications();		try {			ISuportePersistente sp = SuportePersistenteOJB.getInstance();			IPersistentTeacher persistentTeacher = sp.getIPersistentTeacher();			ITeacher teacher = (Teacher) persistentTeacher.readByOID(Teacher.class, teacherId);			InfoTeacher infoTeacher = Cloner.copyITeacher2InfoTeacher(teacher);			infoSitePublications.setInfoTeacher(infoTeacher);			IPersistentPublication persistentPublication = sp.getIPersistentPublication();			//IPublication publication = (IPublication) persistentPublication.readByOID(Publication.class,				//	publicationId);			List infoPublications = getInfoPublications(teacher, persistentTeacher, publicationId,					persistentPublication);			List infoPublicationCientifics = getInfoPublicationsType(infoPublications,					PublicationConstants.CIENTIFIC);			List infoPublicationDidatics = getInfoPublicationsType(infoPublications,					PublicationConstants.DIDATIC);			infoSitePublications.setInfoCientificPublications(infoPublicationCientifics);			infoSitePublications.setInfoDidaticPublications(infoPublicationDidatics);			return new SiteView(infoSitePublications);		} catch (ExcepcaoPersistencia e) {			throw new FenixServiceException(e);		}	}