Package org.nuclos.api.provider
Class BusinessObjectProvider
java.lang.Object
org.nuclos.api.provider.BusinessObjectProvider
BusinessObjectProvider
provides methods for creating, updating and deleting new or existing BusinessObjects
This Class is usually used in Rule-classes and allows API access only
- Author:
- Matthias Reichart
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends BusinessObject>
voiddelete
(T type) Deprecated.static <T extends BusinessObject>
voiddeleteAll
(Collection<T> type) This method deletes all BusinessObjects of then given collection from the database.static <PK,
T extends LogicalDeletable>
voiddeleteLogical
(T type) This method deletes all BusinessObjects logical without removing data from the database.static <PK,
T extends LogicalDeletable>
voiddeleteLogicalAll
(Collection<T> type) This method deletes all BusinessObjects logical without removing data from the database.This method returns a set containing the names of all modifiable business object classes.static <PK,
T extends BusinessObject<PK>>
PKinsert
(T type) Deprecated.static <PK,
T extends BusinessObject<PK>>
Collection<PK>insertAll
(Collection<T> type) This method receives a collection of new BusinessObjects and stores them in the database.static NuclosFile
This method creates a newNuclosFile
using the given contentstatic NuclosImage
This method creates a newNuclosImage
using the given content; a thumbnail will be created automaticallyvoid
static <T extends BusinessObject>
voidDeprecated.static <T extends BusinessObject>
voidupdateAll
(Collection<T> type) This method updates all BusinessObjects in the given collection.
-
Constructor Details
-
BusinessObjectProvider
BusinessObjectProvider()
-
-
Method Details
-
setBusinessObjectService
-
insert
@Deprecated public static <PK,T extends BusinessObject<PK>> PK insert(T type) throws BusinessException Deprecated.This method receives a new BusinessObject and stores it in the database. If the BusinessObject is not flagged 'new' a BusinessException is thrown.- Parameters:
type
-- Throws:
BusinessException
-
insertAll
public static <PK,T extends BusinessObject<PK>> Collection<PK> insertAll(Collection<T> type) throws BusinessException This method receives a collection of new BusinessObjects and stores them in the database. If one BusinessObject is not flagged 'new' a BusinessException is thrown.- Parameters:
type
-- Throws:
BusinessException
-
update
@Deprecated public static <T extends BusinessObject> void update(T type, SaveFlag... saveFlags) throws BusinessException Deprecated.This method updates a BusinessObjects in the database. If the BusinessObject is not flagged 'update' a BusinessException is thrown.- Parameters:
type
-- Throws:
BusinessException
-
updateAll
public static <T extends BusinessObject> void updateAll(Collection<T> type) throws BusinessException This method updates all BusinessObjects in the given collection. If one BusinessObject is not flagged 'update' a BusinessException is thrown.- Parameters:
type
-- Throws:
BusinessException
-
delete
Deprecated.UseModifiable.delete()
or UseModifiable.delete(Object)
This method deletes the given BusinessObject from the database- Parameters:
type
-- Throws:
BusinessException
-
deleteAll
public static <T extends BusinessObject> void deleteAll(Collection<T> type) throws BusinessException This method deletes all BusinessObjects of then given collection from the database.- Parameters:
type
-- Throws:
BusinessException
-
deleteLogical
This method deletes all BusinessObjects logical without removing data from the database.- Parameters:
type
-- Throws:
BusinessException
-
deleteLogicalAll
public static <PK,T extends LogicalDeletable> void deleteLogicalAll(Collection<T> type) throws BusinessException This method deletes all BusinessObjects logical without removing data from the database.- Parameters:
type
-- Throws:
BusinessException
-
newFile
This method creates a newNuclosFile
using the given content- Parameters:
name
-content
-- Returns:
NuclosFile
- Throws:
BusinessException
-
newImage
This method creates a newNuclosImage
using the given content; a thumbnail will be created automatically- Parameters:
name
-content
-- Returns:
NuclosImage
- Throws:
BusinessException
-
getAllModifiableBusinessObjectClassNames
This method returns a set containing the names of all modifiable business object classes. Readonly business objects (such as datasource based), Integration points and generic business objects are NOT included. Helpful for a generic implementation of a GDPR requirement, for example.
-
Modifiable.delete()
or UseModifiable.delete(Object)