com.esri.arcgis.datasourcesGDB
Class ScratchWorkspaceFactory

java.lang.Object
  extended by com.esri.arcgis.datasourcesGDB.ScratchWorkspaceFactory
All Implemented Interfaces:
IScratchWorkspaceFactory, IScratchWorkspaceFactory2, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class ScratchWorkspaceFactory
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IScratchWorkspaceFactory, IScratchWorkspaceFactory2

Scratch workspace factory object (singleton).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows

Singleton:

This type is a singleton.

See Also:
Serialized Form

Constructor Summary
ScratchWorkspaceFactory()
          Constructs a ScratchWorkspaceFactory using ArcGIS Engine.
ScratchWorkspaceFactory(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
ScratchWorkspaceFactory theScratchWorkspaceFactory = (ScratchWorkspaceFactory) obj;
 
Method Summary
 IWorkspace createNewScratchWorkspace()
          Creates and returns a new scratch workspace.
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 IWorkspace getCurrentScratchWorkspace()
          The current scratch workspace.
 IWorkspace getDefaultScratchWorkspace()
          The default scratch workspace.
 int hashCode()
          the hashcode for this object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

ScratchWorkspaceFactory

public ScratchWorkspaceFactory()
                        throws IOException,
                               UnknownHostException
Constructs a ScratchWorkspaceFactory using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

ScratchWorkspaceFactory

public ScratchWorkspaceFactory(Object obj)
                        throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
ScratchWorkspaceFactory theScratchWorkspaceFactory = (ScratchWorkspaceFactory) obj;

Construct a ScratchWorkspaceFactory using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to ScratchWorkspaceFactory.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getDefaultScratchWorkspace

public IWorkspace getDefaultScratchWorkspace()
                                      throws IOException,
                                             AutomationException
The default scratch workspace.

Remarks

IScratchWorkspaceFactory is used to create temporary personal geodatabases in the current user's temporary directory.

The first time IScratchWorkspaceFactory.DefaultScratchWorkspace is called, it will create a new temporary workspace and pass it back. Subsequent calls to this method will return the same workspace. When the application is closed, the default scratch workspace will be deleted.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDefaultScratchWorkspace in interface IScratchWorkspaceFactory
Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspace
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createNewScratchWorkspace

public IWorkspace createNewScratchWorkspace()
                                     throws IOException,
                                            AutomationException
Creates and returns a new scratch workspace.

Remarks

IScratchWorkspaceFactory is used to create temporary personal geodatabases in the current user's temporary directory.

Workspaces created by IScratchWorkspaceFactory.CreateNewScratchWorkspace will be automatically deleted when the last reference to them is released.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
createNewScratchWorkspace in interface IScratchWorkspaceFactory
Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspace
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentScratchWorkspace

public IWorkspace getCurrentScratchWorkspace()
                                      throws IOException,
                                             AutomationException
The current scratch workspace.

Remarks

IScratchWorkspaceFactory.CurrentScratchWorkspace will return a null value if the default scratch workspace has not been created yet, otherwise it will return the default scratch workspace.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCurrentScratchWorkspace in interface IScratchWorkspaceFactory2
Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspace
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.