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

com.talk2object.plum.domain.repository.BigRepository Maven / Gradle / Ivy

There is a newer version: 0.1.22
Show newest version
package com.talk2object.plum.domain.repository;

import java.util.List;

/***
 * It is big so it contains all the Entity types.
 * 
 * @author jack
 * 
 * 
 */
public interface BigRepository {

	/**
	 * if enabled paging, then list current page, else list all
	 * 
	 * @return
	 */
	List list(Class clazz);

	Object getByIndex(Class clazz, int index);

	/*
	 * add a new object to the repository
	 */
	void save(Object entity);

	/***
	 * update a existing object
	 * 
	 * @param entity
	 */
	void update(Object entity);

	/**
	 * copy the entity and create a link for the two entity
	 */
	Object getCopy(Object t);

	/**
	 * if it is a copy, then delete the original object, if not, also delete the
	 * original one.
	 * 
	 * @param entity
	 */
	void delete(Object entity);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy