Examples of PropertyContainer


Examples of com.google.appengine.api.datastore.PropertyContainer

        throw new IllegalStateException("Class '" + pojo.getClass() + "' is not a registered @Subclass");
      else
        return translator.save(pojo, index, ctx, path);
    } else {
      // This is a normal save
      PropertyContainer into = creator.save(pojo, index, ctx, path);

      populator.save(pojo, index, ctx, path, into);

      if (discriminator != null) {
        into.setUnindexedProperty(DISCRIMINATOR_PROPERTY, discriminator);

        if (!indexedDiscriminators.isEmpty())
          into.setProperty(DISCRIMINATOR_INDEX_PROPERTY, indexedDiscriminators);
      }

      return into;
    }
  }
View Full Code Here

Examples of com.google.appengine.api.datastore.PropertyContainer

     * @throws InterruptedException
     */
  public static Object get(Future<Object> future, String name) throws InterruptedException, ExecutionException {
      Object val = future.get();
        if (val instanceof PropertyContainer) {
            PropertyContainer pc = (PropertyContainer) val;
            return pc.getProperty(name);
        }
        if (val instanceof GroovyObject) {
            GroovyObject go = (GroovyObject) val;
            return go.getProperty(name);
        }
View Full Code Here

Examples of com.google.appengine.api.datastore.PropertyContainer

     * @throws InterruptedException
     */
    public static void set(Future<Object> future, String name, Object value) throws InterruptedException, ExecutionException {
        Object val = future.get();
        if (val instanceof PropertyContainer) {
            PropertyContainer pc = (PropertyContainer) val;
            pc.setProperty(name, DatastoreExtensions.transformValueForStorage(value));
            return;
        }
        if (val instanceof GroovyObject) {
            GroovyObject go = (GroovyObject) val;
            go.setProperty(name, DatastoreExtensions.transformValueForStorage(value));
View Full Code Here

Examples of com.googlecode.gwt.test.internal.utils.PropertyContainer

   public static void setProperty(JavaScriptObject jso, String propName, short value) {
      getJsoProperties(jso, propName).put(propName, Short.valueOf(value));
   }

   private static PropertyContainer getJsoProperties(JavaScriptObject o) {
      PropertyContainer pc = GwtReflectionUtils.getPrivateFieldValue(o,
               JsoProperties.JSO_PROPERTIES);

      if (pc == null) {
         pc = PropertyContainer.newInstance(new HashMap<String, Object>());
         GwtReflectionUtils.setPrivateFieldValue(o, JsoProperties.JSO_PROPERTIES, pc);
View Full Code Here

Examples of com.googlecode.gwt.test.internal.utils.PropertyContainer

      }

      StringBuilder sb = new StringBuilder();
      sb.append("<").append(tagName).append(" ");

      PropertyContainer attrs = JsoUtils.getDomProperties(elem);
      for (Map.Entry<String, Object> entry : attrs.entrySet()) {
         // special treatment for "disabled" property, which should be a empty
         // string attribute if the DOM element is disabled
         if ("disabled".equals(entry.getKey())) {
            Boolean disabled = (Boolean) entry.getValue();
            if (disabled.booleanValue()) {
View Full Code Here

Examples of com.googlecode.gwt.test.internal.utils.PropertyContainer

   static String getAttribute(Object domImpl, Element elem, String name) {
      if ("style".equals(name)) {
         return elem.getStyle().toString();
      }

      PropertyContainer properties = JsoUtils.getDomProperties(elem);

      String propertyName = getDOMPropertyName(name);

      return properties.getString(propertyName);

   }
View Full Code Here

Examples of com.googlecode.gwt.test.internal.utils.PropertyContainer

      return JsoUtils.getTagName(elem);
   }

   @PatchMethod
   static boolean hasAttribute(Object domImpl, Element elem, String name) {
      PropertyContainer properties = JsoUtils.getDomProperties(elem);

      String propertyName = getDOMPropertyName(name);

      return properties.contains(propertyName);
   }
View Full Code Here

Examples of com.googlecode.gwt.test.internal.utils.PropertyContainer

      return element.getParentElement();
   }

   @PatchMethod
   static boolean getPropertyBoolean(Element element, String propertyName) {
      PropertyContainer properties = JsoUtils.getDomProperties(element);
      return properties.getBoolean(propertyName);
   }
View Full Code Here

Examples of com.googlecode.gwt.test.internal.utils.PropertyContainer

      return properties.getBoolean(propertyName);
   }

   @PatchMethod
   static double getPropertyDouble(Element element, String propertyName) {
      PropertyContainer properties = JsoUtils.getDomProperties(element);
      return properties.getDouble(propertyName);
   }
View Full Code Here

Examples of com.googlecode.gwt.test.internal.utils.PropertyContainer

      return properties.getDouble(propertyName);
   }

   @PatchMethod
   static int getPropertyInt(Element element, String propertyName) {
      PropertyContainer properties = JsoUtils.getDomProperties(element);
      return properties.getInteger(propertyName);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.