Package com.alvazan.orm.impl.meta.data

Examples of com.alvazan.orm.impl.meta.data.MetaIdField


    if(metaClass == null)
      throw new IllegalArgumentException("Entity type="+entity.getClass().getName()+" was not scanned and added to meta information on startup.  It is either missing @NoSqlEntity annotation or it was not in list of scanned packages");

    Object proxy = entity;
    Object pk = metaClass.fetchId(entity);
    MetaIdField idField = metaClass.getIdField();
    byte[] rowKey = idField.convertIdToNonVirtKey(pk);
    byte[] virtKey = idField.formVirtRowKey(rowKey);
    DboTableMeta metaDbo = metaClass.getMetaDbo();
   
    if(!metaClass.hasIndexedField(entity)) {
      session.remove(metaDbo, virtKey);
      return;
View Full Code Here


    MetaClass metaClass = metaInfo.getMetaClass(cl);
    if(metaClass == null)
      throw new IllegalArgumentException("Entity type="+entity.getClass().getName()+" was not scanned and added to meta information on startup.  It is either missing @NoSqlEntity annotation or it was not in list of scanned packages");

    boolean needRead = false;
    MetaIdField idField = metaClass.getIdField();
    Object id = metaClass.fetchId(entity);
    if(idField.isAutoGen() && id != null && !(entity instanceof NoSqlProxy)) {
      //We do NOT have the data from the database IF this is NOT a NoSqlProxy and we need it since this is an
      //update
      needRead = true;
    }
    putImpl(entity, needRead, metaClass);
View Full Code Here

 
  @SuppressWarnings({ "rawtypes", "unchecked" })
  @Override
  public void fillInWithKey(Object entity) {
    MetaClass metaClass = metaInfo.getMetaClass(entity.getClass());
    MetaIdField idField = metaClass.getIdField();
    if (idField != null)
      idField.fillInAndFetchId(entity);
  }
View Full Code Here

    if(metaClass == null)
      throw new IllegalArgumentException("Entity type="+entity.getClass().getName()+" was not scanned and added to meta information on startup.  It is either missing @NoSqlEntity annotation or it was not in list of scanned packages");

    Object proxy = entity;
    Object pk = metaClass.fetchId(entity);
    MetaIdField idField = metaClass.getIdField();
    byte[] rowKey = idField.convertIdToNonVirtKey(pk);
    byte[] virtKey = idField.formVirtRowKey(rowKey);
    DboTableMeta metaDbo = metaClass.getMetaDbo();
   
    if(!metaClass.hasIndexedField(entity)) {
      session.remove(metaDbo, virtKey);
      return;
View Full Code Here

    Object key = kv.getKey();
   
    KeyValue<T> keyVal;
    if(row == null) {
      keyVal = new KeyValue<T>();
      MetaIdField idMeta = meta.getIdField();
      byte[] nonVirtKey = idMeta.unformVirtRowKey((byte[]) key);
      Object obj = meta.getIdField().translateFromBytes(nonVirtKey);
      if(query != null) {
        RowNotFoundException exc = new RowNotFoundException("Your query="+query+" contained a value with a pk where that entity no longer exists in the nosql store");
        keyVal.setException(exc);
      }
View Full Code Here

TOP

Related Classes of com.alvazan.orm.impl.meta.data.MetaIdField

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.