org.davesag.generica.peer
Class LocalisablePeer

java.lang.Object
  extended byorg.davesag.generica.peer.LocalisablePeer

public class LocalisablePeer
extends Object

This peer manipulates Localisable objects using hibernate.

Since:
Generica 1.0
Version:
CVS Revision $Id: LocalisablePeer.java,v 1.4 2004/03/30 13:00:41 davesag Exp $
Author:
Dave Sag http://www.davesag.com

Constructor Summary
LocalisablePeer()
           
 
Method Summary
static List loadAll(Session sess, Locale loc, String classname, String sort)
          Loads all the Localisable objects of the given classname that match the the given optional Locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalisablePeer

public LocalisablePeer()
Method Detail

loadAll

public static List loadAll(Session sess,
                           Locale loc,
                           String classname,
                           String sort)
Loads all the Localisable objects of the given classname that match the the given optional Locale. The search proceeds from most to least specific, so if a search for localisable objects by language and country turns up no results, then search by just language, then if still nothing, just country, and finally if nothing turns up search without any locale info at all.

Parameters:
sess - The Session to use to delete the Link. The session will be flushed but not closed.
loc - The Locale.
classname - the actual class to load.
sort - The sorting instruction, eg " lastModified desc" (the default).
Returns:
List of Link s
Throws:
RuntimeException - if the params are invalid.


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.