|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.incongru.berkano.user.hibernate.HibernatedUserPropertyAccessor
public class HibernatedUserPropertyAccessor
An helper class to retrieve user/group properties.
| Constructor Summary | |
|---|---|
HibernatedUserPropertyAccessor()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
aggregate(User u,
java.lang.String key)
This method glues all values found for the given user and property name. |
java.lang.Object |
getFirstValue(User u,
java.lang.String key)
Returns the first value encountered for this key. |
java.lang.Object |
getGroupSingleValue(User u,
java.lang.String key)
Returns a single value found for this key, following the following rules: The user's properties are not taken into account If the property is defined in multiple groups, an exception will be thrown The property will be return from group level if it is defined in only one of the user's groups. Null will be returned if the property can't be found |
java.util.Collection |
getGroupValues(User u,
java.lang.String key)
Returns a collection aggregating the different values of this property found in all of the user's groups' properties. |
java.lang.Object |
getSingleValue(User u,
java.lang.String key)
Returns a single value found for this key, following the following rules: If the property is defined at user level, it will be returned, regardless of the groups' properties If the property is defined in multiple groups, an exception will be thrown The property will be return from group level if it is defined in only one of the user's groups. Null will be returned if the property can't be found |
java.lang.Object |
getUserOnlyValue(User u,
java.lang.String key)
Returns a value from the user's properties, not taking the groups properties into account |
java.util.Collection |
getValues(User u,
java.lang.String key)
Returns a collection aggregating the different values of this property found in both the user's properties and all of the user's groups' properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HibernatedUserPropertyAccessor()
| Method Detail |
|---|
public java.lang.Object getUserOnlyValue(User u,
java.lang.String key)
getUserOnlyValue in interface UserPropertyAccessor
public java.lang.Object getFirstValue(User u,
java.lang.String key)
getFirstValue in interface UserPropertyAccessor
public java.lang.Object getSingleValue(User u,
java.lang.String key)
getSingleValue in interface UserPropertyAccessor
public java.lang.Object getGroupSingleValue(User u,
java.lang.String key)
getGroupSingleValue in interface UserPropertyAccessor
public java.util.Collection getValues(User u,
java.lang.String key)
getValues in interface UserPropertyAccessor
public java.util.Collection getGroupValues(User u,
java.lang.String key)
getGroupValues in interface UserPropertyAccessor
public java.lang.Object aggregate(User u,
java.lang.String key)
aggregate in interface UserPropertyAccessor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||