Package org.apache.cayenne.map
Class CallbackDescriptor
java.lang.Object
org.apache.cayenne.map.CallbackDescriptor
- All Implemented Interfaces:
Serializable
public class CallbackDescriptor extends Object implements Serializable
A mapping descriptor of a single callback event.
- Since:
- 3.0
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected Set<String>callbackMethodsprotected LifecycleEventcallbackType -
Constructor Summary
Constructors Constructor Description CallbackDescriptor(LifecycleEvent callbackType) -
Method Summary
Modifier and Type Method Description voidaddCallbackMethod(String methodName)voidclear()Removes all callback methods.Collection<String>getCallbackMethods()Returns all callback methods for this callback event.LifecycleEventgetCallbackType()booleanmoveMethod(String callbackMethod, int destinationIndex)Moves specified callback method to the specified positionvoidremoveCallbackMethod(String methodName)voidsetCallbackMethodAt(int index, String method)Replaces a callback method at the specified position
-
Field Details
-
callbackType
-
callbackMethods
-
-
Constructor Details
-
CallbackDescriptor
-
-
Method Details
-
clear
public void clear()Removes all callback methods. -
getCallbackMethods
Returns all callback methods for this callback event.- Returns:
- Returns all callback methods
-
addCallbackMethod
-
removeCallbackMethod
-
getCallbackType
-
moveMethod
Moves specified callback method to the specified position- Parameters:
callbackMethod- callbacm method name (should exist)destinationIndex- destinationi index (should be valid)- Returns:
- true if any changes were made
-
setCallbackMethodAt
Replaces a callback method at the specified position- Parameters:
index- callback method indexmethod- new callback method
-