com.atlassian.confluence.core.persistence
Interface AnyTypeDao

All Known Subinterfaces:
ExporterAnyTypeDao
All Known Implementing Classes:
HibernateAnyTypeDao

public interface AnyTypeDao

DAO for loading persistent objects of various types


Method Summary
 java.util.List findAllPersistentObjects()
          Finds all persistent objects.
 java.util.List<com.atlassian.bonnie.Handle> findAllPersistentObjectsHandles()
          Finds handles for all persistent objects.
 java.lang.Object findByHandle(com.atlassian.bonnie.Handle handle)
          Find a persistent object by its handle.
 java.util.List findByIdsAndClassName(java.util.List<java.lang.Long> ids, java.lang.String className)
          Find a list of objects from the same persistent class.
 java.lang.Object getByIdAndType(long id, java.lang.Class type)
          Find a persistent object by its id and type.
<T> int
removeAllPersistentObjectsByType(java.lang.Class<T> type)
          Remove all of the persistent objects of the specified type
 

Method Detail

findByHandle

java.lang.Object findByHandle(com.atlassian.bonnie.Handle handle)
Find a persistent object by its handle.

Parameters:
handle - the handle
Returns:
a persistent object by its handle.

getByIdAndType

java.lang.Object getByIdAndType(long id,
                                java.lang.Class type)
Find a persistent object by its id and type.

Returns:
a persistent object by its handle.

findByIdsAndClassName

java.util.List findByIdsAndClassName(java.util.List<java.lang.Long> ids,
                                     java.lang.String className)
Find a list of objects from the same persistent class.

Parameters:
className - the persistent class's fully qualified class name.

findAllPersistentObjectsHandles

java.util.List<com.atlassian.bonnie.Handle> findAllPersistentObjectsHandles()
Finds handles for all persistent objects.

Returns:
handles for all persistent objects.

findAllPersistentObjects

java.util.List findAllPersistentObjects()
Finds all persistent objects.

Returns:
all persistent objects.

removeAllPersistentObjectsByType

<T> int removeAllPersistentObjectsByType(java.lang.Class<T> type)
Remove all of the persistent objects of the specified type

Parameters:
type - the class of the persistent objects to remove
Returns:
the number of objects deleted.


Copyright © 2003-2013 Atlassian. All Rights Reserved.