Skip to content

Instantly share code, notes, and snippets.

@sebersole
Created September 27, 2011 21:13
Show Gist options
  • Save sebersole/1246267 to your computer and use it in GitHub Desktop.
Save sebersole/1246267 to your computer and use it in GitHub Desktop.
/**
* Specifically access by id
*/
interface IdentifierLoadAccess<T> {
public IdentifierLoadAccess<T> with(LockOptions lockOptions);
public T getReference(Object id);
public T load(Object id);
}
/**
* Specifically access by natural-key
*/
interface NaturalIdLoadAccess<T> {
public NaturalIdLoadAccessT<T> with(LockOptions lockOptions);
public <V> NaturalIdLoadAccess<T> using(Attribute<T, V> attribute, V value);
public NaturalIdLoadAccess<T> using(String attributeName, Object value);
public T getReference();
public T load();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment