Examples of Serializable


Examples of java.io.Serializable

    if (entity != null) {
      if (em().contains(entity)) {
        em().remove(entity);
        return true;
      } else {
        Serializable id = getMetadataUtil().getId(entity);
        return _removeById(entity.getClass(), id);
      }
    }
    return false;
  }
View Full Code Here

Examples of org.timerescue.information.Serializable

   */
  @Test
  public void testGetSerializableFromClass() {
    DefaultAttackAction action = new DefaultAttackAction();
    String clasname = action.getClass().getName();
    Serializable ser = null;
    try {
      ser = Introspection.getSerializableFromClass(action.getClass().getName());
    } catch (ClassNotFoundException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      fail("Error ClassNotFound");
    } catch (InstantiationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      fail("Error InstantiationException");
    } catch (IllegalAccessException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      fail("Error IllegalAccessException");
    }
   
    assertArrayEquals(clasname.getBytes(), ser.getClass().getName().getBytes() );
   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.