Package com.vercer.engine.persist

Examples of com.vercer.engine.persist.Property


      return (T) ((SinglePropertySet) properties).getValue();
    }
    else
    {
      Iterator<Property> iterator = properties.iterator();
      Property property = iterator.next();
      if (property == null)
      {
        return null;
      }
      else
      {
        return (T) property.getValue();
      }
    }
  }
View Full Code Here


  public Object propertiesToTypesafe(Set<Property> properties, Path path, Type type)
  {
    Class<?> clazz = GenericTypeReflector.erase(type);
    if (clazz.isEnum())
    {
      Property property = properties.iterator().next();
      String name = (String) property.getValue();
      Class<? extends Enum> ce = (Class<? extends Enum>) clazz;
      return Enum.valueOf(ce, name);
    }
    else
    {
View Full Code Here

  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

  {
    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

  public final Object propertiesToTypesafe(Set<Property> properties, Path path, Type type)
  {
    try
    {
      Property property = properties.iterator().next();
      if (property.getValue() instanceof Blob)
      {
        Blob blob = (Blob) property.getValue();
        return blobToSerializable.convert(blob);
      }
      else
      {
        return null;
View Full Code Here

TOP

Related Classes of com.vercer.engine.persist.Property

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.