Search in sources :

Example 1 with RegionImpl

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

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

Aggregations

RegionImpl (com.liferay.blade.samples.jndiservicebuilder.model.impl.RegionImpl)2 Region (com.liferay.blade.samples.jndiservicebuilder.model.Region)1