io.github.rongaru.javaee.webapp.bean.AbstractUpdateHelperTransactionalBeanJSF Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javaee Show documentation
Show all versions of javaee Show documentation
Java Classes For JavaEE JSF.
The newest version!
package io.github.rongaru.javaee.webapp.bean;
import io.github.rongaru.javaee.backend.dto.AbstractUpdateHelperDto;
import io.github.rongaru.javaee.backend.service.AbstractUpdateHelperService;
import io.github.rongaru.javaee.webapp.model.AbstractUpdateHelperTransactionalDataModelJSF;
import java.util.Date;
public abstract class AbstractUpdateHelperTransactionalBeanJSF< Dto, Service, UserDto, DataModelJSF, UserLoginDataModelJSF > extends AbstractCreateHelperTransactionalBeanJSF< Dto, Service, UserDto, DataModelJSF, UserLoginDataModelJSF > {
@Override
protected boolean updateIntoDatabase( ) {
DataModelJSF dataModelJSF = getDataModelJSF( );
Dto record = getAbstractDataModelJSF( ).getRecord( );
UserDto userDto = getAbstractUserLoginDataModelJSF( ).getUserDto( );
AbstractUpdateHelperDto< UserDto > createHelperDto = ( AbstractUpdateHelperDto ) record;
setEditElementParameters( record, dataModelJSF );
createHelperDto.setUpdatedByUserDto( userDto );
createHelperDto.setUpdatedDate( new Date( ) );
return getAbstractService( ).update( record );
}
@Override
protected AbstractUpdateHelperService< Dto > getAbstractService( ) {
return ( AbstractUpdateHelperService ) getService( );
}
@Override
protected AbstractUpdateHelperTransactionalDataModelJSF< Dto > getAbstractDataModelJSF( ) {
return ( AbstractUpdateHelperTransactionalDataModelJSF ) getDataModelJSF( );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy