POJO
- is the templated type of the POJO
.public abstract class AbstractPojoDescriptorImpl<POJO> extends AbstractPojoDescriptor<POJO>
PojoDescriptor
interface.Modifier and Type | Field and Description |
---|---|
private Collection<PojoPropertyDescriptorImpl> |
properties |
private Map<String,PojoPropertyDescriptorImpl> |
propertyMap |
Constructor and Description |
---|
AbstractPojoDescriptorImpl(GenericType<POJO> pojoType,
PojoDescriptorBuilder pojoDescriptorBuilder)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addPropertyDescriptor(PojoPropertyDescriptorImpl descriptor)
This method adds the given
PojoPropertyDescriptorImpl . |
<ACCESSOR extends PojoPropertyAccessor> |
getAccessor(String property,
PojoPropertyAccessorMode<ACCESSOR> mode,
boolean required)
|
PojoPropertyDescriptorImpl |
getOrCreatePropertyDescriptor(String propertyName)
This method gets the property-descriptor for the given
propertyName . |
PojoPropertyDescriptorImpl |
getPropertyDescriptor(String propertyName)
This method gets the
descriptor for the property identified by the given
propertyName . |
Collection<PojoPropertyDescriptorImpl> |
getPropertyDescriptors()
This method gets the
descriptor s of all properties of the according
pojo . |
addPropertyItem, getAccessor, getPojoClass, getPojoDescriptorBuilder, getPojoType, getProperty, getProperty, getPropertyDescriptor, getPropertyItem, getPropertySize, removePropertyItem, setProperty, setProperty, setPropertyItem, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
newInstance
private final Map<String,PojoPropertyDescriptorImpl> propertyMap
private final Collection<PojoPropertyDescriptorImpl> properties
public AbstractPojoDescriptorImpl(GenericType<POJO> pojoType, PojoDescriptorBuilder pojoDescriptorBuilder)
pojoType
- is the pojo-type
.pojoDescriptorBuilder
- is the PojoDescriptorBuilder
.public PojoPropertyDescriptorImpl getPropertyDescriptor(String propertyName)
PojoDescriptor
descriptor
for the property identified by the given
propertyName
.propertyName
- is the name of the requested property.propertyName
or null
if no such
property exists for the according pojo
.public Collection<PojoPropertyDescriptorImpl> getPropertyDescriptors()
descriptor
s of all properties of the according
pojo
.getPropertyDescriptors
in interface PojoDescriptor<POJO>
getPropertyDescriptors
in class AbstractPojoDescriptor<POJO>
property descriptor
spublic <ACCESSOR extends PojoPropertyAccessor> ACCESSOR getAccessor(String property, PojoPropertyAccessorMode<ACCESSOR> mode, boolean required)
PojoDescriptor
ACCESSOR
- is the type of the requested accessor.property
- is the name
of the property. If the given mode
is
GET
it is treated as
for PojoDescriptor.getProperty(Object, String)
. If the given mode
is
SET
it is treated as
for PojoDescriptor.setProperty(Object, String, Object)
.mode
- is the mode
of the requested accessor. Use
PojoPropertyAccessorModes
for available modes.required
- - if true
the accessor is required and an exception is thrown if NOT found.null
if NOT found and required
is false
.PojoDescriptor.getPropertyDescriptor(String)
,
PojoPropertyDescriptor.getAccessor(PojoPropertyAccessorMode)
public PojoPropertyDescriptorImpl getOrCreatePropertyDescriptor(String propertyName)
AbstractPojoDescriptor
propertyName
.getOrCreatePropertyDescriptor
in class AbstractPojoDescriptor<POJO>
propertyName
- is the name of the requested property-descriptor.null
if NO property exists with the given propertyName
.protected void addPropertyDescriptor(PojoPropertyDescriptorImpl descriptor)
PojoPropertyDescriptorImpl
.descriptor
- is the PojoPropertyDescriptorImpl
to add.Copyright © 2001–2016 mmm-Team. All rights reserved.