Package com.alvazan.orm.api.base.anno

Examples of com.alvazan.orm.api.base.anno.NoSqlEmbedded


    return metaField;
  }

  @SuppressWarnings("unchecked")
  public MetaField processEmbedded(DboTableMeta t, Field field) {
    NoSqlEmbedded embedded = field.getAnnotation(NoSqlEmbedded.class);
    Class<?> type = field.getType();
    Class<?> valType = null;
    if(type.equals(List.class)) {
      ParameterizedType genType = (ParameterizedType) field.getGenericType();
      type = (Class<?>) genType.getActualTypeArguments()[0];
    } else if(type.equals(Map.class)) {
      ParameterizedType genType = (ParameterizedType) field.getGenericType();
      type = (Class<?>) genType.getActualTypeArguments()[0];
      valType = (Class<?>) genType.getActualTypeArguments()[1];
    }
   
    String colNameOrig = embedded.columnNamePrefix();
    String colName = field.getName();
    if(!"".equals(colNameOrig))
      colName = colNameOrig;
   
    MetaField metaField;
View Full Code Here


   
    return metaField;
  }

  public MetaField processEmbedded(DboTableMeta t, Field field) {
    NoSqlEmbedded embedded = field.getAnnotation(NoSqlEmbedded.class);
    Class<?> entityType = field.getType();
    if(entityType.equals(List.class)) {
      ParameterizedType genType = (ParameterizedType) field.getGenericType();
      entityType = (Class<?>) genType.getActualTypeArguments()[0];
    }
   
    if(!entityType.isAnnotationPresent(NoSqlEmbeddable.class))
      throw new IllegalArgumentException("Entity type="+entityType.getName()+" is missing annotation NoSqlEmbeddable" +
          " because field refers to it as being embedded. field="+field);

    String colNameOrig = embedded.columnNamePrefix();
    String colName = field.getName();
    if(!"".equals(colNameOrig))
      colName = colNameOrig;
   
    MetaAbstractClass<?> fkMeta = metaInfo.findOrCreate(entityType);
View Full Code Here

    return metaField;
  }

  @SuppressWarnings("unchecked")
  public MetaField processEmbedded(DboTableMeta t, Field field) {
    NoSqlEmbedded embedded = field.getAnnotation(NoSqlEmbedded.class);
    Class<?> type = field.getType();
    Class<?> valType = null;
    if(type.equals(List.class) || type.equals(Set.class)) {
      ParameterizedType genType = (ParameterizedType) field.getGenericType();
      type = (Class<?>) genType.getActualTypeArguments()[0];
    } else if(type.equals(Map.class)) {
      ParameterizedType genType = (ParameterizedType) field.getGenericType();
      type = (Class<?>) genType.getActualTypeArguments()[0];
      valType = (Class<?>) genType.getActualTypeArguments()[1];
    }

        boolean isIndexed = false;
        if (field.isAnnotationPresent(NoSqlIndexed.class))
            isIndexed = true;

    String colNameOrig = embedded.columnNamePrefix();
    String colName = field.getName();
    if(!"".equals(colNameOrig))
      colName = colNameOrig;
   
    MetaField metaField;
View Full Code Here

    return metaField;
  }

  @SuppressWarnings("unchecked")
  public MetaField processEmbedded(DboTableMeta t, Field field) {
    NoSqlEmbedded embedded = field.getAnnotation(NoSqlEmbedded.class);
    Class<?> type = field.getType();
    if(type.equals(List.class)) {
      ParameterizedType genType = (ParameterizedType) field.getGenericType();
      type = (Class<?>) genType.getActualTypeArguments()[0];
    }
   
    String colNameOrig = embedded.columnNamePrefix();
    String colName = field.getName();
    if(!"".equals(colNameOrig))
      colName = colNameOrig;
   
    MetaField metaField;
View Full Code Here

    return metaField;
  }

  @SuppressWarnings("unchecked")
  public MetaField processEmbedded(DboTableMeta t, Field field) {
    NoSqlEmbedded embedded = field.getAnnotation(NoSqlEmbedded.class);
    Class<?> type = field.getType();
    if(type.equals(List.class)) {
      ParameterizedType genType = (ParameterizedType) field.getGenericType();
      type = (Class<?>) genType.getActualTypeArguments()[0];
    }
   
    String colNameOrig = embedded.columnNamePrefix();
    String colName = field.getName();
    if(!"".equals(colNameOrig))
      colName = colNameOrig;
   
    MetaField metaField;
View Full Code Here

    return metaField;
  }

  @SuppressWarnings("unchecked")
  public MetaField processEmbedded(DboTableMeta t, Field field) {
    NoSqlEmbedded embedded = field.getAnnotation(NoSqlEmbedded.class);
    Class<?> type = field.getType();
    if(type.equals(List.class)) {
      ParameterizedType genType = (ParameterizedType) field.getGenericType();
      type = (Class<?>) genType.getActualTypeArguments()[0];
    }
   
    String colNameOrig = embedded.columnNamePrefix();
    String colName = field.getName();
    if(!"".equals(colNameOrig))
      colName = colNameOrig;
   
    MetaField metaField;
View Full Code Here

    return metaField;
  }

  @SuppressWarnings("unchecked")
  public MetaField processEmbedded(DboTableMeta t, Field field) {
    NoSqlEmbedded embedded = field.getAnnotation(NoSqlEmbedded.class);
    Class<?> type = field.getType();
    if(type.equals(List.class)) {
      ParameterizedType genType = (ParameterizedType) field.getGenericType();
      type = (Class<?>) genType.getActualTypeArguments()[0];
    }
   
    String colNameOrig = embedded.columnNamePrefix();
    String colName = field.getName();
    if(!"".equals(colNameOrig))
      colName = colNameOrig;
   
    MetaField metaField;
View Full Code Here

TOP

Related Classes of com.alvazan.orm.api.base.anno.NoSqlEmbedded

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.