com.nkasenides.athlos.persistence.DAO Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of athlos-core Show documentation
Show all versions of athlos-core Show documentation
An MMOG development framework.
package com.nkasenides.athlos.persistence;
/**
* Defines a generic DAO, used for defining functionality for the DAO and UniqueDAO interfaces.
* @param The object type.
*/
public interface DAO {
/**
* Creates a record/saves an item in the database.
* @param object The object to save in the database.
* @return Returns true if the operation was successful, false otherwise.
*/
boolean create(T object);
/**
* Updates an object in the database.
* @param object The object to update.
* @return Returns true if the operation was successful, false otherwise.
*/
boolean update(T object);
/**
* Deletes an object from the database.
* @param object The object to delete
* @return Returns true if the operation was successful, false otherwise.
*/
boolean delete(T object);
}