Nuclos class generation rule compilation: BOEntities.jar, Nuclet.jar, state model class, generation, suffix SM GEN DS RE PO ISD, classloader. |
Language: Deutsch · English
How Nuclos generates BOs, state models and more as Java classes – types, JAR order and timing.
Auf dieser Seite |
For rule programming Nuclos provides business objects, state models and other units objectified as Java classes. This keeps access from rules simple and type-safe. After a successful save, changes are immediately available in the classloader.
The package name matches the nuclet's (otherwise a default, e.g. |
| Type | Suffix | Purpose |
|---|---|---|
| Business object | – | objectified BO with getters/setters and query constants; QueryProvider. |
| State model | SM | states as constants State_<n> for the StatemodelProvider. |
| Work step | GEN | type-safe generation class for the GenerationProvider. |
| Report datasource | DS | objectified data source for the DatasourceProvider. |
| Report | RE | report with output formats for the report/printout (PDF only). |
| Printout (form) | PO | form with output formats for the PrintoutProvider (PDF only). |
| Import structure definition | ISD | structure definition for the ImportProvider. |
| System/nuclet parameter | – | parameter constants for the ParameterProvider. |
Example of a business object incl. query constants:
public class Adresse extends AbstractBusinessObject implements Modifiable {
// Konstanten für den QueryProvider
public static final Attribute<Boolean> Standard =
new Attribute<Boolean>("Standard", "org.nuclet.basis", "Adresse", new Long(40005905), "standard", new Long(40006275), Boolean.class );
public static final StringAttribute<String> Postfach =
new StringAttribute<String>("Postfach", "org.nuclet.basis", "Adresse", new Long(40005905), "postfach", new Long(40006271), String.class );
public java.lang.Boolean getStandard() {
return getField("standard", java.lang.Boolean.class);
}
public void setStandard(java.lang.Boolean pStandard) {
setField("standard", pStandard);
}
public java.lang.String getPostfach() {
return getField("postfach", java.lang.String.class);
}
public void setPostfach(java.lang.String pPostfach) {
setField("postfach", pPostfach);
}
} |
Example of a state model class:
public class AuftragSM{
public static State State_10 =
new StateImpl(IdUtils.toLongId(40006496), "Entwurf", "Geplant", 10, IdUtils.toLongId(40006477));
public static State State_90 =
new StateImpl(IdUtils.toLongId(40006497), "Abgeschlossen", "Abgeschlossen", 90, IdUtils.toLongId(40006477));
public static State State_50 =
new StateImpl(IdUtils.toLongId(40006498), "Offen", "Offen", 50, IdUtils.toLongId(40006477));
public static State State_99 =
new StateImpl(IdUtils.toLongId(40006499), "Storniert", "Storniert", 99, IdUtils.toLongId(40006477));
} |
The classes are compiled grouped by type into separate JARs in the CodeGenerator directory and added to the classloader:
| Type | JAR | Order |
|---|---|---|
| Business objects | BOEntities.jar | first – only access BO metadata. |
| State model classes | statemodels.jar | independent. |
| Report datasource classes | ReportDSEntities.jar | independent. |
| Report classes | ReportEntities.jar | independent. |
| Printout classes | PrintoutEntities.jar | independent. |
| Import structure definition | ImportStructDefsEntities.jar | independent. |
| Parameters | Parameter.jar | independent. |
| Work step classes | Generation.jar | after the business objects (source/target objects). |
| Rules & libraries | Nuclet.jar | last – uses all other classes; fails on errors or invalid references. |
Nuclet.jar are rebuilt.If, say, a status numeral changes (40 → 50), a rule still addressing status 40 no longer finds it – the |