Beispiel #1
0
  public static final class DataCenterStatusPredicate implements IPredicate<storage_pool> {
    private StoragePoolStatus status = StoragePoolStatus.values()[0];

    public DataCenterStatusPredicate(StoragePoolStatus status) {
      this.status = status;
    }

    @Override
    public boolean Match(storage_pool source) {
      return source.getstatus() == status;
    }
  }
 @Override
 public storage_pool mapRow(ResultSet rs, int rowNum) throws SQLException {
   storage_pool entity = new storage_pool();
   entity.setdescription(rs.getString("description"));
   entity.setId(Guid.createGuidFromString(rs.getString("id")));
   entity.setname(rs.getString("name"));
   entity.setstorage_pool_type(StorageType.forValue(rs.getInt("storage_pool_type")));
   entity.setstatus(StoragePoolStatus.forValue(rs.getInt("status")));
   entity.setmaster_domain_version(rs.getInt("master_domain_version"));
   entity.setspm_vds_id(NGuid.createGuidFromString(rs.getString("spm_vds_id")));
   entity.setcompatibility_version(new Version(rs.getString("compatibility_version")));
   entity.setStoragePoolFormatType(getStorageFormatTypeForPool(rs));
   return entity;
 }