Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.core.model
Interface IRSEPersistableContainer

All Known Subinterfaces:
IConnectorService, IDelegatingConnectorService, IFileServiceSubSystem, IFileServiceSubSystemConfiguration, IHost, IProcessServiceSubSystem, IProcessServiceSubSystemConfiguration, IRemoteCmdSubSystem, IRemoteCmdSubSystemConfiguration, IRemoteFileSubSystem, IRemoteFileSubSystemConfiguration, IRemoteProcessSubSystem, IRemoteProcessSubSystemConfiguration, IRemoteServerLauncher, IRSEModelObject, IServerLauncherProperties, IShellServiceSubSystem, IShellServiceSubSystemConfiguration, ISubSystem, ISubSystemConfiguration, ISystemFilter, ISystemFilterContainer, ISystemFilterPool, ISystemFilterPoolManager, ISystemFilterPoolReference, ISystemFilterString, ISystemHostPool, ISystemProfile, ITerminalServiceSubSystem, ITerminalServiceSubSystemConfiguration
All Known Implementing Classes:
AbstractConnectorService, AbstractDelegatingConnectorService, AuthenticatingConnectorService, BasicConnectorService, DStoreConnectorService, DStoreFileSubSystemConfiguration, DStoreProcessSubSystemConfiguration, DStoreShellSubSystemConfiguration, DStoreWindowsFileSubSystemConfiguration, DummyHost, FileServiceSubSystem, FileServiceSubSystemConfiguration, FTPFileSubSystemConfiguration, Host, LocalFileSubSystemConfiguration, LocalProcessSubSystemConfiguration, LocalShellSubSystemConfiguration, ProcessServiceSubSystem, ProcessServiceSubSystemConfiguration, PropertyList, PropertySet, PropertySetContainer, RemoteCmdSubSystem, RemoteCmdSubSystemConfiguration, RemoteFileSubSystem, RemoteFileSubSystemConfiguration, RemoteProcessSubSystemConfiguration, RemoteProcessSubSystemImpl, RemoteServerLauncher, RSEModelObject, RSEPersistableObject, ServerLauncher, SftpFileSubSystemConfiguration, ShellProcessSubSystemConfiguration, ShellServiceSubSystem, ShellServiceSubSystemConfiguration, SshShellSubSystemConfiguration, SshTerminalSubSystemConfiguration, StandardConnectorService, SubSystem, SubSystemConfiguration, SystemFilterReference, SystemReferencedObject, SystemReferencingObject, TelnetShellSubSystemConfiguration, TerminalServiceSubSystem, TerminalServiceSubSystemConfiguration

public interface IRSEPersistableContainer

This is the interface for all objects that contain persistent data. The objects themselves may not have a persistent form, but can lie in the persistence hierarchy and be reconstructed when the persistent form is restored. An example of this is the SytemFilterPoolManager, which is itself not persisted, but has this interface since it can be reconstructed from its ordering and exists in the parent chain from SystemFilterPool to SystemProfile.


Field Summary
static  IRSEPersistableContainer[] NO_CHILDREN
          A constant indicating the presence of no children for a given container.
 
Method Summary
 boolean commit ()
          Request a persistence manager to persist this object.
  IRSEPersistableContainer[] getPersistableChildren ()
          Retrieves the children of this object in the persistence containment hierarchy.
  IRSEPersistableContainer getPersistableParent ()
          Retrieve the parent of this object in the persistence containment hierarchy.
 boolean isDirty ()
          An object is dirty if a change has been made to it that requires it to be persisted.
 boolean isTainted ()
          An object is tainted if it contains an object that is dirty somewhere in its containment hierarchy.
 void setDirty (boolean flag)
          An object is dirty if a change has been made to it that requires it to be persisted.
 void setTainted (boolean flag)
          Sets the tainted attribute for this object.
 void setWasRestored (boolean flag)
          Sets the restored state of the object.
 boolean wasRestored ()
          An object was restored if it originated from a persistent form.
 

Field Detail

NO_CHILDREN

static final 
IRSEPersistableContainer[] NO_CHILDREN
A constant indicating the presence of no children for a given container. This can be used when implementing getPersistableChildren(). The value is an empty array.

Method Detail

commit

boolean commit()
Request a persistence manager to persist this object.

Returns:
true if the object was persisted.

wasRestored

boolean wasRestored()
An object was restored if it originated from a persistent form.

Returns:
true if the object was created from its persistent form, false if the object has never been persisted.

setWasRestored

void setWasRestored(boolean flag)
Sets the restored state of the object. Only persistence managers should do this. Persistable objects should be initially created with this as false and the persistence manager set this to true. This attribute is "sticky" in the face of most property changes. It should be set false if the object is renamed or re-parented.

Parameters:
flag - true if the object was restored.

isDirty

boolean isDirty()
An object is dirty if a change has been made to it that requires it to be persisted.

Returns:
true if the object is dirty

setDirty

void setDirty(boolean flag)

An object is dirty if a change has been made to it that requires it to be persisted. Objects should usually mark themselves dirty when a persistable change is made. However, there may be a need to mark related objects dirty as well.

Persistable changes are:

  • Any modification of a persistable attribute
  • A rename
  • A deletion of a child object
  • A reordering of the list of child objects
  • The addition of a child object

A rename may also cause a parent to be marked dirty if the parent refers to the child by name.

Setting this value to false should be done only in the persistence manager after the object has been written to the DOM.

Marking an object as dirty must cause it and all of its ancestors in the persistence hierarchy to be marked as tainted.

Parameters:
flag - true if the object must be persisted.

isTainted

boolean isTainted()
An object is tainted if it contains an object that is dirty somewhere in its containment hierarchy.

Returns:
true if the object is tainted.

setTainted

void setTainted(boolean flag)
Sets the tainted attribute for this object. This should set to true only by child objects when they have been marked dirty or tainted. Setting this to true will cause all parent objects in the containment hierarchy to be marked tainted. It should be set to false only by a persistence manager when the object has been committed.

Parameters:
flag - the tainted state of the object.

getPersistableParent

IRSEPersistableContainer getPersistableParent()
Retrieve the parent of this object in the persistence containment hierarchy. This is related to, but not necessarily the same as, the model hierarchy.

Returns:
the parent persistent object. This is null if there is no parent.

getPersistableChildren

IRSEPersistableContainer[] getPersistableChildren()
Retrieves the children of this object in the persistence containment hierarchy. This is related to, but not necessarily the same as, the model hierarchy.

Returns:
the array of persistent children in the order they are to be stored in the persistent form. This is an empty array if there are no children. See NO_CHILDREN.

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire