/**
* Abiquo community edition
* cloud management application for hybrid clouds
* Copyright (C) 2008-2010 - Abiquo Holdings S.L.
*
* This application is free software; you can redistribute it and/or
* modify it under the terms of the GNU LESSER GENERAL PUBLIC
* LICENSE as published by the Free Software Foundation under
* version 3 of the License
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* LESSER GENERAL PUBLIC LICENSE v.3 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
package com.abiquo.abiserver.business.hibernate.pojohb.virtualimage;
// Generated 16-oct-2008 16:52:14 by Hibernate Tools 3.2.1.GA
import com.abiquo.abiserver.business.hibernate.pojohb.IPojoHB;
import com.abiquo.abiserver.business.hibernate.pojohb.infrastructure.DatacenterHB;
import com.abiquo.abiserver.pojo.virtualimage.Repository;
/**
* Repository generated by hbm2java
*/
public class RepositoryHB implements java.io.Serializable, IPojoHB<Repository>
{
private static final long serialVersionUID = 5993461255017812083L;
private Integer idRepository;
private String name;
private String url;
// private EnterpriseHB enterprise;
private DatacenterHB datacenter;
/** This info in not on DDBB, its required to am. */
private Long repositoryCapacityMb;
/** This info in not on DDBB, its required to am. */
private Long repositoryEnterpriseUsedMb;
/** This info in not on DDBB, its required to am. */
private Long repositoryRemainingMb;
public Long getRepositoryCapacityMb()
{
return repositoryCapacityMb;
}
public void setRepositoryCapacityMb(Long repositoryCapacityMb)
{
this.repositoryCapacityMb = repositoryCapacityMb;
}
public Long getRepositoryEnterpriseUsedMb()
{
return repositoryEnterpriseUsedMb;
}
public void setRepositoryEnterpriseUsedMb(Long repositoryEnterpriseUsedMb)
{
this.repositoryEnterpriseUsedMb = repositoryEnterpriseUsedMb;
}
public Long getRepositoryRemainingMb()
{
return repositoryRemainingMb;
}
public void setRepositoryRemainingMb(Long repositoryRemainingMb)
{
this.repositoryRemainingMb = repositoryRemainingMb;
}
public RepositoryHB()
{
}
public RepositoryHB(String name, String url, DatacenterHB datacenter)
{
this.name = name;
this.url = url;
// this.enterprise = enterprise;
this.datacenter = datacenter;
}
public Integer getIdRepository()
{
return idRepository;
}
public void setIdRepository(Integer idRepository)
{
this.idRepository = idRepository;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getUrl()
{
return url;
}
public void setUrl(String url)
{
this.url = url;
}
public DatacenterHB getDatacenter()
{
return datacenter;
}
public void setDatacenter(DatacenterHB datacenter)
{
this.datacenter = datacenter;
}
public Repository toPojo()
{
Repository repository = new Repository();
repository.setId(idRepository);
repository.setName(name);
repository.setURL(url);
// repository.setEnterpirse(enterprise.toPojo());
repository.setDatacenter(datacenter.toPojo());
repository.setRepositoryCapacityMb(repositoryCapacityMb);
repository.setRepositoryEnterpriseUsedMb(repositoryEnterpriseUsedMb);
repository.setRepositoryRemainingMb(repositoryRemainingMb);
return repository;
}
}