JDFieldArray Class Reference

Provides an object manager to supply get and set database requests. More...

List of all members.

Public Member Functions

(BOOL) - addGetField:withType:
(BOOL) - addSetField:withValue:withType:
(unsigned long) - size
(NSString *) - getFieldAt:
(NSObject *) - getValueAt:
(long) - getTypeAt:
(NSObject *) - getValueFor:
(void) - changeValueFor:toObject:
(NSInteger) - count

Properties

NSMutableArray * fieldNames
 array containing names of database fields
NSMutableArray * fieldValues
 array containing objects for values from the database
NSMutableArray * fieldTypes

Detailed Description

Provides an object manager to supply get and set database requests.


Member Function Documentation

- (BOOL) addGetField: (NSString *)  fieldName
withType: (enum JDDATATYPE)  dataType 

Adds a get style field to the Field array. A get style field has nothing in the value field. This type of field is what is provided to a getEntries call to the database manager

Parameters:
fieldName Name of the field in the database
dataType type of data (e.g. TEXT/INTEGER)
Returns:
True on success False on failure
- (BOOL) addSetField: (NSString *)  fieldName
withValue: (NSObject *)  value
withType: (enum JDDATATYPE)  dataType 

Adds a set style field to the Field array. A get style field has a value set value field. This type of field is what is provided to a add/setEntries call to the database manager. a getEntries call returns this a JDFieldArray with this type of set

Parameters:
fieldName Name of the field in the database
value Some object (NSString, or NSNumber) to add to associate with this field.
dataType type of data (e.g. TEXT/INTEGER)
Returns:
True on success False on failure
- (void) changeValueFor: (NSString *)  field
toObject: (NSObject *)  object 

Changes the value for a value in this field array. This has assorted uses from modifying values just pulled from the database for update and reentry or for dynamiclly updating otherwise static data. The latter case is not recommended unless you know what you're doing.

Parameters:
field Name of the field to update
object New object to replace (note, cannot change data type)
- (NSString *) getFieldAt: (unsigned long)  index  

Gets the name of a field at the given index

Parameters:
index the index to get the value at
Returns:
the string representing the field name for this index
- (long) getTypeAt: (unsigned long)  index  

Gets the type of a field at the given index

Parameters:
index the index to get the type at
Returns:
the value corresponding to the JDDATATYPE for the field at the indexed location
- (NSObject *) getValueAt: (unsigned long)  index  

Gets the value object of a field at the given index

Parameters:
(unsigned long) index the index to get the value at
Returns:
(NSObject *) the object for the value for this index
- (NSObject *) getValueFor: (NSString *)  field  

Gets the value object of a given field name

Parameters:
field the name of the field to get the value for
Returns:
the object for the value for this index
- (unsigned long) size  

The number of fields in the array.


Property Documentation

- (NSMutableArray*) fieldTypes [read, write, assign]

array containing the enumerated field types (INTEGER,TEXT e.g.)


The documentation for this class was generated from the following files:
 All Classes Functions Properties

Generated on 27 Apr 2015 for My Project by  doxygen 1.6.1