Package com.tll.model.key

Examples of com.tll.model.key.PrimaryKey


    try {
      final ModelKey mkey = search.getKey();
      final IEntityType et = mkey.getEntityType();
      final Class<IEntity> ec = (Class<IEntity>) context.getEntityTypeResolver().resolveEntityClass(et);
      final IEntityService<IEntity> svc = getEntityService(et);
      final IEntity e = svc.load(new PrimaryKey(ec, mkey.getId()));
      return e;
    }
    catch(final EntityNotFoundException e) {
      RpcServlet.exceptionToStatus(e, status);
      return null;
View Full Code Here


  protected void purgeEntity(ModelKey ref, ModelPayload payload) {
    try {
      final Class<IEntity> entityClass =
        (Class<IEntity>) context.getEntityTypeResolver().resolveEntityClass(ref.getEntityType());
      final IEntityService<IEntity> svc = context.getEntityServiceFactory().instanceByEntityType(entityClass);
      final PrimaryKey pk = new PrimaryKey(entityClass, ref.getId());
      final IEntity e = svc.load(pk);
      svc.purge(e);
      payload.setRef(ref);
      payload.getStatus().addMsg(e.descriptor() + " purged.", MsgLevel.INFO, MsgAttr.STATUS.flag);
    }
View Full Code Here

  }

  @Override
  public <E extends IEntity> void purge(E entity) throws EntityNotFoundException, DataAccessException {
    log.debug("Purging entity: " + entity);
    purge(new PrimaryKey(entity));
  }
View Full Code Here

TOP

Related Classes of com.tll.model.key.PrimaryKey

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.