planetj.database.possiblevalues
Class PossibleValueManager

java.lang.Object
  extended byplanetj.database.possiblevalues.PossibleValueManager
All Implemented Interfaces:
IPossibleValue

public class PossibleValueManager
extends java.lang.Object
implements IPossibleValue

This class can be used to get possible values and configuration properties for a given owner.


Field Summary
static java.lang.String SQL_KEY
           
 
Fields inherited from interface planetj.database.possiblevalues.IPossibleValue
DISPLAY_ORDER, DISPLAY_VALUE, DISPLAY_VALUE_SQL_TYPE, ERROR_MESSAGE_KEY_DELETE, ERROR_MESSAGE_KEY_INSERT, ERROR_MESSAGE_KEY_UPDATE, FIELD_NAME, KEY, LIBRARY_NAME, OWNER_ID, POSSIBLE_VALUES_TABLE_NAME, SYSTEM_ALIAS, TABLE_NAME, TYPE, TYPE_CONFIG_PROPERTY, TYPE_POSSIBLE_VALUE, TYPE_USER_MESSAGE, TYPE_WOW_UPDATE, USER_MESSAGE_KEY_DELETE, USER_MESSAGE_KEY_INSERT, USER_MESSAGE_KEY_UPDATE, VALUE
 
Constructor Summary
PossibleValueManager()
           
 
Method Summary
static RowCollection getAllMessages(Application app)
          Get all owner messages for an owner and application
static RowCollection getConfigProperties(java.lang.String metaDataSystemAlias, java.lang.String key, java.lang.String[] orderByColumnNames, int ownerId)
          This will return a RowCollection fo PossibleValues with the givin key @ pKey
static java.lang.Object getConfigProperty(java.lang.String key, Application app)
           
static Row getConfigProperty(java.lang.String metaDataSystemAlias, java.lang.String key, java.lang.String[] orderByColumnNames, int ownerId)
          This will return a RowCollection of configuration properties.
static PossibleValueRow getMessage(java.lang.String key)
          Get message for key.
static PossibleValueRow getMessage(java.lang.String key, Application app)
          Get message for key and application.
static PossibleValueRow getMessage(java.lang.String key, Row row)
          Get message for Row's system, library, table, and given key for owner of the application.
static PossibleValueRow getMessage(java.lang.String key, Row row, Application app)
          Get message for Row's system, library, table, and given key for owner of the application.
static PossibleValueRow getMessage(java.lang.String key, Row row, ExecutingContext ec)
          Convience method that gets the current application from the current executing context.
static PossibleValueRow getMessage(java.lang.String key, java.lang.String system, java.lang.String library, java.lang.String table, Application app)
          Get message for system, library, table, and given key for owner of the application.
static RowCollection getMessages(java.lang.String key, Row row)
          Get messages for given key and Row.
static RowCollection getMessages(java.lang.String key, java.lang.String system, java.lang.String library, java.lang.String table, Application app)
          Get messages for given key for owner of the application.
static java.lang.String getMessageText(java.lang.String key, Row row)
          Get message text for the given key and row.
static java.lang.String getMessageText(java.lang.String key, Row row, ExecutingContext ec)
          Get message text for the given key and row
static RowCollection getPossibleValues(java.lang.String metaDataSystemAlias, java.lang.String key, java.lang.String[] orderByColumnNames)
          Deprecated. owner id should be required when attempting to get possible values
static RowCollection getPossibleValues(java.lang.String metaDataSystemAlias, java.lang.String key, java.lang.String[] orderByColumnNames, int ownerId)
          This will return a RowCollection fo PossibleValues with the givin key @ pKey
static boolean isPVFileUsed()
           
static void setPVFileUsed(boolean pPVFileUsed)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SQL_KEY

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

PossibleValueManager

public PossibleValueManager()
Method Detail

getConfigProperties

public static RowCollection getConfigProperties(java.lang.String metaDataSystemAlias,
                                                java.lang.String key,
                                                java.lang.String[] orderByColumnNames,
                                                int ownerId)
                                         throws CMException
This will return a RowCollection fo PossibleValues with the givin key @ pKey

Parameters:
metaDataSystemAlias - system alias where metadata is located
key - key of possible values to retrieve
orderByColumnNames - names of columns to order by
ownerId - id of owner to which possible values belong
Returns:
RowCollection of possible values
Throws:
CMException

