Package org.rssowl.core.model.dao

Examples of org.rssowl.core.model.dao.IDGenerator


    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);
    }
  }
View Full Code Here

TOP

Related Classes of org.rssowl.core.model.dao.IDGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.