- public interface DataAbstractionFacade
Abstraction interface for various data persistence technologies.
As such this interface and its implementations are supposed to
be thin wrappers over one of the various data persistence options
(e.g. JDBC, Entity EJB, JDO etc...), not
an alternative in their own right or an implementation of
one of these technologes.
This allows UI applications to be written in a persistence impartial
manner. That may sound similar to the purpose of the Sun JDO spec,
but it is different because this toolkit is intended to be part of
an application architecture, not part of the infrastructure.
In this way it is hoped that this interface can protect application
developers from the evolution of Java technologies. As new infrastructure
technologies and optimisations become available from Sun and other
infrastructure vendors they can be 'plugged in' by implementing
The other main purpose is to allow applications to be rapidly
configured to the most appropriate persistence technology in a
declarative manner (i.e. without code changes). For example a small
web-application with direct JDBC persistence may 'scale-up' to
Entity EJB data persistence simply by configuration of the
Implementations of this interface have responsibility for encoding
the data for the appropriate data store, but are not required to
validate that data. This is the responsibility of application
business objects of generic UI services such as the Struts validator.
public boolean exists(java.lang.Object bean)
- Test if the bean exists in the configured data store.
If the bean implements
then the Persistent datastore will be queried for an entry that matches
just those properties defined by the
Otherwise every accessible property will be used in the query.
public java.lang.Object create(java.lang.Object bean)
public java.lang.Object modify(java.lang.Object bean)
public java.lang.Object remove(java.lang.Object bean)
public java.lang.Object load(java.lang.Object bean)