public class FieldManager extends Object
| Modifier and Type | Field and Description |
|---|---|
protected EntityConfiguration |
entityConfiguration |
protected javax.persistence.EntityManager |
entityManager |
protected BLCFieldUtils |
fieldUtils |
protected Set<Class> |
managedEntityClasses |
static String |
MAPFIELDSEPARATOR |
protected List<org.broadleafcommerce.openadmin.server.service.persistence.module.FieldManager.SortableValue> |
middleFields |
| Constructor and Description |
|---|
FieldManager(EntityConfiguration entityConfiguration,
javax.persistence.EntityManager entityManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearMiddleFields() |
EntityConfiguration |
getEntityConfiguration() |
Field |
getField(Class<?> clazz,
String fieldName) |
Class<?> |
getFieldType(Field field) |
Object |
getFieldValue(Object bean,
String fieldName) |
protected PersistenceManager |
getPersistenceManager(Class entityClass) |
static Field |
getSingleField(Class<?> clazz,
String fieldName) |
protected Object |
handleMapFieldExtraction(Object bean,
String fieldName,
Class<?> componentClass,
Object value,
String fieldNamePart,
String mapKey) |
protected void |
handleMapFieldPopulation(Object bean,
String fieldName,
Object newValue,
Class<?> componentClass,
Field field,
Object value,
String fieldNamePart,
String mapKey) |
protected boolean |
isPersistentClass(Class entityClass) |
Map<String,Serializable> |
persistMiddleEntities() |
Object |
setFieldValue(Object bean,
String fieldName,
Object newValue) |
public static final String MAPFIELDSEPARATOR
protected EntityConfiguration entityConfiguration
protected javax.persistence.EntityManager entityManager
protected List<org.broadleafcommerce.openadmin.server.service.persistence.module.FieldManager.SortableValue> middleFields
protected BLCFieldUtils fieldUtils
public FieldManager(EntityConfiguration entityConfiguration, javax.persistence.EntityManager entityManager)
public static Field getSingleField(Class<?> clazz, String fieldName) throws IllegalStateException
IllegalStateExceptionpublic Field getField(Class<?> clazz, String fieldName) throws IllegalStateException
IllegalStateExceptionpublic Object getFieldValue(Object bean, String fieldName) throws IllegalAccessException, FieldNotAvailableException
public Object setFieldValue(Object bean, String fieldName, Object newValue) throws IllegalAccessException, InstantiationException
public Map<String,Serializable> persistMiddleEntities() throws InstantiationException, IllegalAccessException
public EntityConfiguration getEntityConfiguration()
protected PersistenceManager getPersistenceManager(Class entityClass)
protected boolean isPersistentClass(Class entityClass)
protected Object handleMapFieldExtraction(Object bean, String fieldName, Class<?> componentClass, Object value, String fieldNamePart, String mapKey) throws IllegalAccessException, FieldNotAvailableException
protected void handleMapFieldPopulation(Object bean, String fieldName, Object newValue, Class<?> componentClass, Field field, Object value, String fieldNamePart, String mapKey) throws IllegalAccessException
IllegalAccessExceptionpublic void clearMiddleFields()
Copyright © 2019. All rights reserved.