return template.isRoot();
}
private void setId(IEntity entity) {
if (entity.getId() == null) {
IDGenerator idGenerator = NewsModel.getDefault().getPersistenceLayer().getIDGenerator();
long id;
if (idGenerator instanceof DB4OIDGenerator)
id = ((DB4OIDGenerator) idGenerator).getNext(false);
else
id = idGenerator.getNext();
entity.setId(id);
}
}