public static enum ERXCopyable.CopyType extends Enum<ERXCopyable.CopyType>
Enum
that specifies the valid ways in which an EOModel
's
EOProperty
s can be copied.
The ERXCopyable.CopyType
is specified for a given EOProperty
using a
String entry in the property's UserInfo dictionary with a key of
ERXCopyable.CopyType
and a value matching (case-insensitively)
one of the elements of this enum.
Enum Constant and Description |
---|
CURRENT_TIMESTAMP
Stored as "
ERXCopyable.CopyType = CurrentTimestamp; " in the
EOAttribute 's UserInfo dictionary. |
DEEP
Stored as "
ERXCopyable.CopyType = Deep; " in the
EORelationship 's UserInfo dictionary. |
NULLIFY
Stored as "
ERXCopyable.CopyType = Nullify; " in the
property's UserInfo dictionary. |
REFERENCE
Stored as "
ERXCopyable.CopyType = Reference; " in the
EOAttribute 's and EORelationship 's UserInfo
dictionary. |
SHALLOW
Stored as "
ERXCopyable.CopyType = Shallow; " in the
EORelationship 's UserInfo dictionary. |
SKIP
Stored as "
ERXCopyable.CopyType = Skip; " in the
property's UserInfo dictionary. |
UUID
Stored as "
ERXCopyable.CopyType = UUID; " in the
EOAttribute 's UserInfo dictionary. |
Modifier and Type | Method and Description |
---|---|
static NSArray<ERXCopyable.CopyType> |
copyTypesFor(com.webobjects.eoaccess.EOProperty property) |
static ERXCopyable.CopyType |
get(String typeAsString) |
String |
type() |
NSArray<Class<? extends com.webobjects.eoaccess.EOProperty>> |
validPropertyClasses() |
static ERXCopyable.CopyType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ERXCopyable.CopyType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ERXCopyable.CopyType SKIP
ERXCopyable.CopyType = Skip;
" in the
property's UserInfo dictionary. Skips the value.
For attributes only.public static final ERXCopyable.CopyType NULLIFY
ERXCopyable.CopyType = Nullify;
" in the
property's UserInfo dictionary. Sets the copy
's value to
null
. This setting does not copy the
original
's value. For attributes and relationships.public static final ERXCopyable.CopyType REFERENCE
ERXCopyable.CopyType = Reference;
" in the
EOAttribute
's and EORelationship
's UserInfo
dictionary. For attributes this simply sets the same value on the
destination as the source. For relationships, this sets the
copy
's relationship to point to the same destination
object as the original
's relationship does. WARNING:
if you use this on a non-flattening, to-many relationship, the
destination objects will be moved from the original
to
the copy
. For attributes and relationships.public static final ERXCopyable.CopyType SHALLOW
ERXCopyable.CopyType = Shallow;
" in the
EORelationship
's UserInfo dictionary. New instances of the
destination ERXCopyable
objects will be made and all of the
original's attributes and relationships will be reference copied.
For relationships only.public static final ERXCopyable.CopyType DEEP
ERXCopyable.CopyType = Deep;
" in the
EORelationship
's UserInfo dictionary. Duplicates each of the
destination ERXCopyable
objects using their implementation of
the ERXCopyable.duplicate(NSMutableDictionary)
method.
For relationships only.public static final ERXCopyable.CopyType CURRENT_TIMESTAMP
ERXCopyable.CopyType = CurrentTimestamp;
" in the
EOAttribute
's UserInfo dictionary. This setting does
not copy the original
's value. It sets the copy
's
value to the current date and time using
new NSTimestamp()
For attributes only.public static final ERXCopyable.CopyType UUID
ERXCopyable.CopyType = UUID;
" in the
EOAttribute
's UserInfo dictionary. This setting does
not copy the original
's value. It sets the copy
's
value to a newly generated UUID
using
UUID.randomUUID()
For attributes only.public static ERXCopyable.CopyType[] values()
for (ERXCopyable.CopyType c : ERXCopyable.CopyType.values()) System.out.println(c);
public static ERXCopyable.CopyType 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 String type()
public static NSArray<ERXCopyable.CopyType> copyTypesFor(com.webobjects.eoaccess.EOProperty property)
property
- the attribute or relationship being copiedERXCopyable.CopyType
s for the passed-in
EOProperty
public static ERXCopyable.CopyType get(String typeAsString)
typeAsString
- a String to match (case-insensitive) to a ERXCopyable.CopyType
ERXCopyable.CopyType
equivalent to the typeAsString
Copyright © 2002 – 2020 Project Wonder.