Search in sources :

Example 1 with CountryImpl

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;
}
Also used : CountryImpl(com.liferay.blade.samples.jdbcservicebuilder.model.impl.CountryImpl)

Example 2 with 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;
}
Also used : CountryImpl(com.liferay.blade.samples.jdbcservicebuilder.model.impl.CountryImpl) Country(com.liferay.blade.samples.jdbcservicebuilder.model.Country)

Aggregations

CountryImpl (com.liferay.blade.samples.jdbcservicebuilder.model.impl.CountryImpl)2 Country (com.liferay.blade.samples.jdbcservicebuilder.model.Country)1