/** * The Session used to manipulate entities of this type. * * @param context current DSpace context. * @return the current Session. * @throws SQLException */ protected Session getHibernateSession(Context context) throws SQLException { return ((Session) context.getDBConnection().getSession()); }
/** * Returns the size of the cache of all object that have been read from the database so far. A larger number * means that more memory is consumed by the cache. This also has a negative impact on the query performance. In * that case you should consider uncaching entities when they are no longer needed (see * {@link Context#uncacheEntity(ReloadableEntity)} () uncacheEntity}). * * @throws SQLException When connecting to the active cache fails. */ public long getCacheSize() throws SQLException { return this.getDBConnection().getCacheSize(); }