Package com.alvazan.orm.api.z8spi.conv

Examples of com.alvazan.orm.api.z8spi.conv.StorageTypeEnum


  }

  @SuppressWarnings("unchecked")
  protected void addIndexInfo(InfoForIndex<TypedRow> info, Object value,
      byte[] byteVal) {
    StorageTypeEnum storageType = this.getStorageType();
    TypedRow entity = info.getEntity();
    RowToPersist row = info.getRow();
    Map<Field, Object> fieldToValue = info.getFieldToValue();

    if (!isIndexed())
View Full Code Here


    if(colNamePrefixType == null) {
      this.colNamePrefixType = null;
      return;
    }
   
    StorageTypeEnum storedType = colNamePrefixType.getStoredType();
    this.colNamePrefixType = storedType.getDbValue();
  }
View Full Code Here

    Object id = fillInAndFetchId(entity);
    byte[] byteVal = converter.convertToNoSql(id);
    byte[] virtualKey = metaDbo.formVirtRowKey(byteVal);
    row.setKeys(byteVal, virtualKey);
   
    StorageTypeEnum storageType = metaDbo.getStorageType();
    addIndexInfo(info, id, byteVal, storageType);
    //NOTICE: there is no call to remove because if an id is changed, it is a new entity and we only need to add index not remove since
    //the old entity was not deleted during this save....we remove from index on remove of old entity only
  }
View Full Code Here

    if(colNamePrefixType == null) {
      this.colNamePrefixType = null;
      return;
    }
   
    StorageTypeEnum storedType = colNamePrefixType.getStoredType();
    this.colNamePrefixType = storedType.getDbValue();
  }
View Full Code Here

      c = Character.class;
    return c;
  }

  public static StorageTypeEnum getStorageType(Class fieldType) {
    StorageTypeEnum type = StandardConverters.getStorageType(fieldType);
    if(type == null)
      return StorageTypeEnum.BYTES;
    return type;
  }
View Full Code Here

  public abstract void translateToColumn(InfoForIndex<TypedRow> info);

  @SuppressWarnings("unchecked")
  protected void removeIndexInfo(InfoForIndex<TypedRow> info, Object value, byte[] byteVal) {
    StorageTypeEnum storageType = getStorageType();
    Map<String, Object> fieldToValue = info.getFieldToValue();
    if (!isIndexed())
      return;
    else if (storageType == StorageTypeEnum.BYTES)
      throw new IllegalArgumentException(
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  protected void removingThisEntity(InfoForIndex<TypedRow> info,
      List<IndexData> indexRemoves, byte[] pk) {
    StorageTypeEnum storageType = getStorageType();
    Map<Field, Object> fieldToValue = info.getFieldToValue();
    Object valueInDatabase = fieldToValue.get(columnName);
    byte[] oldIndexedVal = convertToStorage2(valueInDatabase);

    addToIndexList(info, oldIndexedVal, storageType, pk, indexRemoves);
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  protected void addIndexInfo(InfoForIndex<TypedRow> info, Object value,
      byte[] byteVal) {
    StorageTypeEnum storageType = this.getStorageType();
    TypedRow entity = info.getEntity();
    RowToPersist row = info.getRow();
    Map<Field, Object> fieldToValue = info.getFieldToValue();

    if (!isIndexed())
View Full Code Here

    for(T p : toBeRemoved) {
      byte[] name = formTheName(p);
      row.addEntityToRemove(name);
    }
        Object value = ReflectionUtil.fetchFieldValue(entity, field);
        StorageTypeEnum storageType = metaDbo.getStorageType();
    //now process all the existing columns (we can add same entity as many times as we like and it does not
    //get duplicated)
    for(T val : toBeAdded) {
      byte[] name = formTheName(val);
      Column c = new Column();
View Full Code Here

      indexList.add(data);
    }
  }
 
  protected void removingThisEntity(InfoForIndex<OWNER> info, List<IndexData> indexRemoves, byte[] pk) {
    StorageTypeEnum storageType = getMetaDbo().getStorageType();
    Map<Field, Object> fieldToValue = info.getFieldToValue();
    Object valueInDatabase = fieldToValue.get(field);
    byte[] oldIndexedVal = translateValue(valueInDatabase);
   
    addToList(info, oldIndexedVal, storageType, pk, indexRemoves);
View Full Code Here

TOP

Related Classes of com.alvazan.orm.api.z8spi.conv.StorageTypeEnum

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.