Package com.vercer.engine.persist.util

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


  public Set<Property> typesafeToProperties(Object object, Path path, boolean indexed)
  {
    if (object instanceof Enum<?>)
    {
      String name = ((Enum<?>) object).name();
      Property property = new SimpleProperty(path, name, indexed);
      return Collections.singleton(property);
    }
    else
    {
      return null;
View Full Code Here


          Object value = field.get(object);
          if (value == null)
          {
            if (isNullStored())
            {
              merged.add(new SimpleProperty(path, null, indexed));
            }
            continue;
          }

          value = converters.convert(value, type);
View Full Code Here

          Object value = values.get(index);

          // null values are place holders for missing properties
          if (value != null)
          {
            result.add(new SimpleProperty(itemPath, value, true));
          }
          // at least one property has items so we are not done yet
          complete = false;
        }
      }
View Full Code Here

              }

              public Property next()
              {
                Entry<Path, List<Object>> next = iterator.next();
                return new SimpleProperty(next.getKey(), next.getValue(), indexed);
              }

              public void remove()
              {
                throw new UnsupportedOperationException();
View Full Code Here

  {
    Set<Property> properties = chained.typesafeToProperties(object, prefix, indexed);

    String className = object.getClass().getName();
    Path classNamePath = new Path.Builder(prefix).meta(CLASS_NAME).build();
    Property property = new SimpleProperty(classNamePath, className, true);

    return new PrependSet<Property>(property, properties);
  }
View Full Code Here

    try
    {
      if (object instanceof Serializable)
      {
        Blob blob = serializableToBlob.convert((Serializable) object);
        return Collections.singleton((Property) new SimpleProperty(path, blob, indexed));
      }
      else
      {
        return null;
      }
View Full Code Here

    PropertyTranslator chained = new PropertyTranslator()
    {
      public Set<Property> typesafeToProperties(Object object, Path path, boolean indexed)
      {
        HashSet<Property> properties = new HashSet<Property>();
        properties.add(new SimpleProperty(new Path.Builder(path).field("first").build(), object, indexed));
        properties.add(new SimpleProperty(new Path.Builder(path).field("second").build(), object, indexed));
        return properties;
      }

      public Object propertiesToTypesafe(Set<Property> properties, Path path, Type type)
      {
View Full Code Here

TOP

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

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.