public class CSTemplateAssetConstraint extends CSItem
The CSTemplateAssetConstraint
class includes methods for the
retrieval of a particular constraint's details. All such methods require that
certain database and key information (constraint ID, for example) be
specified via the set
methods provided, prior to their
invocation.
All database access/connectivity is handled internally by the
CSTemplateAsset
class.
CSTemplateAssetConstraintContent
,
CSTemplateAsset
,
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 |
---|
CSTemplateAssetConstraint()
Creates an empty
CSTemplateAssetConstraint object. |
CSTemplateAssetConstraint(java.lang.String strPropertyFile)
Creates an empty
CSTemplateAssetConstraint object,
specifying a property file that contains all of the database connection
details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSTemplateAssetConstraint . |
boolean |
exist()
Not currently implemented for
CSTemplateAssetConstraint . |
void |
get()
Retrieves the details of a constraint from the database.
|
int |
getAssetID()
Gets the ID of the asset the constraint applies to.
|
boolean |
getAutoSuggest()
Gets the auto suggest setting of the template asset constraint.
|
int |
getConstraintID()
Gets the ID of the constraint.
|
int |
getContentID()
Gets the ID of the template asset constraint's content.
|
java.lang.String |
getDescription()
Gets the description of the template asset.
|
java.lang.String |
getExtra()
Gets the extra data of the template asset constraint.
|
boolean |
getMandatory()
Gets the mandatory setting of the template asset constraint.
|
int |
getMax()
Gets the max setting of the template asset constraint.
|
int |
getMin()
Gets the min setting of the template asset constraint.
|
java.lang.String |
getName()
Gets the name of the constraint.
|
int |
getParentContentID()
Gets the ID for the parent of the template asset constraint's content.
|
boolean |
getSuggest()
Gets the suggest setting of the template asset constraint.
|
void |
setAssetID(int nAssetID)
Sets the ID of the asset the constraint applies to.
|
void |
setAutoSuggest(boolean bAutoSuggest)
Sets the auto suggest setting of the template asset constraint.
|
void |
setConstraintID(int nConstraintID)
Sets the ID of the constraint.
|
void |
setContentID(int nContentID)
Sets the ID of the template asset constraint's content.
|
void |
setDescription(java.lang.String strDescription)
Sets the description of the template asset.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setExtra(java.lang.String strExtra)
Sets the extra data of the template asset constraint.
|
void |
setMandatory(boolean bMandatory)
Sets the mandatory setting of the template asset constraint.
|
void |
setMax(int nMax)
Sets the max setting of the template asset constraint.
|
void |
setMin(int nMin)
Sets the min setting of the template asset constraint.
|
void |
setName(java.lang.String strName)
Sets the name of the constraint.
|
void |
setParentContentID(int nParentContentID)
Sets the ID for the parent of the template asset constraint's content.
|
void |
setSuggest(boolean bSuggest)
Sets the suggest setting of the template asset constraint.
|
void |
update()
Not currently implemented for
CSTemplateAssetConstraint . |
equals, getID, getStatus, hashCode, jsonString, serialiseWithTypes, setID, setStatus, toString, unset
clearRecordedGatewayMessages, clone, count, getCache, getCachingEnabled, getDatabaseVersion, getDatabaseVersion, getDebugOutput, getDetailLevel, getPreview, getPropertyFile, getPropertyFileExtension, getPropertyFilePathname, getRecordedGatewayMessages, getRecordGatewayMessages, getSendGatewayMessages, getUseCache, setDebugOutput, setPreview, setPropertyFile, setRecordGatewayMessages, setSendGatewayMessages, setUseCache
public CSTemplateAssetConstraint()
CSTemplateAssetConstraint
object.
Use the various set methods provided to initialise the
CSTemplateAssetConstraint
object prior to invoking any of
its query methods.
public CSTemplateAssetConstraint(java.lang.String strPropertyFile)
CSTemplateAssetConstraint
object,
specifying a property file that contains all of the database connection
details.
Use the various set methods provided to initialise the
CSTemplateAssetConstraint
object prior to invoking any of
its query methods.
strPropertyFile
- the name of the property file from which the database
connection details are to be read.public final void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method.
Valid detail levels for a constraint are :
LEVEL_ID
- retrieves the constraint ID and asset ID
only.LEVEL_SUMMARY
- retrieves the constraint ID, asset
ID, constraint Name and constraint Description.LEVEL_ALL
- retrieves all constraint data.setDetailLevel
in class CSDatabaseItem
nDetailLevel
- the detail level to be used.CSParameterException
- if an invalid detail level is specified.public final void setConstraintID(int nConstraintID)
setConstraintID
followed by a call to get
will populate this CSTemplateAssetConstraint
object with
that constraint's details.
nConstraintID
- the numeric identifier of the constraint.public final int getConstraintID()
public final void setAssetID(int nAssetID)
nAssetID
- the numeric identifier of the asset.public final int getAssetID()
public final java.lang.String getName()
public final void setName(java.lang.String strName)
strName
- the constraint's name.public final java.lang.String getDescription()
public final void setDescription(java.lang.String strDescription)
strDescription
- the template asset's description.public final int getParentContentID()
public final void setParentContentID(int nParentContentID)
nParentContentID
- the parent ID of the template asset constraint's content.public final int getContentID()
public final void setContentID(int nContentID)
nContentID
- the template asset constraint's content ID.public final int getMin()
public final void setMin(int nMin)
nMin
- the template asset constraint's min setting.public final int getMax()
public final void setMax(int nMax)
nMax
- the template asset constraint's max setting.public final boolean getMandatory()
public final void setMandatory(boolean bMandatory)
bMandatory
- the template asset constraint's mandatory setting.public final boolean getSuggest()
public final void setSuggest(boolean bSuggest)
bSuggest
- the template asset constraint's suggest setting.public final boolean getAutoSuggest()
public final void setAutoSuggest(boolean bAutoSuggest)
bAutoSuggest
- the template asset constraint's auto suggest setting.public final java.lang.String getExtra()
public final void setExtra(java.lang.String strExtra)
strExtra
- the template asset constraint's extra data.public final boolean exist() throws CSException
CSTemplateAssetConstraint
.
exist
in class CSItem
true
if the item exists on the database.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 items cannot be found on the
database.CSException
- the base class for exceptions thrown by this method.public final void get() throws CSException
Use setConstraintID
followed by
get
to populate this
CSTemplateAssetConstraint
instance with the details of the
constraint identified by the specified ID.
Use the setDetailLevel
method to determine
the exact information that is retrieved and stored within this
CSTemplateAssetConstraint
instance.
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 template cannot be found on the
database.CSSecurityException
- if security has been breached.CSException
- the base class for exceptions thrown by this method.public final void update() throws CSException
CSTemplateAssetConstraint
.
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 items cannot be found on the
database.CSException
- the base class for exceptions thrown by this method.public final void delete() throws CSException
CSTemplateAssetConstraint
.
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 items cannot be found on the
database.CSException
- the base class for exceptions thrown by this method.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.