Skip to content

Instantly share code, notes, and snippets.

@sebersole
Created March 26, 2013 14:34
Show Gist options
  • Save sebersole/5245800 to your computer and use it in GitHub Desktop.
Save sebersole/5245800 to your computer and use it in GitHub Desktop.
public class NamedQueryRepository {
/**
* Defines allowable policies for handling attempts to mutate a repository after initialization
*/
public static enum MutationPolicy {
/**
* Allow attempts to mutate the repository after it has been initialized.
*/
ALLOW,
/**
* Disallow attempts to mutate the repository after it has been initialized by throwing an exception.
*/
DISALLOW,
/**
* Silently ignore attempts to mutate the repository after it has been initialized.
*/
IGNORE
}
private final MutationPolicy mutationPolicy;
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment