Package ua.com.jpy.entity

Examples of ua.com.jpy.entity.IEntity


    } else {
      if(entityForSave != null && id != null) {
        log.info("Find document with id: " + id + " in collection with name: " + ((IEntity) entityForSave).getClass().getName());
        Query<? extends IEntity> query = getDatastore().createQuery(((IEntity) entityForSave).getClass());
        query = query.field("id").equal(id);
        IEntity entity = (IEntity) query.get();
        if(entity == null) {
          log.info("Can not find document in collection: " + ((IEntity) entityForSave).getClass().getName());
          return null;
        } else {
          log.info("We found document with id: " + id + " in collection: " + entity.getClass().getName());
          return entity;
        }
      }
    }
    return null;
View Full Code Here


      log.info("id is null");
      return false;
    }
    Query<? extends IEntity> query = getDatastore().createQuery(entityForUpdate.getClass());
    query = query.field("id").equal(id);
    IEntity entitySavedInDataBase = query.get();
    if(entitySavedInDataBase == null) {
      log.info("Entity with id: " + id + " not saved into database");
      return false;
    }
    log.info("Entity was successfuly finded");
View Full Code Here

TOP

Related Classes of ua.com.jpy.entity.IEntity

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.