/** * Sets the related VDS id. * * @param vdsId * the id */ public void setVdsId(Guid vdsId) { this.vdsId = vdsId; this.statistics.setVdsId(vdsId); }
@Override public VdsNetworkStatistics mapRow(ResultSet rs, int rowNum) throws SQLException { VdsNetworkStatistics entity = super.mapRow(rs, rowNum); entity.setVdsId(getGuidDefaultEmpty(rs, "vds_id")); return entity; }
public static VdsNetworkInterface setUpStatistics(VdsNetworkInterface entity, Guid id) { VdsNetworkStatistics statistics = new VdsNetworkStatistics(); statistics.setId(null); statistics.setReceiveDropRate(1D); statistics.setReceiveRate(2D); statistics.setTransmitDropRate(3D); statistics.setTransmitRate(4D); statistics.setReceivedBytes(5L); statistics.setTransmittedBytes(6L); statistics.setVdsId(id); statistics.setStatus(null); entity.setStatistics(statistics); return entity; }