- Inherits From:
- NSObject
- Declared In:
- MCPAttribute.h
$Id: MCPConnection.m,v 1.4 2004/05/14 11:16:04 sergecohen Exp $
$Author: $
This class holds the model information for the mapping of a class attribute to a column of the corresponding table.
The information held by a MCPAttribute object is : -# Name of the attribute. -name- -# Name of the column (DB Table). -valueClassName- -# Class type used for the attribute (Class). -columnName- -# Type used in the database. -externalType- -# The width of the column (as defined for the DB). -width- or -precision- -# Is the column can be assigned NULL. -allowsNull- (a NSString with Y) -# Is the value of the column is auto-generated by the database at insert/update. -autoGenerated-
All this information is generated from a dictionary containing the key/value pairs: - name : (NSString*) the name of the attribute. - valueClassName : (NSString*) the name of the class used for this attribute. - columnName : (NSString*) the name of the correpsonding column in the table. - externalType : (NSString*) the name of the type used in the database. - precision or width : (NSNumber*) the width of the field in the database. - allowsNull : (NSString*) "Y" if the DB field allow NULL values. - autoGenerated : (NSString*) "Y" if the DB field is auto generated at insert/update time.
NSString *name;
Class valueClass;
NSString *externalName;
NSString *externalType;
unsigned width;
BOOL allowsNull;
BOOL autoGenerated;
name No description. valueClass No description. externalName No description. externalType No description. width No description. allowsNull No description. autoGenerated No description.
Initing the attribute :Accessors :
- - init
- - initWithName:valueClass:externalName:externalType:width:allowsNull:autoGenerated:
- - initWithDictionary:
- - dealloc
Temp for debugging...
- - setName:
- - setValueClass:
- - setExternalName:
- - setExternalType:
- - setWidth:
- - setAllowsNull:
- - setAutoGenerated:
- - name
- - valueClass
- - externalName
- - externalType
- - width
- - allowsNull
- - autoGenerated
- - isEqualToString:
- (BOOL)allowsNull
No method description.
- (BOOL)autoGenerated
No method description.
- (void)dealloc
Releasing the object attributes that belongs to the MCPAttribute.
- (NSString *)externalName
No method description.
- (NSString *)externalType
No method description.
- (id)init
Initing all instance variables to nil... pretty useless init???
- (id)initWithDictionary:(NSDictionary *)iDictionary
Initting the MCPAttribute from a dictionary containing the porper information.
- (id)initWithName:(NSString *)iName valueClass:(Class)iValueClass externalName:(NSString *)iExternalName externalType:(NSString *)iExternalType width:(unsigned)iWidth allowsNull:(BOOL)iAllowsNull autoGenerated:(BOOL)iAutoGenerated
The designated initializer for the MCPAttribute class.
- (BOOL)isEqualToString:(NSString *)iString
No method description.
- (NSString *)name
No method description.
- (void)setAllowsNull:(BOOL)iAllowsNull
No method description.
- (void)setAutoGenerated:(BOOL)iAutoGenerated
No method description.
- (void)setExternalName:(NSString *)iExternalName
No method description.
- (void)setExternalType:(NSString *)iExternalType
No method description.
- (void)setName:(NSString *)iName
No method description.
- (void)setValueClass:(Class)iValueClass
No method description.
- (void)setWidth:(unsigned)iWidth
No method description.
- (Class)valueClass
No method description.
- (unsigned)width
No method description.