public enum SaveMode extends Enum<SaveMode>
Enum Constant and Description |
---|
DELETE
delete, if not exists thats ok
|
INSERT
insert only, if exists then exception
|
INSERT_OR_UPDATE
it will insert or update depending if exsits or not
|
UPDATE
update only, if not exist, then exception
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
allowedToInsert()
if allowed to insert
|
abstract boolean |
allowedToUpdate()
if allowed to update
|
abstract boolean |
isUpdate(String nameToEdit,
String name)
if update based on SaveMode
|
abstract void |
validateNameToEdit(String nameToEdit,
String name)
if there is a uuid, validate it for this
|
static SaveMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SaveMode |
valueOfIgnoreCase(String string)
do a case-insensitive matching
|
static SaveMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SaveMode INSERT
public static final SaveMode UPDATE
public static final SaveMode INSERT_OR_UPDATE
public static final SaveMode DELETE
public static SaveMode[] values()
for (SaveMode c : SaveMode.values()) System.out.println(c);
public static SaveMode 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 abstract boolean allowedToUpdate()
public abstract boolean isUpdate(String nameToEdit, String name)
nameToEdit
- name
- public abstract boolean allowedToInsert()
public abstract void validateNameToEdit(String nameToEdit, String name)
nameToEdit
- name
- Copyright © 2016 Internet2. All rights reserved.