|
Primavera Integration API 8.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.primavera.common.value.ObjectId
public class ObjectId
This value type is used as the primary key of a business object. It may contain one or more key values, usually Integers. Business objects that have multi-part object ids include ActivityCodeAssignment, ActivityPeriodActual, ProjectCodeAssignment, ProjectResourceQuantity, ResourceAccess, ResourceAssignmentPeriodActual, ResourceCodeAssignment, ResourceRole, ScheduleOptions, Timesheet, UDFValue, and UserOBS. Note that for ProjectResourceQuantity, the keys consist of an Integer and two Dates.
Field Summary | |
---|---|
static ObjectId |
SECURITY_OVERRIDE_WBSCONTEXT_ID
|
static ObjectId |
USESSION_OVERRIDE_ID
|
Constructor Summary | |
---|---|
ObjectId()
Constructs an empty ObjectId object. |
|
ObjectId(Collection<?> p_pkVals)
Constructs an ObjectId object with the given Collection of Objects. |
|
ObjectId(Date dtId1,
Date dtId2)
Constructs an ObjectId object with two date values. |
|
ObjectId(int id)
Constructs an ObjectId object with a given key value. |
|
ObjectId(int[] iaPKVals)
Constructs an ObjectId object with up to two given key values. |
|
ObjectId(int iId1,
int iId2)
Constructs an ObjectId object with two int values. |
|
ObjectId(Number id)
Constructs an ObjectId object with a given key value. |
|
ObjectId(Object[] p_pkVals)
Constructs an ObjectId object with the given array of Objects. |
Method Summary | |
---|---|
void |
addPrimaryKeyObject(Object p_obj)
Adds an object that represents a primary key data type to this object. |
int |
compareTo(ObjectId id)
Compares two ObjectId objects. |
boolean |
equals(Object object)
Compares this ObjectId to the specified object. |
static ObjectId |
fromString(String sId)
Creates an ObjectId from a String. |
Integer |
getPrimaryKeyObject()
Gets the Integer represented by this object. |
List<Object> |
getPrimaryKeyObjects()
Gets the key values represented by this object. |
int |
getPrimaryKeyValue()
Gets the key value represented by this object. |
int |
hashCode()
Gets a hashcode used when ObjectIds are stored in hashtables, etc. |
boolean |
isMultiPartKey()
Determines if this ObjectId object contains multiple key values. |
void |
readExternal(ObjectInput ois)
Implementation of the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
Integer |
toInteger()
Returns an Integer representation of the object. |
String |
toString()
Returns a string representation of the object. |
void |
writeExternal(ObjectOutput oos)
Implementation of the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ObjectId SECURITY_OVERRIDE_WBSCONTEXT_ID
public static final ObjectId USESSION_OVERRIDE_ID
Constructor Detail |
---|
public ObjectId()
ObjectId
object. Must use the addPrimaryKeyObject() method
to populate
public ObjectId(int[] iaPKVals)
ObjectId
object with up to two given key values.
iaPKVals
- the array of key values.public ObjectId(Object[] p_pkVals)
ObjectId
object with the given array of Objects.
p_pkVals
- the Object array holding primary key objectspublic ObjectId(Collection<?> p_pkVals)
ObjectId
object with the given Collection of Objects.
p_pkVals
- the Collection holding the primary key objectspublic ObjectId(int iId1, int iId2)
ObjectId
object with two int values.
iId1
- the first key value.iId2
- the second key value.public ObjectId(Date dtId1, Date dtId2)
ObjectId
object with two date values.
dtId1
- the first key value.dtId2
- the second key value.public ObjectId(int id)
ObjectId
object with a given key value.
id
- the key value.public ObjectId(Number id)
ObjectId
object with a given key value.
id
- the key value.Method Detail |
---|
public void addPrimaryKeyObject(Object p_obj)
p_obj
- the object representing the primary keypublic static ObjectId fromString(String sId)
ObjectId
from a String.
sId
- String to be converted
ObjectId
if the string was valid, otherwise returns nullpublic List<Object> getPrimaryKeyObjects()
public int getPrimaryKeyValue() throws MultipartObjectIdException
MultipartObjectIdException
- if this object contains more than one key valuepublic Integer getPrimaryKeyObject() throws MultipartObjectIdException
MultipartObjectIdException
- if this object contains more than one key valuepublic String toString()
toString
in class Object
public Integer toInteger()
public boolean isMultiPartKey()
ObjectId
object contains multiple key values.
public boolean equals(Object object)
ObjectId
to the specified object. The result is true if and only
if the argument is not null and is an ObjectId
object that contains the same
sequence of key values.
equals
in class Object
object
- the object to compare this ObjectId
against.
public int hashCode()
hashCode
in class Object
public int compareTo(ObjectId id)
ObjectId
objects.
compareTo
in interface Comparable<ObjectId>
id
- the Object
to be compared.
0
if the argument is an ObjectId
and equal to
this ObjectId
; a value less than 0
if the argument is an
ObjectId
, and the length of its key values is greater than that of
this ObjectId
,or its key values are greater than the key values of
this ObjectId
, or if the argument is not an ObjectId
; a
value greater than 0
if the argument is an ObjectId
, and
the length of its key values is less than that of this ObjectId
,or
its key values are less than the key values of this ObjectId
.public void writeExternal(ObjectOutput oos) throws IOException
writeExternal
in interface Externalizable
oos
- the stream to write the object to
IOException
- Includes any I/O exceptions that may occurpublic void readExternal(ObjectInput ois) throws ClassNotFoundException, IOException
readExternal
in interface Externalizable
ois
- the stream to read data from in order to restore the object
IOException
- if I/O errors occur
ClassNotFoundException
- If the class for an object being
restored cannot be found.
|
Primavera Integration API 8.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |