|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ORMQueryService
Interface that defines a generic service to perform SQL queries to resolve relationships between database entities.
Implementations of this interface are responsible for abstracting the underlying JDBC and SQL requirements.
Method Summary | |
---|---|
java.util.List |
getReferenceIds(java.lang.String mapping)
Return a List of Strings that contain the names of the reference columns for the given mapping. |
java.util.List |
resolve(java.lang.String mapping)
Resolve the relationships of the named mapping. |
java.util.List |
resolve(java.lang.String mapping,
java.util.Map params)
Resolve the relationships of the named mapping and narrow the results using the provided query parameters. |
java.lang.Object |
resolve(java.lang.String mapping,
java.lang.Object key)
Resolve the relationships of a single database entity using a primary key value. |
java.util.List |
resolve(java.lang.String mapping,
PreparedQuery query,
java.lang.String postfix)
Resolve the relationships of the named mapping and narrow the results using the provided PreparedQuery instance. |
void |
setReferences(java.lang.String mapping,
java.lang.Object instance)
Set all the relationships for the given entity instance, given that the reference identifiers are available on the entity. |
void |
setReferences(java.lang.String mapping,
java.lang.Object instance,
java.lang.Object[] refIds)
Set all the relationships for the given entity instance. |
Method Detail |
---|
java.util.List resolve(java.lang.String mapping) throws DaoException
mapping
- String containing the name of the relational mapping.
DaoException
- if the mapping cannot be resolved.java.util.List resolve(java.lang.String mapping, java.util.Map params) throws DaoException
mapping
- String containing the name of the relational mapping.params
- Map instance containing query parameters.
DaoException
- if the mapping cannot be resolved.java.util.List resolve(java.lang.String mapping, PreparedQuery query, java.lang.String postfix) throws DaoException
mapping
- String containing the name of the relational mapping.query
- PreparedQuery instance containing query parameters.postfix
- An optional postfix to append to the query.
DaoException
- if the mapping cannot be resolved.java.lang.Object resolve(java.lang.String mapping, java.lang.Object key) throws DaoException
mapping
- String containing the name of the relational mapping.key
- Object instance containing the primary key of the
entity to resolve.
DaoException
- if the mapping cannot be resolved.void setReferences(java.lang.String mapping, java.lang.Object instance, java.lang.Object[] refIds) throws DaoException
mapping
- String containing the name of the relational mapping.instance
- Object instance that represents an entity with none of
it's relationships resolved.refIds
- Object array containing the identifiers of the entities
that are referenced by the entity instance.
DaoException
- if the relationships cannot resolved and applied to
the given entity instance.void setReferences(java.lang.String mapping, java.lang.Object instance) throws DaoException
mapping
- String containing the name of the relational mapping.instance
- Object instance that represents an entity with none of
it's relationships resolved.
DaoException
- if the relationships cannot resolved and applied to
the given entity instance.java.util.List getReferenceIds(java.lang.String mapping)
mapping
- String containing the name of the relational mapping.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |