private Property readComplexProperty(final XMLStreamReader reader, final FullQualifiedName fqName) throws XMLStreamException { ComplexProperty property = new ComplexProperty(); property.setName(reader.getAttributeValue(null, XmlMetadataConstants.EDM_NAME)); property.setType(fqName); return property; }
private Property readComplexProperty(final XMLStreamReader reader, final FullQualifiedName fqName) throws XMLStreamException { ComplexProperty property = new ComplexProperty(); property.setName(reader.getAttributeValue(null, XmlMetadataConstants.EDM_NAME)); property.setType(fqName); return property; }
private Property readComplexProperty(final XMLStreamReader reader, final FullQualifiedName fqName) throws XMLStreamException { ComplexProperty property = new ComplexProperty(); property.setName(reader.getAttributeValue(null, XmlMetadataConstants.EDM_NAME)); property.setType(fqName); return property; }
private Property createComplexProperty(final Field field) { ComplexProperty cp = new ComplexProperty(); // settings from property String entityName = ANNOTATION_HELPER.getPropertyName(field); cp.setName(entityName); // settings from related complex entity FullQualifiedName fqn = ANNOTATION_HELPER.extractComplexTypeFqn(field.getType()); cp.setType(fqn); return cp; }
private Property createComplexProperty(final Field field, final String defaultNamespace) { ComplexProperty cp = new ComplexProperty(); // settings from property String entityName = ANNOTATION_HELPER.getPropertyName(field); cp.setName(entityName); // settings from related complex entity EdmComplexType ece = field.getType().getAnnotation(EdmComplexType.class); String complexEntityNamespace = ece.namespace(); if (complexEntityNamespace.isEmpty()) { complexEntityNamespace = defaultNamespace; } cp.setType(new FullQualifiedName(complexEntityNamespace, ece.name())); return cp; }
private Property createComplexProperty(EdmProperty ep, final Field field) { ComplexProperty cp = new ComplexProperty(); // settings from property String entityName = ANNOTATION_HELPER.getPropertyName(field); cp.setName(entityName); // settings from related complex entity FullQualifiedName fqn = ANNOTATION_HELPER.extractComplexTypeFqn(field.getType()); cp.setType(fqn); cp.setFacets(createFacets(ep.facets(), field.getAnnotation(EdmConcurrencyControl.class))); return cp; }
public static void build(final JPAEdmComplexPropertyView complexView, final String parentComplexTypeName, final boolean skipDefaultNaming) { ComplexProperty complexProperty = complexView.getEdmComplexProperty(); JPAEdmMappingModelAccess mappingModelAccess = complexView.getJPAEdmMappingModelAccess(); JPAEdmPropertyView propertyView = ((JPAEdmPropertyView) complexView); String jpaAttributeName = propertyView.getJPAAttribute().getName(); String propertyName = null; if (mappingModelAccess != null && mappingModelAccess.isMappingModelExists()) { propertyName = mappingModelAccess.mapJPAEmbeddableTypeAttribute(parentComplexTypeName, jpaAttributeName); } if (skipDefaultNaming == false && propertyName == null) { propertyName = Character.toUpperCase(jpaAttributeName.charAt(0)) + jpaAttributeName.substring(1); } else if (propertyName == null) { propertyName = jpaAttributeName; } JPAEdmMapping mapping = new JPAEdmMappingImpl(); ((Mapping) mapping).setInternalName(jpaAttributeName); mapping.setJPAType(propertyView.getJPAAttribute().getJavaType()); complexProperty.setMapping((Mapping) mapping); complexProperty.setName(propertyName); }
public static void build(final JPAEdmComplexPropertyView complexView, final String parentComplexTypeName, final boolean skipDefaultNaming) { ComplexProperty complexProperty = complexView.getEdmComplexProperty(); JPAEdmMappingModelAccess mappingModelAccess = complexView.getJPAEdmMappingModelAccess(); JPAEdmPropertyView propertyView = ((JPAEdmPropertyView) complexView); String jpaAttributeName = propertyView.getJPAAttribute().getName(); String propertyName = null; if (mappingModelAccess != null && mappingModelAccess.isMappingModelExists()) { propertyName = mappingModelAccess.mapJPAEmbeddableTypeAttribute(parentComplexTypeName, jpaAttributeName); } if (skipDefaultNaming == false && propertyName == null) { propertyName = Character.toUpperCase(jpaAttributeName.charAt(0)) + jpaAttributeName.substring(1); } else if (propertyName == null) { propertyName = jpaAttributeName; } JPAEdmMapping mapping = new JPAEdmMappingImpl(); ((Mapping) mapping).setInternalName(jpaAttributeName); mapping.setJPAType(propertyView.getJPAAttribute().getJavaType()); complexProperty.setMapping((Mapping) mapping); complexProperty.setName(propertyName); }
public static void build(final JPAEdmComplexPropertyView complexView, final JPAEdmPropertyView propertyView, final boolean skipDefaultNaming) { ComplexProperty complexProperty = complexView.getEdmComplexProperty(); String jpaAttributeName = propertyView.getJPAAttribute().getName(); String jpaEntityTypeName = propertyView.getJPAEdmEntityTypeView().getJPAEntityType().getName(); JPAEdmMappingModelAccess mappingModelAccess = complexView.getJPAEdmMappingModelAccess(); String propertyName = null; if (mappingModelAccess != null && mappingModelAccess.isMappingModelExists()) { propertyName = mappingModelAccess.mapJPAAttribute(jpaEntityTypeName, jpaAttributeName); } if (skipDefaultNaming == false && propertyName == null) { propertyName = Character.toUpperCase(jpaAttributeName.charAt(0)) + jpaAttributeName.substring(1); } else if (propertyName == null) { propertyName = jpaAttributeName; } // change for navigation property issue JPAEdmMapping mapping = new JPAEdmMappingImpl(); ((Mapping) mapping).setInternalName(jpaAttributeName); mapping.setJPAType(propertyView.getJPAAttribute().getJavaType()); complexProperty.setMapping((Mapping) mapping); complexProperty.setName(propertyName); }
public static void build(final JPAEdmComplexPropertyView complexView, final JPAEdmPropertyView propertyView, final boolean skipDefaultNaming) { ComplexProperty complexProperty = complexView.getEdmComplexProperty(); String jpaAttributeName = propertyView.getJPAAttribute().getName(); String jpaEntityTypeName = propertyView.getJPAEdmEntityTypeView().getJPAEntityType().getName(); JPAEdmMappingModelAccess mappingModelAccess = complexView.getJPAEdmMappingModelAccess(); String propertyName = null; if (mappingModelAccess != null && mappingModelAccess.isMappingModelExists()) { propertyName = mappingModelAccess.mapJPAAttribute(jpaEntityTypeName, jpaAttributeName); } if (skipDefaultNaming == false && propertyName == null) { propertyName = Character.toUpperCase(jpaAttributeName.charAt(0)) + jpaAttributeName.substring(1); } else if (propertyName == null) { propertyName = jpaAttributeName; } // change for navigation property issue JPAEdmMapping mapping = new JPAEdmMappingImpl(); ((Mapping) mapping).setInternalName(jpaAttributeName); mapping.setJPAType(propertyView.getJPAAttribute().getJavaType()); complexProperty.setMapping((Mapping) mapping); complexProperty.setName(propertyName); }