org.torweg.pulse.accesscontrol
Class AbstractAccessControlObject
java.lang.Object
org.torweg.pulse.util.entity.AbstractBasicEntity
org.torweg.pulse.util.entity.AbstractNamedEntity
org.torweg.pulse.util.entity.AbstractNamableEntity
org.torweg.pulse.accesscontrol.AbstractAccessControlObject
- All Implemented Interfaces:
- java.io.Serializable, JDOMable, INameable, INamed
- Direct Known Subclasses:
- AbstractUserBase, Group, Permission, Role
public abstract class AbstractAccessControlObject
- extends AbstractNamableEntity
- implements JDOMable
Defines JSON-support and helper-methods for entities in the access-control.
- Version:
- $Revision: 2013 $
- Author:
- Daniel Dietz
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.torweg.pulse.util.INamed |
getName |
AbstractAccessControlObject
public AbstractAccessControlObject()
toJSON
public net.sf.json.JSONObject toJSON()
- Serializes the state of the
AbstractAccessControlObject to a
JSONObject.
Is supposed to be overridden by extending sub-classes.
- Returns:
- the
AbstractAccessControlObject as a JSONObject
getAssociatedAbstractAccessControlObjects
protected final java.util.List<? extends AbstractAccessControlObject> getAssociatedAbstractAccessControlObjects(org.hibernate.Session s,
java.lang.Class<? extends AbstractAccessControlObject> clazz,
java.lang.String alias,
java.lang.Long id)
- Loads the
<? extends AbstractAccessControlObject>s specified by
clazz associated with the <? extends AbstractAccessControlObject>
s specified by alias specified further by id.
- Parameters:
s - the hibernateTM-Sessionclazz - the Class<? extends AbstractAccessControlObject>alias - the aliasid - the id
- Returns:
- a
List<? extends AbstractAccessControlObject>
getLoadCriteriaForClassWithAlias
protected final org.hibernate.Criteria getLoadCriteriaForClassWithAlias(org.hibernate.Session s,
java.lang.Class<? extends AbstractAccessControlObject> c,
java.lang.String alias,
java.lang.Long id)
- Returns a
Criteria to load the
AbstractAccessControlObjects associated with the given
Class<?
extends AbstractBasicEntity>.
- Parameters:
s - the hibernateTM Sessionc - the Class<? extends AbstractBasicEntity> to build the
Criteria foralias - the alias to be usedid - the id of the AbstractAccessControlObject
- Returns:
- a
Criteria to load the
AbstractAccessControlObjects associated with the given
Class<? extends AbstractBasicEntity>