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

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


    }
  }

  public MetaField processColumn(DboTableMeta t, Field field) {
    NoSqlColumn col = field.getAnnotation(NoSqlColumn.class);
    MetaCommonField metaField = metaProvider.get();
    String colName = field.getName();
    if(col != null) {
      if(!"".equals(col.columnName()))
        colName = col.columnName();
    }

    boolean isIndexed = false;
    if(field.isAnnotationPresent(NoSqlIndexed.class))
      isIndexed = true;
   
    boolean isPartitioned = false;
    if(field.isAnnotationPresent(NoSqlPartitionByThisField.class))
      isPartitioned = true;
     
    Class<?> type = field.getType();
    Converter converter = null;
    if(col != null && !NoConversion.class.isAssignableFrom(col.customConverter()))
      converter = ReflectionUtil.create(col.customConverter());

    converter = lookupConverter(field, type, converter);
    if(converter == null)
      throw throwInvalidConverter(field);
    metaField.setup(t, field, colName, converter, isIndexed, isPartitioned);
    return metaField;     
  }
View Full Code Here


    }
  }

  public MetaField processColumn(DboTableMeta t, Field field) {
    NoSqlColumn col = field.getAnnotation(NoSqlColumn.class);
    MetaCommonField metaField = metaProvider.get();
    String colName = field.getName();
    if(col != null) {
      if(!"".equals(col.columnName()))
        colName = col.columnName();
    }

    boolean isIndexed = false;
    if(field.isAnnotationPresent(NoSqlIndexed.class))
      isIndexed = true;
   
    boolean isPartitioned = false;
    if(field.isAnnotationPresent(NoSqlPartitionByThisField.class))
      isPartitioned = true;
     
    Class<?> type = field.getType();
    Converter converter = null;
    if(col != null && !NoConversion.class.isAssignableFrom(col.customConverter()))
      converter = ReflectionUtil.create(col.customConverter());

    try {
      converter = lookupConverter(type, converter);
      metaField.setup(t, field, colName, converter, isIndexed, isPartitioned);
      return metaField;     
    } catch(IllegalArgumentException e)  {
      throw new IllegalArgumentException("No converter found for field='"+field.getName()+"' in class="
          +field.getDeclaringClass()+".  You need to either add one of the @*ToOne annotations, @Embedded, @Transient " +
              "or add your own converter calling EntityMgrFactory.setup(Map<Class, Converter>) which " +
View Full Code Here

    }
  }

  public MetaField processColumn(DboTableMeta t, Field field) {
    NoSqlColumn col = field.getAnnotation(NoSqlColumn.class);
    MetaCommonField metaField = metaProvider.get();
    String colName = field.getName();
    if(col != null) {
      if(!"".equals(col.columnName()))
        colName = col.columnName();
    }

    boolean isIndexed = false;
    if(field.isAnnotationPresent(NoSqlIndexed.class))
      isIndexed = true;
   
    boolean isPartitioned = false;
    if(field.isAnnotationPresent(NoSqlPartitionByThisField.class))
      isPartitioned = true;
     
    Class<?> type = field.getType();
    Converter converter = null;
    if(col != null && !NoConversion.class.isAssignableFrom(col.customConverter()))
      converter = ReflectionUtil.create(col.customConverter());

    converter = lookupConverter(field, type, converter);
    if(converter == null)
      throw throwInvalidConverter(field);
    metaField.setup(t, field, colName, converter, isIndexed, isPartitioned);
    return metaField;     
  }
View Full Code Here

    }
  }

  public MetaField processColumn(DboTableMeta t, Field field) {
    NoSqlColumn col = field.getAnnotation(NoSqlColumn.class);
    MetaCommonField metaField = metaProvider.get();
    String colName = field.getName();
    if(col != null) {
      if(!"".equals(col.columnName()))
        colName = col.columnName();
    }

    boolean isIndexed = false;
    if(field.isAnnotationPresent(NoSqlIndexed.class))
      isIndexed = true;
   
    boolean isPartitioned = false;
    if(field.isAnnotationPresent(NoSqlPartitionByThisField.class))
      isPartitioned = true;
     
    Class<?> type = field.getType();
    Converter converter = null;
    if(col != null && !NoConversion.class.isAssignableFrom(col.customConverter()))
      converter = ReflectionUtil.create(col.customConverter());

    converter = lookupConverter(field, type, converter);
    if(converter == null)
      throw throwInvalidConverter(field);
    metaField.setup(t, field, colName, converter, isIndexed, isPartitioned);
    return metaField;     
  }
