public interface

ObjectDao

bucket.core.persistence.ObjectDao
Known Indirect Subclasses

Summary

Public Methods
List findAll()
Find all objects currently persisted of a particular type.
List findAllSorted(String sortField)
Find all objects currently persisted of a particular type and sort results by named property.
List findAllSorted(String sortField, boolean cacheable, int offset, int maxResultCount)
Find all objects currently persisted of a particular type and sort results by named property.
Class getPersistentClass()
void refresh(EntityObject objectToRrfresh)
Refreshes the object again with the fresh data from db.
void remove(EntityObject object)
Remove object from persistence.
void replicate(Object objectToReplicate)
Replicate the object.
void save(EntityObject objectToSave)
void saveRaw(EntityObject objectToSave)
saves the object.

Public Methods

public List findAll ()

Find all objects currently persisted of a particular type.

public List findAllSorted (String sortField)

Find all objects currently persisted of a particular type and sort results by named property.

Parameters
sortField the name of the property to be sorted on. This should be null if no sorting is required.

public List findAllSorted (String sortField, boolean cacheable, int offset, int maxResultCount)

Find all objects currently persisted of a particular type and sort results by named property. This version of the method allows more control over the query.

Parameters
sortField the name of the property to be sorted on. This should be null if no sorting is required.
cacheable control whether the results should be cached
offset the index of the first result to be returned
maxResultCount the maximum number of results required. Use -1 to specify no limit.

public Class getPersistentClass ()

public void refresh (EntityObject objectToRrfresh)

Refreshes the object again with the fresh data from db.

public void remove (EntityObject object)

Remove object from persistence.

public void replicate (Object objectToReplicate)

Replicate the object. Replication does not generate a new id if the object does not exist in database and it overwrites the database row if the object already exists in database.

public void save (EntityObject objectToSave)

public void saveRaw (EntityObject objectToSave)

saves the object. if the object is new, this won't set the creation date on the object. if it already exists, then it won't set the date that it was updated.