MCPAttribute


Inherits From:
NSObject
Declared In:
MCPAttribute.h


Class Description

$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.


Instance Variables

NSString *name;
Class valueClass;
NSString *externalName;
NSString *externalType;
unsigned width;
BOOL allowsNull;
BOOL autoGenerated;

nameNo description.
valueClassNo description.
externalNameNo description.
externalTypeNo description.
widthNo description.
allowsNullNo description.
autoGeneratedNo description.


Method Types

Initing the attribute :
- init
- initWithName:valueClass:externalName:externalType:width:allowsNull:autoGenerated:
- initWithDictionary:
- dealloc
Accessors :
- setName:
- setValueClass:
- setExternalName:
- setExternalType:
- setWidth:
- setAllowsNull:
- setAutoGenerated:
- name
- valueClass
- externalName
- externalType
- width
- allowsNull
- autoGenerated
Temp for debugging...
- isEqualToString:

Instance Methods

allowsNull

- (BOOL)allowsNull

No method description.


autoGenerated

- (BOOL)autoGenerated

No method description.


dealloc

- (void)dealloc

Releasing the object attributes that belongs to the MCPAttribute.


externalName

- (NSString *)externalName

No method description.


externalType

- (NSString *)externalType

No method description.


init

- (id)init

Initing all instance variables to nil... pretty useless init???


initWithDictionary:

- (id)initWithDictionary:(NSDictionary *)iDictionary

Initting the MCPAttribute from a dictionary containing the porper information.


initWithName:valueClass:externalName:externalType:width:allowsNull:autoGenerated:

- (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.


isEqualToString:

- (BOOL)isEqualToString:(NSString *)iString

No method description.


name

- (NSString *)name

No method description.


setAllowsNull:

- (void)setAllowsNull:(BOOL)iAllowsNull

No method description.


setAutoGenerated:

- (void)setAutoGenerated:(BOOL)iAutoGenerated

No method description.


setExternalName:

- (void)setExternalName:(NSString *)iExternalName

No method description.


setExternalType:

- (void)setExternalType:(NSString *)iExternalType

No method description.


setName:

- (void)setName:(NSString *)iName

No method description.


setValueClass:

- (void)setValueClass:(Class)iValueClass

No method description.


setWidth:

- (void)setWidth:(unsigned)iWidth

No method description.


valueClass

- (Class)valueClass

No method description.


width

- (unsigned)width

No method description.


Version 1.4 Copyright ©2004 by Serge Cohen. All Rights Reserved. Mon Aug 09 11:00:28 2004