Examples of EntityConverter


Examples of com.googlecode.objectify.persister.converter.EntityConverter

  private final Map<String, Class<?>>  kindToClass  = new HashMap<String, Class<?>>();
  private final Map<Class<?>, String>  classToKind  = new HashMap<Class<?>, String>();

  public ObjectifyPersisterFactory() {
    this.getConversions().add(new EntityConverter(this));
  }
View Full Code Here

Examples of com.sleepycat.persist.evolve.EntityConverter

            return false;
        }

        Set<String> deletedKeys;
        if (converter instanceof EntityConverter) {
            EntityConverter entityConverter = (EntityConverter) converter;
            deletedKeys = entityConverter.getDeletedKeys();
        } else {
            deletedKeys = Collections.emptySet();
        }

        Map<String, SecondaryKeyMetadata> oldSecondaryKeys =
View Full Code Here

Examples of com.sleepycat.persist.evolve.EntityConverter

            return false;
        }

        Set<String> deletedKeys;
        if (converter instanceof EntityConverter) {
            EntityConverter entityConverter = (EntityConverter) converter;
            deletedKeys = entityConverter.getDeletedKeys();
        } else {
            deletedKeys = Collections.emptySet();
        }

        Map<String,SecondaryKeyMetadata> oldSecondaryKeys =
View Full Code Here

Examples of com.sleepycat.persist.evolve.EntityConverter

        int skey3;

        @Override
        Mutations getMutations() {
            Mutations m = new Mutations();
            m.addConverter(new EntityConverter
                (NAME2, 0, new MyConversion(),
                 Collections.singleton("skey")));
            return m;
        }
View Full Code Here

Examples of com.sleepycat.persist.evolve.EntityConverter

            return false;
        }

        Set<String> deletedKeys;
        if (converter instanceof EntityConverter) {
            EntityConverter entityConverter = (EntityConverter) converter;
            deletedKeys = entityConverter.getDeletedKeys();
        } else {
            deletedKeys = Collections.emptySet();
        }

        Map<String, SecondaryKeyMetadata> oldSecondaryKeys =
View Full Code Here

Examples of org.crank.crud.jsf.support.EntityConverter

     */
    @Bean (scope = DefaultScopes.SINGLETON)
    public Map<String, Converter> converters() throws Exception {
        Map<String, Converter> converters = new HashMap<String, Converter>();
        for (CrudManagedObject mo : managedObjects()) {
            EntityConverter entityConverter = new EntityConverter();
            entityConverter.setManagedObject( mo );
            entityConverter.setDao( repos().get( mo.getName()) );
            converters.put(mo.getName(), entityConverter);
            converters.put(StringUtils.unCapitalize(mo.getName()), entityConverter);           
        }
        return converters;
    }
View Full Code Here

Examples of org.jboss.seam.ui.EntityConverter

  // Fields
 

  protected Converter createConverter() throws JspException
  {
    EntityConverter converter = (EntityConverter) FacesContext.getCurrentInstance().getApplication().createConverter("org.jboss.seam.ui.EntityConverter");
    _setProperties(converter);
    return converter;
  }
View Full Code Here

Examples of org.jboss.seam.ui.converter.EntityConverter

// Fields
// Setters

  protected Converter createConverter() throws JspException
  {
    EntityConverter converter = (EntityConverter) FacesContext.getCurrentInstance().getApplication().createConverter("org.jboss.seam.ui.EntityConverter");
    _setProperties(converter);
    return converter;
  }
View Full Code Here

Examples of org.locationtech.geogig.osm.internal.EntityConverter

                }
            };
            op.setBoundsFilter(filter);
        }
        Iterator<NodeRef> iterator = op.call();
        final EntityConverter converter = new EntityConverter();
        Function<NodeRef, EntityContainer> function = new Function<NodeRef, EntityContainer>() {

            @Override
            @Nullable
            public EntityContainer apply(@Nullable NodeRef ref) {
                RevFeature revFeature = geogig.command(RevObjectParse.class)
                        .setObjectId(ref.objectId()).call(RevFeature.class).get();
                SimpleFeatureType featureType;
                if (ref.path().startsWith(OSMUtils.NODE_TYPE_NAME)) {
                    featureType = OSMUtils.nodeType();
                } else {
                    featureType = OSMUtils.wayType();
                }
                SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(featureType);
                RevFeatureType revFeatureType = RevFeatureTypeImpl.build(featureType);
                List<PropertyDescriptor> descriptors = revFeatureType.sortedDescriptors();
                ImmutableList<Optional<Object>> values = revFeature.getValues();
                for (int i = 0; i < descriptors.size(); i++) {
                    PropertyDescriptor descriptor = descriptors.get(i);
                    Optional<Object> value = values.get(i);
                    featureBuilder.set(descriptor.getName(), value.orNull());
                }
                SimpleFeature feature = featureBuilder.buildFeature(ref.name());
                Entity entity = converter.toEntity(feature, null);
                EntityContainer container;
                if (entity instanceof Node) {
                    container = new NodeContainer((Node) entity);
                } else {
                    container = new WayContainer((Way) entity);
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.