if (i % 10 == 0)
log.debug("Update : " + i);
ModelConfig modelConfig = getDomainModel().getModelConfig();
if (modelConfig.isDefaultLoadSave()) {
IDomainModel domainModel = getDomainModel();
if (o == domainModel) {
if (domainModel.isSession()) {
if (arg instanceof Transaction) {
Transaction transaction = (Transaction) arg;
String transactionStatus = transaction
.getStatus();
if (transactionStatus.equals("executed")
|| transactionStatus.equals("undone")) {
List<IEntities> entries = transaction
.getEntries();
for (IEntities entry : entries) {
String entryCode = entry
.getConceptConfig()
.getEntitiesCode();
IPersistentEntities persistentEntities = getPersistentEntry(entryCode);
persistentEntities.save();
}
}
} else if (arg instanceof EntitiesAction) {
EntitiesAction action = (EntitiesAction) arg;
String actionName = action.getName();
IEntities entities = action.getEntities();
if (actionName.equals("add")
|| actionName.equals("remove")
|| actionName.equals("update")) {
IEntities entry = domainModel
.getModelMeta().getEntry(entities);
if (entry != null) {
String entryCode = entry
.getConceptConfig()
.getEntitiesCode();
IPersistentEntities persistentEntities = getPersistentEntry(entryCode);
persistentEntities.save();
}
}
}
} else if (arg instanceof EntitiesAction) {
EntitiesAction action = (EntitiesAction) arg;
String actionName = action.getName();
IEntities entities = action.getEntities();
if (actionName.equals("add")
|| actionName.equals("remove")
|| actionName.equals("update")) {
IEntities entry = domainModel.getModelMeta()
.getEntry(entities);
if (entry != null) {
String entryCode = entry.getConceptConfig()
.getEntitiesCode();
IPersistentEntities persistentEntities = getPersistentEntry(entryCode);