public class CSApplicationVar extends CSItem
The CSApplicationVar
class includes methods for the retrieval of a particular link's details.
Specify the name of the application variable via setName(String)
. Application variable names are case insensitive.
All database access/connectivity is handled internally by the CSApplicationVar
class.
CSApplicationVarContent
,
Serialized FormACCESS_GRANTED, DOES_NOT_EXIST, EMPTY, EXISTS, SECURE_ACCESS_DENIED, SECURE_ACCESS_GRANTED, UPDATE_ACTION_INSERTED, UPDATE_ACTION_UPDATED
LEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSApplicationVar()
Creates an empty
CSApplicationVar object. |
CSApplicationVar(java.lang.String strPropertyFile)
Creates a new
CSApplicationVar object, specifying a property file that contains all of the required database
connection details. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates a duplicate of this
CSDatabaseItem object. |
void |
delete()
Not supported.
|
boolean |
exist()
Not currently supported.
|
void |
get()
Given an application variable name via (
setName(String) ), supports resolving that to an
application variable value getValue() at a detail level of CSDatabaseItem.LEVEL_ID . |
java.lang.String |
getName()
Gets the application variable name currently specified as key information.
|
java.lang.Object |
getValue()
Gets the Application Var value
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setName(java.lang.String name)
Sets the application variable name currently specified as key information.
|
void |
setValue(java.lang.Object value)
Sets the Application Var value.
|
java.lang.String |
toString()
Provides debug information on the contents of the
CSApplicationVar object. |
void |
update()
Not supported.
|
equals, getID, getStatus, hashCode, jsonString, serialiseWithTypes, setID, setStatus, unset
clearRecordedGatewayMessages, count, getCache, getCachingEnabled, getDatabaseVersion, getDatabaseVersion, getDebugOutput, getDetailLevel, getPreview, getPropertyFile, getPropertyFileExtension, getPropertyFilePathname, getRecordedGatewayMessages, getRecordGatewayMessages, getSendGatewayMessages, getUseCache, setDebugOutput, setPreview, setPropertyFile, setRecordGatewayMessages, setSendGatewayMessages, setUseCache
public CSApplicationVar()
CSApplicationVar
object.
Use the various set
methods provided to initialise the CSApplicationVar
object prior to
invoking any of its query methods.
public CSApplicationVar(java.lang.String strPropertyFile)
CSApplicationVar
object, specifying a property file that contains all of the required database
connection details.
Use the various set methods provided to initialise the CSApplicationVar
object prior to invoking any of its
query manipulation methods.
strPropertyFile
- the property file that contains the connection details.public void setName(java.lang.String name)
setName
followed by a call to get
will return details of the Application Var with the
specified name.
name
- The Application Var name, to be used as key informationpublic java.lang.String getName()
public void setValue(java.lang.Object value)
value
- The Application Var name, to be used as key informationpublic java.lang.Object getValue()
public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method.
Valid detail levels for an application var are :
LEVEL_ID
Retrieves Application Var's value.
LEVEL_SUMMARY
Retrieves Application Var's value.
setDetailLevel
in class CSDatabaseItem
nDetailLevel
- the detail level to be used.CSParameterException
- if an invalid detail level is specified.public boolean exist() throws CSException
get()
to check if it exists and if it has a value in one method call.
exist
in class CSItem
true
if the item exists on the database.CSDatabaseException
- if there are problems accessing the database.CSParameterException
- if an invalid combination of parameters (key values) have been specified via the set
methods.CSException
- the base class for exceptions thrown by this method.public void get() throws CSException
setName(String)
), supports resolving that to an
application variable value getValue()
at a detail level of CSDatabaseItem.LEVEL_ID
.get
in class CSItem
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if the specified attribute cannot be found on the database.CSSecurityException
- if security has been breached.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
delete
in class CSItem
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if one of the specified attributes cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void update() throws CSException
update
in class CSItem
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if one of the specified attributes cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public java.lang.Object clone() throws java.lang.CloneNotSupportedException, java.lang.OutOfMemoryError
CSDatabaseItem
CSDatabaseItem
object.
clone
in class CSDatabaseItem
CSDatabaseItem
object, distinct from, but identical in every way to the
original.java.lang.CloneNotSupportedException
- thrown if cloning is not supported/allowed.java.lang.OutOfMemoryError
- thrown if there are any problems allocating memory.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.