com.polarion.platform.persistence.model.IPObject


METHODS
Modifiers and TypeNameDescription
IPrototype getPrototype()
IDataService getDataSvc() This is a convenience method, so that everyone, who has a {@link IPObject} in hand, can easily get the {@link IDataService} as well and doesn't have to do some additional work (since the {@link IPObject} has this reference anyway.
boolean isPersisted()
SubterraURI getUri()
IObjectId getObjectId() Convenience method to extract the IObjectId from the object's SubterraURI.
ILocalId getLocalId() Convenience method to get the local id
IContextId getContextId()
String getRevision() Convenience method to extract the revision from the object's SubterraURI.
String getDataRevision() Returns revision from which the data was actually read.
String getLastRevision() Returns the last revision in the History of this object. (Does not return revisions from included child objects like Work Items or Document Workflow Signatures.)
void setEnumerationValue(String,String) Sets the enumeration value of given field.

Shortcut for combination of {@link #getEnumerationOptionForField(String,String)} and {@link #setValue(String,Object)} .

IEnumOption getEnumerationOptionForField(String,String) Returns wrapped enumeration option for given field.
Optional getEnumerationTypeForField(String)
Set getIncompatibleCustomFieldsList()
ICustomField getIncompatibleCustomFieldPrototype(String)
Object getIncompatibleCustomField(String)
boolean isReadOnly() All write attempts on read-only objects will end up with exception.

Temporary objects are never read-only, even their fields, which are defined as read-only in prototype can be written to temporary objects (since they are likely needed during the creation).

boolean isModified()
IStructure createStructureForKey(String) Creates the instance of structure object, which corresponds to model definition. Use the dot notation, if the structure is under another structure (e.g. mystructure.substructure) This is a shortcut method for {@link IPrototype#createStructureForKey(String)} .
boolean isUnresolvable() This method guarantees that the object is either resolved, or unresolvable.
boolean isResolved()
void resolve() Resolves the object content if not yet resolved. (reads it from the associated {@link com.polarion.platform.persistence.IDataService} . In case the object is already resolved, calling this method does nothing.
void save() Saves the content of this object into the associated {@link com.polarion.platform.persistence.IDataService} .
void update() Reloads the content of this object from the associated {@link com.polarion.platform.persistence.IDataService} . This reverts any changes done to this object.

This method is equivalent to {@link #forget()} followed by {@link #resolve()} .

void forget() Forgets the content of this object. The underlying data are disposed, just the {@link SubterraURI} remains. This disposes any changes made to this object (if not saved before).
void copyTo(IPObject,Set,Set,boolean,Set,Set) Copies the content of this IPObject to a given IPObject.

Both objects must be of the same prototype.

New persistent objects may be created in the process.

{@link #save()} may be called on any object (this object, the destination object or any new object) during the execution of this method. However the caller must call {@link #save()} on the destination object in order to make all changes persistent.

The exact implementation is type-dependent.

IType getFieldType(String) Returns type of the field regardless if it is a built-in or custom field.
IPObjectPermissions can()
String getFieldLabel(String) Returns label of the field regardless if it is a built-in or custom field.

Back to Index