use of org.olat.modules.portfolio.model.PageBodyImpl in project OpenOLAT by OpenOLAT.
the class PageDAO method moveDownPart.
public void moveDownPart(PageBody body, PagePart part) {
body.getParts().size();
int index = body.getParts().indexOf(part);
if (index >= 0 && index + 1 < body.getParts().size()) {
PagePart reloadedPart = body.getParts().remove(index);
body.getParts().add(index + 1, reloadedPart);
((PageBodyImpl) body).setLastModified(new Date());
dbInstance.getCurrentEntityManager().merge(body);
}
}
use of org.olat.modules.portfolio.model.PageBodyImpl in project openolat by klemens.
the class PageDAO method moveDownPart.
public void moveDownPart(PageBody body, PagePart part) {
body.getParts().size();
int index = body.getParts().indexOf(part);
if (index >= 0 && index + 1 < body.getParts().size()) {
PagePart reloadedPart = body.getParts().remove(index);
body.getParts().add(index + 1, reloadedPart);
((PageBodyImpl) body).setLastModified(new Date());
dbInstance.getCurrentEntityManager().merge(body);
}
}
use of org.olat.modules.portfolio.model.PageBodyImpl in project openolat by klemens.
the class PageDAO method createAndPersistPageBody.
public PageBody createAndPersistPageBody() {
PageBodyImpl body = new PageBodyImpl();
body.setCreationDate(new Date());
body.setLastModified(body.getCreationDate());
dbInstance.getCurrentEntityManager().persist(body);
return body;
}
Aggregations