@Test public void testClone() { MJob job = job(); MJob withoutJobValue = job.clone(false); assertEquals(job, withoutJobValue); assertEquals(MPersistableEntity.PERSISTANCE_ID_DEFAULT, withoutJobValue.getPersistenceId()); assertNull(withoutJobValue.getName()); assertNull(withoutJobValue.getCreationUser()); assertEquals(fromConfig(), withoutJobValue.getJobConfig(Direction.FROM)); assertEquals(toConfig(), withoutJobValue.getJobConfig(Direction.TO)); assertEquals(driverConfig(), withoutJobValue.getDriverConfig()); assertNull(withoutJobValue.getJobConfig(Direction.FROM) .getConfig("CONFIGFROMNAME").getInput("INTEGER-INPUT").getValue()); assertNull(withoutJobValue.getJobConfig(Direction.FROM) .getConfig("CONFIGFROMNAME").getInput("STRING-INPUT").getValue()); MJob withJobValue = job.clone(true); assertEquals(job, withJobValue); assertEquals(job.getPersistenceId(), withJobValue.getPersistenceId()); assertEquals(job.getName(), withJobValue.getName()); assertEquals(job.getCreationUser(), withJobValue.getCreationUser()); assertEquals(fromConfig(), withJobValue.getJobConfig(Direction.FROM)); assertEquals(toConfig(), withJobValue.getJobConfig(Direction.TO)); assertEquals(driverConfig(), withJobValue.getDriverConfig()); assertEquals(100, withJobValue.getJobConfig(Direction.FROM) .getConfig("CONFIGFROMNAME").getInput("INTEGER-INPUT").getValue()); assertEquals("TEST-VALUE", withJobValue.getJobConfig(Direction.FROM) .getConfig("CONFIGFROMNAME").getInput("STRING-INPUT").getValue()); }
@Override public MJob clone(boolean cloneWithValue) { if(cloneWithValue) { return new MJob(this); } else { return new MJob( getConnectorId(Direction.FROM), getConnectorId(Direction.TO), getLinkId(Direction.FROM), getLinkId(Direction.TO), getFromJobConfig().clone(false), getToJobConfig().clone(false), getDriverConfig().clone(false)); } }
MJob extends MAccountableEntity implements MClonable { @Override public MJob clone(boolean cloneWithValue) { if(cloneWithValue) { return new MJob(this); } else { return new MJob( getConnectorId(Direction.FROM), getConnectorId(Direction.TO), getLinkId(Direction.FROM), getLinkId(Direction.TO), getFromJobConfig().clone(false), getToJobConfig().clone(false), getDriverConfig().clone(false)); } } }
MJob extends MAccountableEntity implements MClonable { @Override public MJob clone(boolean cloneWithValue) { if(cloneWithValue) { return new MJob(this); } else { return new MJob( getConnectorId(Direction.FROM), getConnectorId(Direction.TO), getLinkId(Direction.FROM), getLinkId(Direction.TO), getFromJobConfig().clone(false), getToJobConfig().clone(false), getDriverConfig().clone(false)); } } MJob(long fromConnectorId,
              long toConnectorId,
              long fromLinkId,
              long toLinkId,
              MFromConfig fromConfig,
              MToConfig toConfig,
              MDriverConfig driverConfig);  MJob(MJob other);  MJob(MJob other, MFromConfig fromConfig, MToConfig toConfig, MDriverConfig driverConfig); }
MJob extends MAccountableEntity implements MClonable { @Override public MJob clone(boolean cloneWithValue) { if(cloneWithValue) { return new MJob(this); } else { return new MJob( getConnectorId(Direction.FROM), getConnectorId(Direction.TO), getLinkId(Direction.FROM), getLinkId(Direction.TO), getFromJobConfig().clone(false), getToJobConfig().clone(false), getDriverConfig().clone(false)); } } MJob(long fromConnectorId,
              long toConnectorId,
              long fromLinkId,
              long toLinkId,
              MFromConfig fromConfig,
              MToConfig toConfig,
              MDriverConfig driverConfig);  MJob(MJob other);  MJob(MJob other, MFromConfig fromConfig, MToConfig toConfig, MDriverConfig driverConfig); @Override String toString(); long getLinkId(Direction type); long getFromLinkId(); long getToLinkId(); long getConnectorId(Direction type); long getFromConnectorId(); long getToConnectorId(); MConfigList getJobConfig(Direction type); MFromConfig getFromJobConfig(); MToConfig getToJobConfig(); MDriverConfig getDriverConfig(); @Override MJob clone(boolean cloneWithValue); @Override boolean equals(Object object); }
MJob extends MAccountableEntity implements MClonable { @Override public MJob clone(boolean cloneWithValue) { if(cloneWithValue) { return new MJob(this); } else { return new MJob( getConnectorId(Direction.FROM), getConnectorId(Direction.TO), getLinkId(Direction.FROM), getLinkId(Direction.TO), getFromJobConfig().clone(false), getToJobConfig().clone(false), getDriverConfig().clone(false)); } } MJob(long fromConnectorId,
              long toConnectorId,
              long fromLinkId,
              long toLinkId,
              MFromConfig fromConfig,
              MToConfig toConfig,
              MDriverConfig driverConfig);  MJob(MJob other);  MJob(MJob other, MFromConfig fromConfig, MToConfig toConfig, MDriverConfig driverConfig); @Override String toString(); long getLinkId(Direction type); long getFromLinkId(); long getToLinkId(); long getConnectorId(Direction type); long getFromConnectorId(); long getToConnectorId(); MConfigList getJobConfig(Direction type); MFromConfig getFromJobConfig(); MToConfig getToJobConfig(); MDriverConfig getDriverConfig(); @Override MJob clone(boolean cloneWithValue); @Override boolean equals(Object object);  }