use of org.olat.resource.OLATResourceImpl in project OpenOLAT by OpenOLAT.
the class ReferenceManager method addReference.
/**
* Add a new reference. The meaning of source and target is
* such as the source references the target.
*
* @param source
* @param target
* @param userdata
*/
public void addReference(OLATResourceable source, OLATResourceable target, String userdata) {
OLATResourceImpl sourceImpl = (OLATResourceImpl) olatResourceManager.findResourceable(source);
OLATResourceImpl targetImpl = (OLATResourceImpl) olatResourceManager.findResourceable(target);
ReferenceImpl ref = new ReferenceImpl();
ref.setSource(sourceImpl);
ref.setTarget(targetImpl);
ref.setUserdata(userdata);
ref.setCreationDate(new Date());
dbInstance.getCurrentEntityManager().persist(ref);
}
use of org.olat.resource.OLATResourceImpl in project openolat by klemens.
the class ReferenceManager method addReference.
/**
* Add a new reference. The meaning of source and target is
* such as the source references the target.
*
* @param source
* @param target
* @param userdata
*/
public void addReference(OLATResourceable source, OLATResourceable target, String userdata) {
OLATResourceImpl sourceImpl = (OLATResourceImpl) olatResourceManager.findResourceable(source);
OLATResourceImpl targetImpl = (OLATResourceImpl) olatResourceManager.findResourceable(target);
ReferenceImpl ref = new ReferenceImpl();
ref.setSource(sourceImpl);
ref.setTarget(targetImpl);
ref.setUserdata(userdata);
ref.setCreationDate(new Date());
dbInstance.getCurrentEntityManager().persist(ref);
}
Aggregations