Package com.vercer.engine.persist.util

Examples of com.vercer.engine.persist.util.SinglePropertySet


          return datastore.instanceToKey(instance, getParentKey());
        }
      };
    }

    return new SinglePropertySet(path, item, indexed);
  }
View Full Code Here


      {
        Set<Property> properties = chained.typesafeToProperties(object, path, indexed);
        return properties.iterator().next().getValue();
      }
    };
    return new SinglePropertySet(path, reference, indexed);
  }
View Full Code Here

  public Set<Property> typesafeToProperties(Object object, Path path, boolean indexed)
  {
    if (isDirectType(object.getClass()))
    {
      return new SinglePropertySet(path, object, indexed);
    }
    else
    {
      return null;
    }
View Full Code Here

  @SuppressWarnings("unchecked")
  public final Set<Property> typesafeToProperties(Object instance, Path path, boolean indexed)
  {
    if (clazz.isInstance(instance))
    {
      return new SinglePropertySet(path, encode((T) instance), indexed);
    }
    else
    {
      return null;
    }
View Full Code Here

  {
    if (instance instanceof Locale)
    {
      Locale locale = (Locale) instance;
      String text = locale.getLanguage() + "_" + locale.getCountry() + "_" + locale.getVariant();
      return new SinglePropertySet(path, text, indexed);
    }
    else if (instance instanceof Class<?>)
    {
      String name = ((Class<?>) instance).getName();
      return new SinglePropertySet(path, name, indexed);
    }
    else if (instance instanceof Currency)
    {
      String name = ((Currency) instance).getCurrencyCode();
      return new SinglePropertySet(path, name, indexed);
    }
    else if (instance instanceof URI)
    {
      String name = ((URI) instance).toString();
      return new SinglePropertySet(path, name, indexed);
    }
    else if (instance instanceof URL)
    {
      String name = ((URL) instance).toString();
      return new SinglePropertySet(path, name, indexed);
    }
    return null;
  }
View Full Code Here

      // optimise for case of single properties
      if (lists.size() == 1)
      {
        Path childPath = lists.keySet().iterator().next();
        List<?> values = lists.get(childPath);
        return new SinglePropertySet(childPath, values, indexed);
      }
      else
      {
        return new AbstractSet<Property>()
        {
View Full Code Here

TOP

Related Classes of com.vercer.engine.persist.util.SinglePropertySet

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.