View Full Code Here

    }
  }

  public MetaField processColumn(DboTableMeta t, Field field) {
    NoSqlColumn col = field.getAnnotation(NoSqlColumn.class);
    MetaCommonField metaField = metaProvider.get();
    String colName = field.getName();
    if(col != null) {
      if(!"".equals(col.columnName()))
        colName = col.columnName();
    }

    boolean isIndexed = false;
    if(field.isAnnotationPresent(NoSqlIndexed.class))
      isIndexed = true;
   
    boolean isPartitioned = false;
    if(field.isAnnotationPresent(NoSqlPartitionByThisField.class))
      isPartitioned = true;
     
    Class<?> type = field.getType();
    Converter converter = null;
    if(col != null && !NoConversion.class.isAssignableFrom(col.customConverter()))
      converter = ReflectionUtil.create(col.customConverter());

    converter = lookupConverter(field, type, converter);
    if(converter == null)
      throw throwInvalidConverter(field);
    metaField.setup(t, field, colName, converter, isIndexed, isPartitioned);
    return metaField;     
  }
View Full Code Here

    }
  }

  public MetaField processColumn(DboTableMeta t, Field field) {
    NoSqlColumn col = field.getAnnotation(NoSqlColumn.class);
    MetaCommonField metaField = metaProvider.get();
    String colName = field.getName();
    if(col != null) {
      if(!"".equals(col.columnName()))
        colName = col.columnName();
    }

    boolean isIndexed = false;
    boolean byKeyOnly = false;
    if(field.isAnnotationPresent(NoSqlIndexed.class)) {
      isIndexed = true;
      NoSqlIndexed indexAnno = field.getAnnotation(NoSqlIndexed.class);
      byKeyOnly = indexAnno.byKeyOnly();
    }     
   
    boolean isPartitioned = false;
    if(field.isAnnotationPresent(NoSqlPartitionByThisField.class))
      isPartitioned = true;
     
    Class<?> type = field.getType();
    Converter converter = null;
    if(col != null && !NoConversion.class.isAssignableFrom(col.customConverter()))
      converter = ReflectionUtil.create(col.customConverter());

    converter = lookupConverter(field, type, converter);
    if(converter == null)
      throw throwInvalidConverter(field);
    metaField.setup(t, field, colName, converter, isIndexed, isPartitioned, byKeyOnly);
    return metaField;     
  }
View Full Code Here

    }
  }

  public MetaField processColumn(DboTableMeta t, Field field) {
    NoSqlColumn col = field.getAnnotation(NoSqlColumn.class);
    MetaCommonField metaField = metaProvider.get();
    String colName = field.getName();
    if(col != null) {
      if(!"".equals(col.columnName()))
        colName = col.columnName();
    }

    boolean isIndexed = false;
    if(field.isAnnotationPresent(NoSqlIndexed.class))
      isIndexed = true;
   
    boolean isPartitioned = false;
    if(field.isAnnotationPresent(NoSqlPartitionByThisField.class))
      isPartitioned = true;
     
    Class<?> type = field.getType();
    Converter converter = null;
    if(col != null && !NoConversion.class.isAssignableFrom(col.customConverter()))
      converter = ReflectionUtil.create(col.customConverter());

    converter = lookupConverter(field, type, converter);
    if(converter == null)
      throw throwInvalidConverter(field);
    metaField.setup(t, field, colName, converter, isIndexed, isPartitioned);
    return metaField;     
  }
View Full Code Here

TOP

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

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.