public class ExternalEntityLoader extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DIR_RET_METHOD
The direct retrieve method name (if the external entity is mapped directly).
|
static Class<?>[] |
DIR_RET_METHOD_PARAMS_CLASSES
The direct retrieve method parameters classes (if
ExternalEntity.mappedBy() is empty). |
static Class<?>[] |
REV_MULTI_RET_METHOD_PARAMS_CLASSES
The reverse retrieve method parameters classes (if
ExternalEntity.mappedBy() is not empty) for multiple
external entities. |
static String |
REV_RET_METHOD
The reverse retrieve method name (if the external entity maps the relationship).
|
static Class<?>[] |
REV_SINGLE_RET_METHOD_PARAMS_CLASSES
The reverse retrieve method parameters classes (if
ExternalEntity.mappedBy() is not empty) for a single
external entity. |
Constructor and Description |
---|
ExternalEntityLoader() |
Modifier and Type | Method and Description |
---|---|
static Object |
getExternalEntity(String retrieveObjectName,
String retrieveMethodName,
Class<?>[] paramsClasses,
Object[] paramsValues)
Gets an external entity.
|
static void |
loadAllExternalEntities(Object entity,
Boolean ignoreLazyLoading)
Loads all entities within the given entity.
|
static void |
updateReverseMappedEntities(Object entity)
Update the external entities with the actual mapping information (when relationship is mapped by the
external entity).
|
public static final String DIR_RET_METHOD
public static final String REV_RET_METHOD
public static final Class<?>[] DIR_RET_METHOD_PARAMS_CLASSES
ExternalEntity.mappedBy()
is empty).public static final Class<?>[] REV_SINGLE_RET_METHOD_PARAMS_CLASSES
ExternalEntity.mappedBy()
is not empty) for a single
external entity.public static final Class<?>[] REV_MULTI_RET_METHOD_PARAMS_CLASSES
ExternalEntity.mappedBy()
is not empty) for multiple
external entities.public static Object getExternalEntity(String retrieveObjectName, String retrieveMethodName, Class<?>[] paramsClasses, Object[] paramsValues)
retrieveObjectName
- The JNDI name of the object to be used in order to retrieve the external entity.retrieveMethodName
- The name of the method to be used in order to retrieve the external entity.paramsClasses
- The parameters values for the retrieve method.paramsValues
- The parameters values for the retrieve method.public static void loadAllExternalEntities(Object entity, Boolean ignoreLazyLoading)
entity
- The entity to get the external entities (fields) loaded.ignoreLazyLoading
- If the lazy loading attribute for the annotation must be ignored.public static void updateReverseMappedEntities(Object entity)
entity
- To entity to have the external entities mapping updated.Copyright © 2013. All Rights Reserved.