Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.ocs.dynamo.dao;
import java.util.List;
import com.ocs.dynamo.domain.AbstractEntity;
import com.ocs.dynamo.filter.Filter;
/**
* Interface that all DAO objects must implement
*
* @author bas.rutten
* @param
* The type of the primary key of the entity managed by this DAO
* @param
* The type of the entity managed by this DAO
*/
public interface BaseDao> {
/**
* Returns the total number of entities of this type
*
* @return
*/
long count();
/**
* Returns the number of entities that match the provided filter
*
* @param filter
* the filter
* @param distinct
* whether to return only distinct results
* @return
*/
long count(Filter filter, boolean distinct);
/**
* Deletes all entities in the provided list
*
* @param list
* the list of entities to delete
*/
void delete(List list);
/**
* Deletes the provided entity
*
* @param entity
* the entity to delete
*/
void delete(T entity);
/**
* Fetches entities that match the provided filter
*
* @param filter
* the filter
* @param joins
* the desired relations to fetch
* @return
*/
List fetch(Filter filter, FetchJoinInformation... joins);
/**
* Fetches entities that match the provided filter
*
* @param filter
* the filter
* @param pageable
* the page info
* @param joins
* the desired relations to fetch
* @return
*/
List fetch(Filter filter, Pageable pageable, FetchJoinInformation... joins);
/**
* Fetches entities that match the provided filter
*
* @param filter
* the filter
* @param orders
* the sort info
* @param joins
* the desired relations to fetch
* @return
*/
List fetch(Filter filter, SortOrders orders, FetchJoinInformation... joins);
/**
* Fetches and sorts properties (NOT ENTITIES) that match the provided filter
*
* @param filter
* the filter
* @param selectProperties
* the properties to use in the selection
* @param orders
* the sort info
* @param joins
* the desired relations to fetch
* @return
*/
List