
com.googlecode.fascinator.dao.GenericDao Maven / Gradle / Ivy
/*
* The Fascinator - GenericDao
* Copyright (C) 2008-2010 University of Southern Queensland
* Copyright (C) 2012 Queensland Cyber Infrastructure Foundation (http://www.qcif.edu.au/)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package com.googlecode.fascinator.dao;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
public interface GenericDao {
/** Persist the newInstance object into database */
PK create(T newInstance);
/** Retrieve an object that was previously persisted to the database using
* the indicated id as primary key
*/
T get(PK id);
/** Save changes made to a persistent object. */
void update(T transientObject);
/** Remove an object from persistent storage in the database */
void delete(T persistentObject);
/** Set the query map */
void setQueryMap(Map queryMap);
/** Execute the named query, passing the params */
List query(String name, Map properties);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy