All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.genexus.db.service.IODataMapExt Maven / Gradle / Ivy

Go to download

Core classes for the runtime used by Java and Android apps generated with GeneXus

There is a newer version: 4.7.3
Show newest version
package com.genexus.db.service;

import java.util.HashMap;

public class IODataMapExt implements IODataMap
{
    protected String entity;
    protected IODataMap map;
    public IODataMapExt(String entity, IODataMap map)
    {
        this.entity = entity;
        this.map = map;
    }

    @Override
	@SuppressWarnings("unchecked")
    public Object getValue(IOServiceContext context, HashMap currentEntry)
    {
        HashMap link = (HashMap) currentEntry.get(context.entity(entity));
        return link != null ? map.getValue(context, link) : null;
    }

    @Override
    public String getName()
    {
        return entity;
    }

    @Override
	@SuppressWarnings("unchecked")
    public void setValue(HashMap currentEntry, Object value)
    {
        HashMap child = (HashMap)currentEntry.get(entity);
        if(child == null)
        {
            child = new HashMap();
            currentEntry.put(entity, child);
        }
        map.setValue(child, value);
    }    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy