All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nkasenides.athlos.persistence.DAO Maven / Gradle / Ivy

There is a newer version: 0.1.3
Show newest version
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);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy