|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Provides access to members that return and modify subtype information.
ISubtypes interface is a member of the ObjectClass coclass and is used to maintain information about subtypes for the object class. Subtypes can be removed, added, and retrieved using this interface. Also default subtypes and subtypecodes can be set for the object class here.
| Method Summary | |
void |
addSubtype(int subtypeCode,
java.lang.String subtypeName)
Adds the subtype to the set of associated subtypes. |
void |
deleteSubtype(int subtypeCode)
Deletes the subtype from the set of associated subtypes. |
int |
getDefaultSubtypeCode()
The default subtype associated with the class. |
java.lang.Object |
getDefaultValue(int subtypeCode,
java.lang.String fieldName)
The default value for the associated attribute. |
IDomain |
getDomain(int subtypeCode,
java.lang.String fieldName)
The domain given the subtype and field. |
int |
getSubtypeFieldIndex()
The subtype field index. |
java.lang.String |
getSubtypeFieldName()
The subtype field name. |
java.lang.String |
getSubtypeName(int subtypeCode)
The subtype name. |
IEnumSubtype |
getSubtypes()
The subtypes associated with the class. |
boolean |
isHasSubtype()
Indicates if the table has subtypes. |
void |
setDefaultSubtypeCode(int subtypeCode)
The default subtype associated with the class. |
void |
setDefaultValue(int subtypeCode,
java.lang.String fieldName,
java.lang.Object value)
The default value for the associated attribute. |
void |
setDomainByRef(int subtypeCode,
java.lang.String fieldName,
IDomain domain)
The domain given the subtype and field. |
void |
setSubtypeFieldName(java.lang.String fieldName)
The subtype field name. |
| Method Detail |
public boolean isHasSubtype()
throws java.io.IOException,
AutomationException
HasSubtype property returns a boolean value whether the given object class has subypes or not.
This property returns a boolean value indicating if the object class has subtypes defined. If there are no subtypes defined, it returns FALSE , if there are subypes defined it returns TRUE.
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public int getDefaultSubtypeCode()
throws java.io.IOException,
AutomationException
DefaultSubtypeCode property sets and returns the default subtype code for the given object class.
This property sets or returns the value of the default subtype code for the associated class.
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setDefaultSubtypeCode(int subtypeCode)
throws java.io.IOException,
AutomationException
DefaultSubtypeCode property sets the default subtype code for the given object class.
subtypeCode - The subtypeCode (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.Object getDefaultValue(int subtypeCode,
java.lang.String fieldName)
throws java.io.IOException,
AutomationException
DefaultValue property returns the default value for the given subtype.
This property return the default value for a particular field associated with a subtype. It requires the subtype code as a Long and the field name as a String . You can use the IField::Type property to determine the type of field that you are passing into the function so you will know what data type is being returned.
subtypeCode - The subtypeCode (in)fieldName - The fieldName (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setDefaultValue(int subtypeCode,
java.lang.String fieldName,
java.lang.Object value)
throws java.io.IOException,
AutomationException
DefaultValue property sets the default value for the given subtype.
This property sets the default value for a particlar field associated with a subtype. It requires the subtype code as a Long and the field name as a String.
subtypeCode - The subtypeCode (in)fieldName - The fieldName (in)value - A Variant (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IDomain getDomain(int subtypeCode,
java.lang.String fieldName)
throws java.io.IOException,
AutomationException
The Domain property returns or sets the domain given the subtype code and the fieldname of the subtype.
This property returns or sets an IDomain object associated with a particular subtype code and field. The subtype code is required as a Long and field name as a String.
subtypeCode - The subtypeCode (in)fieldName - The fieldName (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setDomainByRef(int subtypeCode,
java.lang.String fieldName,
IDomain domain)
throws java.io.IOException,
AutomationException
subtypeCode - The subtypeCode (in)fieldName - The fieldName (in)domain - A reference to a com.esri.arcgis.geodatabase.IDomain (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.String getSubtypeFieldName()
throws java.io.IOException,
AutomationException
The SubtypeFieldName property is used to either set or return string value for the field that contains the subtypes for this object class. To assign the subtype field, set SubtypeFieldName equal to the name of the field:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setSubtypeFieldName(java.lang.String fieldName)
throws java.io.IOException,
AutomationException
fieldName - The fieldName (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public int getSubtypeFieldIndex()
throws java.io.IOException,
AutomationException
SubtypeFieldIndex property returns the index of the subtype field.
This property returns the index of the field in the object class which stores the subtype codes. The field index is returned as a Long.
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.String getSubtypeName(int subtypeCode)
throws java.io.IOException,
AutomationException
SubtypeName property returns the subtype name for the subtype referred to by the parameter subtypecode.
This property returns the name of a subtype for a given subtype code for the associated object class. The subtype code is required as a Long and returns the name of the subtype as a String.
subtypeCode - The subtypeCode (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IEnumSubtype getSubtypes()
throws java.io.IOException,
AutomationException
Subtypes returns a IEnumSubtype populated with all of the subtypes for the given object class.
Every ObjectClass has a default subtype code. If the user has not explicitly specified a default subtype or a subtype field, then DefaultSubtypeCode will return a subtype code of zero. Additionally, you can query the HasSubtype property; a value of False indicates an absence of a default subtype code, True indicates the presence of a default subtype code.
If the client instead asks for the enumeration of subtypes associated with an ObjectClass and no subtype has been previously added to the ObjectClass, then the enumerator will contain a single entry with a code of zero. The subtype field index value will be –1 if a default subtype has not been previously specified. Subtypes may only be short or long integers (esriFieldTypeSmallInteger or esriFieldTypeInteger). When setting the default subtype code, if one already exists, then it will be deleted. A subtype field must have been specified prior to setting the subtype code value.
Every type of field, except for esriFieldTypeShape, may have a default value. When setting the default value (which my be assigned on a subtype basis), it will be checked against the field’s associated Domain (if one exists) for validity.
This property returns all of the subtypes for the associated object class. Subtypes returns an IEnumSubtype enumeration which you can loop through to get all of the subtypes.
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void addSubtype(int subtypeCode,
java.lang.String subtypeName)
throws java.io.IOException,
AutomationException
AddSubtype adds the subtype to the set of subtypes for the given object class with the subtype code and subtype name given.
AddSubtype will create a new subtype for the associated object class. This method requires a subtype code as a Long and a subtype name as a String. Before adding subtypes, use the ISubtypes::SubtypeFieldName property to set the subtypes field.
Once created, you can use the ISubtypes::DefaultValue property to set default values for this subtypes fields, and the ISubtypes::Domain property to assign domains to fields for the subtype.
subtypeCode - The subtypeCode (in)subtypeName - The subtypeName (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void deleteSubtype(int subtypeCode)
throws java.io.IOException,
AutomationException
DeleteSubtype takes the subtype code parameter to remove the subtype from the set of subtypes of the given object class.
DeleteSubtype will delete a subtype for the associated object class. Calling DeleteSubtype will also remove any reference to that subtype in the geodatabase.
subtypeCode - The subtypeCode (in)
java.io.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 | |||||||||