Package org.cyclos.impl
Interface CRUDServiceLocal<E extends SimpleEntity,DTO extends EntityDTO,D extends EntityData<DTO>,DP>
-
- All Superinterfaces:
CRUDService<DTO,D,DP>,Service
- All Known Subinterfaces:
AccessClientServiceLocal,AccountFeeServiceLocal,AccountTypeServiceLocal,AdAddressServiceLocal,AdCategoryServiceLocal,AdCustomFieldPossibleValueCategoryServiceLocal,AdCustomFieldPossibleValueServiceLocal,AdCustomFieldServiceLocal,AdDeliveryMethodServiceLocal,AdInterestServiceLocal,AdServiceLocal,AgreementServiceLocal,AuthorizationLevelServiceLocal,AuthorizationRoleServiceLocal,BannerServiceLocal,BaseCustomFieldPossibleValueCategoryServiceLocal<CF,C,PV>,BaseCustomFieldPossibleValueServiceLocal<CF,C,PV>,BulkActionServiceLocal,ChannelConfigurationServiceLocal,ChannelServiceLocal,ConfigurationServiceLocal,ContactCustomFieldPossibleValueCategoryServiceLocal,ContactCustomFieldPossibleValueServiceLocal,ContactCustomFieldServiceLocal,ContactInfoFieldPossibleValueCategoryServiceLocal,ContactInfoFieldPossibleValueServiceLocal,ContactInfoFieldServiceLocal,ContactInfoServiceLocal,ContactServiceLocal,CurrencyServiceLocal,CustomBackgroundTaskServiceLocal,CustomOperationActionServiceLocal,CustomOperationFieldPossibleValueCategoryServiceLocal,CustomOperationFieldPossibleValueServiceLocal,CustomOperationFieldServiceLocal,CustomOperationServiceLocal,CustomRecurringTaskServiceLocal,CustomScriptServiceLocal,CustomSvgIconServiceLocal,CustomWebServiceServiceLocal,CustomWizardFieldPossibleValueCategoryServiceLocal,CustomWizardFieldPossibleValueServiceLocal,CustomWizardFieldServiceLocal,CustomWizardServiceLocal,CustomWizardStepServiceLocal,DocumentCategoryServiceLocal,DocumentCustomFieldPossibleValueCategoryServiceLocal,DocumentCustomFieldPossibleValueServiceLocal,DocumentCustomFieldServiceLocal,DocumentServiceLocal,ExportFormatServiceLocal,ExtensionPointServiceLocal,GeneralReferenceServiceLocal,GroupServiceLocal,IdentityProviderServiceLocal,ImportServiceLocal,IpAddressServiceLocal,LanguageServiceLocal,MenuEntryServiceLocal,MessageCategoryServiceLocal,MobilePageServiceLocal,NetworkServiceLocal,OidcClientServiceLocal,OperatorGroupServiceLocal,OperatorServiceLocal,OrderServiceLocal,PasswordTypeServiceLocal,PhoneServiceLocal,PrincipalTypeServiceLocal,PrivacyControlServiceLocal,ProductServiceLocal,RecordCustomFieldPossibleValueCategoryServiceLocal,RecordCustomFieldPossibleValueServiceLocal,RecordCustomFieldServiceLocal,RecordSectionServiceLocal,RecordServiceLocal,RecordTypeServiceLocal,ServiceInterceptorServiceLocal,SmsOperationConfigurationServiceLocal,StaticContentServiceLocal,SystemImageCategoryServiceLocal,SystemReportPreferencesServiceLocal,ThemeServiceLocal,TokenServiceLocal,TransactionCustomFieldPossibleValueCategoryServiceLocal,TransactionCustomFieldPossibleValueServiceLocal,TransactionCustomFieldServiceLocal,TransactionFeedbackServiceLocal,TransferFeeServiceLocal,TransferFilterServiceLocal,TransferStatusFlowServiceLocal,TransferStatusServiceLocal,TransferTypeServiceLocal,UserAddressServiceLocal,UserCustomFieldPossibleValueCategoryServiceLocal,UserCustomFieldPossibleValueServiceLocal,UserCustomFieldServiceLocal,UserSectionServiceLocal,UserServiceLocal,VoucherCategoryServiceLocal,VoucherConfigurationServiceLocal,VoucherCustomFieldPossibleValueCategoryServiceLocal,VoucherCustomFieldPossibleValueServiceLocal,VoucherCustomFieldServiceLocal,VoucherTemplateServiceLocal,VoucherTypeServiceLocal
public interface CRUDServiceLocal<E extends SimpleEntity,DTO extends EntityDTO,D extends EntityData<DTO>,DP> extends CRUDService<DTO,D,DP>
Local interface for aCRUDService, allowing working directly with the entities
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T extends E>
Tfind(Long id)Finds the entity with the given id<T extends E>
Set<T>findAll(Iterable<Long> ids)Finds all entities with the given ids.Class<E>getEntityClass()It returns the entity with which this service operates.EnewEntity(DP params)Instantiates a new, empty entity.voidremove(E entity)Removes the given entityvoidremoveAll(Iterable<E> entities)Removes all the given entitiesdefault <T extends E>
TsaveEntity(DTO dto)Saves the given DTO and returns the created entityLongsaveSkippingEntityLog(DTO dto)Saves the DTO, skipping any entity log.DTOtoDTO(E entity)Converts the given entity to DTOEtoEntity(DTO dto)Converts the given DTO to entityvoidvalidate(DTO dto)Validates the given DTO without saving it-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
-
-
-
Method Detail
-
findAll
<T extends E> Set<T> findAll(Iterable<Long> ids)
Finds all entities with the given ids.EntityNotFoundExceptionwill be thrown if any of the given ids are invalid
-
newEntity
E newEntity(DP params)
Instantiates a new, empty entity. In some (rare) cases where only a single instance of a given entity exists, will return that instance
-
remove
void remove(E entity)
Removes the given entity
-
saveEntity
default <T extends E> T saveEntity(DTO dto)
Saves the given DTO and returns the created entity
-
saveSkippingEntityLog
Long saveSkippingEntityLog(DTO dto)
Saves the DTO, skipping any entity log. Mostly used on tests.
-
validate
void validate(DTO dto)
Validates the given DTO without saving it- Throws:
ValidationException- When the given DTO was invalid
-
-