@Named public class PropertyBuilderImpl extends AbstractLoggableComponent implements PropertyBuilder
PropertyBuilder.| Modifier and Type | Field and Description |
|---|---|
private OrientBeanMapper |
beanMapper |
private Map<Class<?>,SinglePropertyBuilder<?>> |
class2builderMap |
private Map<com.orientechnologies.orient.core.metadata.schema.OType,SinglePropertyBuilder<?>> |
type2builderMap |
| Constructor and Description |
|---|
PropertyBuilderImpl()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
WritableProperty<?> |
build(com.orientechnologies.orient.core.metadata.schema.OProperty oProperty,
OrientBean prototype)
|
<V> com.orientechnologies.orient.core.metadata.schema.OProperty |
build(WritableProperty<V> property,
com.orientechnologies.orient.core.metadata.schema.OClass oClass) |
protected void |
doInitialize()
This method performs the actual
initialization. |
protected void |
doInitialized()
This method is invoked at the end of the actual
initialization. |
protected OrientBeanMapper |
getBeanMapper() |
<V> SinglePropertyBuilder<? super V> |
getBuilder(Class<V> type) |
SinglePropertyBuilder<?> |
getBuilder(com.orientechnologies.orient.core.metadata.schema.OType type) |
void |
registerBuilder(SinglePropertyBuilder<?> builder) |
protected void |
registerBuilder(SinglePropertyBuilder<?> builder,
boolean allowOverride) |
protected void |
registerDefaults()
|
void |
setBeanMapper(OrientBeanMapper beanMapper) |
void |
setBuilders(List<SinglePropertyBuilder<?>> builders) |
createLogger, getLoggergetInitializationState, initializeprivate final Map<com.orientechnologies.orient.core.metadata.schema.OType,SinglePropertyBuilder<?>> type2builderMap
private final Map<Class<?>,SinglePropertyBuilder<?>> class2builderMap
private OrientBeanMapper beanMapper
protected OrientBeanMapper getBeanMapper()
OrientBeanMapper.@Inject public void setBeanMapper(OrientBeanMapper beanMapper)
beanMapper - is the OrientBeanMapper to Inject.@Inject public void setBuilders(List<SinglePropertyBuilder<?>> builders)
builders - the List of SinglePropertyBuilders to Inject.public void registerBuilder(SinglePropertyBuilder<?> builder)
builder - the SinglePropertyBuilder to register.protected void registerBuilder(SinglePropertyBuilder<?> builder, boolean allowOverride)
builder - the SinglePropertyBuilder to register.allowOverride - - true if the given SinglePropertyBuilder may override (replace) a previously
registered one.protected void doInitialize()
AbstractComponentinitialization. It is called when AbstractComponent.initialize() is
invoked for the first time. super.AbstractComponent.doInitialize().doInitialize in class AbstractLoggableComponentprotected void doInitialized()
AbstractComponentinitialization. It is called when
AbstractComponent.initialize() is invoked for the first time after AbstractComponent.doInitialize() is completed and
initialization-state has changed to initialized. super.AbstractComponent.doInitialized().doInitialized in class AbstractComponentprotected void registerDefaults()
public SinglePropertyBuilder<?> getBuilder(com.orientechnologies.orient.core.metadata.schema.OType type)
getBuilder in interface PropertyBuildertype - the OType.SinglePropertyBuilder responsible for the given
OType.public <V> SinglePropertyBuilder<? super V> getBuilder(Class<V> type)
getBuilder in interface PropertyBuilderV - the generic type of the given Class.type - the raw Class of the bean
property value type.SinglePropertyBuilder responsible for the given
Class.public WritableProperty<?> build(com.orientechnologies.orient.core.metadata.schema.OProperty oProperty, OrientBean prototype)
AbstractPropertyBuilderbuild in interface AbstractPropertyBuilderoProperty - the OProperty.prototype - the OrientBean
prototype.property corresponding to the given OProperty that has been created or
was already existing. May be null if the property type is not supported
(e.g. if new version of OrientDB introduces new property type that has not yet been implemented here).BeanAccess.getOrCreateProperty(String, net.sf.mmm.util.reflect.api.GenericType, Class)public <V> com.orientechnologies.orient.core.metadata.schema.OProperty build(WritableProperty<V> property, com.orientechnologies.orient.core.metadata.schema.OClass oClass)
build in interface PropertyBuilderV - the generic type of the property value.property - the property to create in the given OClass, that is currently
missing.oClass - the OClass of the OrientDB schema.OProperty. May be null if the property type
is not supported.Copyright © 2001–2016 mmm-Team. All rights reserved.