Spring Data Commmons

org.springframework.persistence
Annotation Type RelatedEntity


@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface RelatedEntity

Annotation indicating that a field may be stored in a foreign store and specifying the necessary guarantees. Conceptual rather than implementation-specific.

Author:
Rod Johnson
See Also:
ForeignStoreKeyManager

Optional Element Summary
 boolean afterCommit
           
 boolean asynchStore
          Is asynchronous store OK?
 String keyExpression
          Optional information as to how to compute or locate the key value.
 PersistencePolicy policy
          Policies for persistence
 String preferredStore
          Name for the preferred data store.
 boolean sameKey
          Should we use the key of the present entity
 String storeCompletionListenerBeanName
           
 Class<? extends AsynchStoreCompletionListener> storeCompletionListenerClass
          Completion listener class.
 

keyExpression

public abstract String keyExpression
Optional information as to how to compute or locate the key value. Some strategies may take this into account.

Default:
""

sameKey

public abstract boolean sameKey
Should we use the key of the present entity

Returns:
Default:
false

policy

public abstract PersistencePolicy policy
Policies for persistence

Returns:
Default:
@org.springframework.persistence.PersistencePolicy

preferredStore

public abstract String preferredStore
Name for the preferred data store. Merely a hint. May not be followed.

Returns:
Default:
""

asynchStore

public abstract boolean asynchStore
Is asynchronous store OK?

Returns:
Default:
false

afterCommit

public abstract boolean afterCommit
Default:
false

storeCompletionListenerClass

public abstract Class<? extends AsynchStoreCompletionListener> storeCompletionListenerClass
Completion listener class. Only used if asynchStore is true. Must have a no-arg constructor.

Returns:
Default:
org.springframework.persistence.AsynchStoreCompletionListener.NONE.class

storeCompletionListenerBeanName

public abstract String storeCompletionListenerBeanName
Default:
""

Spring Data Commmons

Copyright © 2011. All Rights Reserved.