if (isNullable != null || maxLength != null || precision != null || scale != null || isFixedLength != null || isUnicode != null || concurrencyMode != null || defaultValue != null || collation != null) { EdmFacets facets = new Facets(); if (isNullable != null) { ((Facets) facets).setNullable("true".equalsIgnoreCase(isNullable));
if (isNullable != null || maxLength != null || precision != null || scale != null || isFixedLength != null || isUnicode != null || concurrencyMode != null || defaultValue != null || collation != null) { Facets facets = new Facets(); if (isNullable != null) { facets.setNullable("true".equalsIgnoreCase(isNullable));
if (isNullable != null || maxLength != null || precision != null || scale != null || isFixedLength != null || isUnicode != null || concurrencyMode != null || defaultValue != null || collation != null) { Facets facets = new Facets(); if (isNullable != null) { facets.setNullable("true".equalsIgnoreCase(isNullable));
if (isNullable != null || maxLength != null || precision != null || scale != null || isFixedLength != null || isUnicode != null || concurrencyMode != null || defaultValue != null || collation != null) { Facets facets = new Facets(); if (isNullable != null) { facets.setNullable("true".equalsIgnoreCase(isNullable));
public void normalizeComplexKey(final ComplexType complexType, final List<PropertyRef> propertyRefList) { for (Property property : complexType.getProperties()) { try { SimpleProperty simpleProperty = (SimpleProperty) property; Facets facets = (Facets) simpleProperty.getFacets(); if (facets == null) { simpleProperty.setFacets(new Facets().setNullable(false)); } else { facets.setNullable(false); } PropertyRef propertyRef = new PropertyRef(); propertyRef.setName(simpleProperty.getName()); propertyRefList.add(propertyRef); } catch (ClassCastException e) { ComplexProperty complexProperty = (ComplexProperty) property; normalizeComplexKey(complexTypeView.searchEdmComplexType(complexProperty.getType()), propertyRefList); } } } }
public void normalizeComplexKey(final ComplexType complexType, final List<PropertyRef> propertyRefList) { for (Property property : complexType.getProperties()) { try { SimpleProperty simpleProperty = (SimpleProperty) property; Facets facets = (Facets) simpleProperty.getFacets(); if (facets == null) { simpleProperty.setFacets(new Facets().setNullable(false)); } else { facets.setNullable(false); } PropertyRef propertyRef = new PropertyRef(); propertyRef.setName(simpleProperty.getName()); propertyRefList.add(propertyRef); } catch (ClassCastException e) { ComplexProperty complexProperty = (ComplexProperty) property; normalizeComplexKey(complexTypeView.searchEdmComplexType(complexProperty.getType()), propertyRefList); } } } }
@Override public void build() throws ODataJPAModelException { List<PropertyRef> propertyRefList = null; if (key == null) { key = new Key(); } if (key.getKeys() == null) { propertyRefList = new ArrayList<PropertyRef>(); key.setKeys(propertyRefList); } else { propertyRefList = key.getKeys(); } if (isBuildModeComplexType) { ComplexType complexType = complexTypeView.searchEdmComplexType(propertyView.getJPAAttribute().getJavaType().getName()); normalizeComplexKey(complexType, propertyRefList); } else { PropertyRef propertyRef = new PropertyRef(); propertyRef.setName(propertyView.getEdmSimpleProperty().getName()); Facets facets = (Facets) propertyView.getEdmSimpleProperty().getFacets(); if (facets == null) { propertyView.getEdmSimpleProperty().setFacets(new Facets().setNullable(false)); } else { facets.setNullable(false); } propertyRefList.add(propertyRef); } }
@Override public void build() throws ODataJPAModelException { List<PropertyRef> propertyRefList = null; if (key == null) { key = new Key(); } if (key.getKeys() == null) { propertyRefList = new ArrayList<PropertyRef>(); key.setKeys(propertyRefList); } else { propertyRefList = key.getKeys(); } if (isBuildModeComplexType) { ComplexType complexType = complexTypeView.searchEdmComplexType(propertyView.getJPAAttribute().getJavaType().getName()); normalizeComplexKey(complexType, propertyRefList); } else { PropertyRef propertyRef = new PropertyRef(); propertyRef.setName(propertyView.getEdmSimpleProperty().getName()); Facets facets = (Facets) propertyView.getEdmSimpleProperty().getFacets(); if (facets == null) { propertyView.getEdmSimpleProperty().setFacets(new Facets().setNullable(false)); } else { facets.setNullable(false); } propertyRefList.add(propertyRef); } }
Facets facets = new Facets(); if (annotation.facets().maxLength() > 0) { facets.setMaxLength(annotation.facets().maxLength());
Facets facets = new Facets(); if (annotation.facets().maxLength() > 0) { facets.setMaxLength(annotation.facets().maxLength());
private Facets createFacets(final EdmFacets facets, final EdmConcurrencyControl concurrencyControl) { Facets resultFacets = new Facets().setNullable(facets.nullable()); if(facets.maxLength() > -1) { resultFacets.setMaxLength(facets.maxLength()); } if(facets.precision() > -1) { resultFacets.setPrecision(facets.precision()); } if(facets.scale() > -1) { resultFacets.setScale(facets.scale()); } if (concurrencyControl != null) { resultFacets.setConcurrencyMode(EdmConcurrencyMode.Fixed); } return resultFacets; }
Facets facets = new Facets(); edmProperty.setFacets(facets);
Facets facets = new Facets(); edmProperty.setFacets(facets);
private Facets createFacets(final EdmFacets facets, final EdmConcurrencyControl concurrencyControl) { Facets resultFacets = new Facets().setNullable(facets.nullable()); if(facets.maxLength() > -1) { resultFacets.setMaxLength(facets.maxLength()); } if(facets.precision() > -1) { resultFacets.setPrecision(facets.precision()); } if(facets.scale() > -1) { resultFacets.setScale(facets.scale()); } if (concurrencyControl != null) { resultFacets.setConcurrencyMode(EdmConcurrencyMode.Fixed); } return resultFacets; }