Package com.google.code.gaeom.annotation

Examples of com.google.code.gaeom.annotation.Parent


        String[] path = field.split("\\.");
        Field f = encoder.getField(path);
        if (f == null)
          throw new IllegalArgumentException("No such field " + field + " on class " + type);

        Parent parentAnno = f.getAnnotation(Parent.class);
        if (parentAnno != null)
        {
          switch (parentAnno.value())
          {
            case AncestorQuery :
            {
              if (gop == FilterOperator.EQUAL)
                return ancestor(value);
              else
                throw new IllegalArgumentException("Cannot filter on parent-key encoded field " + field + " in class " + type + " using " + gop);
            }
            case NoFilter :
            {
              throw new IllegalArgumentException("No filtering on FilterPolicy." + parentAnno.value() + " parent relationships.");
            }
            case RetainKey :
              // all good in this case
          }
        }
View Full Code Here


        {
          return new EmbeddedEncoder(propertyName, clazz, os);
        }
        else
        {
          Parent parent = field.getAnnotation(Parent.class);
          if (parent != null && parent.value() != Parent.FilterPolicy.RetainKey)
            return new ParentRelationshipEncoder(field.getName());
          else
            return new RelationshipEncoder(field.getName(), propertyName, field.isAnnotationPresent(Child.class), index);
        }
      }
View Full Code Here

TOP

Related Classes of com.google.code.gaeom.annotation.Parent

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.