File tree Expand file tree Collapse file tree
jpa-specification/src/main/java/com/fd/jpa/converter Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 */
1414public class CycleAvoidingMappingContext {
1515
16- /** The known instances. */
1716 private Map <Object , Object > knownInstances = new IdentityHashMap <>();
1817
19- /**
20- * Gets the mapped instance.
21- *
22- * @param <T>
23- * the generic type
24- * @param source
25- * the source
26- * @param targetType
27- * the target type
28- * @return the mapped instance
29- */
3018 @ SuppressWarnings ("unchecked" )
3119 @ BeforeMapping
3220 public <T > T getMappedInstance (Object source , @ TargetType Class <T > targetType ) {
3321 return (T ) knownInstances .get (source );
3422 }
3523
36- /**
37- * Store mapped instance.
38- *
39- * @param source
40- * the source
41- * @param target
42- * the target
43- */
4424 @ BeforeMapping
4525 public void storeMappedInstance (Object source , @ MappingTarget Object target ) {
4626 knownInstances .put (source , target );
You can’t perform that action at this time.
0 commit comments