use of com.liferay.blade.samples.jdbcservicebuilder.model.impl.CountryImpl in project liferay-blade-samples by liferay.
the class CountryPersistenceImpl method toUnwrappedModel.
protected Country toUnwrappedModel(Country country) {
if (country instanceof CountryImpl) {
return country;
}
CountryImpl countryImpl = new CountryImpl();
countryImpl.setNew(country.isNew());
countryImpl.setPrimaryKey(country.getPrimaryKey());
countryImpl.setCountryId(country.getCountryId());
countryImpl.setCountryName(country.getCountryName());
return countryImpl;
}
use of com.liferay.blade.samples.jdbcservicebuilder.model.impl.CountryImpl in project liferay-blade-samples by liferay.
the class CountryPersistenceImpl method create.
/**
* Creates a new country with the primary key. Does not add the country to the database.
*
* @param countryId the primary key for the new country
* @return the new country
*/
@Override
public Country create(long countryId) {
Country country = new CountryImpl();
country.setNew(true);
country.setPrimaryKey(countryId);
return country;
}
Aggregations