|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.dataobjects.BaseDataObject
com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject
com.jcorporate.expresso.core.dbobj.DBObject
com.jcorporate.expresso.core.dbobj.SecuredDBObject
com.jcorporate.expresso.services.dbobj.Setup
Copyright 1999, 2000, 2001 Jcorporate Ltd.
Setup is a generic configuration/setup value table. Each schema can define a number of default setup values that are created when the schema is initialized. The user can then customize these values.
| Nested Class Summary |
| Nested classes inherited from class com.jcorporate.expresso.core.dbobj.DBObject |
DBObject.FieldError, DBObject.FieldUpdate |
| Field Summary | |
static String |
CACHE_NAME
Name of the setup cache file. |
static String |
SCHEMA_CLASS
|
static String |
SETUP_CODE
|
static String |
SETUP_DESCRIP
|
static String |
SETUP_VALUE
|
| Fields inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject |
ADD, ALL_FUNCTIONS, CACHE_TTY, DELETE, SEARCH, SYSTEM_ACCOUNT, SYSTEM_ACCOUNT_NAME, UPDATE |
| Fields inherited from class com.jcorporate.expresso.core.dbobj.DBObject |
ATTRIBUTE_ERROR, ATTRIBUTE_ERROR_MESSAGE, ATTRIBUTE_PAGE_LIMIT, BIG_DECIMAL_ZERO, EMAIL_MASK, EVENT_ADD, EVENT_DELETE, EVENT_UPDATE, FLOAT_MASK, INT_MASK, IS_CHECK_RELATIONAL_INTEGRITY, UPDATE_CHANGED_ONLY, WHERE_KEYWORD |
| Fields inherited from class com.jcorporate.expresso.core.dataobjects.jdbc.JDBCDataObject |
anyFieldsDistinct, anyFieldsToRetrieve, appendCustomWhere, caseSensitiveQuery, customWhereClause, dbKey, distinctFields, localConnection, LONGBINARY_READ_DEFAULT_SIZE, maxRecords, myClassName, myUpdates, offsetRecord, recordSet, retrieveFields, sMetadataMap, sortKeys |
| Fields inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject |
currentStatus, globalMask |
| Fields inherited from interface com.jcorporate.expresso.core.dataobjects.DataObject |
STATUS_CURRENT, STATUS_DELETED, STATUS_NEW, STATUS_UPDATED |
| Constructor Summary | |
Setup()
Constructor |
|
Setup(ControllerRequest request)
For using DBObjects within Controllers. |
|
Setup(int uid)
Initializes Setup with proper user context |
|
| Method Summary | |
void |
add()
Extend add to call updatepool |
void |
delete()
Extend update to call updatepool |
boolean |
find()
Just like retrieve, but works with any fields, not just the key field. |
static String |
getValue(String dbName,
String setupCode)
Get a config value for the default schema Config values are like INI file variables or registry entries - except stored in a database. |
static String |
getValue(String dbName,
String schemaName,
String setupCode)
Get a config value for the default schema Config values are like INI file variables or registry entries - except stored in a database. |
static String |
getValueRequired(String dbName,
String setupCode)
Get a value from the configuration values. |
static String |
getValueRequired(String dbName,
String schema,
String setupCode)
Get a value from the configuration values. |
static String |
getValueUnrequired(String dbName,
String setupCode)
Get a value from the configuration values. |
static String |
getValueUnrequired(String dbName,
String schema,
String setupCode)
Get a value from the configuration values. |
static void |
readSetups()
Read the setup/config values into a hashtable for cached access |
static void |
readSetups(boolean forceRead)
|
void |
retrieve()
Extend retrieve to supply a defeult for the schemaclass field |
void |
setCode(String code)
convenience setter for code |
void |
setDescrip(String descrip)
convenience setter for description of Setup item |
void |
setSchemaClass(String schemaclassname)
convenience setter for schema class; schema is optional; if not provided, find() will default to Expresso |
static void |
setTableExists(String dbName)
DB Tool calls this when the Expresso Setup Values are finally able to be read |
protected void |
setupFields()
Method to set up the fields for this database object. |
void |
setValue(String value)
convenience setter for value |
void |
update()
Extend update to validate some setup values |
| Methods inherited from class com.jcorporate.expresso.core.dbobj.SecuredDBObject |
canRequesterAdd, canRequesterDelete, canRequesterRead, canRequesterUpdate, checkAllowed, copyAttributes, count, createSecurityCache, deleteAll, getRequestingUid, getString, getString, getString, getString, getString, getString, getSystemUid, instantiate, isAllowed, search, searchAndRetrieveList, searchAndRetrieveList, setRequestingUid |
| Methods inherited from class com.jcorporate.expresso.core.dataobjects.BaseDataObject |
getGlobalMask, getStatus, isGlobalMasked, setFieldsWithDefaults, setGlobalMask, setStatus |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String CACHE_NAME
public static final String SETUP_CODE
public static final String SETUP_DESCRIP
public static final String SETUP_VALUE
public static final String SCHEMA_CLASS
| Constructor Detail |
public Setup()
throws DBException
DBException - upon error
public Setup(int uid)
throws DBException
uid - the Owning user's uid
DBException - upon error
public Setup(ControllerRequest request)
throws DBException
request - - The controller request handed to you by the framework.
DBException - upon error| Method Detail |
public void add()
throws DBException
add in interface DataObjectadd in class SecuredDBObjectDBException - upon error
public void delete()
throws DBException
delete in interface DataObjectdelete in class SecuredDBObjectDBException - upon error
public boolean find()
throws DBException
SecuredDBObject
find in interface DataObjectfind in class SecuredDBObjectDBException - upon error
public static String getValue(String dbName,
String setupCode)
throws DBException
dbName - The data context to get the value forsetupCode - The code string of the setup code required
DBException - If the value cannot be retrieved
public static String getValue(String dbName,
String schemaName,
String setupCode)
throws DBException
dbName - The data context nameschemaName - The name of the schemasetupCode - The code string of the setup code required
DBException - If the value cannot be retrieved
public static String getValueRequired(String dbName,
String setupCode)
throws DBException
dbName - The datacontext namesetupCode - Code of the required setup value
DBException - if the value does not exist or is null
public static String getValueUnrequired(String dbName,
String setupCode)
dbName - The datacontext namesetupCode - Code of the required setup value
public static String getValueUnrequired(String dbName,
String schema,
String setupCode)
dbName - The datacontext namesetupCode - Code of the required setup valueschema - name of schema
public static String getValueRequired(String dbName,
String schema,
String setupCode)
throws DBException
dbName - The data context for the valueschema - The schema class for this setup codesetupCode - Code of the required setup value
DBException - if the value does not exist or is null
public static void readSetups(boolean forceRead)
throws DBException
forceRead - - Tries to reread the setup values even if the db tables
don't exist yet.
DBException - if there's an error reading the setups
public static void readSetups()
throws DBException
DBException - upon error
public void retrieve()
throws DBException
retrieve in class SecuredDBObjectDBException - If the retrieve failspublic static void setTableExists(String dbName)
dbName - the data context that setup tables now exist for
protected void setupFields()
throws DBException
DBObject
setupFields in class DBObjectDBException - If there is an error setting up the fields
as requested. For example, if a field allowing null is requested
as part of the keyDBObject.setupFields()
public void update()
throws DBException
update in interface DataObjectupdate in class SecuredDBObjectDBException - upon error
public void setCode(String code)
throws DBException
code - new code to set
DBException
public void setValue(String value)
throws DBException
value - new value to set
DBException
public void setDescrip(String descrip)
throws DBException
descrip - new description to set
DBException
public void setSchemaClass(String schemaclassname)
throws DBException
schemaclassname - new name to set
DBException
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||