org.infoglue.cms.controllers.kernel.impl.simple
Class BaseController

java.lang.Object
  |
  +--org.infoglue.cms.controllers.kernel.impl.simple.BaseController
Direct Known Subclasses:
AccessRightController, AvailableServiceBindingController, CategoryController, ComponentController, ContentCategoryController, ContentController, ContentStateController, ContentTypeDefinitionController, ContentVersionController, DigitalAssetController, EventController, ExtendedSearchController, GroupController, GroupControllerProxy, GroupPropertiesController, ImportController, InfoGlueBasicAuthorizationModule, InfoGluePrincipalControllerProxy, InterceptionPointController, InterceptorController, LanguageController, PropertiesCategoryController, PublicationController, QualifyerController, RegistryController, RepositoryController, RepositoryLanguageController, RoleController, RoleControllerProxy, RolePropertiesController, SearchController, ServiceBindingController, ServiceDefinitionController, SiteNodeController, SiteNodeStateController, SiteNodeTypeDefinitionController, SiteNodeVersionController, SystemUserController, TransactionHistoryController, UserControllerProxy, UserPropertiesController, ValidationController, WorkflowController, WorkflowDefinitionController

public abstract class BaseController
extends java.lang.Object

BaseController.java Created on 2002-aug-28

Author:
Stefan Sik, ss@frovi.com, Mattias Bogeblad, mattias.bogeblad@sprawlsolutions.se Baseclass for ControllerClasses. Various methods to load, create and delete entities TODO: Now that all entities implements BaseEntity clear all reflection and simplify arguments... -matbog 2002-09-15: Added and modified new read-only methods for fetching a VO-object. These method must be called instead of the old ones when just fetching a entity or all entities from a table.

Constructor Summary
BaseController()
           
 
Method Summary
static void deleteEntity(java.lang.Class entClass, java.lang.Integer id)
           
static void deleteEntity(java.lang.Class entClass, java.lang.Integer id, org.exolab.castor.jdo.Database db)
           
static void deleteEntity(java.lang.Class entClass, java.lang.String id)
           
 java.util.List getAllVOObjects(java.lang.Class arg, java.lang.String primaryKey)
          This method fetches all object in read only mode and returns a list of value objects sorted on primary Key.
 java.util.List getAllVOObjects(java.lang.Class arg, java.lang.String primaryKey, org.exolab.castor.jdo.Database db)
          This method fetches all object in read only mode and returns a list of value objects.
static java.util.List getAllVOObjects(java.lang.Class arg, java.lang.String orderByAttribute, java.lang.String direction)
          This method fetches all object in read only mode and returns a list of value objects.
static java.util.List getAllVOObjects(java.lang.Class arg, java.lang.String orderByField, java.lang.String direction, org.exolab.castor.jdo.Database db)
          This method fetches all object in read only mode and returns a list of value objects.
abstract  BaseEntityVO getNewVO()
           
static java.lang.Object getVOWithId(java.lang.Class arg, java.lang.Integer id)
          This method is used to fetch a ValueObject from the database.
static BaseEntityVO getVOWithId(java.lang.Class arg, java.lang.Integer id, org.exolab.castor.jdo.Database db)
          This method fetches one object in read only mode and returns it's value object.
static java.lang.Object getVOWithId(java.lang.Class arg, java.lang.String id)
          This method is used to fetch a ValueObject from the database.
static java.util.List toModifiableVOList(java.util.Collection baseEntities)
          This method converts a List of entities to a list of value-objects.
static java.util.List toVOList(java.util.Collection baseEntities)
          This method converts a List of entities to a list of value-objects.
static BaseEntityVO updateEntity(java.lang.Class arg, BaseEntityVO vo)
           
static BaseEntityVO updateEntity(java.lang.Class arg, BaseEntityVO vo, org.exolab.castor.jdo.Database db)
           
static BaseEntityVO updateEntity(java.lang.Class entClass, BaseEntityVO vo, java.lang.String collectionMethod, java.lang.Class manyClass, java.lang.String[] manyIds)
           
