|
WebObjects 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.webobjects.eodistribution.client.EOAttribute
EOAttribute is the client-side representation of an attribute, containing the information relevant within Java Client. The corresponding server-side definition is also called EOAttribute, but exists in the package com.webobjects.eoaccess.
An EOAttribute represents a column, field, or property in a database and associates an internal name with an external name or expression by which the property is known to the database. The property an EOAttribute represents may be a meaningful value, such as a salary or a name, or it may be an arbitrary value used for identification but with no real-world applicability (ID numbers and foreign keys for relationships fall into this category). An EOAttribute also maintains type information for binding values to the instance variables of objects.
You usually define attributes in the EOModel with the EOModeler application. Your code probably won't need to interact programmatically with EOAttribute unless you are working at the adaptor level.
Inner classes inherited from class com.webobjects.foundation.NSCoding |
NSCoding.Support |
Constructor Summary | |
EOAttribute()
The constructor for EOAttribute. |
Method Summary | |
boolean |
allowsNull()
Returns whether this attribute allows null values. |
Class |
classForCoder()
Returns the class that will be used by NSCoders to later re-create this object. |
static Object |
decodeObject(NSCoder coder)
Decodes (re-creates) an EOAttribute from the information in the given coder . |
void |
encodeWithCoder(NSCoder coder)
Encodes the information defining this EOAttribute into the given coder . |
String |
name()
Returns the name of the attribute (within the model, not necessarily the same as on the database). |
String |
toString()
Returns a readable String representation of this attribute's definitions. |
Object |
validateValue(Object value)
Validates value by attempting to convert it to the attribute's
value type and testing other attribute validation constraints (such as
allowsNull , width , and so on). |
String |
valueClassName()
Returns the name of the class which values of this attribute have, or null if no class is specified. |
int |
width()
Returns the maximum length (in characters or bytes) for values that are mapped to this attribute. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public EOAttribute()
Method Detail |
public boolean allowsNull()
true
if this attribute allows null values; false
otherwisepublic Class classForCoder()
classForCoder
in interface NSCoding
public static Object decodeObject(NSCoder coder)
coder
.public void encodeWithCoder(NSCoder coder)
coder
.encodeWithCoder
in interface NSCoding
coder
- the NSCoder to be used for encodingpublic String name()
public String toString()
toString
in class Object
public Object validateValue(Object value) throws NSValidation.ValidationException
value
by attempting to convert it to the attribute's
value type and testing other attribute validation constraints (such as
allowsNull
, width
, and so on). Throws an exception
if any errors occur during validation. On success, if no conversion was
performed, returns null
; if the validation process required
coercion, the converted value is returned.value
- the object to be validatedvalue
, the converted value, or null
NSValidation.ValidationException
- if validation failspublic String valueClassName()
null
if no class is specified.public int width()
#setWidth(int)
|
Last updated Fri Feb 21 13:15:00 PST 2003. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |