Up
Authors
- Mirko Viviani (
mirko.viviani@gmail.com)
-
- Manuel Guesdon (
mguesdon@orange-concept.com)
-
Date: Generated at 2025-12-01
Copyright: (C)
2000-2002,2003,2004,2005 Free Software
Foundation, Inc.
- Declared in:
- EOAccess/EOAttribute.h
- Conforms to:
- EOPropertyListEncoding
Description forthcoming.
EOAttribute declares 30 Instance Variables
+ (id)
attributeWithParent: (
EOEntity*)parent
definition: (
NSString*)def;
returns an autoreleased attribute
+ (id)
attributeWithPropertyList: (
NSDictionary*)propertyList
owner: (id)owner;
returns an autoreleased attribute owned by onwer
and built from propertyList
- (BOOL)
allowsNull;
Description forthcoming.
- (
NSString*)
columnName;
Description forthcoming.
- (
NSString*)
definition;
Description forthcoming.
- (
NSString*)
docComment;
Description forthcoming.
- (
EOEntity*)
entity;
4.5 Docs say: Returns the entity that owns the
attribute, or nil if this attribute
is acting as an argument for a stored procedure. 5.x
returns the parent
- (
NSString*)
externalType;
Returns the adaptor specific name of
externalType. This is the name use during
SQL generation.
If the externalType has not been set explicitly and
the reciever
-isFlattened
, the valueClassName of the flattened attribute is
returned.
Otherwise, if the reciever has a prototype
then the externalType of the prototype is returned.
If all that fails, this method returns
nil.
- (BOOL)
isDerived;
Return NO when the attribute
corresponds to one SQL column in its entity
associated table return YES
otherwise. An attribute with a definition such
as "anotherAttributeName * 2" is derived. A Flattened
attribute is also a derived attributes.
- (BOOL)
isFlattened;
Returns YES if the attribute is
flattened, NO otherwise. A
flattened attribute is an attribute with a
definition using a relationship to another
entity. A Flattened attribute is also a derived
attribute.
- (BOOL)
isReadOnly;
Description forthcoming.
- (
NSString*)
name;
Description forthcoming.
- (id)
parent;
Description forthcoming.
- (unsigned int)
precision;
Description forthcoming.
- (
NSString*)
prototypeName;
Description forthcoming.
- (
NSString*)
readFormat;
Description forthcoming.
- (BOOL)
referencesProperty: (id)aProperty;
Returns YES if the attribute
references aProperty, NO
otherwise.
- (
NSString*)
relationshipPath;
Description forthcoming.
- (int)
scale;
Description forthcoming.
- (void)
setEntity: (
EOEntity*)entity;
Description forthcoming.
- (void)
setParent: (id)parent;
Description forthcoming.
- (
EOAttribute*)
targetAttribute;
Description forthcoming.
- (
NSString*)
valueClassName;
Returns the name of the class values of this
attribute are represented by. The standard
classes are NSNumber, NSString, NSData and NSDate
for the corresponding
-adaptorValueType
. A model can define more specific classes like
NSDecimalNumber, NSCalendarDate and
NSImage or custom classes which implement a
factory method specified by
[-valueFactoryMethodName]
to create instances with the data supplied by the data
source.
If the valueClassName has not been set explicitly and
the reciever
-isFlattened
, the valueClassName of the flattened attribute is
returned.
Otherwise, if the reciever has a prototype
then the valueClassName of the prototype is
returned.
If all that fails, this method returns
nil.
See also:[setValueClassName:]
- (
NSString*)
valueType;
Returns a one character string identifiying the
underlying C type of an NSNumber
-valueType
. The legal values in GDL2 are:
-
@"c": char
-
@"C": unsigned
char
-
@"s": short
-
@"S": unsigned
short
-
@"i": int
-
@"I": unsigned
int
-
@"l": long
-
@"L": unsigned
long
-
@"u": long long
-
@"U": unsigned
long long
-
@"f": float
-
@"d": double
If the valueType has not been set explicitly and the
reciever
-isFlattened
, the valueClassName of the flattened attribute is
returned.
Otherwise, if the reciever has a prototype
then the valueType of the prototype is returned.
If all that fails, this method returns
nil.
- (unsigned int)
width;
Description forthcoming.
- (
NSString*)
writeFormat;
Description forthcoming.
Instance Variables for EOAttribute Class
@protected SEL
_adaptorValueConversionMethod;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString*
_adaptorValueConversionMethodName;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected EOAdaptorValueType
_adaptorValueType;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected EOFactoryMethodArgumentType
_argumentType;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString*
_columnName;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected EOExpressionArray*
_definitionArray;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString*
_docComment;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString*
_externalType;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSDictionary*
_internalInfo;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString*
_name;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected EOParameterDirection
_parameterDirection;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id
_parent;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected unsigned short int
_precision;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected EOAttribute*
_prototype;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString*
_prototypeName;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString*
_readFormat;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected EOAttribute*
_realAttribute;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected short int
_scale;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSTimeZone*
_serverTimeZone;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSDictionary*
_sourceToDestinationKeyMap;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSDictionary*
_userInfo;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected Class
_valueClass;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString*
_valueClassName;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected SEL
_valueFactoryMethod;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString*
_valueFactoryMethodName;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString*
_valueType;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected unichar
_valueTypeCharacter;
First char of _valueType or \0
Warning the underscore at the start
of the name of this instance variable indicates that,
even though it is not technically private, it
is intended for internal use within the package, and you
should not use the variable in other code.
@protected unsigned int
_width;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString*
_writeFormat;
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected unsigned int
extraRefCount;
Description forthcoming.
- Declared in:
- EOAccess/EOAttribute.h
Description forthcoming.
- (id)
_normalizeDefinition: (id)definition
path: (
NSArray*)path;
Warning the underscore at the start of the
name of this method indicates that it is private, for
internal use only, and you should not use the
method in your code.
- (void)
setAllowsNull: (BOOL)allowsNull;
Description forthcoming.
- (void)
setColumnName: (
NSString*)columnName;
Description forthcoming.
- (void)
setDefinition: (
NSString*)definition;
Description forthcoming.
- (void)
setDocComment: (
NSString*)docComment;
Description forthcoming.
- (void)
setExternalType: (
NSString*)type;
Description forthcoming.
- (void)
setInternalInfo: (
NSDictionary*)dictionary;
Description forthcoming.
- (void)
setName: (
NSString*)name;
Description forthcoming.
- (void)
setPrecision: (unsigned)precision;
Description forthcoming.
- (void)
setPrototype: (
EOAttribute*)prototype;
Description forthcoming.
- (void)
setReadFormat: (
NSString*)string;
Description forthcoming.
- (void)
setReadOnly: (BOOL)yn;
Description forthcoming.
- (void)
setScale: (int)scale;
Description forthcoming.
- (void)
setUserInfo: (
NSDictionary*)dictionary;
Description forthcoming.
- (void)
setValueClassName: (
NSString*)name;
Description forthcoming.
- (void)
setValueType: (
NSString*)type;
Description forthcoming.
- (void)
setWidth: (unsigned)length;
Description forthcoming.
- (void)
setWriteFormat: (
NSString*)string;
Description forthcoming.
- Declared in:
- EOAccess/EOAttribute.h
Description forthcoming.
- (id)
adaptorValueByConvertingAttributeValue: (id)value;
Depending on
[-adaptorValueType]
this method checks whether the
value is a
NSNumber, NSString, NSData or NSDate instance
respectively. If not, it attempts to retrieve
the
-adaptorValueConversionMethod
which should be used to convert the
value
accordingly. If none has been specified and
the
-adaptorValueType
is EOAdaptorBytesType, it tries to convert the
value by invoking
-archiveData
. The EONull instance is not converted. Returns the
converted
value. Note: This
implementation currently raises if
-adaptorValueType
is of an unknown type or if conversion is necessary but
not possible. This maybe contrary to the reference
implementation but it seems like useful
behavior. If this is causing problems please
submit a bug report.
- (SEL)
adaptorValueConversionMethod;
- (
NSString*)
adaptorValueConversionMethodName;
- (
EOAdaptorValueType)
adaptorValueType;
Returns an EOAdaptorValueType describing the
adaptor (i.e. database) type of data for this
attribute.
Returned value can be:
-
EOAdaptorBytesType Raw bytes
(default type)
-
EOAdaptorNumberType Number value
(attribute valueClass is kind of NSNumber)
-
EOAdaptorCharactersType String
value (attribute valueClass is kind of NSString)
-
EOAdaptorDateType Date value
(attribute valueClass is kind of NSDate)
- (
EOFactoryMethodArgumentType)
factoryMethodArgumentType;
Returns the type of argument needed by the
factoryMethod. Type can be:
EOFactoryMethodArgumentIsNSData
method need one parameter: a NSData
EOFactoryMethodArgumentIsNSString
method need one parameter: a NSString
EOFactoryMethodArgumentIsBytes
method need 2 parameters (for data type valueClass):
a raw bytes buffer and its length or 3 parameters (for
string type valueClass): a raw bytes buffer, its
length and the encoding See also:
-valueFactoryMethod
,
-setFactoryMethodArgumentType:
- (
NSCalendarDate*)
newDateForYear: (int)year
month: (unsigned)month
day: (unsigned)day
hour: (unsigned)hour
minute: (unsigned)minute
second: (unsigned)second
millisecond: (unsigned)millisecond
timezone: (
NSTimeZone*)timezone
zone: (
NSZone*)zone;
Returns an NSCalendarDate object from the supplied
time information. The Adaptor calls this method during
value creation when fetching objects from the
database. For efficiency, the returned value is
NOT autoreleased. Milliseconds are dropped since they
cannot be easily be stored in NSCalendarDate.
- (id)
newValueForBytes: (const void*)bytes
length: (int)length;
Returns an NSData or a custom-class value object
from the supplied set of bytes. The Adaptor
calls this method during value creation when fetching
objects from the database. For efficiency, the
returned value is NOT autoreleased. NB: The
documentation of the reference implementation
mistakenly claims that it returns an NSString.
- (id)
newValueForBytes: (const void*)bytes
length: (int)length
encoding: (
NSStringEncoding)encoding;
Returns a NSString or a custom-class value object
from the supplied set of bytes using
encoding. The Adaptor calls this method
during value creation when fetching objects from the
database. For efficiency, the returned value is
NOT autoreleased.
- (SEL)
valueFactoryMethod;
- Declared in:
- EOAccess/EOAttribute.h
Description forthcoming.
- (void)
setAdaptorValueConversionMethodName: (
NSString*)conversionMethodName;
- (void)
setFactoryMethodArgumentType: (
EOFactoryMethodArgumentType)argumentType;
Set the type of argument needed by the factoryMethod.
Type can be: EOFactoryMethodArgumentIsNSData method
need one parameter: a NSData
EOFactoryMethodArgumentIsNSString
method need one parameter: a NSString
EOFactoryMethodArgumentIsBytes
method need 2 parameters (for data type valueClass):
a raw bytes buffer and its length or 3 parameters (for
string type valueClass): a raw bytes buffer, its
length and the encoding See also:
-setValueFactoryMethodName:
,
-factoryMethodArgumentType
- (void)
setValueFactoryMethodName: (
NSString*)factoryMethodName;
Set the "factory method" name (the method to invoke to
create custom class attribute value). This method
must be a class method returning an autoreleased value
of attribute valueClass. See also:
-setFactoryMethodArgumentType:
- Declared in:
- EOAccess/EOAttribute.h
Description forthcoming.
- (
NSException*)
validateValue: (id*)valueP;
Validates value pointed by valueP, may
set changed validated value in valueP and
return an validation exception if constraints
validation fails. valueP must not be
NULL. More details: 1. raise an exception if [self
allowsNull] == NO but *valueP is
nil or EONull except if attribute is a
primaryKey attribute (reason of this process
exception is currently unknown). 2. if
valueClassName isn't set, return
nil and leave *valueP unchanged 3. if
it can't find the class by name, log message, return
nil and leave *valueP unchanged 4. do
the fancy type conversions as necessary (Pretty much
the current handling we have) 5. THEN if width is not 0
call adaptorValueByConvertingAttributeValue: on the
new value and the if returned value is NSString or
NSData validate length with width and return a
corresponding exception if it's longer than
allowed.
- Declared in:
- EOAccess/EOAttribute.h
Description forthcoming.
- (void)
beautifyName;
Description forthcoming.
- Declared in:
- EOAccess/EOAttribute.h
Description forthcoming.
- (
NSTimeZone*)
serverTimeZone;
Description forthcoming.
- Declared in:
- EOAccess/EOAttribute.h
Description forthcoming.
- (void)
setServerTimeZone: (
NSTimeZone*)tz;
Description forthcoming.
- Declared in:
- EOAccess/EOAttribute.h
Description forthcoming.
+ (id)
objectWithArchiveData: (
NSData*)data;
Description forthcoming.
- (
NSData*)
archiveData;
Description forthcoming.
typedef enum ... EOAdaptorValueType;
Description forthcoming.
typedef enum ... EOFactoryMethodArgumentType;
Description forthcoming.
typedef enum ... EOParameterDirection;
Description forthcoming.
Up