static ConstraintExceptionBuffer validateEntity(ValidatableEntityVO vo)
          Validation and integrity check of entities - cre 2002-09-18 / SS
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseController

public BaseController()
Method Detail

deleteEntity

public static void deleteEntity(java.lang.Class entClass,
                                java.lang.Integer id)
                         throws Bug,
                                SystemException
Bug
SystemException

deleteEntity

public static void deleteEntity(java.lang.Class entClass,
                                java.lang.String id)
                         throws Bug,
                                SystemException
Bug
SystemException

deleteEntity

public static void deleteEntity(java.lang.Class entClass,
                                java.lang.Integer id,
                                org.exolab.castor.jdo.Database db)
                         throws Bug,
                                SystemException
Bug
SystemException

updateEntity

public static BaseEntityVO updateEntity(java.lang.Class arg,
                                        BaseEntityVO vo)
                                 throws Bug,
                                        SystemException
Bug
SystemException

updateEntity

public static BaseEntityVO updateEntity(java.lang.Class arg,
                                        BaseEntityVO vo,
                                        org.exolab.castor.jdo.Database db)
                                 throws Bug,
                                        SystemException
Bug
SystemException

updateEntity

public static BaseEntityVO updateEntity(java.lang.Class entClass,
                                        BaseEntityVO vo,
                                        java.lang.String collectionMethod,
                                        java.lang.Class manyClass,
                                        java.lang.String[] manyIds)
                                 throws ConstraintException,
                                        SystemException
ConstraintException
SystemException

toVOList

public static java.util.List toVOList(java.util.Collection baseEntities)
                               throws SystemException,
                                      Bug
This method converts a List of entities to a list of value-objects.

SystemException
Bug

toModifiableVOList

public static java.util.List toModifiableVOList(java.util.Collection baseEntities)
                                         throws SystemException,
                                                Bug
This method converts a List of entities to a list of value-objects.

SystemException
Bug

getVOWithId

public static java.lang.Object getVOWithId(java.lang.Class arg,
                                           java.lang.Integer id)
                                    throws SystemException,
                                           Bug
This method is used to fetch a ValueObject from the database.

SystemException
Bug

getVOWithId

public static BaseEntityVO getVOWithId(java.lang.Class arg,
                                       java.lang.Integer id,
                                       org.exolab.castor.jdo.Database db)
                                throws SystemException,
                                       Bug
This method fetches one object in read only mode and returns it's value object.

SystemException
Bug

getVOWithId

public static java.lang.Object getVOWithId(java.lang.Class arg,
                                           java.lang.String id)
                                    throws SystemException,
                                           Bug
This method is used to fetch a ValueObject from the database.

SystemException
Bug

getAllVOObjects

public static java.util.List getAllVOObjects(java.lang.Class arg,
                                             java.lang.String orderByAttribute,
                                             java.lang.String direction)
                                      throws SystemException,
                                             Bug
This method fetches all object in read only mode and returns a list of value objects.

SystemException
Bug

getAllVOObjects

public static java.util.List getAllVOObjects(java.lang.Class arg,
                                             java.lang.String orderByField,
                                             java.lang.String direction,
                                             org.exolab.castor.jdo.Database db)
                                      throws SystemException,
                                             Bug
This method fetches all object in read only mode and returns a list of value objects.

SystemException
Bug

getAllVOObjects

public java.util.List getAllVOObjects(java.lang.Class arg,
                                      java.lang.String primaryKey)
                               throws SystemException,
                                      Bug
This method fetches all object in read only mode and returns a list of value objects sorted on primary Key.

SystemException
Bug

getAllVOObjects

public java.util.List getAllVOObjects(java.lang.Class arg,
                                      java.lang.String primaryKey,
                                      org.exolab.castor.jdo.Database db)
                               throws SystemException,
                                      Bug
This method fetches all object in read only mode and returns a list of value objects.

SystemException
Bug

validateEntity

public static ConstraintExceptionBuffer validateEntity(ValidatableEntityVO vo)
Validation and integrity check of entities - cre 2002-09-18 / SS


getNewVO

public abstract BaseEntityVO getNewVO()