use of com.liferay.blade.samples.jndiservicebuilder.model.impl.RegionImpl in project liferay-blade-samples by liferay.
the class RegionPersistenceImpl method toUnwrappedModel.
protected Region toUnwrappedModel(Region region) {
if (region instanceof RegionImpl) {
return region;
}
RegionImpl regionImpl = new RegionImpl();
regionImpl.setNew(region.isNew());
regionImpl.setPrimaryKey(region.getPrimaryKey());
regionImpl.setRegionId(region.getRegionId());
regionImpl.setRegionName(region.getRegionName());
return regionImpl;
}
use of com.liferay.blade.samples.jndiservicebuilder.model.impl.RegionImpl in project liferay-blade-samples by liferay.
the class RegionPersistenceImpl method create.
/**
* Creates a new region with the primary key. Does not add the region to the database.
*
* @param regionId the primary key for the new region
* @return the new region
*/
@Override
public Region create(long regionId) {
Region region = new RegionImpl();
region.setNew(true);
region.setPrimaryKey(regionId);
return region;
}
Aggregations