public class CSObjectContent extends CSItemContent
CSObject
object.
CSObject
,
Serialized FormConstructor and Description |
---|
CSObjectContent()
Creates an empty
CSObjectContent instance. |
Modifier and Type | Method and Description |
---|---|
void |
addEmptyObjectToObjectData(java.lang.String flattenedObjectKey,
java.lang.Boolean mustExistInObjectTypeDefinition,
CSObjectDefinition definition)
Adds an empty object to the object data at the position identified by the flattenedObjectKey.
|
boolean |
equals(java.lang.Object obj)
Determines whether the data contained in this
CSObjectContent object is the same as that contained
within the one supplied. |
boolean |
existsItem(java.lang.String strObject)
States if a particular element (property) is present in the object's data structure (see
getObjectData ). |
java.lang.String |
getCreatedBy()
Gets the name of the person who created the object.
|
java.util.Date |
getDateCreated()
Gets the
Date upon which the object was created. |
java.util.Date |
getDateLastUpdated()
Gets the
Date upon which the object was last updated. |
java.lang.Object |
getItem(java.lang.String strObject)
Retrieves a stated element (property) from the object's data structure
getObjectData . |
java.lang.String |
getLabel()
Gets the object label.
|
java.lang.String |
getLastUpdatedBy()
Gets the name of the person who last updated the object.
|
java.lang.Object |
getObjectData()
Gets the object's data.
|
int |
getObjectID()
Gets the object ID.
|
java.lang.String |
getType()
Gets the object type which identifies the
CSObjectDefinition that describes the object's data. |
java.lang.String |
getUpdatedLabel()
Gets the updated object label, if any.
|
void |
setCreatedBy(java.lang.String strCreatedBy)
Sets the name of the user who created the object.
|
void |
setDateCreated(java.util.Date dDateCreated)
Sets the
Date upon which the object was first created. |
void |
setDateLastUpdated(java.util.Date dDateLastUpdated)
Sets the
Date upon which the object was last updated. |
void |
setItem(java.lang.String flattenedObjectKey,
java.lang.Object dataToSet,
java.lang.Boolean mustExistInObjectTypeDefinition,
CSObjectDefinition objectTypeDefinition)
Sets a stated element (property) in the object's data structure
getObjectData . |
void |
setLabel(java.lang.String strLabel)
Sets the object label.
|
void |
setLastUpdatedBy(java.lang.String strLastUpdatedBy)
Sets the name of the user who last updated the object.
|
void |
setObjectData(java.lang.Object objObjectData,
CSObjectDefinition definition)
Sets the object's data.
|
void |
setObjectID(int nObjectID)
Sets the object ID.
|
void |
setType(java.lang.String strType)
Sets the object type which identifies the
CSObjectDefinition that describes the object's data. |
void |
setUpdatedLabel(java.lang.String strLabel)
Sets an updated object label.
|
java.lang.String |
toString()
Outputs the contents of this
CSObjectContent object to a String object in a
user-friendly format. |
clone, getID, setID, unset
public CSObjectContent()
CSObjectContent
instance.public int getObjectID()
public void setObjectID(int nObjectID)
nObjectID
- The object identifierpublic void setLabel(java.lang.String strLabel)
setType
), this can be used to
identify the object instead of the object ID (setObjectID
).
strLabel
- The object labelpublic java.lang.String getLabel()
setType
), this can be used to
identify the object instead of the object ID (setObjectID
).
public void setUpdatedLabel(java.lang.String strLabel)
strLabel
- The object labelpublic java.lang.String getUpdatedLabel()
public void setType(java.lang.String strType)
CSObjectDefinition
that describes the object's data. Along with
the object's label (setLabel
), this can be used to identify the object instead of the
object ID (setObjectID
).
strType
- The object typepublic java.lang.String getType()
CSObjectDefinition
that describes the object's data. Along with
the object's label (setLabel
), this can be used to identify the object instead of the
object ID (setObjectID
).
public void setCreatedBy(java.lang.String strCreatedBy)
strCreatedBy
- The name of the userpublic java.lang.String getCreatedBy()
getCreatedBy
.
public void setLastUpdatedBy(java.lang.String strLastUpdatedBy)
strLastUpdatedBy
- The name of the userpublic java.lang.String getLastUpdatedBy()
getLastUpdatedBy
.
public void setDateCreated(java.util.Date dDateCreated)
Date
upon which the object was first created.
dDateCreated
- The object creation datepublic java.util.Date getDateCreated()
Date
upon which the object was created.
public void setDateLastUpdated(java.util.Date dDateLastUpdated)
Date
upon which the object was last updated.
dDateLastUpdated
- The date when the object was last updated.public java.util.Date getDateLastUpdated()
Date
upon which the object was last updated.
public void setObjectData(java.lang.Object objObjectData, CSObjectDefinition definition) throws CSException
The object data supplied should comply with the structure determined by the object's Type (getType
)
and described by the corresponding CSObjectDefinition
. The preferred way of accessing the object data is
via the getItem
and #setItem(String, Object, CSObjectDefinition)
methods.
objObjectData
- A Hashtable
cast to Object
containing valid data for this type of
object.definition
- The object type definitionCSException
public java.lang.Object getObjectData()
The object data returned complies with the structure determined by this object's Type (getType
)
and described by the corresponding CSObjectDefinition
. The preferred way of accessing the object data is
via the getItem
and #setItem(String, Object, CSObjectDefinition)
methods.
Hashtable
cast to an object
.public void setItem(java.lang.String flattenedObjectKey, java.lang.Object dataToSet, java.lang.Boolean mustExistInObjectTypeDefinition, CSObjectDefinition objectTypeDefinition) throws CSParameterException
getObjectData
.flattenedObjectKey
- The name of the element to be set in the object's data structure (e.g.
CONTACTDETAILS.EMAIL
)dataToSet
- The data to be assigned to the specified elementCSParameterException
- if an invalid object was specified.public void addEmptyObjectToObjectData(java.lang.String flattenedObjectKey, java.lang.Boolean mustExistInObjectTypeDefinition, CSObjectDefinition definition) throws CSParameterException
flattenedObjectKey
- The location at which to add the empty objectmustExistInObjectTypeDefinition
- A boolean indicating if the flattenedObjectKey must exist in the object type definition for us to set the empty object.definition
- The object type definition to use the existence check.CSParameterException
public java.lang.Object getItem(java.lang.String strObject) throws CSParameterException
getObjectData
.
strObject
- The name of the element to be retrieved from the object's data structure (e.g.
billto.electronic.email
)CSParameterException
- if an invalid object was specified.public boolean existsItem(java.lang.String strObject)
getObjectData
). The object data must have been populated via the
setObjectData(Object, CSObjectDefinition)
setObjectData} method before existsItem
can be used.
strObject
- The name of the element to be searched for within the object's data structure. For example, the name
for the EMAIL
property that resides within the ELECTRONIC
property which
in turn resides within the BILLTO
property of a UserProfile
object would
be BILLTO.ELECTRONIC.EMAIL
.true
if the item exists, false
otherwisepublic boolean equals(java.lang.Object obj)
CSObjectContent
object is the same as that contained
within the one supplied. Note that the key data used for searching is not tested for equality.
equals
in class CSItemContent
obj
- The CSObjectContent
object to be tested for equalitytrue
if the data matches, false
otherwise.public java.lang.String toString()
CSObjectContent
object to a String
object in a
user-friendly format.
toString
in class CSItemContent
String
containing the user-friendly outputCopyright © 2022 Goss Interactive Ltd. All Rights Reserved.