Showing results for 
Search instead for 
Did you mean: 


0 0 558

Obsolete Pages{{Obsolete}}

The official documentation is at:

DevelopingDatabaseCore Repository Services

Persistence Components

Programming to Interfaces

Wherever possible, all interaction with POJOs and services will be against an interface.  This allows the switching of implementations using the configuration of Spring.

Using Hibernate

Below the public services layer, components will operate on POJOs.  All basic DAO operations will be available on these objects directly.  This means that components can attribute and relationship modification, deletions and additions can be performed without having any knowledge of the persistence mechanisms involved.  Transactions will be handled by Spring and Hibernate interaction.

Hibernate Node Model

Not all operations can be performed on POJOs, however.  For example:

  • Operations which are performed on multiple instances of logical data - deleting multiple nodes
  • Construction and deletion of instances

These operations will be present on a DAO service specific to the operations in question.

DAO Service Interfaces


void deleteInstance(Object persistentObj)


Ensures that the given persistent object removed from the data store.  The object provided must be treated as deleted after this operation and will therefore probably be discarded.


  • persistentObj - the instance to remove from the persistence store


List executeNamedQuery(String queryName, Object[] parameters)


Execute the given named query


  • queryName - the name of the query
  • parameters - the query parameters.  If null, will be treated as an empty Object[]


  • Returns a list of persistent instances, the types of which must be known by the caller

NodeDAOService extends DAOService

Node newNode()


Constructs a new implementation of a Node interface.  The actual implementation may be a HibernateNodeImpl or any other type that the DAO service chooses.



  • new Node implementation

Any other Node-specific methods as required, such as deleteAllNodes