| Auszug |
|---|
|
Nuclos Interface Modifiable: save, delete, refresh, changeStatus, rule API 4.28, BusinessObjectProvider deprecated. |
Language: Deutsch · English
Interface Modifiable
Write BOs directly via save() and delete() – the modern way instead of the deprecated provider methods.
| Status |
|---|
| colour | Green |
|---|
| title | Updated: Jul 2026 |
|---|
|
| Status |
|---|
| colour | Grey |
|---|
| title | applies to Nuclos 4.2026.x |
|---|
|
What is Modifiable?
Since Nuclos 4.28 the rule API provides the Modifiable interface: business objects are written directly via save() and delete() – without the BusinessObjectProvider (whose static insert/update/delete are deprecated).
save()
Saves the BO. A new BO is created (and gets a new id), an existing one is updated.
| Codeblock |
|---|
|
void save() throws BusinessException; |
delete(id)
Deletes the BO with this id. Static method – callable without an instance.
| Codeblock |
|---|
|
static <PK> void delete(PK id) throws BusinessException; |
Example
Readable, modern rule code with get, changeStatus, save, refresh (from 4.32) and static delete:
| Codeblock |
|---|
|
import org.nuclos.api.exception.BusinessException;
public class UtilsNeu {
public static void workAuftrag(Long id1, Long id2) throws BusinessException {
Auftrag auftrag = Auftrag.get(id1);
auftrag.changeStatus(AuftragSM.State_20);
auftrag.setName("NeuerName");
auftrag.save();
auftrag.refresh(); // ab v4.32
Auftrag.delete(id2);
}
} |
Related pages
BusinessObjectProvider
Provider alternative.
Open →