ArcGIS Runtime SDK for iOS: AGSField Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSField Class Reference

Description

An object that represents information about a field.

Instances of this class represent information about each field in a layer.

Since
100
Inheritance diagram for AGSField:
AGSObject <AGSJSONSerializable>

Instance Methods

(instancetype) - initWithFieldType:name:alias:length:domain:editable:allowNull:
 
(nullable id) - toJSON:
 

Class Methods

(instancetype) + dateFieldWithName:alias:
 
(instancetype) + doubleFieldWithName:alias:
 
(instancetype) + fieldWithFieldType:name:alias:length:domain:editable:allowNull:
 
(instancetype) + floatFieldWithName:alias:
 
(nullable id< AGSJSONSerializable >) + fromJSON:error:
 
(instancetype) + longIntFieldWithName:alias:
 
(instancetype) + shortIntFieldWithName:alias:
 
(instancetype) + textFieldWithName:alias:length:
 

Properties

NSString * alias
 
BOOL allowNull
 
AGSDomaindomain
 
BOOL editable
 
NSInteger length
 
NSString * name
 
AGSFieldType type
 
NSDictionary< NSString *, id > * unknownJSON
 
NSDictionary< NSString *, id > * unsupportedJSON
 

Method Documentation

◆ dateFieldWithName:alias:

+ (instancetype) dateFieldWithName: (NSString *)  name
alias: (NSString *)  alias 

Convenience method to create a date field. The field will be editable and nullable.

Parameters
nameof the field
aliasof the field
Returns
Initialized field
Since
100

◆ doubleFieldWithName:alias:

+ (instancetype) doubleFieldWithName: (NSString *)  name
alias: (NSString *)  alias 

Convenience method to create a double field. The field will be editable and nullable.

Parameters
nameof the field
aliasof the field
Returns
Initialized field
Since
100

◆ fieldWithFieldType:name:alias:length:domain:editable:allowNull:

+ (instancetype) fieldWithFieldType: (AGSFieldType fieldType
name: (NSString *)  name
alias: (NSString *)  alias
length: (NSInteger)  length
domain: (nullable AGSDomain *)  domain
editable: (BOOL)  editable
allowNull: (BOOL)  allowNull 

Initialize the field with the provided parameters

Parameters
fieldTypespecifying the type of field
nameof the field
aliasof the field
lengthof the field (only applicable for text fields)
domainof the field, if any
editablespecifying whether the field is editable or not
allowNullspecifying whether null values are allowed for the field or not
Returns
Initialized field
Since
100

◆ floatFieldWithName:alias:

+ (instancetype) floatFieldWithName: (NSString *)  name
alias: (NSString *)  alias 

Convenience method to create a float field. The field will be editable and nullable.

Parameters
nameof the field
aliasof the field
Returns
Initialized field
Since
100

◆ fromJSON:error:

+ (nullable id<AGSJSONSerializable>) fromJSON: (id)  JSONObject
error: (NSError **)  error 
staticrequiredinherited

Initializes and returns an object from its JSON representation.

Parameters
JSONObjectNSDictionary or NSArray containing the JSON.
errorencountered during the operation, if any.
Since
100

◆ initWithFieldType:name:alias:length:domain:editable:allowNull:

- (instancetype) initWithFieldType: (AGSFieldType fieldType
name: (NSString *)  name
alias: (NSString *)  alias
length: (NSInteger)  length
domain: (nullable AGSDomain *)  domain
editable: (BOOL)  editable
allowNull: (BOOL)  allowNull 

Initialize the field with the provided parameters

Parameters
fieldTypespecifying the type of field
nameof the field
aliasof the field
lengthof the field
domainof the field, if any
editablespecifying whether the field is editable or not
allowNullspecifying whether null values are allowed for the field or not
Returns
Initialized field
Since
100

◆ longIntFieldWithName:alias:

+ (instancetype) longIntFieldWithName: (NSString *)  name
alias: (NSString *)  alias 

Convenience method to create a long field. The field will be editable and nullable.

Parameters
nameof the field
aliasof the field
Returns
Initialized field
Since
100

◆ shortIntFieldWithName:alias:

+ (instancetype) shortIntFieldWithName: (NSString *)  name
alias: (NSString *)  alias 

Convenience method to create a short field. The field will be editable and nullable.

Parameters
nameof the field
aliasof the field
Returns
Initialized field
Since
100

◆ textFieldWithName:alias:length:

+ (instancetype) textFieldWithName: (NSString *)  name
alias: (NSString *)  alias
length: (NSInteger)  length 

Convenience method to create a text field. The field will be editable and nullable.

Parameters
nameof the field
aliasof the field
lengthof the field
Returns
Initialized field
Since
100

◆ toJSON:

- (nullable id) toJSON: (NSError **)  error
requiredinherited

Returns JSON representation for this object.

Parameters
errorencountered during the operation, if any.
Returns
NSDictionary or NSArray containing the JSON.
Since
100

Reimplemented in AGSPortalItem.

Property Documentation

◆ alias

- (NSString*) alias
readnonatomiccopy

Alias name of the field. Alias name is usually more user friendly than the actual field name which may use underlying datasource naming conventions.

Since
100

◆ allowNull

- (BOOL) allowNull
readnonatomicassign

Indicates if the field can accept null values.

Since
100

◆ domain

- (AGSDomain*) domain
readnonatomicstrong

The domain limiting values to a range or a set of coded values for the field.

Since
100

◆ editable

- (BOOL) editable
readnonatomicassign

Indicates whether the field is editable.

Since
100

◆ length

- (NSInteger) length
readnonatomicassign

The field length.

Since
100

◆ name

- (NSString*) name
readnonatomiccopy

Name of the field.

Since
100

◆ type

- (AGSFieldType) type
readnonatomicassign

Type of value in the field.

Since
100

◆ unknownJSON

- (NSDictionary<NSString*,id>*) unknownJSON
readrequirednonatomiccopyinherited

A dictionary of values that was in the source JSON but was unparsed by API.

Returns
NSDictionary containing the unknown JSON.
Since
100

◆ unsupportedJSON

- (NSDictionary<NSString*,id>*) unsupportedJSON
readnonatomiccopyinherited

A dictionary of values that are supported by the REST API, but not exposed through the SDK API.

Returns
NSDictionary containing the unsupported JSON.
Since
100