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

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

public class PropertiesCategoryController
extends BaseController

The PropertiesCategoryController manages all actions related to persistence and querying for PropertiesCategory relationships. TODO: When we convert have Hibernate manage all of these relationships, it will pull it TODO: all back with one query and be a helluva lot faster than this basic implementation

Author:
Frank Febbraro (frank@phase2technology.com)

Method Summary
 PropertiesCategory createWithDatabase(PropertiesCategoryVO c, org.exolab.castor.jdo.Database db)
           
 void delete(java.lang.Integer id)
          Deletes a PropertiesCategory
 void deleteByCategory(java.lang.Integer categoryId)
          Deletes all PropertiesCategories for a particular Category
 void deleteByCategory(java.lang.Integer categoryId, org.exolab.castor.jdo.Database db)
          Deletes all PropertiesCategories for a particular Category using the provided Database
 void deleteByProperties(java.lang.String entityName, java.lang.Integer entityId)
          Deletes all PropertiesCategories for a particular PropertiesVersion
 void deleteByPropertiesVersion(java.lang.String entityName, java.lang.Integer entityId, org.exolab.castor.jdo.Database db)
          Deletes all PropertiesCategories for a particular PropertiesVersion using the provided Database
 void deleteByPropertiesVersionAttribute(java.lang.String attribute, java.lang.String entityName, java.lang.Integer entityId)
          Deletes all properties categories with a specific attribute for a specific properties version within a single transaction
 void deleteByPropertiesVersionAttribute(java.lang.String attribute, java.lang.String entityName, java.lang.Integer entityId, org.exolab.castor.jdo.Database db)
          Deletes all properties categories with a specific attribute for a specific properties version using the given database
 java.util.List findByCategory(java.lang.Integer categoryId)
          Find a List of PropertiesCategories for the specific attribute and Properties Version.
 PropertiesCategoryVO findById(java.lang.Integer id)
          Find a PropertiesCategory by it's identifier.
 java.util.List findByProperties(java.lang.String entityName, java.lang.Integer entityId)
          Find a List of PropertiesCategories for a Properties Version.
 java.util.List findByPropertiesAttribute(java.lang.String attribute, java.lang.String entityName, java.lang.Integer entityId)
          Find a List of PropertiesCategories for the specific attribute and Properties Version.
 java.util.List findByPropertiesAttribute(java.lang.String attribute, java.lang.String entityName, java.lang.Integer entityId, org.exolab.castor.jdo.Database db)
          Find a List of PropertiesCategories for the specific attribute and Properties Version.
static PropertiesCategoryController getController()
           
 BaseEntityVO getNewVO()
          Implemented for BaseController
 PropertiesCategoryVO save(PropertiesCategoryVO c)
          Saves a PropertiesCategoryVO whether it is new or not.
 
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, getAllObjects, 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
 

Method Detail

getController

public static PropertiesCategoryController getController()

findById

public PropertiesCategoryVO findById(java.lang.Integer id)
                              throws SystemException
Find a PropertiesCategory by it's identifier.

Parameters:
id - The id of the Category to find
Returns:
The CategoryVO identified by the provided id
Throws:
SystemException - If an error happens

findByPropertiesAttribute

public java.util.List findByPropertiesAttribute(java.lang.String attribute,
                                                java.lang.String entityName,
                                                java.lang.Integer entityId)
                                         throws SystemException
Find a List of PropertiesCategories for the specific attribute and Properties Version.

Parameters:
attribute - The attribute name of the PropertiesCategory to find
versionId - The Properties Version id of the PropertiesCategory to find
Returns:
A list of PropertiesCategoryVO that have the provided properties version and attribute
Throws:
SystemException - If an error happens

findByPropertiesAttribute

public java.util.List findByPropertiesAttribute(java.lang.String attribute,
                                                java.lang.String entityName,
                                                java.lang.Integer entityId,
                                                org.exolab.castor.jdo.Database db)
                                         throws SystemException
Find a List of PropertiesCategories for the specific attribute and Properties Version.

Parameters:
attribute - The attribute name of the PropertiesCategory to find
versionId - The Properties Version id of the PropertiesCategory to find
Returns:
A list of PropertiesCategoryVO that have the provided properties version and attribute
Throws:
SystemException - If an error happens

findByProperties

public java.util.List findByProperties(java.lang.String entityName,
                                       java.lang.Integer entityId)
                                throws SystemException
Find a List of PropertiesCategories for a Properties Version.

Parameters:
versionId - The Properties Version id of the PropertiesCategory to find
Returns:
A list of PropertiesCategoryVO that have the provided properties version and attribute
Throws:
SystemException - If an error happens

findByCategory

public java.util.List findByCategory(java.lang.Integer categoryId)
                              throws SystemException
Find a List of PropertiesCategories for the specific attribute and Properties Version.

Parameters:
categoryId - The Category id of the PropertiesCategory to find
Returns:
A list of PropertiesCategoryVO that have the provided category id
Throws:
SystemException - If an error happens

save

public PropertiesCategoryVO save(PropertiesCategoryVO c)
                          throws SystemException
Saves a PropertiesCategoryVO whether it is new or not.

Parameters:
c - The PropertiesCategoryVO to save
Returns:
The saved PropertiesCategoryVO
Throws:
SystemException - If an error happens

createWithDatabase

public PropertiesCategory createWithDatabase(PropertiesCategoryVO c,
                                             org.exolab.castor.jdo.Database db)
                                      throws SystemException,
                                             org.exolab.castor.jdo.PersistenceException
Throws:
SystemException
org.exolab.castor.jdo.PersistenceException

delete

public void delete(java.lang.Integer id)
            throws SystemException
Deletes a PropertiesCategory

Parameters:
id - The id of the PropertiesCategory to delete
Throws:
SystemException - If an error happens

deleteByProperties

public void deleteByProperties(java.lang.String entityName,
                               java.lang.Integer entityId)
                        throws SystemException
Deletes all PropertiesCategories for a particular PropertiesVersion

Parameters:
versionId - The id of the PropertiesCategory to delete
Throws:
SystemException - If an error happens

deleteByPropertiesVersion

public void deleteByPropertiesVersion(java.lang.String entityName,
                                      java.lang.Integer entityId,
                                      org.exolab.castor.jdo.Database db)
                               throws SystemException
Deletes all PropertiesCategories for a particular PropertiesVersion using the provided Database

Parameters:
versionId - The id of the PropertiesCategory to delete
db - The Database instance to use
Throws:
SystemException - If an error happens

deleteByCategory

public void deleteByCategory(java.lang.Integer categoryId)
                      throws SystemException
Deletes all PropertiesCategories for a particular Category

Parameters:
categoryId - The id of the PropertiesCategory to delete
Throws:
SystemException - If an error happens

deleteByCategory

public void deleteByCategory(java.lang.Integer categoryId,
                             org.exolab.castor.jdo.Database db)
                      throws SystemException
Deletes all PropertiesCategories for a particular Category using the provided Database

Parameters:
categoryId - The id of the Category to delete
db - The Database instance to use
Throws:
SystemException - If an error happens

deleteByPropertiesVersionAttribute

public void deleteByPropertiesVersionAttribute(java.lang.String attribute,
                                               java.lang.String entityName,
                                               java.lang.Integer entityId)
                                        throws SystemException
Deletes all properties categories with a specific attribute for a specific properties version within a single transaction

Parameters:
attribute - the desired attribute
versionId - the ID of the desired properties version
Throws:
SystemException - if a database error occurs

deleteByPropertiesVersionAttribute

public void deleteByPropertiesVersionAttribute(java.lang.String attribute,
                                               java.lang.String entityName,
                                               java.lang.Integer entityId,
                                               org.exolab.castor.jdo.Database db)
                                        throws SystemException
Deletes all properties categories with a specific attribute for a specific properties version using the given database

Parameters:
attribute - the desired attribute
versionId - the ID of the desired properties version
db - the database defining the transaction context for this delete
Throws:
SystemException - if a database error occurs

getNewVO

public BaseEntityVO getNewVO()
Implemented for BaseController

Specified by:
getNewVO in class BaseController


Copyright © 2005 InfoGlue.org All Rights Reserved.