File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/PersisterFactory.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/PersisterFactory.java
|
Method name: EntityPersister create(Class, PersistentClass, EntityRegionAccessStrategy, SessionFactoryImplementor, Mapping)
|
|
Method name: CollectionPersister create(Class, Configuration, Collection, CollectionRegionAccessStrategy, SessionFactoryImplementor)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | Constructor pc;↵ | | 1 | Constructor pc;↵
|
2 | try {↵ | | 2 | try {↵
|
3 | pc = persisterClass.getConstructor( PERSISTER_CONSTRUCTOR_ARGS );↵ | | 3 | pc = persisterClass.getConstructor( COLLECTION_PERSISTER_CONSTRUCTOR_ARGS );↵
|
4 | }↵ | | 4 | }↵
|
5 | catch ( Exception e ) {↵ | | 5 | catch (Exception e) {↵
|
6 | throw new MappingException( "Could not get constructor for " + persisterClass.getName(), e );↵ | | 6 | throw new MappingException( "Could not get constructor for " + persisterClass.getName(), e );↵
|
7 | }↵ | | 7 | }↵
|
|
8 | try {↵ | | 8 | try {↵
|
9 | return (EntityPersister) pc.newInstance( new Object[] { model, cacheAccessStrategy, factory, cfg } );↵ | | 9 | return (CollectionPersister) pc.newInstance( new Object[] { model, cacheAccessStrategy, cfg, factory } );↵
|
10 | }↵ | | 10 | }↵
|
11 | catch (InvocationTargetException ite) {↵ | | 11 | catch (InvocationTargetException ite) {↵
|
12 | Throwable e = ite.getTargetException();↵ | | 12 | Throwable e = ite.getTargetException();↵
|
13 | if (e instanceof HibernateException) {↵ | | 13 | if (e instanceof HibernateException) {↵
|
14 | throw (HibernateException) e;↵ | | 14 | throw (HibernateException) e;↵
|
15 | }↵ | | 15 | }↵
|
16 | else {↵ | | 16 | else {↵
|
17 | throw new MappingException( "Could not instantiate persister " + persisterClass.getName(), e );↵ | | 17 | throw new MappingException( "Could not instantiate collection persister " + persisterClass.getName(), e );↵
|
18 | }↵ | | 18 | }↵
|
19 | }↵ | | 19 | }↵
|
20 | catch (Exception e) {↵ | | 20 | catch (Exception e) {↵
|
21 | throw new MappingException( "Could not instantiate persister " + persisterClass.getName(), e );↵ | | 21 | throw new MappingException( "Could not instantiate collection persister " + persisterClass.getName(), e );↵
|
22 | } | | 22 | }
|