no message

This commit is contained in:
2024-10-22 17:27:41 +03:00
parent a60fd375d0
commit a0ceafff0a
57 changed files with 319 additions and 323 deletions

View File

@@ -86,7 +86,7 @@ public abstract class Database {
public DBObject InsertS(DBObject object) throws Exception {
DBTable table = tables.get(object.getClass());
if (!(object instanceof iDBObject) && table.Data.containsKey(object.getPK()))
throw new RepositoryRefuseException("Таблица " + Utils_.Brackets(table.Name) + " уже содержит объект с ключом " + Utils_.Brackets(object.getPK().toString()));
throw new RepositoryRefuseException("Таблица " + Utils_.Brackets(table.getName()) + " уже содержит объект с ключом " + Utils_.Brackets(object.getPK().toString()));
insert(table, object);
table.Data.put(object.getPK(), object);
return object;
@@ -113,7 +113,7 @@ public abstract class Database {
table.Data.remove(o.getPK());
return o;
} else
throw new RepositoryRefuseException("Таблица " + Utils_.Brackets(table.Name) + " не содержит объект с ключом " + Utils_.Brackets(to_delete.getPK().toString()));
throw new RepositoryRefuseException("Таблица " + Utils_.Brackets(table.getName()) + " не содержит объект с ключом " + Utils_.Brackets(to_delete.getPK().toString()));
}
public DBObject DeleteByPK(Class object_class, Object key) throws Exception {
DBTable table = tables.get(object_class);
@@ -123,7 +123,7 @@ public abstract class Database {
table.Data.remove(key);
return o;
} else
throw new RepositoryRefuseException("Таблица " + Utils_.Brackets(table.Name) + " не содержит объект с ключом " + Utils_.Brackets(key.toString()));
throw new RepositoryRefuseException("Таблица " + Utils_.Brackets(table.getName()) + " не содержит объект с ключом " + Utils_.Brackets(key.toString()));
}
// не работает с автоинкрементом.
public DBObject getObjectCopyByPK(Class table_class, Object pk) throws Exception {