Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The context object is used to authorize access to particular actions.

Individual DSOs implement an update() method.  This method calls org.dspace.storage.rdbms.DatabaseManager.update().  This is a helper class that helps to construct the SQL for a DSO.

Data Access Objects (introduced in DSpace 6.x)

...

In DSpace 6, Hibernate was implemented as the DAO.  The DAO concept would allow for a framework other than Hibernate to be implemented in the DSpace code base.

Here is the interface for the GenericDAO in DSpace 6: https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/core/GenericDAO.java

Hibernate (introduced in DSpace 6.x)

...

Objects accessed by hibernate are registered in the hibernate.cfg.xml file.  DSO properties and relationships can be inferred from the database schema.  

The following class provides a hibernate implementation of the GenericDAO interface: https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/core/AbstractHibernateDAO.java

Because hibernate has a mechanism for automatically updating content that has changed, the save() method is not implemented.  See https://github.com/DSpace/DSpace/blob/dspace-6.1/dspace-api/src/main/java/org/dspace/core/AbstractHibernateDAO.java#L43-L45

Hibernate Annotations in DSpace

...