Package org.cyclos.services
Interface CRUDService<DTO extends EntityDTO,D extends EntityData<DTO>,DP>
-
- Type Parameters:
DTO- TheEntityDTOthis service operates
- All Superinterfaces:
Service
- All Known Subinterfaces:
AccessClientService,AccessClientServiceLocal,AccountFeeService,AccountFeeServiceLocal,AccountTypeService,AccountTypeServiceLocal,AdAddressService,AdAddressServiceLocal,AdCategoryService,AdCategoryServiceLocal,AdCustomFieldPossibleValueCategoryService,AdCustomFieldPossibleValueCategoryServiceLocal,AdCustomFieldPossibleValueService,AdCustomFieldPossibleValueServiceLocal,AdCustomFieldService,AdCustomFieldServiceLocal,AdDeliveryMethodService,AdDeliveryMethodServiceLocal,AdInterestService,AdInterestServiceLocal,AdService,AdServiceLocal,AgreementService,AgreementServiceLocal,AuthorizationLevelService,AuthorizationLevelServiceLocal,AuthorizationRoleService,AuthorizationRoleServiceLocal,BannerService,BannerServiceLocal,BaseCustomFieldPossibleValueCategoryService,BaseCustomFieldPossibleValueCategoryServiceLocal<CF,C,PV>,BaseCustomFieldPossibleValueService,BaseCustomFieldPossibleValueServiceLocal<CF,C,PV>,BaseCustomFieldService<DTO,D,DP>,BulkActionService,BulkActionServiceLocal,ChannelConfigurationService,ChannelConfigurationServiceLocal,ChannelService,ChannelServiceLocal,ConfigurationService,ConfigurationServiceLocal,ContactCustomFieldPossibleValueCategoryService,ContactCustomFieldPossibleValueCategoryServiceLocal,ContactCustomFieldPossibleValueService,ContactCustomFieldPossibleValueServiceLocal,ContactCustomFieldService,ContactCustomFieldServiceLocal,ContactInfoFieldPossibleValueCategoryService,ContactInfoFieldPossibleValueCategoryServiceLocal,ContactInfoFieldPossibleValueService,ContactInfoFieldPossibleValueServiceLocal,ContactInfoFieldService,ContactInfoFieldServiceLocal,ContactInfoService,ContactInfoServiceLocal,ContactService,ContactServiceLocal,CRUDServiceLocal<E,DTO,D,DP>,CRUDWithConfirmationPasswordService<DTO,D,DP>,CurrencyService,CurrencyServiceLocal,CustomBackgroundTaskService,CustomBackgroundTaskServiceLocal,CustomOperationActionService,CustomOperationActionServiceLocal,CustomOperationFieldPossibleValueCategoryService,CustomOperationFieldPossibleValueCategoryServiceLocal,CustomOperationFieldPossibleValueService,CustomOperationFieldPossibleValueServiceLocal,CustomOperationFieldService,CustomOperationFieldServiceLocal,CustomOperationService,CustomOperationServiceLocal,CustomRecurringTaskService,CustomRecurringTaskServiceLocal,CustomScriptService,CustomScriptServiceLocal,CustomSvgIconService,CustomSvgIconServiceLocal,CustomWebServiceService,CustomWebServiceServiceLocal,CustomWizardFieldPossibleValueCategoryService,CustomWizardFieldPossibleValueCategoryServiceLocal,CustomWizardFieldPossibleValueService,CustomWizardFieldPossibleValueServiceLocal,CustomWizardFieldService,CustomWizardFieldServiceLocal,CustomWizardService,CustomWizardServiceLocal,CustomWizardStepService,CustomWizardStepServiceLocal,DocumentCategoryService,DocumentCategoryServiceLocal,DocumentCustomFieldPossibleValueCategoryService,DocumentCustomFieldPossibleValueCategoryServiceLocal,DocumentCustomFieldPossibleValueService,DocumentCustomFieldPossibleValueServiceLocal,DocumentCustomFieldService,DocumentCustomFieldServiceLocal,DocumentService,DocumentServiceLocal,ExportFormatService,ExportFormatServiceLocal,ExtensionPointService,ExtensionPointServiceLocal,GeneralReferenceService,GeneralReferenceServiceLocal,GroupService,GroupServiceLocal,IdentityProviderService,IdentityProviderServiceLocal,ImportService,ImportServiceLocal,IpAddressService,IpAddressServiceLocal,LanguageService,LanguageServiceLocal,MenuEntryService,MenuEntryServiceLocal,MessageCategoryService,MessageCategoryServiceLocal,MobilePageService,MobilePageServiceLocal,NetworkService,NetworkServiceLocal,OidcClientService,OidcClientServiceLocal,OperatorGroupService,OperatorGroupServiceLocal,OperatorService,OperatorServiceLocal,OrderService,OrderServiceLocal,PasswordTypeService,PasswordTypeServiceLocal,PhoneService,PhoneServiceLocal,PrincipalTypeService,PrincipalTypeServiceLocal,PrivacyControlService,PrivacyControlServiceLocal,ProductService,ProductServiceLocal,RecordCustomFieldPossibleValueCategoryService,RecordCustomFieldPossibleValueCategoryServiceLocal,RecordCustomFieldPossibleValueService,RecordCustomFieldPossibleValueServiceLocal,RecordCustomFieldService,RecordCustomFieldServiceLocal,RecordSectionService,RecordSectionServiceLocal,RecordService,RecordServiceLocal,RecordTypeService,RecordTypeServiceLocal,ServiceInterceptorService,ServiceInterceptorServiceLocal,SmsOperationConfigurationService,SmsOperationConfigurationServiceLocal,StaticContentService,StaticContentServiceLocal,SystemImageCategoryService,SystemImageCategoryServiceLocal,SystemReportPreferencesService,SystemReportPreferencesServiceLocal,ThemeService,ThemeServiceLocal,TokenService,TokenServiceLocal,TransactionCustomFieldPossibleValueCategoryService,TransactionCustomFieldPossibleValueCategoryServiceLocal,TransactionCustomFieldPossibleValueService,TransactionCustomFieldPossibleValueServiceLocal,TransactionCustomFieldService,TransactionCustomFieldServiceLocal,TransactionFeedbackService,TransactionFeedbackServiceLocal,TransferFeeService,TransferFeeServiceLocal,TransferFilterService,TransferFilterServiceLocal,TransferStatusFlowService,TransferStatusFlowServiceLocal,TransferStatusService,TransferStatusServiceLocal,TransferTypeService,TransferTypeServiceLocal,UserAddressService,UserAddressServiceLocal,UserCustomFieldPossibleValueCategoryService,UserCustomFieldPossibleValueCategoryServiceLocal,UserCustomFieldPossibleValueService,UserCustomFieldPossibleValueServiceLocal,UserCustomFieldService,UserCustomFieldServiceLocal,UserSectionService,UserSectionServiceLocal,UserService,UserServiceLocal,VoucherCategoryService,VoucherCategoryServiceLocal,VoucherConfigurationService,VoucherConfigurationServiceLocal,VoucherCustomFieldPossibleValueCategoryService,VoucherCustomFieldPossibleValueCategoryServiceLocal,VoucherCustomFieldPossibleValueService,VoucherCustomFieldPossibleValueServiceLocal,VoucherCustomFieldService,VoucherCustomFieldServiceLocal,VoucherTemplateService,VoucherTemplateServiceLocal,VoucherTypeService,VoucherTypeServiceLocal
public interface CRUDService<DTO extends EntityDTO,D extends EntityData<DTO>,DP> extends Service
A CRUD service is capable of performing basic data access operations
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DgetData(@NotNull Long id)Returns data for details of the given entityDgetDataForNew(DP params)Returns data for a new entity with the given context parametersDTOload(@NotNull Long id)Loads a DTO for the entity with the given id, ensuring that the logged user can see the recordvoidremove(@NotNull Long id)Removes the entity associated with the given identifiervoidremoveAll(@NotNull Collection<Long> ids)Removes the entities associated with the given identifiersLongsave(DTO object)Saves the given object, returning the generated identifier
-
-
-
Method Detail
-
getData
D getData(@NotNull @NotNull Long id) throws FrameworkException
Returns data for details of the given entity- Throws:
EntityNotFoundException- When the given id is not valid (or represents a not visible entity)FrameworkException
-
getDataForNew
D getDataForNew(DP params) throws FrameworkException
Returns data for a new entity with the given context parameters- Throws:
FrameworkException
-
load
DTO load(@NotNull @NotNull Long id) throws FrameworkException
Loads a DTO for the entity with the given id, ensuring that the logged user can see the record- Throws:
EntityNotFoundException- When the entity with the given id was not found (or not visible)FrameworkException
-
remove
void remove(@NotNull @NotNull Long id) throws FrameworkExceptionRemoves the entity associated with the given identifier- Throws:
EntityNotFoundException- When the given id is not valid (or represents a not visible entity)ConstraintViolatedOnRemoveException- When the given id represents an entity which is referenced by other entities, and the delete is not cascaded to themFrameworkException
-
removeAll
void removeAll(@NotNull @NotNull Collection<Long> ids) throws FrameworkExceptionRemoves the entities associated with the given identifiers- Throws:
EntityNotFoundException- When any of the given ids are not valid (or represents not visible entities)ConstraintViolatedOnRemoveException- When any of the given ids represents an entity which is referenced by other entities, and the delete is not cascaded to themFrameworkException
-
save
Long save(@NotNull DTO object) throws FrameworkException
Saves the given object, returning the generated identifier- Throws:
EntityNotFoundException- When the given id is not valid (or represents a not visible entity)ValidationException- When the given object has invalid fieldsDataAccessException- When a data access error prevented the object of being savedFrameworkException
-
-