Package org.cruxframework.crux.core.client.db.annotation.Store

Examples of org.cruxframework.crux.core.client.db.annotation.Store.Indexed


    List<JMethod> getterMethods = JClassUtils.getGetterMethods(objectStoreTarget);
    for (JMethod method : getterMethods)
        {
          if (JClassUtils.isSimpleType(method.getReturnType()))
          {
            Indexed indexed = method.getAnnotation(Indexed.class);
            if (indexed != null)
            {
              String property = JClassUtils.getPropertyForGetterOrSetterMethod(method);
              if (!isValidTypeForKey(method.getReturnType()))
              {
                throw new CruxGeneratorException("Invalid index type for index on method ["+method.getReadableDeclaration()+"]. Crux databases only support Strings, integers, double or dates as part of a key or index");
              }
              result.add(new IndexData(new String[]{prefix+property}, indexed.unique(), false, prefix+property));
            }
          }
          else
          {
            String property = JClassUtils.getPropertyForGetterOrSetterMethod(method);
View Full Code Here

TOP

Related Classes of org.cruxframework.crux.core.client.db.annotation.Store.Indexed

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.