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.
/*
* Copyright 2014 - 2019 Blazebit.
*
* 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.blazebit.persistence.view;
import java.util.Set;
/**
* A builder for defining flush related configuration.
*
* @author Christian Beikov
* @since 1.4.0
*/
public interface FlushOperationBuilder {
/**
* Invoked the flush operation.
*/
public void flush();
/**
* Registers the given listener to the current flush operation.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPrePersist(PrePersistListener> listener);
/**
* Registers the given listener to the current flush operation.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPrePersist(PrePersistEntityListener, ?> listener);
/**
* Registers the given listener to the current flush operation.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostPersist(PostPersistListener> listener);
/**
* Registers the given listener to the current flush operation.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostPersist(PostPersistEntityListener, ?> listener);
/**
* Registers the given listener to the current flush operation.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPreUpdate(PreUpdateListener> listener);
/**
* Registers the given listener to the current flush operation.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostUpdate(PostUpdateListener> listener);
/**
* Registers the given listener to the current flush operation.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPreRemove(PreRemoveListener> listener);
/**
* Registers the given listener to the current flush operation.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRemove(PostRemoveListener> listener);
/**
* Registers the given listener to the current flush operation.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommit(PostCommitListener> listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#PERSIST}.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommitPersist(PostCommitListener> listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#UPDATE}.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommitUpdate(PostCommitListener> listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#REMOVE}.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommitRemove(PostCommitListener> listener);
/**
* Registers the given listener to the current flush operation.
*
* @param viewTransitions The view transitions
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommit(Set viewTransitions, PostCommitListener> listener);
/**
* Registers the given listener to the current flush operation.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollback(PostRollbackListener> listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#PERSIST}.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollbackPersist(PostRollbackListener> listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#UPDATE}.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollbackUpdate(PostRollbackListener> listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#REMOVE}.
*
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollbackRemove(PostRollbackListener> listener);
/**
* Registers the given listener to the current flush operation.
*
* @param viewTransitions The view transitions
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollback(Set viewTransitions, PostRollbackListener> listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPrePersist(Class entityViewClass, PrePersistListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPrePersist(Class entityViewClass, PrePersistEntityListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostPersist(Class entityViewClass, PostPersistListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostPersist(Class entityViewClass, PostPersistEntityListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPreUpdate(Class entityViewClass, PreUpdateListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostUpdate(Class entityViewClass, PostUpdateListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPreRemove(Class entityViewClass, PreRemoveListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRemove(Class entityViewClass, PostRemoveListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommit(Class entityViewClass, PostCommitListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param The entity view type
* @param entityViewClass The entity view type for which to register the listener
* @param viewTransitions The view transitions
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommit(Class entityViewClass, Set viewTransitions, PostCommitListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#PERSIST}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommitPersist(Class entityViewClass, PostCommitListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#UPDATE}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommitUpdate(Class entityViewClass, PostCommitListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#REMOVE}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommitRemove(Class entityViewClass, PostCommitListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollback(Class entityViewClass, PostRollbackListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param The entity view type
* @param entityViewClass The entity view type for which to register the listener
* @param viewTransitions The view transitions
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollback(Class entityViewClass, Set viewTransitions, PostRollbackListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#PERSIST}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollbackPersist(Class entityViewClass, PostRollbackListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#UPDATE}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollbackUpdate(Class entityViewClass, PostRollbackListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#REMOVE}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollbackRemove(Class entityViewClass, PostRollbackListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPrePersist(Class entityViewClass, Class entityClass, PrePersistListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPrePersist(Class entityViewClass, Class entityClass, PrePersistEntityListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostPersist(Class entityViewClass, Class entityClass, PostPersistListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostPersist(Class entityViewClass, Class entityClass, PostPersistEntityListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPreUpdate(Class entityViewClass, Class entityClass, PreUpdateListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostUpdate(Class entityViewClass, Class entityClass, PostUpdateListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPreRemove(Class entityViewClass, Class entityClass, PreRemoveListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRemove(Class entityViewClass, Class entityClass, PostRemoveListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommit(Class entityViewClass, Class entityClass, PostCommitListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param The entity view type
* @param The entity type
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param viewTransitions The view transitions
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommit(Class entityViewClass, Class entityClass, Set viewTransitions, PostCommitListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#PERSIST}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommitPersist(Class entityViewClass, Class entityClass, PostCommitListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#UPDATE}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommitUpdate(Class entityViewClass, Class entityClass, PostCommitListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#REMOVE}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommitRemove(Class entityViewClass, Class entityClass, PostCommitListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollback(Class entityViewClass, Class entityClass, PostRollbackListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param The entity view type
* @param The entity type
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param viewTransitions The view transitions
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollback(Class entityViewClass, Class entityClass, Set viewTransitions, PostRollbackListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#PERSIST}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollbackPersist(Class entityViewClass, Class entityClass, PostRollbackListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#UPDATE}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollbackUpdate(Class entityViewClass, Class entityClass, PostRollbackListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#REMOVE}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param entityClass The entity type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @param The entity type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollbackRemove(Class entityViewClass, Class entityClass, PostRollbackListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPrePersist(Class entityViewClass, ViewListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPrePersist(Class entityViewClass, ViewAndEntityListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostPersist(Class entityViewClass, ViewListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostPersist(Class entityViewClass, ViewAndEntityListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPreUpdate(Class entityViewClass, ViewListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostUpdate(Class entityViewClass, ViewListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPreRemove(Class entityViewClass, ViewListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRemove(Class entityViewClass, ViewListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommit(Class entityViewClass, ViewListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommit(Class entityViewClass, ViewTransitionListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param The entity view type
* @param entityViewClass The entity view type for which to register the listener
* @param viewTransitions The view transitions
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommit(Class entityViewClass, Set viewTransitions, ViewListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param The entity view type
* @param entityViewClass The entity view type for which to register the listener
* @param viewTransitions The view transitions
* @param listener The listener to register
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommit(Class entityViewClass, Set viewTransitions, ViewTransitionListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#PERSIST}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommitPersist(Class entityViewClass, ViewListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#UPDATE}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommitUpdate(Class entityViewClass, ViewListener listener);
/**
* Registers the given listener to the current flush operation for the {@link ViewTransition#REMOVE}.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostCommitRemove(Class entityViewClass, ViewListener listener);
/**
* Registers the given listener to the current flush operation.
*
* @param entityViewClass The entity view type for which to register the listener
* @param listener The listener to register
* @param The entity view type
* @return This builder for method chaining
*/
public FlushOperationBuilder onPostRollback(Class