|
WebObjects 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.webobjects.eoaccess.EOAdaptor | +--com.webobjects.jndiadaptor.JNDIAdaptor
The JNDIAdaptor
class represents a Java Naming and Directory Interface service.
Inner classes inherited from class com.webobjects.eoaccess.EOAdaptor |
EOAdaptor.Delegate |
Field Summary | |
static String |
AuthenticationMethodKey
A connection dictionary key representing the authentication method. |
static String |
DefaultScopeKey
A connection dictionary key representing the default scope. |
static String |
InitialContextFactoryKey
A connection dictionary key representing the initial context factory. |
static String |
NoneKey
A connection dictionary value representing no authentication method. |
static String |
ObjectKey
A connection dictionary value representing object scope. |
static String |
OneLevelKey
A connection dictionary value representing one-level scope. |
static String |
PasswordKey
A connection dictionary key representing the password. |
static String |
PlugInClassNameKey
A connection dictionary key representing the plug-in class name. |
static String |
ServerUrlKey
A connection dictionary key representing the server URL. |
static String |
SubtreeKey
A connection dictionary value representing subtree scope. |
static String |
TimeoutKey
A connection dictionary key representing the timeout. |
static String |
UsernameKey
A connection dictionary key representing the username. |
Constructor Summary | |
JNDIAdaptor(String name)
Creates a new instance of JNDIAdaptor . |
Method Summary | |
void |
assertConnectionDictionaryIsValid()
An abstract method that should be implemented by subclasses to verify that the adaptor can connect to the database server with its connection dictionary. |
void |
assignExternalInfoForEntireModel(EOModel model)
Assigns database-specific characteristics to model . |
EOAdaptorContext |
createAdaptorContext()
An abstract method that should be implemented by subclasses to create and return a new EOAdaptorContext, or null if a new context can't be created. |
static EOEditingContext |
createEditingContext(String modelName,
String serverUrl,
String username,
String password)
Creates a new instance of EOEditingContext with the specified model, server URL, username, and password. |
Class |
defaultExpressionClass()
An abstract method that should be implemented by subclasses to return the subclass of EOSQLExpression used as the default expression class for the adaptor. |
EOSQLExpressionFactory |
expressionFactory()
An abstract method that supports changes made to EOSQLExpression and related classes and interfaces. |
NSArray |
externalTypesWithModel(EOModel model)
The default implementation returns an empty array. |
boolean |
isDroppedConnectionException(Exception exception)
The default implementation returns false . |
boolean |
isValidQualifierType(String typeName,
EOModel model)
An abstract method that should be implemented by subclasses to return true if an attribute of type typeName
can be used in a qualifier (an SQL WHERE clause) sent to the database server,
false otherwise. |
JNDIPlugIn |
plugIn()
Gets the instance of the plug-in class name specified in the connection dictionary. |
void |
setConnectionDictionary(NSDictionary dictionary)
Sets the adaptor's connection dictionary to dictionary ,
which must only contain String, NSData, NSDictionary, and NSArray
objects. |
EOSchemaGeneration |
synchronizationFactory()
An abstract method that supports changes made to EOSQLExpression and related classes and interfaces. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String AuthenticationMethodKey
public static final String DefaultScopeKey
public static final String InitialContextFactoryKey
public static final String NoneKey
public static final String ObjectKey
public static final String OneLevelKey
public static final String PasswordKey
public static final String PlugInClassNameKey
public static final String ServerUrlKey
public static final String SubtreeKey
public static final String TimeoutKey
public static final String UsernameKey
Constructor Detail |
public JNDIAdaptor(String name)
JNDIAdaptor
.name
- - name of adaptorEOAdaptor.EOAdaptor(String)
Method Detail |
public void assertConnectionDictionaryIsValid()
EOAdaptor
An actual connection is made when the first adaptor channel
is sent an openChannel
message.
assertConnectionDictionaryIsValid
in class EOAdaptor
com.webobjects.eoaccess.EOAdaptor
EOAdaptor.setConnectionDictionary(NSDictionary dictionary)
,
EOAdaptorChannel.openChannel()
public void assignExternalInfoForEntireModel(EOModel model)
EOAdaptor
model
. Used in
EOModeler to switch a model's adaptor. This method examines each entity
in model
. If an entity's external name is not set and all of
the entity's attribute's external names are not set, then this method uses
assignExternalInfoForEntity
and
assignExternalInfoForAttribute
to assign external names. If the
entity's external name is set or if any of the entity's attributes' external
names are set, then the method doesn't assign external names to the entity
or any of its attributes. Regardless, this method assigns external types for
all the model's attributes. Recurses through entities and their attributes
calling the conversion methods above.
A subclass of EOAdaptor doesn't need to implement this method.
assignExternalInfoForEntireModel
in class EOAdaptor
com.webobjects.eoaccess.EOAdaptor
model
- The model.EOAdaptor.assignExternalInfoForEntity(EOEntity entity)
,
EOAdaptor.assignExternalInfoForAttribute(EOAttribute attribute)
public EOAdaptorContext createAdaptorContext()
EOAdaptor
null
if a new context can't be created.
A newly created EOAdaptor has no contexts.createAdaptorContext
in class EOAdaptor
com.webobjects.eoaccess.EOAdaptor
EOAdaptor.contexts()
public static EOEditingContext createEditingContext(String modelName, String serverUrl, String username, String password)
EOEditingContext
with the specified model, server URL, username, and password.modelName
- - the name of the modelserverUrl
- - the server URL of the connection dictionaryusername
- - the username of the connection dictionarypassword
- - the password of the connection dictionary-
- JNDIAdaptorException
- if modelName is null
EOEditingContext
public Class defaultExpressionClass()
EOAdaptor
defaultExpressionClass
in class EOAdaptor
com.webobjects.eoaccess.EOAdaptor
EOAdaptor.setExpressionClassName(
String sqlExpressionClassName,
String adaptorClassName)
public EOSQLExpressionFactory expressionFactory()
EOAdaptor
expressionFactory
in class EOAdaptor
com.webobjects.eoaccess.EOAdaptor
EOSQLExpression
public NSArray externalTypesWithModel(EOModel model)
EOAdaptor
model
is an optional argument that can be used to supplement
the adaptor's set of database types with additional, user-defined database
types. Refer to your adaptor's documentation to determine whether, and how,
it uses the model for type mapping.
externalTypesWithModel
in class EOAdaptor
com.webobjects.eoaccess.EOAdaptor
model
- An optional argument that can be used to supplement
the adaptor's set of database types with additional,
user-defined database types.public boolean isDroppedConnectionException(Exception exception)
EOAdaptor
false
. Subclasses
that support database reconnection should implement this method to
allow for automatic database reconnection. This method should return
true
if the exception is one that the adaptor can
attempt to recover from by reconnecting to the database,
false
otherwise.
Invoked if an exception is thrown during fetching or saving. If
the adaptor returns true
, it then attempts to reconnect
to the database and retries the operation. If the reconnection
attempt fails, the exception from the failure is thrown as usual. If
the adaptor returns false
, reconnection isn't attempted
and the exception is thrown.
isDroppedConnectionException
in class EOAdaptor
com.webobjects.eoaccess.EOAdaptor
exception
- An exception object.false
by default.EOAdaptor.handleDroppedConnection()
,
EOAdaptor.Delegate.reconnectionDictionaryForAdaptor(
EOAdaptor adaptor)
public boolean isValidQualifierType(String typeName, EOModel model)
EOAdaptor
true
if an attribute of type typeName
can be used in a qualifier (an SQL WHERE clause) sent to the database server,
false
otherwise. typeName
is the name of a type as
required by the database server. model
is an optional argument
that can be used to supplement the adaptor's set of type mappings with
additional mappings for user-defined database types.isValidQualifierType
in class EOAdaptor
com.webobjects.eoaccess.EOAdaptor
typeName
- The name of a type as determined by the database server.model
- A model.true
if an attribute of type
typeName
can be used in a qualifier.public JNDIPlugIn plugIn()
JNDIPlugIn
JNDIPlugIn
public void setConnectionDictionary(NSDictionary dictionary)
EOAdaptor
dictionary
,
which must only contain String, NSData, NSDictionary, and NSArray
objects. Connection information can not be changed while the adaptor
is connected. Throws an exception if there are any open channels
when this method is invoked.
Subclasses of EOAdaptor don't need to override this method.
A subclass that does override this method must incorporate the
superclass's version by calling super
.
setConnectionDictionary
in class EOAdaptor
com.webobjects.eoaccess.EOAdaptor
dictionary
- The adaptor's connection dictionary.IllegalArgumentException
- if there are any
open channels when this method is called.EOAdaptor.connectionDictionary()
,
EOAdaptor.hasOpenChannels()
,
EOAdaptor.assertConnectionDictionaryIsValid()
public EOSchemaGeneration synchronizationFactory()
EOAdaptor
synchronizationFactory
in class EOAdaptor
com.webobjects.eoaccess.EOAdaptor
EOSQLExpression
|
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 |