public class PojoPropertyAccessorOneArgMode extends PojoPropertyAccessorMode<PojoPropertyAccessorOneArg>
accessor-mode
for a
one-arg accessor
of a
property
. This abstract base class acts like an
Enum
but allows you to define your own custom mode by extending this class.Modifier and Type | Field and Description |
---|---|
static PojoPropertyAccessorOneArgMode |
ADD
The mode for an
accessor used to add an item to a property with a container
(array or Collection ) type . |
static PojoPropertyAccessorOneArgMode |
GET_MAPPED
The mode for a
getter of a mapped property. |
static PojoPropertyAccessorOneArgMode |
REMOVE
The mode for an
accessor used to remove an item from a property with an
container (array or Collection ) type . |
static PojoPropertyAccessorOneArgMode |
SET
The mode for a regular
setter of a property. |
Modifier | Constructor and Description |
---|---|
protected |
PojoPropertyAccessorOneArgMode(String name,
boolean reading)
The constructor.
|
public static final PojoPropertyAccessorOneArgMode SET
setter
of a property.public static final PojoPropertyAccessorOneArgMode ADD
accessor
used to add an item to a property with a container
(array or Collection
) type
. The accessor will add
the item given as argument to the end of the container (if ordered). If the container is an array a copy with a
size increased by 1
has to be created. Therefore a virtual add-accessor can only be generated for
array-type getters if also an according setter is present.Collection.add(Object)
public static final PojoPropertyAccessorOneArgMode REMOVE
accessor
used to remove an item from a property with an
container (array or Collection
) type
. The accessor
will remove the first occurrence of the item given as argument from the container. It will return true
on
success and false
if the item was NOT found in the container. If the container is an array a copy with a
size decreased by 1
has to be created. Therefore a virtual remove-accessor can only be generated for
array-type getters if also an according setter is present.Collection.remove(Object)
public static final PojoPropertyAccessorOneArgMode GET_MAPPED
Copyright © 2001–2016 mmm-Team. All rights reserved.