com.esri.arcgis.geodatabase
Class AttributeRule

java.lang.Object
  extended bycom.esri.arcgis.geodatabase.AttributeRule
All Implemented Interfaces:
IAttributeRule, IRule, java.io.Serializable

public class AttributeRule
extends java.lang.Object
implements IRule, IAttributeRule

ESRI attribute rule object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Description

AttributeRule coclass maintains information regarding attribute rules.

See Also:
Serialized Form

Constructor Summary
AttributeRule()
          Constructs a AttributeRule using ArcGIS Engine.
AttributeRule(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compare this object with another
 IAttributeRule getAsIAttributeRule()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IRule getAsIRule()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 int getCategory()
          The name associated with the validation rule.
static java.lang.String getClsid()
           
 java.lang.String getDomainName()
          The domain name associated with the attribute rule.
 java.lang.String getFieldName()
          The field name associated with the attribute rule.
 java.lang.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(java.lang.String name)
          The domain name associated with the attribute rule.
 void setFieldName(java.lang.String name)
          The field name associated with the attribute rule.
 void setHelpstring(java.lang.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, java.lang.String[] errorMessage)
          Validates the rule.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeRule

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

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

AttributeRule

public AttributeRule(java.lang.Object obj)
              throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.

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.
AttributeRule theAttributeRule = (AttributeRule) obj;

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

getClsid

public static java.lang.String getClsid()

getAsIRule

public IRule getAsIRule()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIAttributeRule

public IAttributeRule getAsIAttributeRule()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


equals

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


hashCode

public int hashCode()
the hashcode for this object


getCategory

public int getCategory()
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IRule
The name associated with the validation rule.

Supported Platforms

Windows, Solaris, Linux

Description

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

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

setCategory

public void setCategory(int groupBitmap)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IRule
The name associated with the validation rule.

Supported Platforms

Windows, Solaris, Linux

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

getHelpstring

public java.lang.String getHelpstring()
                               throws java.io.IOException,
                                      AutomationException
Description copied from interface: IRule
The helpstring associated with the validation rule.

Supported Platforms

Windows, Solaris, Linux

Description

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

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

setHelpstring

public void setHelpstring(java.lang.String helpstring)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IRule
The helpstring associated with the validation rule.

Supported Platforms

Windows, Solaris, Linux

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

getID

public int getID()
          throws java.io.IOException,
                 AutomationException
Description copied from interface: IRule
The ID of the validation rule.

Supported Platforms

Windows, Solaris, Linux

Description

ID property returns the id for the given rule.

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

setID

public void setID(int iD)
           throws java.io.IOException,
                  AutomationException
Description copied from interface: IRule
The ID of the validation rule.

Supported Platforms

Windows, Solaris, Linux

Description

ID property sets the id for the given rule.

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

getType

public int getType()
            throws java.io.IOException,
                   AutomationException
Description copied from interface: IRule
The type associated with the validation rule.

Supported Platforms

Windows, Solaris, Linux

Description

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

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

getDomainName

public java.lang.String getDomainName()
                               throws java.io.IOException,
                                      AutomationException
Description copied from interface: IAttributeRule
The domain name associated with the attribute rule.

Supported Platforms

Windows, Solaris, Linux

Description

DomainName property returns the DomainName of the given Attribute rule.

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

setDomainName

public void setDomainName(java.lang.String name)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IAttributeRule
The domain name associated with the attribute rule.

Supported Platforms

Windows, Solaris, Linux

Description

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

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

getFieldName

public java.lang.String getFieldName()
                              throws java.io.IOException,
                                     AutomationException
Description copied from interface: IAttributeRule
The field name associated with the attribute rule.

Supported Platforms

Windows, Solaris, Linux

Description

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

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

setFieldName

public void setFieldName(java.lang.String name)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IAttributeRule
The field name associated with the attribute rule.

Supported Platforms

Windows, Solaris, Linux

Description

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

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

getSubtypeCode

public int getSubtypeCode()
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IAttributeRule
The subtype code.

Supported Platforms

Windows, Solaris, Linux

Description

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

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

setSubtypeCode

public void setSubtypeCode(int value)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IAttributeRule
The subtype code.

Supported Platforms

Windows, Solaris, Linux

Description

SubtypeCode sets the subtypecode that this rule will apply to.

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

validate

public boolean validate(IRow row,
                        java.lang.String[] errorMessage)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IAttributeRule
Validates the rule.

Supported Platforms

Windows, Solaris, Linux

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.

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:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.