Package net.sf.jkniv.whinstone
Enum CallbackScope
- java.lang.Object
-
- java.lang.Enum<CallbackScope>
-
- net.sf.jkniv.whinstone.CallbackScope
-
- All Implemented Interfaces:
Serializable,Comparable<CallbackScope>
public enum CallbackScope extends Enum<CallbackScope>
Enumeration for possible scope of execution from callback methods.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADDValue that means that a callback method is invoked beforeaddRepository.add(Queryable)orRepository.add(Object)methodsNONEValue that indicates that no callback method is invoked.REMOVEValue that means that a callback method is invoked beforeremoveRepository.remove(Queryable)orRepository.remove(Object)methodsSELECTValue that means that a callback method is invoked beforegetandlistmethods like:Repository.get(Queryable),Repository.get(Object),Repository.list(Queryable)etc.UPDATEValue that means that a callback method is invoked beforeupdateRepository.update(Queryable)orRepository.update(Object)methods
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAdd()booleanisRemove()booleanisSelect()booleanisUpdate()static CallbackScopevalueOf(String name)Returns the enum constant of this type with the specified name.static CallbackScope[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ADD
public static final CallbackScope ADD
Value that means that a callback method is invoked beforeaddRepository.add(Queryable)orRepository.add(Object)methods
-
UPDATE
public static final CallbackScope UPDATE
Value that means that a callback method is invoked beforeupdateRepository.update(Queryable)orRepository.update(Object)methods
-
REMOVE
public static final CallbackScope REMOVE
Value that means that a callback method is invoked beforeremoveRepository.remove(Queryable)orRepository.remove(Object)methods
-
SELECT
public static final CallbackScope SELECT
Value that means that a callback method is invoked beforegetandlistmethods like:Repository.get(Queryable),Repository.get(Object),Repository.list(Queryable)etc.
-
NONE
public static final CallbackScope NONE
Value that indicates that no callback method is invoked.
-
-
Method Detail
-
values
public static CallbackScope[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CallbackScope c : CallbackScope.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CallbackScope valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isAdd
public boolean isAdd()
-
isUpdate
public boolean isUpdate()
-
isRemove
public boolean isRemove()
-
isSelect
public boolean isSelect()
-
-