getConfigProperty

public static Row getConfigProperty(java.lang.String metaDataSystemAlias,
                                    java.lang.String key,
                                    java.lang.String[] orderByColumnNames,
                                    int ownerId)
                             throws CMException
This will return a RowCollection of configuration properties.

Parameters:
metaDataSystemAlias - system alias where metadata is located
key - key of possible values to retrieve
orderByColumnNames - names of columns to order by
ownerId - id of owner to which possible values belong
Returns:
RowCollection of possible values
Throws:
CMException

getConfigProperty

public static java.lang.Object getConfigProperty(java.lang.String key,
                                                 Application app)
                                          throws CMException
Throws:
CMException

getPossibleValues

public static RowCollection getPossibleValues(java.lang.String metaDataSystemAlias,
                                              java.lang.String key,
                                              java.lang.String[] orderByColumnNames)
                                       throws CMException
Deprecated. owner id should be required when attempting to get possible values

This will return a RowCollection fo PossibleValues with the givin key @ pKey

Parameters:
metaDataSystemAlias - system alias where metadata is located
key - key of possible values to retrieve
orderByColumnNames - names of columns to order by
Returns:
RowCollection of possible values
Throws:
CMException

getPossibleValues

public static RowCollection getPossibleValues(java.lang.String metaDataSystemAlias,
                                              java.lang.String key,
                                              java.lang.String[] orderByColumnNames,
                                              int ownerId)
                                       throws CMException
This will return a RowCollection fo PossibleValues with the givin key @ pKey

Parameters:
metaDataSystemAlias - system alias where metadata is located
key - key of possible values to retrieve
orderByColumnNames - names of columns to order by
ownerId - id of owner to which possible values belong
Returns:
RowCollection of possible values
Throws:
CMException

getMessage

public static PossibleValueRow getMessage(java.lang.String key,
                                          Row row,
                                          ExecutingContext ec)
                                   throws CMException
Convience method that gets the current application from the current executing context.

Throws:
CMException

getMessages

public static RowCollection getMessages(java.lang.String key,
                                        Row row)
                                 throws CMException
Get messages for given key and Row.

Throws:
CMException

getMessages

public static RowCollection getMessages(java.lang.String key,
                                        java.lang.String system,
                                        java.lang.String library,
                                        java.lang.String table,
                                        Application app)
                                 throws CMException
Get messages for given key for owner of the application. If system, library, or table are provided, then messages returned will be filtered on that criteria.

Throws:
CMException

getMessage

public static PossibleValueRow getMessage(java.lang.String key)
                                   throws CMException
Get message for key.

Throws:
CMException

getMessage

public static PossibleValueRow getMessage(java.lang.String key,
                                          Application app)
                                   throws CMException
Get message for key and application.

Throws:
CMException

getMessage

public static PossibleValueRow getMessage(java.lang.String key,
                                          Row row)
                                   throws CMException
Get message for Row's system, library, table, and given key for owner of the application.

Throws:
CMException

getMessage

public static PossibleValueRow getMessage(java.lang.String key,
                                          Row row,
                                          Application app)
                                   throws CMException
Get message for Row's system, library, table, and given key for owner of the application.

Throws:
CMException

getMessage

public static PossibleValueRow getMessage(java.lang.String key,
                                          java.lang.String system,
                                          java.lang.String library,
                                          java.lang.String table,
                                          Application app)
                                   throws CMException
Get message for system, library, table, and given key for owner of the application.

Throws:
CMException

getMessageText

public static java.lang.String getMessageText(java.lang.String key,
                                              Row row)
                                       throws CMException
Get message text for the given key and row.

Throws:
CMException

getMessageText

public static java.lang.String getMessageText(java.lang.String key,
                                              Row row,
                                              ExecutingContext ec)
                                       throws CMException
Get message text for the given key and row

Throws:
CMException

getAllMessages

public static RowCollection getAllMessages(Application app)
                                    throws CMException
Get all owner messages for an owner and application

Throws:
CMException

isPVFileUsed

public static boolean isPVFileUsed()

setPVFileUsed

public static void setPVFileUsed(boolean pPVFileUsed)