1 | public Object instantiate(Serializable id) {↵ | | 1 | public Object instantiate(Serializable id) {↵
|
2 | if ( Person.class.getName().equals( entityName ) ) {↵ | | 2 | if ( Person.class.getName().equals( entityName ) ) {↵
|
3 | return ProxyHelper.newPersonProxy( id );↵ | | 3 | return ProxyHelper.newPersonProxy( id );↵
|
4 | }↵ | | 4 | }↵
|
5 | if ( Customer.class.getName().equals( entityName ) ) {↵ | | 5 | if ( Customer.class.getName().equals( entityName ) ) {↵
|
6 | return ProxyHelper.newCustomerProxy( id );↵ | | 6 | return ProxyHelper.newCustomerProxy( id );↵
|
7 | }↵ | | 7 | }↵
|
8 | else if ( Company.class.getName().equals( entityName ) ) {↵ | | 8 | else if ( Company.class.getName().equals( entityName ) ) {↵
|
9 | return ProxyHelper.newCompanyProxy( id );↵ | | 9 | return ProxyHelper.newCompanyProxy( id );↵
|
10 | }↵ | | 10 | }↵
|
11 | else if ( Address.class.getName().equals( entityName ) ) {↵ | | 11 | else if ( Address.class.getName().equals( entityName ) ) {↵
|
12 | return ProxyHelper.newAddressProxy( id );↵ | | 12 | return ProxyHelper.newAddressProxy( id );↵
|
13 | }↵ | | 13 | }↵
|
14 | else {↵ | | 14 | else {↵
|
15 | throw new IllegalArgumentException( "unknown entity for instantiation [" + entityName + "]" );↵ | | 15 | throw new IllegalArgumentException( "unknown entity for instantiation [" + entityName + "]" );↵
|
16 | | | 16 |
|