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

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


  }

  @Override
  public String getIndexTableName() {
    DboColumnIdMeta idMeta = fkToColumnFamily.getIdColumnMeta();
    StorageTypeEnum storageType;
    if (idMeta != null)
      storageType = idMeta.getStorageType();
    else
      storageType = fkToColumnFamily.getNameStorageType();
    return storageType.getIndexTableName();
  }
View Full Code Here


  }

  @Override
  public StorageTypeEnum getStorageType() {
    //StorageTypeEnum typeInTheArray = fkToColumnFamily.getIdColumnMeta().getStorageType();
    StorageTypeEnum typeInTheArray = fkToColumnFamily.getNameStorageType();
    return typeInTheArray;
  }
View Full Code Here

  }

  @Override
  public StorageTypeEnum getStorageType() {
    Class storageTypeClass = DboColumnMeta.classForName(itemType);
    StorageTypeEnum storageType = DboColumnMeta.getStorageType(storageTypeClass);
    return storageType;
  }
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

    return isPartitionedByThisColumn;
  }
 
  @Override
  public String getIndexTableName() {
    StorageTypeEnum type = getStorageType();
    if(type == null)
      throw new IllegalArgumentException(getClassType()+" is not supported at this time");
    return getStorageType().getIndexTableName();
  }
View Full Code Here

    } else if(formName(DecimalType.class, BytesType.class).equals(comparatorType)) {
      type = ColumnType.COMPOSITE_DECIMALPREFIX;
    }
   
    String keyValidationClass = def.getKeyValidationClass();
    StorageTypeEnum keyType = null;
    if(UTF8Type.class.getName().equals(keyValidationClass)) {
      keyType = StorageTypeEnum.STRING;
    } else if(DecimalType.class.getName().equals(keyValidationClass)) {
      keyType = StorageTypeEnum.DECIMAL;
    } else if(IntegerType.class.getName().equals(keyValidationClass)) {
View Full Code Here

          .setName(colFamily)
          .setKeyspace(keysp);

    if (log.isInfoEnabled())
      log.info("keyspace="+def.getKeyspace()+" col family="+def.getName());
    StorageTypeEnum rowKeyType = meta.getIdColumnMeta().getStorageType();
    ColumnType colType = ColumnType.ANY_EXCEPT_COMPOSITE;
    if(meta.isVirtualCf()) {
      rowKeyType = StorageTypeEnum.BYTES;
    } else {
      StorageTypeEnum type = meta.getColNamePrefixType();
      def = addRowKeyValidation(meta, def);
      def = setColumnNameCompareType(meta, type, def);
     
      if(type == StorageTypeEnum.STRING)
        colType = ColumnType.COMPOSITE_STRINGPREFIX;
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.