|
Primavera Integration API 7.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(java.util.Collection<?> p_pkVals)
Constructs an ObjectId object with the given Collection of Objects. |
|
ObjectId(java.sql.Date dtId1,
java.sql.Date dtId2)
Constructs an ObjectId object with two int 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(java.lang.Number id)
Constructs an ObjectId object with a given key value. |
|
ObjectId(java.lang.Object[] p_pkVals)
Constructs an ObjectId object with the given array of Objects. |
Method Summary | |
---|---|
void |
addPrimaryKeyObject(java.lang.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(java.lang.Object object)
Compares this ObjectId to the specified object. |
static ObjectId |
fromString(java.lang.String sId)
Creates an ObjectId from a String. |
java.lang.Integer |
getPrimaryKeyObject()
Gets the Integer represented by this object. |
java.util.List<java.lang.Object> |
getPrimaryKeyObjects()
Gets the key values represented by this object. |
int |
getPrimaryKeyValue()
Gets the key value represented by this object. |
int[] |
getPrimaryKeyValues()
Deprecated. As of release 5.0, use getPrimaryKeyObjects() to retrieve the key values. |
int |
hashCode()
Gets a hashcode used when ObjectIds are stored in hashtables, etc. |
java.lang.Long |
hashCodeDates()
Deprecated. do not use - it will be removed in the next release |
java.lang.Integer |
hashCodeInt()
Deprecated. do not use - it will be removed in the next release |
java.lang.Long |
hashCodeLong()
Deprecated. do not use - it will be removed in the next release |
boolean |
isMultiPartKey()
Determines if this ObjectId object contains multiple key values. |
java.lang.Integer |
toInteger()
Returns an Integer representation of the object. |
java.lang.String |
toString()
Returns a string representation of the object. |
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(java.lang.Object[] p_pkVals)
ObjectId
object with the given array of Objects.
p_pkVals
- the Object array holding primary key objectspublic ObjectId(java.util.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(java.sql.Date dtId1, java.sql.Date dtId2)
ObjectId
object with two int 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(java.lang.Number id)
ObjectId
object with a given key value.
id
- the key value.Method Detail |
---|
public void addPrimaryKeyObject(java.lang.Object p_obj)
p_obj
- the object representing the primary keypublic static ObjectId fromString(java.lang.String sId)
ObjectId
from a String.
sId
- String to be converted
ObjectId
if the string was valid, otherwise returns null@Deprecated public int[] getPrimaryKeyValues()
getPrimaryKeyObjects()
public java.util.List<java.lang.Object> getPrimaryKeyObjects()
public int getPrimaryKeyValue() throws MultipartObjectIdException
MultipartObjectIdException
- if this object contains more than one key valuepublic java.lang.Integer getPrimaryKeyObject() throws MultipartObjectIdException
MultipartObjectIdException
- if this object contains more than one key valuepublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Integer toInteger()
public boolean isMultiPartKey()
ObjectId
object contains multiple key values.
public boolean equals(java.lang.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 java.lang.Object
object
- the object to compare this ObjectId
against.
public int hashCode()
hashCode
in class java.lang.Object
@Deprecated public java.lang.Long hashCodeLong()
@Deprecated public java.lang.Long hashCodeDates()
@Deprecated public java.lang.Integer hashCodeInt()
Integer
.
public int compareTo(ObjectId id)
ObjectId
objects.
compareTo
in interface java.lang.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
.
|
Primavera Integration API 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |