Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2014 Philip Helger (www.helger.com) philip[at]helger[dot]com 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.helger.appbasics.app.dao;
Abstraction layer around auto save stuff.

Author(s):
Philip Helger
public interface IAutoSaveAware
{
  

Returns:
true if auto save is enabled, false otherwise.
  boolean isAutoSaveEnabled ();

  
Start doing something without auto save.
  void beginWithoutAutoSave ();

  
End doing something without auto save. It must be ensure that each call to beginWithoutAutoSave() is always correctly ended with a call to this method.
  void endWithoutAutoSave ();

  
This method is used for batch processing of instructions (like the initial read). If first turns automatic saving off, runs the desired operations and finally restores the initial state of the "automatic save" flag and tries to write any pending changes.

Parameters:
aRunnable The runnable to be executed. May not be null.
This method is used for batch processing of instructions (like the initial read). If first turns automatic saving off, runs the desired operations and finally restores the initial state of the "automatic save" flag and tries to write any pending changes.

Parameters:
aCallable The runnable to be executed. May not be null.
Returns:
the result of the callable.
  <RETURNTYPE> RETURNTYPE performWithoutAutoSave (@Nonnull INonThrowingCallable <RETURNTYPE> aCallable);
New to GrepCode? Check out our FAQ X