planetj.dataengine.application
Class ApplicationManager

java.lang.Object
  extended byplanetj.dataengine.AbstractTableManager
      extended byplanetj.dataengine.application.ApplicationManager
All Implemented Interfaces:
java.io.Serializable

public class ApplicationManager
extends AbstractTableManager

Manages instances of Applications. Provides data access methods and data generation methods. Creation date: (3/26/2002 10:56:45 AM)

See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_APPLICATION_TABLE_NAME
           
 
Constructor Summary
protected ApplicationManager()
           
 
Method Summary
 Application createApplication(java.lang.String pMetaDataAlias, java.util.Map pValues)
          Creates an Application using the given values.
 Application getApplication(int appId, java.lang.String userLib, java.lang.String metaDataAlias)
          Get an application by id and user library.
 Application getApplication(java.lang.String metaDataAlias, int appId, java.util.List columnNames, IUser user)
          Gets an application by ID Creation date: (3/25/2002 1:48:24 PM)
protected  Application getApplication(java.lang.String pSystemAlias, java.lang.String pLibrary, java.lang.String pTable, int pId, java.util.List pColumnNames, boolean pCheckCache, IUser pUser)
          Gets an application by ID Creation date: (3/25/2002 1:48:24 PM)
 RowCollection getApplications(java.lang.String pSystemAlias, java.util.List pColumnNames, IUser pUser)
          Returns A RowCollection of all Application objects
 RowCollection getApplications(java.lang.String pSystemAlias, java.util.List pColumnNames, IUser pUser, java.util.List orderByColumns)
          Returns A RowCollection of all Application objects
protected  RowCollection getApplications(java.lang.String pSystemAlias, java.lang.String pLibraryName, java.lang.String pTableName, java.util.List pColumnNames, IUser pUser)
          Returns A RowCollection of all Application objects Creation date: (3/25/2002 1:48:24 PM)
protected  RowCollection getApplications(java.lang.String pSystemAlias, java.lang.String pLibraryName, java.lang.String pTableName, java.util.List pColumnNames, IUser pUser, java.util.List orderByNames)
          Returns A RowCollection of all Application objects Creation date: (3/25/2002 1:48:24 PM)
 java.lang.String getDefaultTableName()
          Gets the name of the table containing application information (the default name is APPLICATION).
 Application getNonCachedApplication(java.lang.String pMetaDataAlias, int pId, java.util.List pColumnNames, IUser pUser)
          Deprecated. - Now that the cache is wiped out on update we don't need this method any more - use the normal getApplication() method
 java.lang.String getTableSQLString(java.lang.String libraryName, java.lang.String tableName)
          Get an SQL String that can be used to create the table.
static void setSingleton(ApplicationManager newSingleton)
          Allows a subclass of the ApplicationManager to be set as the singleton instance.
static ApplicationManager singleton()
          Gets the singleton instance of the ApplicationManager
 
Methods inherited from class planetj.dataengine.AbstractTableManager
appendFromClause, appendSelectClause, createTable, createTable, getLibraryName, getTable, getTableName, setTableName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_APPLICATION_TABLE_NAME

public static final java.lang.String DEFAULT_APPLICATION_TABLE_NAME
See Also:
Constant Field Values
Constructor Detail

ApplicationManager

protected ApplicationManager()
Method Detail

createApplication

public Application createApplication(java.lang.String pMetaDataAlias,
                                     java.util.Map pValues)
                              throws CMException
Creates an Application using the given values. Note: This does not save a ListView to the database.

Parameters:
pValues - Map of values for the newly created Application
Returns:
Application
Throws:
CMException

getApplication

public Application getApplication(java.lang.String metaDataAlias,
                                  int appId,
                                  java.util.List columnNames,
                                  IUser user)
                           throws CMException
Gets an application by ID Creation date: (3/25/2002 1:48:24 PM)

Throws:
CMException

getApplication

public Application getApplication(int appId,
                                  java.lang.String userLib,
                                  java.lang.String metaDataAlias)
                           throws CMException
Get an application by id and user library.

Throws:
CMException

getApplication

protected Application getApplication(java.lang.String pSystemAlias,
                                     java.lang.String pLibrary,
                                     java.lang.String pTable,
                                     int pId,
                                     java.util.List pColumnNames,
                                     boolean pCheckCache,
                                     IUser pUser)
                              throws CMException
Gets an application by ID Creation date: (3/25/2002 1:48:24 PM)

Parameters:
pSystemAlias - The alias of the system containing the table of applications
pId - The id of the application to retrieve
pColumnNames - The names of the columns to retrieve. If this is null, all columns will be retrieved
pCheckCache - If the cache should be checked
pUser - IUser object holding info about the user
Throws:
CMException

getApplications

protected RowCollection getApplications(java.lang.String pSystemAlias,
                                        java.lang.String pLibraryName,
                                        java.lang.String pTableName,
                                        java.util.List pColumnNames,
                                        IUser pUser)
                                 throws CMException
Returns A RowCollection of all Application objects Creation date: (3/25/2002 1:48:24 PM)

Parameters:
pSystemAlias - The alias of the system containing the table of applications
pLibraryName - The name of the library containing the table of applications
pTableName - The name of the table containing the application information
pColumnNames - The names of the columns to retrieve. (If this is null all columns will be retrieved.)
pUser - IUser object holding info about the user
Throws:
CMException

getApplications

protected RowCollection getApplications(java.lang.String pSystemAlias,
                                        java.lang.String pLibraryName,
                                        java.lang.String pTableName,
                                        java.util.List pColumnNames,
                                        IUser pUser,
                                        java.util.List orderByNames)
                                 throws CMException
Returns A RowCollection of all Application objects Creation date: (3/25/2002 1:48:24 PM)

Parameters:
pSystemAlias - The alias of the system containing the table of applications
pLibraryName - The name of the library containing the table of applications
pTableName - The name of the table containing the application information
pColumnNames - The names of the columns to retrieve. (If this is null all columns will be retrieved.)
pUser - IUser object holding info about the user
orderByNames - The names of the columns to order the results by.
Throws:
CMException

getApplications

public RowCollection getApplications(java.lang.String pSystemAlias,
                                     java.util.List pColumnNames,
                                     IUser pUser)
                              throws CMException
Returns A RowCollection of all Application objects

Parameters:
pSystemAlias - The alias of the system containing the table of applications
pColumnNames - The names of the columns to retrieve. (If this is null all columns will be retrieved.)
pUser - IUser object holding info about the user
Throws:
CMException

getApplications

public RowCollection getApplications(java.lang.String pSystemAlias,
                                     java.util.List pColumnNames,
                                     IUser pUser,
                                     java.util.List orderByColumns)
                              throws CMException
Returns A RowCollection of all Application objects

Parameters:
pSystemAlias - The alias of the system containing the table of applications
pColumnNames - The names of the columns to retrieve. (If this is null all columns will be retrieved.)
pUser - IUser object holding info about the user
orderByColumns - The names of the columns to order the results by.
Throws:
CMException

getDefaultTableName

public java.lang.String getDefaultTableName()
Gets the name of the table containing application information (the default name is APPLICATION).

Specified by:
getDefaultTableName in class AbstractTableManager

getNonCachedApplication

public Application getNonCachedApplication(java.lang.String pMetaDataAlias,
                                           int pId,
                                           java.util.List pColumnNames,
                                           IUser pUser)
                                    throws CMException
Deprecated. - Now that the cache is wiped out on update we don't need this method any more - use the normal getApplication() method

Gets an application by ID out of the DB (the cache is not checked) Creation date: (3/25/2002 1:48:24 PM)

Parameters:
pId - The id of the application to retrieve
pColumnNames - The names of the columns to retrieve. If this is null, all columns will be retrieved
pUser - IUser object holding info about the user
Throws:
CMException

getTableSQLString

public java.lang.String getTableSQLString(java.lang.String libraryName,
                                          java.lang.String tableName)
Get an SQL String that can be used to create the table.

Specified by:
getTableSQLString in class AbstractTableManager

setSingleton

public static void setSingleton(ApplicationManager newSingleton)
Allows a subclass of the ApplicationManager to be set as the singleton instance. The singleton instance isn't synchronized, so this method must be invoked before the singleton is accessed.


singleton

public static ApplicationManager singleton()
Gets the singleton instance of the ApplicationManager