* @see net.sf.jportlet.portlets.bookmark.BookmarkManager#findBookmarks(net.sf.jportlet.portlet.User, int, java.lang.String)
*/
public Collection findBookmarks( User user,
int maxsize )
{
Session session = null;
try
{
session = _sessionFactory.openSession( );
String oql;
Collection col;
if ( user != null )
{
oql = "FROM b IN CLASS " + BookmarkImpl.class.getName( ) + " WHERE b.userId=? ORDER BY b.title";
col = session.find( oql, user.getId( ), Hibernate.STRING );
}
else
{
oql = "FROM b IN CLASS " + BookmarkImpl.class.getName( ) + " WHERE b.userId IS NULL ORDER BY b.title";
col = session.find( oql );
}
if ( maxsize >= 0 )
{
ArrayList lst = new ArrayList( );