public enum CrudMethod extends Enum<CrudMethod>
PagingAndSortingRepository
or
CrudRepository
.Enum Constant and Description |
---|
COUNT |
DELETE_ALL |
DELETE_ONE |
DELETE_SOME |
FIND_ALL |
FIND_ONE |
FIND_SOME |
SAVE_ONE |
SAVE_SOME |
Modifier and Type | Method and Description |
---|---|
static CrudMethod |
fromMethod(Method m)
Get an enum from a
Method . |
String |
toMethodName()
Turn this enum into a method name.
|
static CrudMethod |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CrudMethod[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CrudMethod COUNT
public static final CrudMethod DELETE_ALL
public static final CrudMethod DELETE_ONE
public static final CrudMethod DELETE_SOME
public static final CrudMethod FIND_ALL
public static final CrudMethod FIND_ONE
public static final CrudMethod FIND_SOME
public static final CrudMethod SAVE_ONE
public static final CrudMethod SAVE_SOME
public static CrudMethod[] values()
for (CrudMethod c : CrudMethod.values()) System.out.println(c);
public static CrudMethod valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic static CrudMethod fromMethod(Method m)
Method
. Narrow down overridden methods by looking for Iterable
in the first
parameter, which tells us it is a '_SOME' type.m
- The CRUD method from the repository interface.public String toMethodName()
Copyright © 2011-2014-2014 Pivotal Software, Inc.. All Rights Reserved.