com.esri.arcgis.geodatabase
Class AttributeRule

java.lang.Object
  extended by com.esri.arcgis.geodatabase.AttributeRule
All Implemented Interfaces:
IAttributeRule, IRule, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class AttributeRule
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IRule, IAttributeRule

ESRI attribute rule object.

Description

AttributeRule coclass maintains information regarding attribute rules.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
AttributeRule()
          Constructs a AttributeRule using ArcGIS Engine.
AttributeRule(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
AttributeRule theAttributeRule = (AttributeRule) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 int getCategory()
          The name associated with the validation rule.
static String getClsid()
          getClsid.
 String getDomainName()
          The domain name associated with the attribute rule.
 String getFieldName()
          The field name associated with the attribute rule.
 String getHelpstring()
          The helpstring associated with the validation rule.
 int getID()
          The ID of the validation rule.
 int getSubtypeCode()
          The subtype code.
 int getType()
          The type associated with the validation rule.
 int hashCode()
          the hashcode for this object
 void setCategory(int groupBitmap)
          The name associated with the validation rule.
 void setDomainName(String name)
          The domain name associated with the attribute rule.
 void setFieldName(String name)
          The field name associated with the attribute rule.
 void setHelpstring(String helpstring)
          The helpstring associated with the validation rule.
 void setID(int iD)
          The ID of the validation rule.
 void setSubtypeCode(int value)
          The subtype code.
 boolean validate(IRow row, String[] errorMessage)
          Validates the rule.
 
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

AttributeRule

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

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

AttributeRule

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

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

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

getCategory

public int getCategory()
                throws IOException,
                       AutomationException
The name associated with the validation rule.

Description

Category sets the name associated with the rule. Not currently used by any ArcGIS application.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCategory in interface IRule
Returns:
The groupBitmap
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCategory

public void setCategory(int groupBitmap)
                 throws IOException,
                        AutomationException
The name associated with the validation rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setCategory in interface IRule
Parameters:
groupBitmap - The groupBitmap (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHelpstring

public String getHelpstring()
                     throws IOException,
                            AutomationException
The helpstring associated with the validation rule.

Description

Helpstring property sets the helpstring for the given rule. Not currently used by any ArcGIS application.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getHelpstring in interface IRule
Returns:
The helpstring
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setHelpstring

public void setHelpstring(String helpstring)
                   throws IOException,
                          AutomationException
The helpstring associated with the validation rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setHelpstring in interface IRule
Parameters:
helpstring - The helpstring (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getID

public int getID()
          throws IOException,
                 AutomationException
The ID of the validation rule.

Description

ID property returns the id for the given rule.

Remarks

This property will always return -1 for rules in geodatabases created in versions of ArcGIS later than 9.3.1.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getID in interface IRule
Returns:
The iD
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setID

public void setID(int iD)
           throws IOException,
                  AutomationException
The ID of the validation rule.

Description

ID property sets the id for the given rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setID in interface IRule
Parameters:
iD - The iD (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getType

public int getType()
            throws IOException,
                   AutomationException
The type associated with the validation rule.

Description

Type property returns the esriRuleType enumeration type of the given rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getType in interface IRule
Returns:
A com.esri.arcgis.geodatabase.esriRuleType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDomainName

public String getDomainName()
                     throws IOException,
                            AutomationException
The domain name associated with the attribute rule.

Description

DomainName property returns the DomainName of the given Attribute rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDomainName in interface IAttributeRule
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDomainName

public void setDomainName(String name)
                   throws IOException,
                          AutomationException
The domain name associated with the attribute rule.

Description

DomainName property sets the domain name for the given attribute rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setDomainName in interface IAttributeRule
Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFieldName

public String getFieldName()
                    throws IOException,
                           AutomationException
The field name associated with the attribute rule.

Description

FieldName property returns the field name of the given attribute rule.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFieldName in interface IAttributeRule
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFieldName

public void setFieldName(String name)
                  throws IOException,
                         AutomationException
The field name associated with the attribute rule.

Description

FieldName property sets the field name that this rule is to apply to.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setFieldName in interface IAttributeRule
Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSubtypeCode

public int getSubtypeCode()
                   throws IOException,
                          AutomationException
The subtype code.

Description

SubtypeCode property retrieves the subtypecode that this rule will apply to.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSubtypeCode in interface IAttributeRule
Returns:
The value
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSubtypeCode

public void setSubtypeCode(int value)
                    throws IOException,
                           AutomationException
The subtype code.

Description

SubtypeCode sets the subtypecode that this rule will apply to.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setSubtypeCode in interface IAttributeRule
Parameters:
value - The value (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

validate

public boolean validate(IRow row,
                        String[] errorMessage)
                 throws IOException,
                        AutomationException
Validates the rule.

Description

Validate function validates a row against this attribute rule, placing an error message if any is generated in the error message string parameter. Returns a boolean TRUE if row is valid and FALSE if not.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
validate in interface IAttributeRule
Parameters:
row - A reference to a com.esri.arcgis.geodatabase.IRow (in)
errorMessage - The errorMessage (out: use single element array)
Returns:
The isValid
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.