|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IQueryName2
Provides access to the associated query definition.
This interface extends the IQueryName interface to allow Objects in tables created from a QueryDef. The table used in the QueryDef does not need to be registered with the geodatabase in order for the table generated from the QueryDef to have Object ID's. An Object ID column is required for a table to support selections. If the QueryDef includes a geometry column, a FeatureClass is created when the name object is opened.
How the PrimaryKey and CopyLocally properties are set determines whether or not the table will have an Object ID column. The following describes the various scenarios:
IQueryName2.getPrimaryKey()
,
There are three ways in which Object ID's are assigned to a table:
Direct - The values from the primary key field are used directly as Object ID's. Here the primary key must be a single field and of integer type.
Wrapped - The primary key values are mapped to unique integer values which are used as the Object ID's. The primary key in this case is set to a list of fields (i.e. composite keys) or a single non-integer field. Two mapping tables are created in memory (Object ID-> PrimaryKey, PrimaryKey-> Object ID). If the tables are too large to fit in memory, virtual memory will be used.
Copy - No primary key is set and CopyLocally is set to True. In this case, the table is copied into the scratch workspace and an Object ID field is appended. The scratch workspace is usually under your system temp directory in a file named mx<n>.mdb.
With copy tables, the fields are renamed (A.field1-> A_field1), but the qualified name is still the alias name.
If you are working with feature classes use FeatureQueryName rather than TableQueryName.
The following diagram illustrates how the criteria described above is used to generate tables from TableQueryNames and FeatureQueryNames:
Method Summary | |
---|---|
String |
getPrimaryKey()
The primary key field names. |
boolean |
isCopyLocally()
Indicates if the data must be copied locally. |
void |
setCopyLocally(boolean copyLocally)
Indicates if the data must be copied locally. |
void |
setPrimaryKey(String fieldNames)
The primary key field names. |
Methods inherited from interface com.esri.arcgis.geodatabase.IQueryName |
---|
getQueryDef, setQueryDef |
Method Detail |
---|
void setCopyLocally(boolean copyLocally) throws IOException, AutomationException
copyLocally
- The copyLocally (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IQueryName2.getPrimaryKey()
,
IQueryName2
boolean isCopyLocally() throws IOException, AutomationException
By default, CopyLocally is set to False.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setPrimaryKey(String fieldNames) throws IOException, AutomationException
fieldNames
- The fieldNames (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getPrimaryKey() throws IOException, AutomationException
The name of the field or fields to use for assigning Object ID's to the rows in the QueryDef. Provide a comma delimited string of field names for cases where more than one field is needed to provide a unique value for each row (i.e. composite keys)
Always provide fully qualified field names.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |