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

net.urosk.mifss.repositories.ContentMetaDataDefRepository Maven / Gradle / Ivy

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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.
 *
 **************************************************************************
 * MIFSS  - content storage system
 * 
 *
 * @uthors: [email protected] (Uroš Kristan ) Urosk.NET
 *         [email protected] (Jernej Švigelj) 
 */
package net.urosk.mifss.repositories;

import net.urosk.mifss.configurations.pojos.StorageDef;
import net.urosk.mifss.entities.AuditEntry;
import net.urosk.mifss.lib.DataResult;
import net.urosk.mifss.lib.exceptions.ContentMetaDataDaoException;
import net.urosk.mifss.entities.ContentMetaDataDef;
import org.apache.cxf.jaxrs.ext.PATCH;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface ContentMetaDataDefRepository extends PagingAndSortingRepository {


	List findByUuidAndStorageName(@Param("uuid") String contentUuid,  @Param("storageName") String name);


	void deleteAllByStorageName(@Param("storageName") String name);

	 @Query("SELECT COUNT(c.uuid) from ContentMetaDataDef c WHERE c.storageName = :storageName")
	Long countAllForStorageName(@Param("storageName") String name);



	List findByStorageName( String storageName, Pageable pageRequest);

	ContentMetaDataDef findOneByUuidAndStorageName(String contentUuid, String name);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy