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

java.lang.Object
  extended by org.infoglue.cms.controllers.kernel.impl.simple.BaseController
      extended by org.infoglue.cms.controllers.kernel.impl.simple.LanguageController

public class LanguageController
extends BaseController

This class handles all interaction with Languages and persistence of them.

Author:
mattias

Constructor Summary
LanguageController()
           
 
Method Summary
 LanguageVO create(org.exolab.castor.jdo.Database db, LanguageVO languageVO)
           
 LanguageVO create(LanguageVO languageVO)
           
 void delete(org.exolab.castor.jdo.Database db, LanguageVO languageVO)
          This method removes a Language from the system and also cleans out all depending repositoryLanguages.
 void delete(LanguageVO languageVO)
          This method removes a Language from the system and also cleans out all depending repositoryLanguages.
 void deleteLanguage(java.lang.Integer languageId, org.exolab.castor.jdo.Database db)
          This method deletes the Repository sent in from the system.
static LanguageController getController()
          Factory method
 java.util.List getLanguageList(java.lang.Integer repositoryId, org.exolab.castor.jdo.Database db)
           
 Language getLanguageWithCode(java.lang.String code, org.exolab.castor.jdo.Database db)
          Returns the Language with the given languageCode fetched within a given transaction.
 Language getLanguageWithId(java.lang.Integer languageId)
           
 Language getLanguageWithId(java.lang.Integer languageId, org.exolab.castor.jdo.Database db)
           
 Language getLanguageWithName(java.lang.String name, org.exolab.castor.jdo.Database db)
          Returns the Language with the given name fetched within a given transaction.
 Language getLanguageWithRepositoryLanguageId(java.lang.Integer repositoryLanguageId, org.exolab.castor.jdo.Database db)
           
 java.util.List getLanguageVOList()
           
 java.util.List getLanguageVOList(org.exolab.castor.jdo.Database db)
           
 java.util.List getLanguageVOList(java.lang.Integer repositoryId)
           
 java.util.List getLanguageVOList(java.lang.Integer repositoryId, org.exolab.castor.jdo.Database db)
           
 LanguageVO getLanguageVOWithCode(java.lang.String code)
          Returns the LanguageVO with the given languageCode.
 LanguageVO getLanguageVOWithCode(java.lang.String code, org.exolab.castor.jdo.Database db)
          Returns the LanguageVO with the given languageCode.
 LanguageVO getLanguageVOWithId(java.lang.Integer languageId)
          This method return a LanguageVO
 LanguageVO getLanguageVOWithId(java.lang.Integer languageId, org.exolab.castor.jdo.Database db)
          This method returns a specific LanguageVO object
 LanguageVO getLanguageVOWithName(java.lang.String name)
          Returns the LanguageVO with the given name.
 LanguageVO getLanguageVOWithRepositoryLanguageId(java.lang.Integer repositoryLanguageId)
           
 java.util.Locale getLocaleWithId(java.lang.Integer languageId)
          This method returns language with the languageCode sent in.
 Language getMasterLanguage(org.exolab.castor.jdo.Database db, java.lang.Integer repositoryId)
          This method returns the master language within an transaction.
 LanguageVO getMasterLanguage(java.lang.Integer repositoryId)
          This method returns the master language.
 LanguageVO getMasterLanguage(java.lang.Integer repositoryId, org.exolab.castor.jdo.Database db)
          This method returns the master language.
 BaseEntityVO getNewVO()
          This is a method that gives the user back an newly initialized ValueObject for this entity that the controller is handling.
 LanguageVO update(LanguageVO languageVO)
           
 
Methods inherited from class org.infoglue.cms.controllers.kernel.impl.simple.BaseController
beginTransaction, beginTransaction, closeDatabase, commitTransaction, createEntity, createEntity, createQuery, deleteEntity, deleteEntity, deleteEntity, deleteEntity, executeQuery, executeQuery, executeQuery, executeQuery, getAllVOObjects, getAllVOObjects, getAllVOObjects, getAllVOObjects, getLogger, getObjectWithId, getObjectWithId, getObjectWithIdAsReadOnly, getVOWithId, getVOWithId, getVOWithId, getVOWithId, intercept, intercept, rollbackTransaction, toModifiableVOList, toVOList, updateEntity, updateEntity, updateEntity, updateEntity, validateEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguageController

public LanguageController()
Method Detail

getController

public static LanguageController getController()
Factory method


getLanguageVOWithId

public LanguageVO getLanguageVOWithId(java.lang.Integer languageId)
                               throws SystemException,
                                      java.lang.Exception
This method return a LanguageVO

Throws:
SystemException
java.lang.Exception

getLanguageVOWithId

public LanguageVO getLanguageVOWithId(java.lang.Integer languageId,
                                      org.exolab.castor.jdo.Database db)
                               throws SystemException,
                                      Bug
This method returns a specific LanguageVO object

Throws:
SystemException
Bug

getLocaleWithId

public java.util.Locale getLocaleWithId(java.lang.Integer languageId)
This method returns language with the languageCode sent in.


getLanguageVOWithName

public LanguageVO getLanguageVOWithName(java.lang.String name)
                                 throws SystemException,
                                        Bug
Returns the LanguageVO with the given name.

Parameters:
name -
Returns:
Throws:
SystemException
Bug

getLanguageWithName

public Language getLanguageWithName(java.lang.String name,
                                    org.exolab.castor.jdo.Database db)
                             throws SystemException,
                                    Bug
Returns the Language with the given name fetched within a given transaction.

Parameters:
name -
db -
Returns:
Throws:
SystemException
Bug

getLanguageVOWithCode

public LanguageVO getLanguageVOWithCode(java.lang.String code,
                                        org.exolab.castor.jdo.Database db)
                                 throws SystemException,
                                        Bug
Returns the LanguageVO with the given languageCode.

Parameters:
code -
Returns:
Throws:
SystemException
Bug

getLanguageVOWithCode

public LanguageVO getLanguageVOWithCode(java.lang.String code)
                                 throws SystemException,
                                        Bug
Returns the LanguageVO with the given languageCode.

Parameters:
code -
Returns:
Throws:
SystemException
Bug

getLanguageWithCode

public Language getLanguageWithCode(java.lang.String code,
                                    org.exolab.castor.jdo.Database db)
                             throws SystemException,
                                    Bug
Returns the Language with the given languageCode fetched within a given transaction.

Parameters:
code -
db -
Returns:
Throws:
SystemException
Bug

create

public LanguageVO create(LanguageVO languageVO)
                  throws ConstraintException,
                         SystemException
Throws:
ConstraintException
SystemException

create

public LanguageVO create(org.exolab.castor.jdo.Database db,
                         LanguageVO languageVO)
                  throws ConstraintException,
                         SystemException,
                         java.lang.Exception
Throws:
ConstraintException
SystemException
java.lang.Exception

delete

public void delete(LanguageVO languageVO)
            throws ConstraintException,
                   SystemException
This method removes a Language from the system and also cleans out all depending repositoryLanguages.

Throws:
ConstraintException
SystemException

delete

public void delete(org.exolab.castor.jdo.Database db,
                   LanguageVO languageVO)
            throws ConstraintException,
                   SystemException
This method removes a Language from the system and also cleans out all depending repositoryLanguages.

Throws:
ConstraintException
SystemException

getLanguageWithId

public Language getLanguageWithId(java.lang.Integer languageId,
                                  org.exolab.castor.jdo.Database db)
                           throws SystemException,
                                  Bug
Throws:
SystemException
Bug

getLanguageWithId

public Language getLanguageWithId(java.lang.Integer languageId)
                           throws ConstraintException,
                                  SystemException,
                                  Bug
Throws:
ConstraintException
SystemException
Bug

getLanguageVOWithRepositoryLanguageId

public LanguageVO getLanguageVOWithRepositoryLanguageId(java.lang.Integer repositoryLanguageId)
                                                 throws ConstraintException,
                                                        SystemException,
                                                        Bug
Throws:
ConstraintException
SystemException
Bug

getLanguageWithRepositoryLanguageId

public Language getLanguageWithRepositoryLanguageId(java.lang.Integer repositoryLanguageId,
                                                    org.exolab.castor.jdo.Database db)
                                             throws ConstraintException,
                                                    SystemException,
                                                    Bug
Throws:
ConstraintException
SystemException
Bug

getLanguageVOList

public java.util.List getLanguageVOList(java.lang.Integer repositoryId)
                                 throws ConstraintException,
                                        SystemException
Throws:
ConstraintException
SystemException

getLanguageVOList

public java.util.List getLanguageVOList(java.lang.Integer repositoryId,
                                        org.exolab.castor.jdo.Database db)
                                 throws ConstraintException,
                                        SystemException
Throws:
ConstraintException
SystemException

getLanguageList

public java.util.List getLanguageList(java.lang.Integer repositoryId,
                                      org.exolab.castor.jdo.Database db)
                               throws ConstraintException,
                                      SystemException
Throws:
ConstraintException
SystemException

getLanguageVOList

public java.util.List getLanguageVOList(org.exolab.castor.jdo.Database db)
                                 throws SystemException,
                                        Bug
Throws:
SystemException
Bug

getLanguageVOList

public java.util.List getLanguageVOList()
                                 throws SystemException,
                                        Bug
Throws:
SystemException
Bug

getMasterLanguage

public LanguageVO getMasterLanguage(java.lang.Integer repositoryId)
                             throws SystemException,
                                    java.lang.Exception
This method returns the master language. todo - add attribute on repositoryLanguage to be able to sort them... and then fetch the first

Throws:
SystemException
java.lang.Exception

getMasterLanguage

public LanguageVO getMasterLanguage(java.lang.Integer repositoryId,
                                    org.exolab.castor.jdo.Database db)
                             throws SystemException,
                                    java.lang.Exception
This method returns the master language. todo - add attribute on repositoryLanguage to be able to sort them... and then fetch the first

Throws:
SystemException
java.lang.Exception

getMasterLanguage

public Language getMasterLanguage(org.exolab.castor.jdo.Database db,
                                  java.lang.Integer repositoryId)
                           throws SystemException,
                                  java.lang.Exception
This method returns the master language within an transaction.

Throws:
SystemException
java.lang.Exception

deleteLanguage

public void deleteLanguage(java.lang.Integer languageId,
                           org.exolab.castor.jdo.Database db)
                    throws SystemException,
                           Bug
This method deletes the Repository sent in from the system.

Throws:
SystemException
Bug

update

public LanguageVO update(LanguageVO languageVO)
                  throws ConstraintException,
                         SystemException
Throws:
ConstraintException
SystemException

getNewVO

public BaseEntityVO getNewVO()
This is a method that gives the user back an newly initialized ValueObject for this entity that the controller is handling.

Specified by:
getNewVO in class BaseController


Copyright © 2005 InfoGlue.org All Rights Reserved.