Class FieldManager
java.lang.Object
org.broadleafcommerce.openadmin.server.service.persistence.module.FieldManager
- Author:
- jfischer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected EntityConfigurationprotected jakarta.persistence.EntityManagerstatic final Stringprotected List<FieldManager.SortableValue> -
Constructor Summary
ConstructorsConstructorDescriptionFieldManager(EntityConfiguration entityConfiguration, jakarta.persistence.EntityManager entityManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidClass<?>getFieldType(Field field) getFieldValue(Object bean, String fieldName) protected PersistenceManagergetPersistenceManager(Class entityClass) static FieldgetSingleField(Class<?> clazz, String fieldName) protected ObjecthandleMapFieldExtraction(Object bean, String fieldName, Class<?> componentClass, Object value, String fieldNamePart, String mapKey) protected voidhandleMapFieldPopulation(Object bean, String fieldName, Object newValue, Class<?> componentClass, Field field, Object value, String fieldNamePart, String mapKey) protected booleanisPersistentClass(Class entityClass) setFieldValue(Object bean, String fieldName, Object newValue)
-
Field Details
-
MAPFIELDSEPARATOR
- See Also:
-
entityConfiguration
-
entityManager
protected jakarta.persistence.EntityManager entityManager -
middleFields
-
persistentClasses
-
-
Constructor Details
-
FieldManager
public FieldManager(EntityConfiguration entityConfiguration, jakarta.persistence.EntityManager entityManager)
-
-
Method Details
-
getSingleField
- Throws:
IllegalStateException
-
getField
- Throws:
IllegalStateException
-
getFieldValue
public Object getFieldValue(Object bean, String fieldName) throws IllegalAccessException, FieldNotAvailableException -
setFieldValue
public Object setFieldValue(Object bean, String fieldName, Object newValue) throws IllegalAccessException, InstantiationException -
getFieldType
-
persistMiddleEntities
public Map<String,Serializable> persistMiddleEntities() throws InstantiationException, IllegalAccessException -
getEntityConfiguration
-
getPersistenceManager
-
isPersistentClass
-
handleMapFieldExtraction
protected Object handleMapFieldExtraction(Object bean, String fieldName, Class<?> componentClass, Object value, String fieldNamePart, String mapKey) throws IllegalAccessException, FieldNotAvailableException -
handleMapFieldPopulation
protected void handleMapFieldPopulation(Object bean, String fieldName, Object newValue, Class<?> componentClass, Field field, Object value, String fieldNamePart, String mapKey) throws IllegalAccessException - Throws:
IllegalAccessException
-
clearMiddleFields
public void clearMiddleFields()
-