com.pow2.user.dao
Class UserDAOFactory

java.lang.Object
  extended bycom.pow2.user.dao.UserDAOFactory

public class UserDAOFactory
extends Object

"Creator" class for UserDAO objects.

Author:
Luca Fossato

Field Summary
static String KEY_USER_DATA_PROVIDER
          user dao provider key
static String USER_DATA_PROVIDER_LDAP
          LDAP user dao provider
static String USER_DATA_PROVIDER_RDBMS
          RDBMS user dao provider
 
Method Summary
 String getProviderType()
          Get the current User data provider type, asspecified by the Prefs object.
 UserDAO getUserDAO()
          Return an UserDAO object whose subclass is specified by the defaultProvider member attribute.
 UserDAO getUserDAO(int provider)
          Return an UserDAO object whose subclass is specified by the input provider parameter.
static UserDAOFactory instance()
          Get the unique instance of UserDAOFactory class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_USER_DATA_PROVIDER

public static final String KEY_USER_DATA_PROVIDER
user dao provider key

See Also:
Constant Field Values

USER_DATA_PROVIDER_RDBMS

public static final String USER_DATA_PROVIDER_RDBMS
RDBMS user dao provider

See Also:
Constant Field Values

USER_DATA_PROVIDER_LDAP

public static final String USER_DATA_PROVIDER_LDAP
LDAP user dao provider

See Also:
Constant Field Values
Method Detail

instance

public static UserDAOFactory instance()
Get the unique instance of UserDAOFactory class.

Returns:
the instance of UserDAOFactory class

getUserDAO

public UserDAO getUserDAO()
Return an UserDAO object whose subclass is specified by the defaultProvider member attribute.


getUserDAO

public UserDAO getUserDAO(int provider)
Return an UserDAO object whose subclass is specified by the input provider parameter.

Parameters:
provider - specifies the UserDAO class type.
Returns:
the selected userDAO instance, or null if the input provider parameter doesn't match an UserDAO subclass.
Supported provider constants are:
  • PROVIDER_RDBMS to use rdbms data access
  • PROVIDER_LDAP to use ldap data access

getProviderType

public String getProviderType()
Get the current User data provider type, asspecified by the Prefs object.

Returns:
the User data provider type


Copyright © 2002-2004 Power Of Two S.R.L. All Rights Reserved.