📄 jdooperations.java
字号:
* It is still recommended to call this operation for enhanced adaptability.
* @param detachedEntity the detached instance to attach
* @return the corresponding persistent instance
* @see javax.jdo.PersistenceManager#makePersistent(Object)
*/
Object attachCopy(Object detachedEntity);
/**
* Reattach the given detached instances (for example, web form objects) with
* the current JDO transaction, merging their changes into the current persistence
* instances that represent the corresponding entities.
* <p>Only available on JDO 2.0+ or through a vendor-specific JdoDialect.
* Note that as of JDO 2.0 final, this operation is equivalent to a
* <code>makePersistentAll</code> call. This dedicated reattach operation
* now solely serves as distinction point for custom JdoDialects.
* It is still recommended to call this operation for enhanced adaptability.
* @param detachedEntities the detached instances to reattach
* @return the corresponding persistent instances
* @see javax.jdo.PersistenceManager#makePersistentAll(java.util.Collection)
*/
Collection attachCopyAll(Collection detachedEntities);
/**
* Flush all transactional modifications to the database.
* <p>Only invoke this for selective eager flushing, for example when JDBC code
* needs to see certain changes within the same transaction. Else, it's preferable
* to rely on auto-flushing at transaction completion.
* <p>Only available on JDO 2.0+ or through a vendor-specific JdoDialect.
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#flush()
* @see JdoDialect#flush(javax.jdo.PersistenceManager)
*/
void flush() throws DataAccessException;
//-------------------------------------------------------------------------
// Convenience finder methods
//-------------------------------------------------------------------------
/**
* Find all persistent instances of the given class.
* @param entityClass a persistent class
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(Class)
*/
Collection find(Class entityClass) throws DataAccessException;
/**
* Find all persistent instances of the given class that match the given
* JDOQL filter.
* @param entityClass a persistent class
* @param filter the JDOQL filter to match (or <code>null</code> if none)
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(Class, String)
*/
Collection find(Class entityClass, String filter) throws DataAccessException;
/**
* Find all persistent instances of the given class that match the given
* JDOQL filter, with the given result ordering.
* @param entityClass a persistent class
* @param filter the JDOQL filter to match (or <code>null</code> if none)
* @param ordering the ordering of the result (or <code>null</code> if none)
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(Class, String)
* @see javax.jdo.Query#setOrdering
*/
Collection find(Class entityClass, String filter, String ordering) throws DataAccessException;
/**
* Find all persistent instances of the given class that match the given
* JDOQL filter, using the given parameter declarations and parameter values.
* @param entityClass a persistent class
* @param filter the JDOQL filter to match
* @param parameters the JDOQL parameter declarations
* @param values the corresponding parameter values
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(Class, String)
* @see javax.jdo.Query#declareParameters
* @see javax.jdo.Query#executeWithArray
*/
Collection find(Class entityClass, String filter, String parameters, Object[] values)
throws DataAccessException;
/**
* Find all persistent instances of the given class that match the given
* JDOQL filter, using the given parameter declarations and parameter values,
* with the given result ordering.
* @param entityClass a persistent class
* @param filter the JDOQL filter to match
* @param parameters the JDOQL parameter declarations
* @param values the corresponding parameter values
* @param ordering the ordering of the result (or <code>null</code> if none)
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(Class, String)
* @see javax.jdo.Query#declareParameters
* @see javax.jdo.Query#executeWithArray
* @see javax.jdo.Query#setOrdering
*/
Collection find(Class entityClass, String filter, String parameters, Object[] values, String ordering)
throws DataAccessException;
/**
* Find all persistent instances of the given class that match the given
* JDOQL filter, using the given parameter declarations and parameter values.
* @param entityClass a persistent class
* @param filter the JDOQL filter to match
* @param parameters the JDOQL parameter declarations
* @param values a Map with parameter names as keys and parameter values
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(Class, String)
* @see javax.jdo.Query#declareParameters
* @see javax.jdo.Query#executeWithMap
*/
Collection find(Class entityClass, String filter, String parameters, Map values)
throws DataAccessException;
/**
* Find all persistent instances of the given class that match the given
* JDOQL filter, using the given parameter declarations and parameter values,
* with the given result ordering.
* @param entityClass a persistent class
* @param filter the JDOQL filter to match
* @param parameters the JDOQL parameter declarations
* @param values a Map with parameter names as keys and parameter values
* @param ordering the ordering of the result (or <code>null</code> if none)
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(Class, String)
* @see javax.jdo.Query#declareParameters
* @see javax.jdo.Query#executeWithMap
* @see javax.jdo.Query#setOrdering
*/
Collection find(Class entityClass, String filter, String parameters, Map values, String ordering)
throws DataAccessException;
/**
* Find persistent instances through the given query object
* in the specified query language.
* <p>Only available on JDO 2.0 and higher.
* @param language the query language (<code>javax.jdo.Query#JDOQL</code>
* or <code>javax.jdo.Query#SQL</code>, for example)
* @param queryObject the query object for the specified language
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(String, Object)
* @see javax.jdo.Query#JDOQL
* @see javax.jdo.Query#SQL
*/
Collection find(String language, Object queryObject) throws DataAccessException;
/**
* Find persistent instances through the given single-string JDOQL query.
* <p>Only available on JDO 2.0 and higher.
* @param queryString the single-string JDOQL query
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(String)
*/
Collection find(String queryString) throws DataAccessException;
/**
* Find persistent instances through the given single-string JDOQL query.
* <p>Only available on JDO 2.0 and higher.
* @param queryString the single-string JDOQL query
* @param values the corresponding parameter values
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(String)
*/
Collection find(String queryString, Object[] values) throws DataAccessException;
/**
* Find persistent instances through the given single-string JDOQL query.
* <p>Only available on JDO 2.0 and higher.
* @param queryString the single-string JDOQL query
* @param values a Map with parameter names as keys and parameter values
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newQuery(String)
*/
Collection find(String queryString, Map values) throws DataAccessException;
/**
* Find persistent instances through the given named query.
* <p>Only available on JDO 2.0+ or through a vendor-specific JdoDialect.
* @param entityClass a persistent class
* @param queryName the name of the query
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newNamedQuery(Class, String)
*/
Collection findByNamedQuery(Class entityClass, String queryName) throws DataAccessException;
/**
* Find persistent instances through the given named query.
* <p>Only available on JDO 2.0+ or through a vendor-specific JdoDialect.
* @param entityClass a persistent class
* @param queryName the name of the query
* @param values the corresponding parameter values
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newNamedQuery(Class, String)
*/
Collection findByNamedQuery(Class entityClass, String queryName, Object[] values) throws DataAccessException;
/**
* Find persistent instances through the given named query.
* <p>Only available on JDO 2.0+ or through a vendor-specific JdoDialect.
* @param entityClass a persistent class
* @param queryName the name of the query
* @param values a Map with parameter names as keys and parameter values
* @return the persistent instances
* @throws org.springframework.dao.DataAccessException in case of JDO errors
* @see javax.jdo.PersistenceManager#newNamedQuery(Class, String)
*/
Collection findByNamedQuery(Class entityClass, String queryName, Map values) throws DataAccessException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -