|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.geodatabase.Row
public class Row
Esri Row object.
A Row object is an instantiated software object that represents a persistent row in a Table. A row object is normally obtained from a cursor on a table (for example, ICursor::NextRow) or fetched directly given its object ID (for example, ITable::GetRow).
Once retrieved, clients may query the row object for additional interfaces and invoke methods on the row object. The CLSID property of a Table determines the type of row object returned by the Table. A new persistent row object is created using the ITable::CreateRow method. The act of creating the row assigns it identity. Note that applications should use the CreateRow method to create new persistent row objects as opposed to directly cocreating the row objects. The latter will not create a row in the underlying persistent store.
A Row has a set of Fields. The set of Fields for a Row is the same as the set of Fields for its Table. In particular, the numeric index of a field in the Fields collection of its table is the same as the numeric index of the field in the Fields collec-tion of the row, which is the same as the numeric index used to access the value of the field from the row. This means that application programs can and should cache field numeric indexes using the FindField method on the Table object, rather than invoke the FindField method once per row returned by a Cursor.
Constructor Summary | |
---|---|
Row()
Constructs a Row using ArcGIS Engine. |
|
Row(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. Row theRow = (Row) obj; |
Method Summary | |
---|---|
void |
delete()
Deletes the row. |
void |
deleteSet(ISet rows)
Deletes the set of rows. |
boolean |
equals(Object o)
Compare this object with another |
static String |
getClsid()
getClsid. |
IFields |
getFields()
The fields Collection for this row buffer. |
IFields |
getInvalidFields()
Returns all invalid fields. |
IEnumRule |
getInvalidRules()
The set of all invalid rules. |
IEnumRule |
getInvalidRulesByField(String fieldName)
The set of all invalid rules for the specified field. |
int |
getOID()
The OID for the row. |
Object |
getOriginalValue(int index)
The value of the field at the specified index immediately after the last call to Store on the Row object. |
int |
getSubtypeCode()
The subtype for the row. |
ITable |
getTable()
The Table for the row. |
Object |
getValue(int index)
The value of the field with the specified index. |
int |
hashCode()
the hashcode for this object |
void |
initDefaultValues()
The default values of the row. |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
boolean |
isEqual(IRow otherRow)
Indicates if the rows (which may be from two different versions) are the same (oid + values). |
boolean |
isHasOID()
Indicates if the row has an OID. |
boolean |
isValueChanged(int index)
Indicates whether the value of the field at the specified index has changed since the last call to Store on the Row object. |
void |
onChanged()
An after event that is fired when a custom object is changed. |
void |
onDelete()
An after event that is fired when a custom object is deleted. |
void |
onInitialize()
An after event that is fired when a custom object is initialized. |
void |
onNew()
An after event that is fired when a custom object is Stored for the first time. |
void |
onValidate()
An after event that is fired when a custom object is validated. |
void |
relatedObjectChanged(IRelationshipClass relationshipClass,
IObject objectThatChanged)
Notifies this object that a related object changed. |
void |
relatedObjectMoved(IRelationshipClass relationshipClass,
IObject objectThatChanged,
ILine moveVector)
Notifies this object that a related object moved. |
void |
relatedObjectRotated(IRelationshipClass relationshipClass,
IObject objectThatChanged,
IPoint origin,
double angle)
Notifies this object that a related object rotated. |
void |
relatedObjectSetMoved(IRelationshipClass relationshipClass,
ISet objectsThatNeedToChange,
ISet objectsThatChanged,
ILine moveVector)
Notifies this object that a set of objects with relationships to the input set of objects moved. |
void |
relatedObjectSetRotated(IRelationshipClass relationshipClass,
ISet objectsThatNeedToChange,
ISet objectsThatChanged,
IPoint origin,
double angle)
Notifies this object that a set of objects with relationships to the input set of objects rotated. |
void |
setSubtypeCode(int subtypeCode)
The subtype for the row. |
void |
setValue(int index,
Object value)
The value of the field with the specified index. |
void |
store()
Stores the row. |
boolean |
validate(String[] errorMessage)
Validates the row. |
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 |
---|
public Row() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic Row(Object obj) throws IOException
Row theRow = (Row) obj;
obj
to Row
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public boolean isHasOID() throws IOException, AutomationException
If the table has been registered with the geodatabase it will have unique Object ID, automatically created by the register tool, and the HasOID property will be set to True. Tables not registered with the geodatabase will not have an OID column and the HasOID property will be set to False. See the IClassSchemaEdit::RegisterAsObjectClass method for more information.
isHasOID
in interface IRow
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getOID() throws IOException, AutomationException
Gets the OID for a row in a table that has a unique Object ID, such as tables registered with the geodatabase.
if (pRow.isHasOID()) {
System.out.print(pRow.getOID());
}
getOID
in interface IRow
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ITable getTable() throws IOException, AutomationException
Returns a pointer to the table the row belongs to.
ITable pTable; pTable = pRow.getTable();
getTable
in interface IRow
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void store() throws IOException, AutomationException
The Store method is called by an application once it has modified the values of a Row. Once Store is called on a Row object, all subsequent queries within the same edit session, using the Geodatabase API, will reflect the modified state of the Row object.
All edits to features that participate in a Topology or Geometric Network must be performed within an edit session and bracketed within an edit operation.
Calling the Store method triggers the following actions:
- The IRowEvents::OnChanged is called for the row being stored. The OnNew is called if this is a newly created row being stored for the first time. A custom row object can implement the OnChanged method and take some special action when it is called - for example; update a special column in the row
- The IRelatedObjectEvents::RelatedObjectChanged method is called for related objects in a related object class if the table for this row is an object class that participates in relationship classes with notification
Store should not be used for batch operations, such as updates or inserts. For performing a number of inserts or updates using cursors, refer to the ITable::Insert, ITable::Update, ITable::UpdateSearchedRows , IFeatureClass::Update andIFeatureClass::Insert. If an insert or update cursor is used on non-simple features (such as network features), the cursor will revert to using Store.
It is not necessary to explicitly call Connect on network features, this is handled polymorphically when Store is called on the feature. This is also the case with features in a Topology, Dirty Area creation is handled internally when Store is called.
Store should not be called inside of edit events, such as OnCreateFeature, OnChangeFeature or OnDeleteFeature. Even if you are modifying the geometry or other field values, Store will be called once the event is complete.
store
in interface IRow
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void delete() throws IOException, AutomationException
All edits to features that participate in a Topology or Geometric Network must be performed within an edit session and bracketed within an edit operation.
delete
in interface IRow
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getValue(int index) throws IOException, AutomationException
getValue
in interface IRowBuffer
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setValue(int index, Object value) throws IOException, AutomationException
setValue
in interface IRowBuffer
index
- The index (in)value
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFields getFields() throws IOException, AutomationException
getFields
in interface IRowBuffer
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void onChanged() throws IOException, AutomationException
The OnChanged method is called by the geodatabase when an application program calls Store on an existing Row object.
onChanged
in interface IRowEvents
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void onDelete() throws IOException, AutomationException
The OnDelete method is called by the geodatabase when an application program calls Delete on a Row object.
onDelete
in interface IRowEvents
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void onInitialize() throws IOException, AutomationException
The OnInitialize method is called by the geodatabase after hydrating a cocreated Row object with its state (its set of field values) but before handing the Row to an application program. This is an opportunity for the Row object to initialize further state and derived member variables.
onInitialize
in interface IRowEvents
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void onNew() throws IOException, AutomationException
The OnNew method is called by the geodatabase when an application program calls Store on a newly created Row object.
onNew
in interface IRowEvents
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void onValidate() throws IOException, AutomationException
onValidate
in interface IRowEvents
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSubtypeCode() throws IOException, AutomationException
When creating new objects within ArcMap, the default subtype and any default values are automatically set. When objects are created programmatically, the default subtype and default values are not automatically set. The subtype code of the feature can be specified with the SubtypeCode property.
All edits to features that participate in a Topology or Geometric Network must be performed within an edit session and bracketed within an edit operation.
getSubtypeCode
in interface IRowSubtypes
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSubtypeCode(int subtypeCode) throws IOException, AutomationException
setSubtypeCode
in interface IRowSubtypes
subtypeCode
- The subtypeCode (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void initDefaultValues() throws IOException, AutomationException
When creating new objects within ArcMap, the default subtype and any default values are automatically set. When objects are created programmatically, the default subtype and default values are not automatically set. InitDefaultValues will populate fields with the specified default values.
All edits to features that participate in a Topology or Geometric Network must be performed within an edit session and bracketed within an edit operation
initDefaultValues
in interface IRowSubtypes
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isValueChanged(int index) throws IOException, AutomationException
isValueChanged
in interface IRowChanges
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object getOriginalValue(int index) throws IOException, AutomationException
getOriginalValue
in interface IRowChanges
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isEqual(IRow otherRow) throws IOException, AutomationException
isEqual
in interface IRowCompare
otherRow
- A reference to a com.esri.arcgis.geodatabase.IRow (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteSet(ISet rows) throws IOException, AutomationException
All edits to features that participate in a Topology or Geometric Network must be performed within an edit session and bracketed within an edit operation.
deleteSet
in interface IRowEdit
rows
- A reference to a com.esri.arcgis.system.ISet (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFields getInvalidFields() throws IOException, AutomationException
getInvalidFields
in interface IValidate
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumRule getInvalidRules() throws IOException, AutomationException
The GetInvalidRules method returns an enumerator of rules that are currently violated by the row.
getInvalidRules
in interface IValidate
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumRule getInvalidRulesByField(String fieldName) throws IOException, AutomationException
The GetInvalidRulesByField method returns an enumerator of rules violated by the specified field of the row.
getInvalidRulesByField
in interface IValidate
fieldName
- The fieldName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean validate(String[] errorMessage) throws IOException, AutomationException
The Validate method indicates whether the row is violating any of its class's rules. A return value of true indicates the row is valid, while a return value of false indicates the row is violating one or more rules.
Validate on a row occurs in five steps:
The validate process stops once a row is found invalid. For example, if a network feature violates an attribute rule, the validation process stops and the feature's network connectivity rules are not evaluated until the attribute rule violation is corrected.
validate
in interface IValidate
errorMessage
- The errorMessage (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void relatedObjectChanged(IRelationshipClass relationshipClass, IObject objectThatChanged) throws IOException, AutomationException
The RelatedObjectChanged method is called when a related object has changed.
relatedObjectChanged
in interface IRelatedObjectEvents
relationshipClass
- A reference to a com.esri.arcgis.geodatabase.IRelationshipClass (in)objectThatChanged
- A reference to a com.esri.arcgis.geodatabase.IObject (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void relatedObjectMoved(IRelationshipClass relationshipClass, IObject objectThatChanged, ILine moveVector) throws IOException, AutomationException
This method is currently reserved and implementations should not define any behavior.
relatedObjectMoved
in interface IRelatedObjectEvents
relationshipClass
- A reference to a com.esri.arcgis.geodatabase.IRelationshipClass (in)objectThatChanged
- A reference to a com.esri.arcgis.geodatabase.IObject (in)moveVector
- A reference to a com.esri.arcgis.geometry.ILine (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void relatedObjectSetMoved(IRelationshipClass relationshipClass, ISet objectsThatNeedToChange, ISet objectsThatChanged, ILine moveVector) throws IOException, AutomationException
The RelatedObjectSetMoved method is called when a set of objects in the related object class has moved. The objectsThatChanged argument represents the set of objects in the related object classes that have moved.
The objectsThatNeedToChange argument is a set of objects in this object's class that are related to the objects that moved. The object executing this method will itself be a member of the objectsThatNeedToChange set.
relatedObjectSetMoved
in interface IRelatedObjectEvents
relationshipClass
- A reference to a com.esri.arcgis.geodatabase.IRelationshipClass (in)objectsThatNeedToChange
- A reference to a com.esri.arcgis.system.ISet (in)objectsThatChanged
- A reference to a com.esri.arcgis.system.ISet (in)moveVector
- A reference to a com.esri.arcgis.geometry.ILine (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void relatedObjectRotated(IRelationshipClass relationshipClass, IObject objectThatChanged, IPoint origin, double angle) throws IOException, AutomationException
This method is currently reserved and implementations should not define any behavior.
relatedObjectRotated
in interface IRelatedObjectEvents
relationshipClass
- A reference to a com.esri.arcgis.geodatabase.IRelationshipClass (in)objectThatChanged
- A reference to a com.esri.arcgis.geodatabase.IObject (in)origin
- A reference to a com.esri.arcgis.geometry.IPoint (in)angle
- The angle (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void relatedObjectSetRotated(IRelationshipClass relationshipClass, ISet objectsThatNeedToChange, ISet objectsThatChanged, IPoint origin, double angle) throws IOException, AutomationException
The RelatedObjectSetRotated method is called when a set of objects in the related object class has moved. Its arguments are similar to the arguments for RelatedObjectSetMoved.
relatedObjectSetRotated
in interface IRelatedObjectEvents
relationshipClass
- A reference to a com.esri.arcgis.geodatabase.IRelationshipClass (in)objectsThatNeedToChange
- A reference to a com.esri.arcgis.system.ISet (in)objectsThatChanged
- A reference to a com.esri.arcgis.system.ISet (in)origin
- A reference to a com.esri.arcgis.geometry.IPoint (in)angle
- The angle (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
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 |