public final class CSAttributeType extends CSItem
The CSAttributeType
class includes methods for the retrieval of a particular attribute type's details.
All such methods require that certain database and key information (attribute type ID, for example) be specified via
the set
methods provided, prior to their invocation.
All database access/connectivity is handled internally by the CSAttributeType
class.
ACCESS_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 |
---|
CSAttributeType()
Creates an empty
CSAttributeType object. |
CSAttributeType(CSAttributeType objItem)
Creates an empty
CSAttributeType object, and initialises it from the contents of the supplied
CSItem object. |
CSAttributeType(java.lang.String strPropertyFile)
Creates a new
CSAttributeType , specifying a property file that contains all of the database
connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSAttributeType . |
boolean |
exist()
Determines whether an attribute type exists on the database.
|
void |
get()
Retrieves the details of an attribute type from the database.
|
int |
getAttributeTypeID()
Gets the ID of the attribute type to be used as key information.
|
java.lang.String |
getDescription()
Gets the description of the attribute type.
|
int |
getDisplayOrder()
Gets the display order of the attribute type.
|
java.lang.String |
getName()
Gets the name of the attribute type to be used as key information.
|
void |
setAttributeTypeID(int nAttributeTypeID)
Sets the attribute type ID to be used as key information.
|
void |
setDescription(java.lang.String strDescription)
Sets the description of the attribute type.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setDisplayOrder(int nDisplayOrder)
Sets the display order of the attribute type.
|
void |
setName(java.lang.String strName)
Sets the name of the attribute type to be used as key information.
|
void |
update()
Not currently implemented for
CSAttributeType . |
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 CSAttributeType()
CSAttributeType
object.
Use the various set methods provided to initialise the CSAttributeType
object prior to invoking
any of its query methods.
public CSAttributeType(CSAttributeType objItem)
CSAttributeType
object, and initialises it from the contents of the supplied
CSItem object.
objItem
- the CSAttributeType
object to be used to initialise the new onepublic CSAttributeType(java.lang.String strPropertyFile)
CSAttributeType
, specifying a property file that contains all of the database
connection details.
Use the various set methods provided to initialise the CSAttributeType
object prior to invoking
any of its query methods.
strPropertyFile
- the property file that contains the connection details.public int getAttributeTypeID()
public void setAttributeTypeID(int nAttributeTypeID)
setAttributeTypeID
followed by a call to get
will return details of the attribute
type with the specified ID.
nAttributeTypeID
- the attribute type's ID to be used as key information.public java.lang.String getName()
public void setName(java.lang.String strName)
setName
followed by a call to get
will return details of the attribute type with
the specified name and group.
strName
- the attribute type's name to be used as key information.public java.lang.String getDescription()
public void setDescription(java.lang.String strDescription)
strDescription
- the attribute type's description.public int getDisplayOrder()
public void setDisplayOrder(int nDisplayOrder)
nDisplayOrder
- the attribute type's display order.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method. Default is LEVEL_ALL.
Valid detail levels for an attribute type are :
LEVEL_ID
Retrieves AttributeTypeID only.LEVEL_SUMMARY
Retrieves Name.LEVEL_ALL
Retrieves all attribute data.setDetailLevel
in class CSDatabaseItem
nDetailLevel
- the detail level to be used.CSParameterException
- if an invalid detail level is specified.public boolean exist() throws CSException
Use setAttributeTypeID
followed by exist
to ascertain if there is
an attribute type with the specified ID on the database.
Use setName
followed by exist
to ascertain if there is an attribute type
with the specified name on the database.
exist
in class CSItem
true
if this attribute type exists on the database.CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSSecurityException
- if security has been breached.CSException
- the base class for exceptions thrown by this method.public void get() throws CSException
If it is not necessary to retrieve all the details of the attribute type then specify the amount of detail
required using the setDetailLevel
method before calling this method.
Use setAttributeTypeID
followed by get
to populate this
CSAttributeType
object with the details of the attribute type identified by the specified ID.
Use setName
followed by get
to populate this CSAttributeType
object with the details of the attribute type identified by the specified name.
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 type cannot be found on the database.CSSecurityException
- if security has been breached.CSException
- the base class for exceptions thrown by this method.public void update() throws CSException
CSAttributeType
.
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 attribute types cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSAttributeType
.
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 attribute types cannot be found on the database.CSException
- the base class for exceptions thrown by this method.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.