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

microsoft.dynamics.crm.entity.request.EntityMetadataRequest Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package microsoft.dynamics.crm.entity.request;

import com.fasterxml.jackson.annotation.JsonIgnoreType;
import com.github.davidmoten.odata.client.ContextPath;
import com.github.davidmoten.odata.client.EntityRequest;
import com.github.davidmoten.odata.client.NameValue;

import microsoft.dynamics.crm.entity.EntityMetadata;
import microsoft.dynamics.crm.entity.collection.request.AttributeMetadataCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.EntityKeyMetadataCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.ManyToManyRelationshipMetadataCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.OneToManyRelationshipMetadataCollectionRequest;
import microsoft.dynamics.crm.schema.SchemaInfo;

@JsonIgnoreType
public class EntityMetadataRequest extends EntityRequest {

    public EntityMetadataRequest(ContextPath contextPath) {
        super(EntityMetadata.class, contextPath, SchemaInfo.INSTANCE);
    }

    public AttributeMetadataCollectionRequest attributes() {
        return new AttributeMetadataCollectionRequest(
                        contextPath.addSegment("Attributes"));
    }

    public AttributeMetadataRequest attributes(String metadataId) {
        return new AttributeMetadataRequest(contextPath.addSegment("Attributes").addKeys(new NameValue(metadataId.toString())));
    }

    public ManyToManyRelationshipMetadataCollectionRequest manyToManyRelationships2() {
        return new ManyToManyRelationshipMetadataCollectionRequest(
                        contextPath.addSegment("ManyToManyRelationships2"));
    }

    public ManyToManyRelationshipMetadataRequest manyToManyRelationships2(String metadataId) {
        return new ManyToManyRelationshipMetadataRequest(contextPath.addSegment("ManyToManyRelationships2").addKeys(new NameValue(metadataId.toString())));
    }

    public OneToManyRelationshipMetadataCollectionRequest manyToOneRelationships2() {
        return new OneToManyRelationshipMetadataCollectionRequest(
                        contextPath.addSegment("ManyToOneRelationships2"));
    }

    public OneToManyRelationshipMetadataRequest manyToOneRelationships2(String metadataId) {
        return new OneToManyRelationshipMetadataRequest(contextPath.addSegment("ManyToOneRelationships2").addKeys(new NameValue(metadataId.toString())));
    }

    public OneToManyRelationshipMetadataCollectionRequest oneToManyRelationships2() {
        return new OneToManyRelationshipMetadataCollectionRequest(
                        contextPath.addSegment("OneToManyRelationships2"));
    }

    public OneToManyRelationshipMetadataRequest oneToManyRelationships2(String metadataId) {
        return new OneToManyRelationshipMetadataRequest(contextPath.addSegment("OneToManyRelationships2").addKeys(new NameValue(metadataId.toString())));
    }

    public EntityKeyMetadataCollectionRequest keys() {
        return new EntityKeyMetadataCollectionRequest(
                        contextPath.addSegment("Keys"));
    }

    public EntityKeyMetadataRequest keys(String metadataId) {
        return new EntityKeyMetadataRequest(contextPath.addSegment("Keys").addKeys(new NameValue(metadataId.toString())));
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy