|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.mmm.util.pojo.descriptor.api.accessor.PojoPropertyAccessorMode<PojoPropertyAccessorOneArg>
net.sf.mmm.util.pojo.descriptor.api.accessor.PojoPropertyAccessorOneArgMode
public class PojoPropertyAccessorOneArgMode
An instance of this class represents a specific
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.
| Field Summary | |
|---|---|
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. |
| Constructor Summary | |
|---|---|
protected |
PojoPropertyAccessorOneArgMode(String name,
boolean reading)
The constructor. |
| Method Summary |
|---|
| Methods inherited from class net.sf.mmm.util.pojo.descriptor.api.accessor.PojoPropertyAccessorMode |
|---|
getName, isReading, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
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
getter of a mapped
property.invoke with argument key for a property named "colors" might cause a pojo.getColors().get(key) or
pojo.getColors(key) or even pojo.getColor(key).
| Constructor Detail |
|---|
protected PojoPropertyAccessorOneArgMode(String name,
boolean reading)
name - is the name of this mode.reading - is a flag that determines if this mode is for
reading.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||