Examples of EdmSimpleTypeKind


Examples of org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind

                .addContent(method.getDeclaringClass(), method.getName(), methodReturnType.getSimpleName()), null);
          }
          functionReturnType.setTypeName(JPAEdmNameBuilder.build(schemaView, edmEntityType.getName()));
          break;
        case SIMPLE:
          EdmSimpleTypeKind edmSimpleTypeKind = JPATypeConvertor.convertToEdmSimpleType(methodReturnType, null);
          functionReturnType.setTypeName(edmSimpleTypeKind.getFullQualifiedName());

          break;
        case COMPLEX:
          String embeddableTypeName = null;
          ComplexType complexType = null;
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind

        throws ODataJPAModelException,
        ODataJPARuntimeException {

      JPAEdmNameBuilder
          .build((JPAEdmPropertyView) JPAEdmProperty.this, isBuildModeComplexType, skipDefaultNaming, isFK);
      EdmSimpleTypeKind simpleTypeKind = JPATypeConvertor
          .convertToEdmSimpleType(jpaAttribute
              .getJavaType(), jpaAttribute);
      simpleProperty.setType(simpleTypeKind);
      JPAEdmFacets.setFacets(jpaAttribute, simpleProperty);
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind

  private Object convert(final Field field, final String propertyValue) {
    Class<?> fieldClass = field.getType();
    try {
      EdmProperty property = field.getAnnotation(EdmProperty.class);
      EdmSimpleTypeKind type = mapTypeKind(property.type());
      return type.getEdmSimpleTypeInstance().valueOfString(propertyValue,
          EdmLiteralKind.DEFAULT, null, fieldClass);
    } catch (EdmSimpleTypeException ex) {
      throw new AnnotationRuntimeException("Conversion failed for string property ["
          + propertyValue + "] on field ["
          + field + "] with error: " + ex.getMessage(), ex);
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind

  private Object convert(final Field field, final String propertyValue) {
    Class<?> fieldClass = field.getType();
    try {
      EdmProperty property = field.getAnnotation(EdmProperty.class);
      EdmSimpleTypeKind type = mapTypeKind(property.type());
      return type.getEdmSimpleTypeInstance().valueOfString(propertyValue,
          EdmLiteralKind.DEFAULT, null, fieldClass);
    } catch (EdmSimpleTypeException ex) {
      throw new AnnotationRuntimeException("Conversion failed for string property ["
          + propertyValue + "] on field ["
          + field + "] with error: " + ex.getMessage(), ex);
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind

        throws ODataJPAModelException,
        ODataJPARuntimeException {

      JPAEdmNameBuilder
          .build((JPAEdmPropertyView) JPAEdmProperty.this, isBuildModeComplexType, skipDefaultNaming);
      EdmSimpleTypeKind simpleTypeKind = JPATypeConvertor
          .convertToEdmSimpleType(jpaAttribute
              .getJavaType(), jpaAttribute);
      simpleProperty.setType(simpleTypeKind);
      JPAEdmFacets.setFacets(jpaAttribute, simpleProperty);
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind

import org.apache.olingo.odata2.api.edm.provider.Facets;
import org.apache.olingo.odata2.api.edm.provider.SimpleProperty;

public class JPAEdmFacets {
  public static void setFacets(final Attribute<?, ?> jpaAttribute, final SimpleProperty edmProperty) {
    EdmSimpleTypeKind edmTypeKind = edmProperty.getType();
    Facets facets = new Facets();
    edmProperty.setFacets(facets);

    Column column = null;
    if (jpaAttribute.getJavaMember() instanceof AnnotatedElement) {
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind

                .addContent(method.getDeclaringClass(), method.getName(), methodReturnType.getSimpleName()), null);
          }
          functionReturnType.setTypeName(JPAEdmNameBuilder.build(schemaView, edmEntityType.getName()));
          break;
        case SIMPLE:
          EdmSimpleTypeKind edmSimpleTypeKind = JPATypeConvertor.convertToEdmSimpleType(methodReturnType, null);
          functionReturnType.setTypeName(edmSimpleTypeKind.getFullQualifiedName());

          break;
        case COMPLEX:
          String embeddableTypeName = null;
          ComplexType complexType = null;
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind

import org.apache.olingo.odata2.api.edm.provider.Facets;
import org.apache.olingo.odata2.api.edm.provider.SimpleProperty;

public class JPAEdmFacets {
  public static void setFacets(final Attribute<?, ?> jpaAttribute, final SimpleProperty edmProperty) {
    EdmSimpleTypeKind edmTypeKind = edmProperty.getType();
    Facets facets = new Facets();
    edmProperty.setFacets(facets);

    Column column = null;
    if (jpaAttribute.getJavaMember() instanceof AnnotatedElement) {
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind

          }
          functionReturnType.setTypeName(JPAEdmNameBuilder.build(schemaView, edmEntityType.getName()));
          break;
        case SCALAR:

          EdmSimpleTypeKind edmSimpleTypeKind = JPATypeConvertor.convertToEdmSimpleType(methodReturnType, null);
          functionReturnType.setTypeName(edmSimpleTypeKind.getFullQualifiedName());

          break;
        case COMPLEX_TYPE:
          ComplexType complexType = null;
          if (multiplicity == Multiplicity.ONE) {
View Full Code Here

Examples of org.apache.olingo.odata2.api.edm.EdmSimpleTypeKind

          currentSimpleProperty = new SimpleProperty();
          JPAEdmNameBuilder
              .build((JPAEdmPropertyView) JPAEdmProperty.this, isBuildModeComplexType);

          EdmSimpleTypeKind simpleTypeKind = JPATypeConvertor
              .convertToEdmSimpleType(currentAttribute
                  .getJavaType(), currentAttribute);

          currentSimpleProperty.setType(simpleTypeKind);
          JPAEdmFacets.setFacets(currentAttribute, currentSimpleProperty);
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.