DAFieldDefinition

Overview

A DAFieldDefinition represents the definition of an individual field in a DADataTable. Descendant classes, such as DALookupFieldDefinition and DACalculatedFieldDefinition exist for more specialized field types, but a regular DAFieldDefinition represents a real field that is physically stored as part of the data table.

You will not usually create or deal with DAFieldDefinitions yourself, but work with fields thru the properties exposed by DADataTable and DADataTableRow. If necessary, you can query a DADataTable for a list of all defined fields via its fields property, and inspect them individually as DAFieldDefinition or subclass thereof.

Location


 

attributeType

- (NSAttributeType) attributeType

autoIncrement

- (BOOL) autoIncrement

dataType

Specifies the Data Type for the field.

@property (readonly) enum DADataType dataType

dataTypeName

Returns the readable name of the fields data type, as defined by the dataType property.

@property (readonly) NSString *dataTypeName

initWithTable:

- (InstanceType) initWithTable:(DADataTable *)ownerTable

Parameters:

  • ownerTable:

initWithTable:andSchema:

- (InstanceType) initWithTable:(DADataTable *)ownerTable andSchema:(DASchemaDataTableField *)schemaField

Parameters:

  • ownerTable:
  • schemaField:

initWithTable:name:

- (InstanceType) initWithTable:(DADataTable *)ownerTable name:(NSString *)fieldName

Parameters:

  • ownerTable:
  • fieldName:

name

Specifies the uniqe name of the field within the data table. The field can be queried by this name using KVC's valueForKey: and setValue:forKey: methods on the individual DADataTableRows.

@property (readonly) NSString *name

position

Returns the position or index of the field within the data table. This is mainly for internal use; regular field access should use the name and not rely on position.

@property (readonly) NSInteger position

predicateEditorRowTemplateForName:type:

+ (NSPredicateEditorRowTemplate *) predicateEditorRowTemplateForName:(NSString *)name type:(NSAttributeType)type

Parameters:

  • name:
  • type:

predicateEditorRowTemplates

Returns an array with one or more NSPredicateEditorRowTemplates that match the field definition, for use in an NSPredicateEditor. Usually, you will not call 'send this message' to an individual field, but use the DADataTable's defaultPredicateEditorRowTemplates method. See also Working with NSPredicateEditor (Xcode).

- (NSArray *) predicateEditorRowTemplates

predicateEditorRowTemplateStandardOperators

+ (NSArray *) predicateEditorRowTemplateStandardOperators

properties

Provides access to various properties of the field as defined in the server's Schema.

@property (readonly) NSDictionary *properties

setDataType:

- (void) setDataType:(enum DADataType)aType

Parameters:

  • aType:

setPosition:

- (void) setPosition:(NSInteger)aPosition

Parameters:

  • aPosition:

setProperty:toValue:

Updates a property stored in the properties list.

- (void) setProperty:(NSString *)propertyName toValue:(NSString *)propertyValue

Parameters:

  • propertyName: name of the property for which we want to set new value
  • propertyValue: new value we want to set.

table

Returns a reference to the DADataTable that contains this field.

@property (readonly) DADataTable *table

valueForRow:

- (id) valueForRow:(DADataTableRow *)row

Parameters:

  • row:

visible  assign

Specifies whether this field should be visible in user interfaces. This property is not used directly by the Data Abstract framework, but can be queried by user interface code to determine whether to see the field (for example in a table view or a field picker) or not. visible will be initialized based on the value set in the Schema, server-side, but can be changed within the client, if necessary.

@property (assign) BOOL visible

 

dataType

Specifies the Data Type for the field.

@property (readonly) enum DADataType dataType

dataTypeName

Returns the readable name of the fields data type, as defined by the dataType property.

@property (readonly) NSString *dataTypeName

name

Specifies the uniqe name of the field within the data table. The field can be queried by this name using KVC's valueForKey: and setValue:forKey: methods on the individual DADataTableRows.

@property (readonly) NSString *name

position

Returns the position or index of the field within the data table. This is mainly for internal use; regular field access should use the name and not rely on position.

@property (readonly) NSInteger position

properties

Provides access to various properties of the field as defined in the server's Schema.

@property (readonly) NSDictionary *properties

table

Returns a reference to the DADataTable that contains this field.

@property (readonly) DADataTable *table

visible  assign

Specifies whether this field should be visible in user interfaces. This property is not used directly by the Data Abstract framework, but can be queried by user interface code to determine whether to see the field (for example in a table view or a field picker) or not. visible will be initialized based on the value set in the Schema, server-side, but can be changed within the client, if necessary.

@property (assign) BOOL visible

 

predicateEditorRowTemplateForName:type:

+ (NSPredicateEditorRowTemplate *) predicateEditorRowTemplateForName:(NSString *)name type:(NSAttributeType)type

Parameters:

  • name:
  • type:

predicateEditorRowTemplateStandardOperators

+ (NSArray *) predicateEditorRowTemplateStandardOperators

 

attributeType

- (NSAttributeType) attributeType

autoIncrement

- (BOOL) autoIncrement

initWithTable:

- (InstanceType) initWithTable:(DADataTable *)ownerTable

Parameters:

  • ownerTable:

initWithTable:andSchema:

- (InstanceType) initWithTable:(DADataTable *)ownerTable andSchema:(DASchemaDataTableField *)schemaField

Parameters:

  • ownerTable:
  • schemaField:

initWithTable:name:

- (InstanceType) initWithTable:(DADataTable *)ownerTable name:(NSString *)fieldName

Parameters:

  • ownerTable:
  • fieldName:

predicateEditorRowTemplates

Returns an array with one or more NSPredicateEditorRowTemplates that match the field definition, for use in an NSPredicateEditor. Usually, you will not call 'send this message' to an individual field, but use the DADataTable's defaultPredicateEditorRowTemplates method. See also Working with NSPredicateEditor (Xcode).

- (NSArray *) predicateEditorRowTemplates

setDataType:

- (void) setDataType:(enum DADataType)aType

Parameters:

  • aType:

setPosition:

- (void) setPosition:(NSInteger)aPosition

Parameters:

  • aPosition:

setProperty:toValue:

Updates a property stored in the properties list.

- (void) setProperty:(NSString *)propertyName toValue:(NSString *)propertyValue

Parameters:

  • propertyName: name of the property for which we want to set new value
  • propertyValue: new value we want to set.

valueForRow:

- (id) valueForRow:(DADataTableRow *)row

Parameters:

  • row: