[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins CMPPersistenceManager.java
User: dbudworth Date: 01/11/02 18:07:41 Modified:src/main/org/jboss/ejb/plugins CMPPersistenceManager.java Log: added more descriptive NoSuchMethodException throw. Default version didn't specify what class or what method, requiring users to look in the jboss source to find out what method was missing. The method name createMethodCache() sounds more like create a method cache, and not create a create method cache So the stack trace was pretty much useless. Revision ChangesPath 1.33 +8 -3 jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java Index: CMPPersistenceManager.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- CMPPersistenceManager.java2001/10/09 00:59:39 1.32 +++ CMPPersistenceManager.java2001/11/03 02:07:41 1.33 @@ -53,7 +53,7 @@ * @author a href=mailto:[EMAIL PROTECTED];Dan Christopherson/a * @author a href=mailto:[EMAIL PROTECTED];Bill Burke/a * @author a href=mailto:[EMAIL PROTECTED];Andreas Schaefer/a -* @version $Revision: 1.32 $ +* @version $Revision: 1.33 $ * * Revisions: * 20010621 Bill Burke: removed loadEntities call because CMP read-ahead is now @@ -156,8 +156,13 @@ { if (methods[i].getName().equals(create)) { -createMethods.put(methods[i], con.getBeanClass().getMethod(ejbCreate, methods[i].getParameterTypes())); -postCreateMethods.put(methods[i], con.getBeanClass().getMethod(ejbPostCreate, methods[i].getParameterTypes())); + try{ + createMethods.put(methods[i], con.getBeanClass().getMethod(ejbCreate, methods[i].getParameterTypes())); + postCreateMethods.put(methods[i], con.getBeanClass().getMethod(ejbPostCreate, methods[i].getParameterTypes())); + } + catch (NoSuchMethodException nsme){ + throw new NoSuchMethodException(Can't find ejb[Post]Create in +con.getBeanClass().getName()); + } } } ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins CMPPersistenceManager.java
Please follow the coding standards when submitting changes. They are listed here: http://www.jboss.org/developers/guidelines.jsp Your checkin is using tabs instead of spaces and is not aligning braces consistent with the rest of the code. Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: David Budworth [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 02, 2001 6:07 PM Subject: [JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins CMPPersistenceManager.java User: dbudworth Date: 01/11/02 18:07:41 Modified:src/main/org/jboss/ejb/plugins CMPPersistenceManager.java Log: added more descriptive NoSuchMethodException throw. Default version didn't specify what class or what method, requiring users to look in the jboss source to find out what method was missing. The method name createMethodCache() sounds more like create a method cache, and not create a create method cache So the stack trace was pretty much useless. Revision ChangesPath 1.33 +8 -3 jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java Index: CMPPersistenceManager.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.ja va,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- CMPPersistenceManager.java 2001/10/09 00:59:39 1.32 +++ CMPPersistenceManager.java 2001/11/03 02:07:41 1.33 @@ -53,7 +53,7 @@ * @author a href=mailto:[EMAIL PROTECTED];Dan Christopherson/a * @author a href=mailto:[EMAIL PROTECTED];Bill Burke/a * @author a href=mailto:[EMAIL PROTECTED];Andreas Schaefer/a -* @version $Revision: 1.32 $ +* @version $Revision: 1.33 $ * * Revisions: * 20010621 Bill Burke: removed loadEntities call because CMP read-ahead is now @@ -156,8 +156,13 @@ { if (methods[i].getName().equals(create)) { -createMethods.put(methods[i], con.getBeanClass().getMethod(ejbCreate, methods[i].getParameterTypes())); -postCreateMethods.put(methods[i], con.getBeanClass().getMethod(ejbPostCreate, methods[i].getParameterTypes())); + try{ + createMethods.put(methods[i], con.getBeanClass().getMethod(ejbCreate, methods[i].getParameterTypes())); + postCreateMethods.put(methods[i], con.getBeanClass().getMethod(ejbPostCreate, methods[i].getParameterTypes())); + } + catch (NoSuchMethodException nsme){ + throw new NoSuchMethodException(Can't find ejb[Post]Create in +con.getBeanClass().getName()); + } } } ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins CMPPersistenceManager.java
User: starksm Date: 01/11/02 18:37:23 Modified:src/main/org/jboss/ejb/plugins CMPPersistenceManager.java Log: Cleanup formatting Revision ChangesPath 1.34 +354 -259 jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java Index: CMPPersistenceManager.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- CMPPersistenceManager.java2001/11/03 02:07:41 1.33 +++ CMPPersistenceManager.java2001/11/03 02:37:23 1.34 @@ -1,9 +1,9 @@ /* -* JBoss, the OpenSource J2EE webOS -* -* Distributable under LGPL license. -* See terms of license at gnu.org. -*/ + * JBoss, the OpenSource J2EE webOS + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ package org.jboss.ejb.plugins; import java.lang.reflect.Method; @@ -42,27 +42,28 @@ import org.jboss.management.j2ee.TimeStatistic; /** -* The CMP Persistence Manager implements the semantics of the CMP -* EJB 1.1 call back specification. -* -* This Manager works with a EntityPersistenceStore that takes care of the -* physical storing of instances (JAWS, JDBC O/R, FILE, Object). -* -* @see related -* @author a href=mailto:[EMAIL PROTECTED];Marc Fleury/a -* @author a href=mailto:[EMAIL PROTECTED];Dan Christopherson/a -* @author a href=mailto:[EMAIL PROTECTED];Bill Burke/a -* @author a href=mailto:[EMAIL PROTECTED];Andreas Schaefer/a -* @version $Revision: 1.33 $ -* -* Revisions: -* 20010621 Bill Burke: removed loadEntities call because CMP read-ahead is now -* done directly by the finder. -* 20010709 Andreas Schaefer: added statistics gathering -* -*/ + * The CMP Persistence Manager implements the semantics of the CMP + * EJB 1.1 call back specification. + * + * This Manager works with a EntityPersistenceStore that takes care of the + * physical storing of instances (JAWS, JDBC O/R, FILE, Object). + * + * @see related + * @author a href=mailto:[EMAIL PROTECTED];Marc Fleury/a + * @author a href=mailto:[EMAIL PROTECTED];Dan Christopherson/a + * @author a href=mailto:[EMAIL PROTECTED];Bill Burke/a + * @author a href=mailto:[EMAIL PROTECTED];Andreas Schaefer/a + * @version $Revision: 1.34 $ + * + * Revisions: + * 20010621 Bill Burke: removed loadEntities call because CMP read-ahead is now + * done directly by the finder. + * 20010709 Andreas Schaefer: added statistics gathering + * + */ public class CMPPersistenceManager - implements EntityPersistenceManager { + implements EntityPersistenceManager +{ // Constants - // Attributes @@ -89,39 +90,43 @@ private TimeStatistic mStore = new TimeStatistic( Store, ms, Load Time ); // Static - -// Constructors -- - -// Public - public void setContainer(Container c) { + + // Constructors -- + + // Public + public void setContainer(Container c) + { con = (EntityContainer)c; - if (store != null) store.setContainer(c); + if (store != null) + store.setContainer(c); } - /** - * Gets the entity persistence store. - */ - public EntityPersistenceStore getPersistenceStore() { - return store; - } + /** +* Gets the entity persistence store. +*/ + public EntityPersistenceStore getPersistenceStore() + { + return store; + } - public void setPersistenceStore(EntityPersistenceStore store) { + public void setPersistenceStore(EntityPersistenceStore store) + { this.store= store; - + //Give it the container if (con!= null) store.setContainer(con); } public void init() - throws Exception { - + throws Exception + { // The common EJB methods ejbLoad = EntityBean.class.getMethod(ejbLoad, new Class[0]); ejbStore = EntityBean.class.getMethod(ejbStore, new Class[0]); ejbActivate = EntityBean.class.getMethod(ejbActivate, new Class[0]); ejbPassivate = EntityBean.class.getMethod(ejbPassivate, new Class[0]); ejbRemove = EntityBean.class.getMethod(ejbRemove, new Class[0]); - + if (con.getHomeClass() != null) { Method[] methods =
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins CMPPersistenceManager.java
User: patriot1burke Date: 01/08/08 09:17:37 Modified:src/main/org/jboss/ejb/plugins Tag: Branch_2_4 CMPPersistenceManager.java Log: catch and throw RemoveException Revision ChangesPath No revision No revision 1.21.2.1 +6 -2 jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java Index: CMPPersistenceManager.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java,v retrieving revision 1.21 retrieving revision 1.21.2.1 diff -u -r1.21 -r1.21.2.1 --- CMPPersistenceManager.java2001/06/15 23:59:07 1.21 +++ CMPPersistenceManager.java2001/08/08 16:17:36 1.21.2.1 @@ -47,7 +47,7 @@ * @see related * @author a href=mailto:[EMAIL PROTECTED];Marc Fleury/a * @author a href=mailto:[EMAIL PROTECTED];danch (Dan Christopherson/a -* @version $Revision: 1.21 $ +* @version $Revision: 1.21.2.1 $ */ public class CMPPersistenceManager implements EntityPersistenceManager { @@ -447,7 +447,11 @@ } catch (InvocationTargetException ite) { Throwable e = ite.getTargetException(); - if (e instanceof RemoteException) +if (e instanceof RemoveException) +{ + // Rethrow exception + throw (RemoveException)e; +} else if (e instanceof RemoteException) { // Rethrow exception throw (RemoteException)e; ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins CMPPersistenceManager.java
User: patriot1burke Date: 01/08/08 09:23:46 Modified:src/main/org/jboss/ejb/plugins CMPPersistenceManager.java Log: catch and throw RemoveException Revision ChangesPath 1.30 +7 -2 jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java Index: CMPPersistenceManager.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- CMPPersistenceManager.java2001/08/03 17:15:44 1.29 +++ CMPPersistenceManager.java2001/08/08 16:23:46 1.30 @@ -53,7 +53,7 @@ * @author a href=mailto:[EMAIL PROTECTED];Dan Christopherson/a * @author a href=mailto:[EMAIL PROTECTED];Bill Burke/a * @author a href=mailto:[EMAIL PROTECTED];Andreas Schaefer/a -* @version $Revision: 1.29 $ +* @version $Revision: 1.30 $ * * Revisions: * 20010621 Bill Burke: removed loadEntities call because CMP read-ahead is now @@ -435,7 +435,12 @@ } catch (InvocationTargetException ite) { Throwable e = ite.getTargetException(); - if (e instanceof RemoteException) + if (e instanceof RemoveException) + { +// Rethrow exception +throw (RemoveException)e; + } + else if (e instanceof RemoteException) { // Rethrow exception throw (RemoteException)e; ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins CMPPersistenceManager.java
User: mnf999 Date: 01/07/03 16:11:05 Modified:src/main/org/jboss/ejb/plugins CMPPersistenceManager.java Log: Message update on the propagation of calls Revision ChangesPath 1.25 +3 -1 jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java Index: CMPPersistenceManager.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- CMPPersistenceManager.java2001/06/24 03:06:46 1.24 +++ CMPPersistenceManager.java2001/07/03 23:11:05 1.25 @@ -49,7 +49,7 @@ * @author a href=mailto:[EMAIL PROTECTED];Marc Fleury/a * @author a href=mailto:[EMAIL PROTECTED];Dan Christopherson/a * @author a href=mailto:[EMAIL PROTECTED];Bill Burke/a -* @version $Revision: 1.24 $ +* @version $Revision: 1.25 $ * * Revisions: * 20010621 Bill Burke: removed loadEntities call because CMP read-ahead is now @@ -317,6 +317,8 @@ } } + // The implementation of the call can be left absolutely empty, the propagation of the call + // is just a notification for stores that would need to know that an instance is being activated store.activateEntity(ctx); } ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins CMPPersistenceManager.java
User: patriot1burke Date: 01/06/21 14:51:47 Modified:src/main/org/jboss/ejb/plugins CMPPersistenceManager.java Log: removed loadEntities call from findEntities method. loadEntities is now obsolete. Revision ChangesPath 1.23 +399 -395 jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java Index: CMPPersistenceManager.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- CMPPersistenceManager.java2001/06/18 20:01:23 1.22 +++ CMPPersistenceManager.java2001/06/21 21:51:47 1.23 @@ -47,275 +47,279 @@ * @see related * @author a href=mailto:[EMAIL PROTECTED];Marc Fleury/a * @author a href=mailto:[EMAIL PROTECTED];Dan Christopherson/a -* @version $Revision: 1.22 $ +* @author a href=mailto:[EMAIL PROTECTED];Bill Burke/a +* @version $Revision: 1.23 $ +* +* Revisions: +* 20010621 Bill Burke: removed loadEntities call because CMP read-ahead is now +* done directly by the finder. +* */ public class CMPPersistenceManager -implements EntityPersistenceManager { -// Constants - + implements EntityPersistenceManager { + // Constants - -// Attributes -EntityContainer con; -// Physical persistence implementation -EntityPersistenceStore store; - -// The EJB Methods, the reason for this class -Method ejbLoad; -Method ejbStore; -Method ejbActivate; -Method ejbPassivate; -Method ejbRemove; + // Attributes + EntityContainer con; + // Physical persistence implementation + EntityPersistenceStore store; + + // The EJB Methods, the reason for this class + Method ejbLoad; + Method ejbStore; + Method ejbActivate; + Method ejbPassivate; + Method ejbRemove; -HashMap createMethods = new HashMap(); -HashMap postCreateMethods = new HashMap(); + HashMap createMethods = new HashMap(); + HashMap postCreateMethods = new HashMap(); -// Static + // Static // Constructors -- // Public -public void setContainer(Container c) { -con = (EntityContainer)c; -if (store != null) store.setContainer(c); -} + public void setContainer(Container c) { + con = (EntityContainer)c; + if (store != null) store.setContainer(c); + } + + + public void setPersistenceStore(EntityPersistenceStore store) { + this.store= store; + + //Give it the container + if (con!= null) store.setContainer(con); + } + + public void init() + throws Exception { + + // The common EJB methods + ejbLoad = EntityBean.class.getMethod(ejbLoad, new Class[0]); + ejbStore = EntityBean.class.getMethod(ejbStore, new Class[0]); + ejbActivate = EntityBean.class.getMethod(ejbActivate, new Class[0]); + ejbPassivate = EntityBean.class.getMethod(ejbPassivate, new Class[0]); + ejbRemove = EntityBean.class.getMethod(ejbRemove, new Class[0]); - -public void setPersistenceStore(EntityPersistenceStore store) { -this.store= store; - -//Give it the container -if (con!= null) store.setContainer(con); -} - -public void init() -throws Exception { - -// The common EJB methods -ejbLoad = EntityBean.class.getMethod(ejbLoad, new Class[0]); -ejbStore = EntityBean.class.getMethod(ejbStore, new Class[0]); -ejbActivate = EntityBean.class.getMethod(ejbActivate, new Class[0]); -ejbPassivate = EntityBean.class.getMethod(ejbPassivate, new Class[0]); -ejbRemove = EntityBean.class.getMethod(ejbRemove, new Class[0]); - - if (con.getHomeClass() != null) - { -Method[] methods = con.getHomeClass().getMethods(); -createMethodCache( methods ); - } - if (con.getLocalHomeClass() != null) - { -Method[] methods = con.getLocalHomeClass().getMethods(); -createMethodCache( methods ); - } + if (con.getHomeClass() != null) + { + Method[] methods = con.getHomeClass().getMethods(); + createMethodCache( methods ); + } + if (con.getLocalHomeClass() != null) + { + Method[]
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins CMPPersistenceManager.java
User: danch Date: 01/06/15 16:59:07 Modified:src/main/org/jboss/ejb/plugins CMPPersistenceManager.java Log: Clean up of stuff left over in CMPPersistenceManager from 1st round finder optimization: my test (1000 entities) now completes in about 8.7 seconds - cached was 6.4 seconds Revision ChangesPath 1.21 +7 -31 jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java Index: CMPPersistenceManager.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- CMPPersistenceManager.java2001/06/04 20:46:42 1.20 +++ CMPPersistenceManager.java2001/06/15 23:59:07 1.21 @@ -46,7 +46,8 @@ * * @see related * @author a href=mailto:[EMAIL PROTECTED];Marc Fleury/a -* @version $Revision: 1.20 $ +* @author a href=mailto:[EMAIL PROTECTED];danch (Dan Christopherson/a +* @version $Revision: 1.21 $ */ public class CMPPersistenceManager implements EntityPersistenceManager { @@ -299,44 +300,19 @@ return ((EntityCache) con.getInstanceCache()).createCacheKey(id); } +/** find multiple entities */ public Collection findEntities(Method finderMethod, Object[] args, EntityEnterpriseContext ctx) throws Exception { // The store will find the id and return a collection of PrimaryKeys FinderResults ids = store.findEntities(finderMethod, args, ctx); - - AbstractInstanceCache cache = (AbstractInstanceCache)con.getInstanceCache(); - Map contextMap = new HashMap(); - ArrayList keyList = new ArrayList(); - Iterator idEnum = ids.iterator(); - while(idEnum.hasNext()) { - Object key = idEnum.next(); - Object cacheKey = ((EntityCache)cache).createCacheKey(key); - keyList.add(cacheKey); - - Sync mutex = (Sync)cache.getLock(cacheKey); - try - { - mutex.acquire(); - - // Get context - ctx = (EntityEnterpriseContext)cache.get(cacheKey); - // if ctx has a transaction, we skip it - either it's our Tx - //or we plain don't want to block here. - if (ctx.getTransaction() == null) { -contextMap.put(key, ctx); - } - } catch (InterruptedException ignored) { - } finally { - mutex.release(); - } - } - - ids.setEntityMap(contextMap); store.loadEntities(ids); - return keyList; + // Note: for now we just return the keys - RabbitHole should return the + // finderResults so that the invoker layer can extend this back + // giving the client an OO 'cursor' + return ids.getAllKeys(); } /* ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins CMPPersistenceManager.java
User: vharcq Date: 01/05/02 04:03:16 Modified:src/main/org/jboss/ejb/plugins CMPPersistenceManager.java Log: Nested properties of cmp entity beans can now be private Revision ChangesPath 1.18 +34 -30jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java Index: CMPPersistenceManager.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- CMPPersistenceManager.java2001/02/28 00:03:51 1.17 +++ CMPPersistenceManager.java2001/05/02 11:03:16 1.18 @@ -42,7 +42,7 @@ * * @see related * @author a href=mailto:[EMAIL PROTECTED];Marc Fleury/a -* @version $Revision: 1.17 $ +* @version $Revision: 1.18 $ */ public class CMPPersistenceManager implements EntityPersistenceManager { @@ -129,7 +129,7 @@ // The EJB 1.1 specification is not entirely clear about this, // the EJB 2.0 spec is, see page 169. // Robustness is more important than raw speed for most server - // applications, and not resetting atrribute values result in + // applications, and not resetting atrribute values result in // *very* weird errors (old states re-appear in different instances and the // developer thinks he's on drugs). @@ -142,33 +142,38 @@ i.hasNext();) { try { // get the field declaration - cmpField = ejbClass.getField((String)i.next()); - cmpFieldType = cmpField.getType(); - // find the type of the field and reset it - // to the default value - if (cmpFieldType.equals(boolean.class)) { - cmpField.setBoolean(instance,false); - } else if (cmpFieldType.equals(byte.class)) { - cmpField.setByte(instance,(byte)0); - } else if (cmpFieldType.equals(int.class)) { - cmpField.setInt(instance,0); - } else if (cmpFieldType.equals(long.class)) { - cmpField.setLong(instance,0L); - } else if (cmpFieldType.equals(short.class)) { - cmpField.setShort(instance,(short)0); - } else if (cmpFieldType.equals(char.class)) { - cmpField.setChar(instance,'\u'); - } else if (cmpFieldType.equals(double.class)) { - cmpField.setDouble(instance,0d); - } else if (cmpFieldType.equals(float.class)) { - cmpField.setFloat(instance,0f); - - //} else if (... cmr collection in ejb2.0...) { - // cmpField.set(instance,someNewCollection?); - - } else { - cmpField.set(instance,null); - } +try{ +cmpField = ejbClass.getField((String)i.next()); +cmpFieldType = cmpField.getType(); +// find the type of the field and reset it +// to the default value +if (cmpFieldType.equals(boolean.class)) { +cmpField.setBoolean(instance,false); +} else if (cmpFieldType.equals(byte.class)) { +cmpField.setByte(instance,(byte)0); +} else if (cmpFieldType.equals(int.class)) { +cmpField.setInt(instance,0); +} else if (cmpFieldType.equals(long.class)) { +cmpField.setLong(instance,0L); +} else if (cmpFieldType.equals(short.class)) { +cmpField.setShort(instance,(short)0); +} else if (cmpFieldType.equals(char.class)) { +cmpField.setChar(instance,'\u'); +} else if (cmpFieldType.equals(double.class)) { +cmpField.setDouble(instance,0d); +} else if (cmpFieldType.equals(float.class)) {