
com.github.jhonyscamacho.persistence.generic.GenericDAO Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bootstrap-object Show documentation
Show all versions of bootstrap-object Show documentation
A set of components that help developers building their own domain object classes.
The newest version!
package com.github.jhonyscamacho.persistence.generic;
import com.github.jhonyscamacho.domain.DomainObject;
/**
*
* @author Jhonathan Camacho
*
* @param
* any object that extends {@link DomainObject}
*
* @see DomainObject
*/
public interface GenericDAO {
/**
* Persist the object in the database.
*
* @param object
* the object to be persisted.
* @return true if the object was persisted. Return false otherwise.
*/
public boolean persist(T object);
/**
* Update the object in the database.
*
* @param object
* the object to be updated.
* @return the updated object.
*/
public T update(T object);
/**
* Remove the object from the database.
*
* @param object
* the object to be removed from the databse.
* @return true if the object was removed. Return false otherwise.
*/
public boolean remove(T object);
/**
* Find an object by object's id.
*
* @param id
* the object's id.
* @return the object that have the informed id. Return null if there is no
* object with the informed id.
*/
public T findById(long id);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy