toolbox.services.ldap.simple.beans
Class SimpleUser

Package class diagram package SimpleUser
java.lang.Object
  extended by toolbox.services.ldap.simple.beans.SimpleUser
All Implemented Interfaces:
java.io.Serializable, DaoBean

public class SimpleUser
extends java.lang.Object
implements DaoBean, java.io.Serializable

Simple Java Bean representing a user entry in LDAP.

SimpleUser bean generated by the Toolbox Bean Generator.

This bean implements the DaoBean interface that allows it to be persisted by sub-class instances of the toolbox.services.dao.DaoService class.

See Also:
Serialized Form

Constructor Summary
SimpleUser()
          Default constructor to initialise the internal Map for storing bean properties.
 
Method Summary
static SimpleUser create(java.util.Map map)
          Create a new SimpleUser bean instance using the properties in the given Map as the values of the bean properties.
 java.lang.String getCn()
          Return the cn property.
 java.lang.String getDescription()
          Return the description property.
 java.lang.String getDn()
          Return the dn property.
 java.lang.String getGivenName()
          Return the givenName property.
 java.lang.String getLocalityName()
          Return the localityName property.
 java.lang.String getMail()
          Return the mail property.
 java.util.Map getMap()
          Return the Map containing the bean properties.
 java.lang.String getMapping(java.lang.String prop)
          Return the mapped value for the provided property name.
 java.util.Map getMappings()
          Return the Map containing the property mappings.
 java.util.Set getOu()
          Return the ou property.
 java.lang.String getSn()
          Return the sn property.
 java.lang.String getUid()
          Return the uid property.
 java.lang.String getUserPassword()
          Return the userPassword property.
 void setCn(java.lang.String cn)
          Set the cn property.
 void setDescription(java.lang.String description)
          Set the description property.
 void setDn(java.lang.String dn)
          Set the dn property.
 void setGivenName(java.lang.String givenName)
          Set the givenName property.
 void setLocalityName(java.lang.String localityName)
          Set the localityName property.
 void setMail(java.lang.String mail)
          Set the mail property.
 void setMap(java.util.Map map)
          Set the Map containing the bean properties.
 void setOu(java.util.Set ou)
          Set the ou property.
 void setSn(java.lang.String sn)
          Set the sn property.
 void setUid(java.lang.String uid)
          Set the uid property.
 void setUserPassword(java.lang.String userPassword)
          Set the userPassword property.
 java.lang.String toString()
          Return a String representation of this DaoBean instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleUser

public SimpleUser()
Default constructor to initialise the internal Map for storing bean properties.

Method Detail

setDn

public void setDn(java.lang.String dn)
Set the dn property.

Parameters:
dn - New value of the dn property.

getDn

public java.lang.String getDn()
Return the dn property.

Returns:
String containinig the value of the dn property.

setUid

public void setUid(java.lang.String uid)
Set the uid property.

Parameters:
uid - New value of the uid property.

getUid

public java.lang.String getUid()
Return the uid property.

Returns:
String containinig the value of the uid property.

setDescription

public void setDescription(java.lang.String description)
Set the description property.

Parameters:
description - New value of the description property.

getDescription

public java.lang.String getDescription()
Return the description property.

Returns:
String containinig the value of the description property.

setGivenName

public void setGivenName(java.lang.String givenName)
Set the givenName property.

Parameters:
givenName - New value of the givenName property.

getGivenName

public java.lang.String getGivenName()
Return the givenName property.

Returns:
String containinig the value of the givenName property.

setSn

public void setSn(java.lang.String sn)
Set the sn property.

Parameters:
sn - New value of the sn property.

getSn

public java.lang.String getSn()
Return the sn property.

Returns:
String containinig the value of the sn property.

setCn

public void setCn(java.lang.String cn)
Set the cn property.

Parameters:
cn - New value of the cn property.

getCn

public java.lang.String getCn()
Return the cn property.

Returns:
String containinig the value of the cn property.

setUserPassword

public void setUserPassword(java.lang.String userPassword)
Set the userPassword property.

Parameters:
userPassword - New value of the userPassword property.

getUserPassword

public java.lang.String getUserPassword()
Return the userPassword property.

Returns:
String containinig the value of the userPassword property.

setMail

public void setMail(java.lang.String mail)
Set the mail property.

Parameters:
mail - New value of the mail property.

getMail

public java.lang.String getMail()
Return the mail property.

Returns:
String containinig the value of the mail property.

setLocalityName

public void setLocalityName(java.lang.String localityName)
Set the localityName property.

Parameters:
localityName - New value of the localityName property.

getLocalityName

public java.lang.String getLocalityName()
Return the localityName property.

Returns:
String containinig the value of the localityName property.

setOu

public void setOu(java.util.Set ou)
Set the ou property.

Parameters:
ou - New value of the ou property.

getOu

public java.util.Set getOu()
Return the ou property.

Returns:
Set containinig the value of the ou property.

setMap

public void setMap(java.util.Map map)
Set the Map containing the bean properties.

Specified by:
setMap in interface DaoBean
Parameters:
map - Map containing bean properties.

getMap

public java.util.Map getMap()
Return the Map containing the bean properties.

Specified by:
getMap in interface DaoBean
Returns:
Map containing bean properties.

getMapping

public java.lang.String getMapping(java.lang.String prop)
Return the mapped value for the provided property name.

Specified by:
getMapping in interface DaoBean
Parameters:
prop - Return the mapping for this property.
Returns:
String containing the mapping for the provided property.

getMappings

public java.util.Map getMappings()
Return the Map containing the property mappings.

Specified by:
getMappings in interface DaoBean
Returns:
Map instance containing property mappings.

create

public static SimpleUser create(java.util.Map map)
                         throws java.lang.Exception
Create a new SimpleUser bean instance using the properties in the given Map as the values of the bean properties.

Property mappings are done using Java Reflection and is performed as follows:

The keys in the Map are used as the names of the bean properties. If the Map contains a key with the value name it will be translated into a method call that will invoke the setName(...) method on the target bean using the value associated with the key in the Map.

Parameters:
map - Map containing bean properties.
Returns:
SimpleUser bean instance.
Throws:
java.lang.Exception - if the bean cannot be created.

toString

public java.lang.String toString()
Return a String representation of this DaoBean instance.

Overrides:
toString in class java.lang.Object
Returns:
String representation of the properties of this bean.