edu.internet2.middleware.grouper.internal.dao.PITConfigDAO Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grouper Show documentation
Show all versions of grouper Show documentation
Internet2 Groups Management Toolkit
/**
* Copyright 2014 Internet2
*
* 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.
*/
/**
* @author shilen
* $Id$
*/
package edu.internet2.middleware.grouper.internal.dao;
import java.sql.Timestamp;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import edu.internet2.middleware.grouper.cfg.dbConfig.GrouperConfigHibernate;
import edu.internet2.middleware.grouper.pit.PITGrouperConfigHibernate;
/**
*
*/
public interface PITConfigDAO extends GrouperDAO {
/**
* insert or update
* @param pitGrouperConfigHibernate
*/
public void saveOrUpdate(PITGrouperConfigHibernate pitGrouperConfigHibernate);
/**
* insert or update
* @param pitGrouperConfigHibernates
*/
public void saveOrUpdate(Set pitGrouperConfigHibernates);
/**
* delete
* @param pitGrouperConfigHibernate
*/
public void delete(PITGrouperConfigHibernate pitGrouperConfigHibernate);
/**
* @param id
* @param exceptionIfNotFound
* @return PITGrouperConfigHibernate
*/
public PITGrouperConfigHibernate findBySourceIdActive(String id, boolean exceptionIfNotFound);
/**
* @param ids
* @return
*/
public Set findBySourceIdsActive(Collection ids);
/**
* @param id
* @param exceptionIfNotFound
* @return PITGrouperConfigHibernate
*/
public PITGrouperConfigHibernate findById(String id, boolean exceptionIfNotFound);
/**
* @param ids
* @return PITGrouperConfigHibernate
*/
public Set findByIds(Collection ids);
/**
* @param id
* @param exceptionIfNotFound
* @return PITGrouperConfigHibernate
*/
public PITGrouperConfigHibernate findBySourceIdUnique(String id, boolean exceptionIfNotFound);
/**
* @param id
* @param exceptionIfNotFound
* @return set of PITGrouperConfigHibernate
*/
public Set findBySourceId(String id, boolean exceptionIfNotFound);
/**
* Delete records that ended before the given date.
* @param time
* @return the number of records deleted
*/
public long deleteInactiveRecords(Timestamp time);
/**
* @param id
*/
public void delete(String id);
/**
* @return active configs that are missing in point in time
*/
public Set findMissingActivePITConfigs();
/**
* @return active point in time configs that should be inactive
*/
public Set findMissingInactivePITConfigs();
/**
* find pit configs based on filter (optional)
* @param queryOptions
* @param filter
* @return
*/
public List findPITConfigs(QueryOptions queryOptions, String filter);
/**
* revert list of configs to previous values
* @param pitIds
* @param message
* @param errorsToDisplay
* @param validationErrorsToDisplay
*/
public void revertConfigs(Set pitIds, StringBuilder message,
List errorsToDisplay, Map validationErrorsToDisplay);
}