public enum PersistableIsNewStrategy extends Enum<PersistableIsNewStrategy> implements IsNewStrategy
IsNewStrategy
that invokes Persistable.isNew()
on the given object.Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
boolean |
isNew(Object entity)
Returns whether the given entity is new, i.e. has never been persisted before or not.
|
static PersistableIsNewStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PersistableIsNewStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PersistableIsNewStrategy INSTANCE
public static PersistableIsNewStrategy[] values()
for (PersistableIsNewStrategy c : PersistableIsNewStrategy.values()) System.out.println(c);
public static PersistableIsNewStrategy 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 boolean isNew(Object entity)
IsNewStrategy
isNew
in interface IsNewStrategy
entity
- can be null.Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.