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

com.genexus.db.odata.ODataMapDomain Maven / Gradle / Ivy

Go to download

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

The newest version!
package com.genexus.db.odata;

import com.genexus.db.service.IODataMapName;
import com.genexus.db.service.IOServiceContext;
import java.util.HashMap;

import org.apache.olingo.client.api.domain.ClientEnumValue;
import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.client.core.domain.ClientPrimitiveValueImpl;

public class ODataMapDomain extends IODataMapName
{
    public ODataMapDomain(String name)
    {
        super(name);
    }

    @Override
    public Object getValue(IOServiceContext context, HashMap currentEntry)
    {
        ClientValue value = (ClientValue)currentEntry.get(name);
        if(value == null)
            return null;
		ClientEnumValue enumValue = value.asEnum();
        return enumValue != null ? new ClientPrimitiveValueImpl.BuilderImpl().buildInt32(((ODataConnection)context.getConnection()).getEnumValue(enumValue)) : null;
    }    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy